6 #include "VsMovableItem.h"
9 #include "VsMotorizedJoint.h"
10 #include "VsRigidBody.h"
13 #include "VsSimulator.h"
14 #include "VsOsgUserData.h"
15 #include "VsOsgUserDataVisitor.h"
16 #include "VsDragger.h"
42 {
Std_TraceMsg(0,
"Caught Error in desctructor of VsSphere/\r\n",
"", -1,
false,
true);}
45 void VsSphere::CreateGraphicsGeometry()
50 void VsSphere::CalculateEstimatedMassAndVolume()
57 void VsSphere::CreatePhysicsGeometry()
62 CalculateEstimatedMassAndVolume();
69 VsRigidBody::CreateItem();
70 Sphere::CreateParts();
71 VsRigidBody::SetBody();
79 Sphere::CreateJoints();
80 VsRigidBody::Initialize();
83 void VsSphere::ResizePhysicsGeometry()
87 VxSphere *vxSphere =
dynamic_cast<VxSphere *
>(m_vxGeometry);
90 THROW_TEXT_ERROR(Vs_Err_lGeometryMismatch, Vs_Err_strGeometryMismatch, m_lpThisAB->Name());
94 CalculateEstimatedMassAndVolume();
virtual bool IsCollisionObject()
Query if this object is collision object.
float m_fltEstimatedVolume
The estimated volume. See m_fltEstimatedMass desciption.
Simulator * m_lpSim
The pointer to a Simulation.
virtual void DistanceUnits(std::string strUnits)
Sets the distance units.
virtual void CreateParts()
Allows the rigid body to create its parts using the chosen physics engine.
virtual void CreateJoint()
Creates the joint.
virtual float DisplayMassUnits()
Gets the density mass units.
float m_fltDensity
Uniform density for the rigid body.
osg::Geometry * CreateSphereGeometry(int latres, int longres, float radius)
float m_fltRadius
The radius of the sphere.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
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 CreateJoints()
Allows the rigid body to create its joints using the chosen physics engine.
virtual int LongtitudeSegments()
Gets the longtitude segments.
Joint * m_lpJointToParent
virtual int LatitudeSegments()
Gets the latitude segments.
Declares the vortex structure class.