9 #include "BlMotorizedJoint.h"
10 #include "BlRigidBody.h"
12 #include "BlSimulator.h"
30 m_bCullBackfaces =
true;
47 {
Std_TraceMsg(0,
"Caught Error in desctructor of BlPlane/\r\n",
"", -1,
false,
true);}
50 void BlPlane::CreateGraphicsGeometry()
55 void BlPlane::CreatePhysicsGeometry()
59 DeleteCollisionGeometry();
64 OsgMovableItem::UpdatePositionAndRotationFromMatrix(m_osgMT->getMatrix());
67 m_eBodyType = STATIC_PLANE_PROXYTYPE;
68 m_btCollisionShape =
new btStaticPlaneShape(btVector3(0,1,0), vPos.y);
77 m_eControlType = DynamicsControlType::ControlNode;
79 BlRigidBody::CreateItem();
83 void BlPlane::CreateDynamicPart()
87 if(lpSim && m_lpThisRB && m_lpThisAB)
90 btRigidBody::btRigidBodyConstructionInfo rbInfo( 0., NULL, m_btCollisionShape, btVector3(0,0,0) );
95 rbInfo.m_linearDamping = m_lpThisRB->LinearVelocityDamping();
96 rbInfo.m_angularDamping = m_lpThisRB->AngularVelocityDamping();
98 m_btPart =
new btRigidBody(rbInfo);
102 m_btPart->setUserPointer((
void *) m_lpBulletData);
104 lpSim->DynamicsWorld()->addRigidBody( m_btPart, AnimatCollisionTypes::RIGID_BODY, ALL_COLLISIONS );
106 m_osgbMotion =
dynamic_cast<osgbDynamics::MotionState *
>(m_btPart->getMotionState());
116 void BlPlane::Physics_FluidDataChanged()
Declares the vortex plane class.
virtual float FrictionAngularPrimaryConverted()
Gets the angular primary friction coefficient converted to match vortex values.
virtual void CreateParts()
Allows the rigid body to create its parts using the chosen physics engine.
virtual bool IsCollisionObject()
Query if this object is collision object.
virtual float GridY()
Gets the length of a segment for the y dimension of the plane.
virtual ~BlPlane()
Destructor.
float m_fltMass
The mass of the object.
virtual float CornerX()
Gets the corner x coordinate.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
AnimatSim::Environment::Structure * m_lpStructure
The pointer to this items parent Structure. If this is not relevant for this object then this is NULL...
virtual float GridX()
Gets the width of a segment for the x dimension of the plane.
virtual CStdFPoint Position()
Gets the local position. (m_oPosition)
BlPlane()
Default constructor.
virtual float Restitution()
Gets the restitution for collisions between RigidBodies with these two materials. ...
virtual float FrictionLinearPrimary()
Gets the primary friction coefficient.
void Std_TraceMsg(const int iLevel, std::string strMessage, std::string strSourceFile, int iSourceLine, bool bLogToFile, bool bPrintHeader)
Traces a message to the debugger window.
BlMaterialType * m_lpMaterial
The pointer to the material for this body.
virtual float CornerY()
Gets the corner y coordinate.