AnimatLab  2
Test
RbHingeLimit.cpp
1 
2 #include "StdAfx.h"
3 #include "RbMovableItem.h"
4 #include "RbBody.h"
5 #include "RbJoint.h"
6 #include "RbMotorizedJoint.h"
7 #include "RbRigidBody.h"
8 #include "RbHinge.h"
9 #include "RbHingeLimit.h"
10 #include "RbSimulator.h"
11 
12 namespace RoboticsAnimatSim
13 {
14  namespace Environment
15  {
16  namespace Joints
17  {
18 
19 RbHingeLimit::RbHingeLimit()
20 {
21 }
22 
23 RbHingeLimit::~RbHingeLimit()
24 {
25 }
26 
28 {
29  //Hinge *lpHinge = dynamic_cast<Hinge *>(m_lpJoint);
30 
31  // if(lpHinge)
32  // RbHingeLimit::SetLimitPos(lpHinge->CylinderHeight());
33 
35  //SetLimitValues();
36 }
37 
39 {
40  RbHinge *lpHinge = dynamic_cast<RbHinge *>(m_lpJoint);
41 
42  //Do not want to call this repeatedly if we are the flap limit.
43  if(lpHinge && !m_bIsShowPosition)
44  lpHinge->SetLimitValues();
45 }
46 
47  } //Bodies
48  } // Environment
49 } //RoboticsAnimatSim
virtual void SetLimitValues()
Sets the limit values of the joint in the child object.
virtual void SetLimitPos()
Sets the limit position using the current value set within the object.
Joint * m_lpJoint
Pointer to parent joint.
Declares the vortex hinge class.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.