Newton Dynamics  4.00
ndBody Class Referenceabstract
Inheritance diagram for ndBody:
ndContainersFreeListAlloc< ndBody > ndFreeListAlloc ndBodyKinematic ndBodyParticleSet ndBodyDynamic ndBodyKinematicBase ndBodySentinel ndBodySphFluid ndBodyPlayerCapsule ndBodyTriggerVolume

Public Member Functions

 D_CLASS_REFLECTION (ndBody)
 
D_COLLISION_API ndBody (const ndLoadSaveBase::ndLoadDescriptor &desc)
 
virtual ndBodyGetAsBody ()
 
virtual ndBodyDynamicGetAsBodyDynamic ()
 
virtual ndBodySentinelGetAsBodySentinel ()
 
virtual ndBodySphFluidGetAsBodySphFluid ()
 
virtual ndBodyKinematicGetAsBodyKinematic ()
 
virtual ndBodyParticleSetGetAsBodyParticleSet ()
 
virtual ndBodyPlayerCapsuleGetAsBodyPlayerCapsule ()
 
virtual ndBodyTriggerVolumeGetAsBodyTriggerVolume ()
 
virtual ndBodyKinematicBaseGetAsBodyKinematicSpecial ()
 
ndUnsigned32 GetId () const
 
void GetAABB (ndVector &p0, ndVector &p1) const
 
virtual ndFloat32 GetInvMass () const
 
virtual bool RayCast (ndRayCastNotify &callback, const ndFastRay &ray, const ndFloat32 maxT) const =0
 
const ndVectorGetCentreOfMass () const
 
virtual D_COLLISION_API void SetCentreOfMass (const ndVector &com)
 
ndBodyNotifyGetNotifyCallback () const
 
ndVector GetOmega () const
 
ndMatrix GetMatrix () const
 
ndVector GetVelocity () const
 
ndVector GetPosition () const
 
ndQuaternion GetRotation () const
 
ndVector GetGlobalGetCentreOfMass () const
 
virtual D_COLLISION_API void SetNotifyCallback (ndBodyNotify *const notify)
 
virtual D_COLLISION_API void SetOmega (const ndVector &veloc)
 
virtual D_COLLISION_API void SetVelocity (const ndVector &veloc)
 
virtual D_COLLISION_API void SetMatrix (const ndMatrix &matrix)
 
virtual D_COLLISION_API void Save (const ndLoadSaveBase::ndSaveDescriptor &desc) const
 
D_COLLISION_API ndVector GetVelocityAtPoint (const ndVector &point) const
 
D_COLLISION_API void SetOmegaNoSleep (const ndVector &veloc)
 
D_COLLISION_API void SetVelocityNoSleep (const ndVector &veloc)
 
D_COLLISION_API void SetMatrixNoSleep (const ndMatrix &matrix)
 
D_COLLISION_API void SetMatrixAndCentreOfMass (const ndQuaternion &rotation, const ndVector &globalcom)
 
- Public Member Functions inherited from ndFreeListAlloc
D_CORE_API void * operator new (size_t size)
 
D_CORE_API void operator delete (void *ptr)
 

Protected Member Functions

virtual void AttachContact (ndContact *const)
 
virtual void DetachContact (ndContact *const)
 
virtual ndContactFindContact (const ndBody *const) const
 

Static Protected Member Functions

static D_COLLISION_API const nd::TiXmlNodeFindNode (const nd::TiXmlNode *const rootNode, const char *const name)
 

Protected Attributes

ndMatrix m_matrix
 
ndVector m_veloc
 
ndVector m_omega
 
ndVector m_localCentreOfMass
 
ndVector m_globalCentreOfMass
 
ndVector m_minAabb
 
ndVector m_maxAabb
 
ndQuaternion m_rotation
 
ndBodyNotifym_notifyCallback
 
ndUnsigned32 m_uniqueId
 
union {
   ndUnsigned32   m_flags
 
   struct {
      ndUnsigned32   m_isDynamics: 1
 
      ndUnsigned32   m_skeletonMark: 1
 
      ndUnsigned32   m_skeletonMark0: 1
 
      ndUnsigned32   m_skeletonMark1: 1
 
      ndUnsigned32   m_contactTestOnly: 1
 
      ndUnsigned32   m_transformIsDirty: 1
 
      ndUnsigned32   m_equilibriumOverride: 1
 
   } 
 
}; 
 
ndUnsigned8 m_isStatic
 
ndUnsigned8 m_autoSleep
 
ndUnsigned8 m_equilibrium
 
ndUnsigned8 m_equilibrium0
 
ndUnsigned8 m_isJointFence0
 
ndUnsigned8 m_isJointFence1
 
ndUnsigned8 m_isConstrained
 
ndUnsigned8 m_sceneForceUpdate
 
ndUnsigned8 m_sceneEquilibrium
 
ndUnsigned8 m_markedForRemoved
 

Static Protected Attributes

static D_COLLISION_API ndUnsigned32 m_uniqueIdCount = 0
 

Friends

class ndWorld
 
class ndScene
 
class ndConstraint
 
class ndBodyPlayerCapsuleImpulseSolver
 

Additional Inherited Members

- Static Public Member Functions inherited from ndContainersFreeListAlloc< ndBody >
static void FlushFreeList (ndInt32 size)
 
- Static Public Member Functions inherited from ndFreeListAlloc
static D_CORE_API void Flush ()
 
static D_CORE_API void Flush (ndInt32 size)