8 #include "BlOsgGeometry.h"
10 #include "BlRigidBody.h"
12 #include "BlSimulator.h"
32 BlEllipsoid::~BlEllipsoid()
40 {
Std_TraceMsg(0,
"Caught Error in desctructor of BlEllipsoid/\r\n",
"", -1,
false,
true);}
43 void BlEllipsoid::CreateGraphicsGeometry()
48 void BlEllipsoid::CreatePhysicsGeometry()
52 DeleteCollisionGeometry();
54 m_eBodyType = CONVEX_HULL_SHAPE_PROXYTYPE;
55 CalculateVolumeAndAreas();
56 m_btCollisionShape = OsgMeshToConvexHull(m_osgNode.get(),
true, -1);
61 void BlEllipsoid::CalculateVolumeAndAreas()
69 Mass(fltMass,
false,
false);
77 BlRigidBody::CreateItem();
78 Ellipsoid::CreateParts();
86 Ellipsoid::CreateJoints();
87 BlRigidBody::Initialize();
virtual bool IsCollisionObject()
Query if this object is collision object.
float m_fltMinorRadius
The radius of the minor axis of the ellipsoid.
float m_fltMass
The mass of the object.
float m_fltMajorRadius
The radius of the major axis of the ellipsoid.
float m_fltVolume
The volume for the rigid body.
virtual void CreateParts()
Allows the rigid body to create its parts using the chosen physics engine.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
virtual void CreateJoint()
Creates the joint.
BlEllipsoid()
Default constructor.
virtual void CreateJoints()
Allows the rigid body to create its joints using the chosen physics engine.
float m_fltDensity
Uniform density for the rigid body.
int m_iLatSegments
The number of segments used to draw in the latitude direction.
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.
Declares the vortex ellipsoid class.
Joint * m_lpJointToParent
int m_iLongSegments
The number of segments used to draw in the longtitude direction.