7 #include "BlMotorizedJoint.h"
8 #include "BlRigidBody.h"
9 #include "BlCylinder.h"
10 #include "BlSimulator.h"
23 BlCylinder::BlCylinder()
28 BlCylinder::~BlCylinder()
36 {
Std_TraceMsg(0,
"Caught Error in desctructor of BlCylinder\r\n",
"", -1,
false,
true);}
39 void BlCylinder::CreateGraphicsGeometry()
44 CStdFPoint vPos(0, 0, 0), vRot(-(osg::PI/2), 0, 0);
45 GeometryRotationMatrix(SetupMatrix(vPos, vRot));
48 void BlCylinder::CreatePhysicsGeometry()
52 DeleteCollisionGeometry();
54 CalculateVolumeAndAreas();
55 m_eBodyType = CYLINDER_SHAPE_PROXYTYPE;
60 void BlCylinder::CalculateVolumeAndAreas()
71 Mass(fltMass,
false,
false);
79 BlRigidBody::CreateItem();
80 Cylinder::CreateParts();
88 Cylinder::CreateJoints();
89 BlRigidBody::Initialize();
virtual bool IsCollisionObject()
Query if this object is collision object.
float m_fltRadius
The radius of the cylinder.
int m_iSides
The number of sides used to draw the cylinder.
float m_fltMass
The mass of the object.
float m_fltVolume
The volume for the rigid body.
virtual void CreateJoints()
Allows the rigid body to create its joints using the chosen physics engine.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
float m_fltHeight
The height of the cylinder.
virtual void CreateJoint()
Creates the joint.
float m_fltDensity
Uniform density for the rigid body.
osg::Geometry ANIMAT_OSG_PORT * CreateConeGeometry(float height, float topradius, float botradius, int sides, bool doSide, bool doTop, bool doBottom)
virtual void CreateParts()
Allows the rigid body to create its parts using the chosen physics engine.
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.
Joint * m_lpJointToParent