AnimatLab  2
Test
RbPrismaticLimit.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 "RbPrismaticLimit.h"
9 #include "RbPrismatic.h"
10 #include "RbSimulator.h"
11 
12 namespace RoboticsAnimatSim
13 {
14  namespace Environment
15  {
16  namespace Joints
17  {
18 
19 RbPrismaticLimit::RbPrismaticLimit()
20 {
21  //OsgPrismaticLimit::SetConstraintLimit(this);
22 }
23 
24 RbPrismaticLimit::~RbPrismaticLimit()
25 {
26 }
27 
29 {
30  //CStdFPoint vPos(0, 0, 0), vRot(0, 0, 0);
31 
32  //Prismatic *lpPrismatic = dynamic_cast<Prismatic *>(m_lpJoint);
33  // if(lpPrismatic)
34  // OsgPrismaticLimit::SetLimitPos(lpPrismatic->CylinderRadius());
35 
37  //SetLimitValues();
38 }
39 
41 {
42  RbPrismatic *lpPrismatic = dynamic_cast<RbPrismatic *>(m_lpJoint);
43 
44  //Do not want to call this repeatedly if we are the flap limit.
45  if(lpPrismatic && !m_bIsShowPosition)
46  lpPrismatic->SetLimitValues();
47 }
48 
49  } //Bodies
50  } // Environment
51 } //RoboticsAnimatSim
Joint * m_lpJoint
Pointer to parent joint.
Declares the vs prismatic class.
virtual void SetLimitPos()
Sets the limit position using the current value set within the object.
virtual void SetLimitValues()
Sets the limit values of the joint in the child object.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.