7 #include "BlMotorizedJoint.h"
8 #include "BlRigidBody.h"
10 #include "BlSimulator.h"
36 {
Std_TraceMsg(0,
"Caught Error in desctructor of BlSphere/\r\n",
"", -1,
false,
true);}
39 void BlSphere::CreateGraphicsGeometry()
44 void BlSphere::CreatePhysicsGeometry()
48 DeleteCollisionGeometry();
50 CalculateVolumeAndAreas();
51 m_eBodyType = SPHERE_SHAPE_PROXYTYPE;
52 m_btCollisionShape =
new btSphereShape(
m_fltRadius );
56 void BlSphere::CalculateVolumeAndAreas()
64 Mass(fltMass,
false,
false);
72 BlRigidBody::CreateItem();
73 Sphere::CreateParts();
81 Sphere::CreateJoints();
82 BlRigidBody::Initialize();
virtual bool IsCollisionObject()
Query if this object is collision object.
virtual void CreateJoints()
Allows the rigid body to create its joints using the chosen physics engine.
float m_fltMass
The mass of the object.
float m_fltVolume
The volume for the rigid body.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
virtual void CreateJoint()
Creates the joint.
float m_fltDensity
Uniform density for the rigid body.
float m_fltRadius
The radius of the sphere.
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.
virtual void CreateParts()
Allows the rigid body to create its parts using the chosen physics engine.
virtual int LongtitudeSegments()
Gets the longtitude segments.
Joint * m_lpJointToParent
virtual int LatitudeSegments()
Gets the latitude segments.
osg::Geometry ANIMAT_OSG_PORT * CreateSphereGeometry(int latres, int longres, float radius)