My Project: dgDeformableBody Class Reference

My Project

Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
dgDeformableBody Class Reference

`#include <dgDeformableBody.h>`

Inheritance diagram for dgDeformableBody:

## Public Member Functions

| dgDeformableBody ()
| dgDeformableBody (dgWorld *const world, const dgTree< const dgCollision *, dgInt32 > *const collisionNode, dgDeserialize serializeCallback, void *const userData)
virtual | ~dgDeformableBody ()
virtual void | Serialize (const dgTree< dgInt32, const dgCollision *> *const collisionNode, dgSerialize serializeCallback, void *const userData)
Public Member Functions inherited from dgBody
| dgBody ()
| dgBody (dgWorld *const world, const dgTree< const dgCollision *, dgInt32 > *const collisionNode, dgDeserialize serializeCallback, void *const userData)
virtual | ~dgBody ()
dgType | GetType () const
dgInt32 | IsRTTIType (dgUnsigned32 rtti) const
void * | GetUserData () const
void | SetUserData (void *const userData)
dgWorld * | GetWorld () const
const dgMatrix & | GetMatrix () const
const dgQuaternion & | GetRotation () const
const dgVector & | GetPosition () const
void | SetCentreOfMass (const dgVector &com)
const dgVector & | GetCentreOfMass () const
void | GetAABB (dgVector &p0, dgVector &p1) const
const dgVector & | GetOmega () const
const dgVector & | GetVelocity () const
const dgVector & | GetNetForce () const
const dgVector & | GetNetTorque () const
dgVector | GetVelocityAtPoint (const dgVector &point) const
void | SetOmega (const dgVector &omega)
void | SetVelocity (const dgVector &velocity)
dgUnsigned32 | GetGroupID () const
virtual void | SetGroupID (dgUnsigned32 id)
dgInt32 | GetUniqueID () const
bool | GetContinueCollisionMode () const
void | SetContinueCollisionMode (bool mode)
bool | GetCollisionWithLinkedBodies () const
void | SetCollisionWithLinkedBodies (bool state)
void | Freeze ()
void | Unfreeze ()
bool | GetFreeze () const
void | SetFreeze (bool state)
bool | GetSleepState () const
void | SetSleepState (bool state)
bool | GetAutoSleep () const
void | SetAutoSleep (bool state)
dgCollisionInstance * | GetCollision () const
dgBodyMasterList::dgListNode * | GetMasterList () const
OnBodyDestroy | GetDestructorCallback () const
void | SetDestructorCallback (OnBodyDestroy destructor)
OnMatrixUpdateCallback | GetMatrixUpdateCallback () const
void | SetMatrixUpdateCallback (OnMatrixUpdateCallback callback)
dgVector | GetMass () const
dgVector | GetInvMass () const
const dgMatrix & | GetInertiaMatrix () const
bool | IsCollidable () const
virtual void | InvalidateCache ()
virtual void | SetMatrixIgnoreSleep (const dgMatrix &matrix)
virtual void | IntegrateVelocity (dgFloat32 timestep)
virtual dgFloat32 | RayCast (const dgLineBox &line, OnRayCastAction filter, OnRayPrecastAction preFilter, void *const userData, dgFloat32 minT) const
virtual dgFloat32 | ConvexRayCast (const dgFastRayTest &ray, const dgCollisionInstance *const convexShape, const dgVector &shapeMinBox, const dgVector &shapeMaxBox, const dgMatrix &origin, const dgVector &shapeVeloc, OnRayCastAction filter, OnRayPrecastAction preFilter, void *const userData, dgFloat32 minT, dgInt32 threadId) const
virtual dgConstraint * | GetFirstJoint () const
virtual dgConstraint * | GetNextJoint (dgConstraint *const joint) const
virtual dgConstraint * | GetFirstContact () const
virtual dgConstraint * | GetNextContact (dgConstraint *const joint) const
virtual dgVector | CalculateInverseDynamicForce (const dgVector &desiredVeloc, dgFloat32 timestep) const
void | SetMatrixOriginAndRotation (const dgMatrix &matrix)

## Protected Member Functions

virtual bool | IsDeformable () const
virtual bool | IsInEquilibrium () const
virtual void | SetMatrix (const dgMatrix &matrix)
virtual void | ApplyExtenalForces (dgFloat32 timestep, dgInt32 threadIndex)
virtual void | SetVelocity (const dgVector &velocity)
virtual void | SetMassMatrix (dgFloat32 mass, dgFloat32 Ix, dgFloat32 Iy, dgFloat32 Iz)
virtual void | SetMassProperties (dgFloat32 mass, const dgCollisionInstance *const collision)
virtual const dgVector & | GetForce () const
virtual const dgVector & | GetTorque () const
virtual void | AddDampingAcceleration ()
virtual void | AddForce (const dgVector &force)
virtual void | SetForce (const dgVector &force)
virtual void | SetTorque (const dgVector &torque)
virtual void | AddTorque (const dgVector &torque)
virtual dgFloat32 | GetLinearDamping () const
virtual dgVector | GetAngularDamping () const
virtual void | SetLinearDamping (dgFloat32 linearDamp)
virtual void | SetAngularDamping (const dgVector &angularDamp)
virtual const dgMatrix & | GetInertiaMatrix () const
virtual dgMatrix | CalculateInertiaMatrix () const
virtual dgMatrix | CalculateInvInertiaMatrix () const
virtual void | AttachCollision (dgCollisionInstance *const collision)
virtual dgVector | PredictLinearVelocity (dgFloat32 timestep) const
virtual dgVector | PredictAngularVelocity (dgFloat32 timestep) const
virtual void | SetCollidable (bool state)
virtual void | AddImpulse (const dgVector &pointVeloc, const dgVector &pointPosit)
virtual void | ApplyImpulsePair (const dgVector &linearImpulse, const dgVector &angularImpulse)
virtual void | ApplyImpulsesAtPoint (dgInt32 count, dgInt32 strideInBytes, const dgFloat32 *const impulseArray, const dgFloat32 *const pointArray)
virtual void | SetExtForceAndTorqueCallback (OnApplyExtForceAndTorque callback)
virtual OnApplyExtForceAndTorque | GetExtForceAndTorqueCallback () const
Protected Member Functions inherited from dgBody
void | UpdateWorlCollisionMatrix () const
void | UpdateMatrix (dgFloat32 timestep, dgInt32 threadIndex)
void | UpdateCollisionMatrix (dgFloat32 timestep, dgInt32 threadIndex)
void | CalcInvInertiaMatrix ()
dgVector | GetApparentMass () const
void | SetAparentMassMatrix (const dgVector &massMatrix)

## Protected Attributes

dgVector | m_force
dgVector | m_torque
OnApplyExtForceAndTorque | m_applyExtForces
Protected Attributes inherited from dgBody
dgMatrix | m_invWorldInertiaMatrix
dgMatrix | m_matrix
dgQuaternion | m_rotation
dgVector | m_mass
dgVector | m_invMass
dgVector | m_veloc
dgVector | m_omega
dgVector | m_minAABB
dgVector | m_maxAABB
dgVector | m_netForce
dgVector | m_netTorque
dgVector | m_localCentreOfMass
dgVector | m_globalCentreOfMass
dgVector | m_aparentMass
dgInt32 | m_index
dgInt32 | m_uniqueID
dgInt32 | m_bodyGroupId
dgInt32 | m_rtti
dgInt32 | m_type
dgUnsigned32 | m_dynamicsLru
dgUnsigned32 | m_genericLRUMark
dgThread::dgCriticalSection | m_criticalSectionLock
union {
dgUnsigned32 m_flags
struct {
dgUnsigned32 m_freeze: 1
dgUnsigned32 m_sleeping: 1
dgUnsigned32 m_autoSleep: 1
dgUnsigned32 m_equilibrium: 1
dgUnsigned32 m_continueCollisionMode: 1
dgUnsigned32 m_spawnnedFromCallback: 1
dgUnsigned32 m_collideWithLinkedBodies: 1
dgUnsigned32 m_inCallback: 1
dgUnsigned32 m_collidable: 1
dgUnsigned32 m_resting: 1
dgUnsigned32 m_active: 1
} |
}; |
void * | m_userData
dgWorld * | m_world
dgCollisionInstance * | m_collision
dgBroadPhase::dgNode * | m_collisionCell
dgBodyMasterList::dgListNode * | m_masterNode
OnBodyDestroy | m_destructor
OnMatrixUpdateCallback | m_matrixUpdate

## Static Protected Attributes

static dgVector | m_dummy

## Additional Inherited Members

Public Types inherited from dgBody
enum | dgRTTI { m_baseBodyRTTI = 1<<0, m_dynamicBodyRTTI = 1<<1, m_kinematicBodyRTTI = 1<<2, m_deformableBodyRTTI = 1<<3 }
enum | dgType { m_dynamicBody = 0, m_kinematicBody, m_deformableBody }
typedef void(dgApi * | OnBodyDestroy) (dgBody &me)
typedef void(dgApi * | OnApplyExtForceAndTorque) (dgBody &me, dgFloat32 timestep, dgInt32 threadIndex)
typedef void(dgApi * | OnMatrixUpdateCallback) (const dgBody &me, const dgMatrix &matrix, dgInt32 threadIndex)

## Constructor & Destructor Documentation

## § dgDeformableBody() [1/2]

dgDeformableBody::dgDeformableBody | ( |  | ) |

## § dgDeformableBody() [2/2]

dgDeformableBody::dgDeformableBody | ( | dgWorld *const | world,
|  | const dgTree< const dgCollision *, dgInt32 > *const | collisionNode,
|  | dgDeserialize | serializeCallback,
|  | void *const | userData
| ) |  |

## § ~dgDeformableBody()

dgDeformableBody::~dgDeformableBody | ( |  | ) |

virtual

## Member Function Documentation

## § AddDampingAcceleration()

virtual void dgDeformableBody::AddDampingAcceleration | ( |  | ) |

inlineprotectedvirtual

Implements dgBody.

## § AddForce()

void dgDeformableBody::AddForce | ( | const dgVector & | force | ) |

protectedvirtual

Implements dgBody.

## § AddImpulse()

virtual void dgDeformableBody::AddImpulse | ( | const dgVector & | pointVeloc,
|  | const dgVector & | pointPosit
| ) |  |

inlineprotectedvirtual

Reimplemented from dgBody.

## § AddTorque()

virtual void dgDeformableBody::AddTorque | ( | const dgVector & | torque | ) |

inlineprotectedvirtual

Implements dgBody.

## § ApplyExtenalForces()

void dgDeformableBody::ApplyExtenalForces | ( | dgFloat32 | timestep,
|  | dgInt32 | threadIndex
| ) |  |

protectedvirtual

Implements dgBody.

## § ApplyImpulsePair()

virtual void dgDeformableBody::ApplyImpulsePair | ( | const dgVector & | linearImpulse,
|  | const dgVector & | angularImpulse
| ) |  |

inlineprotectedvirtual

Reimplemented from dgBody.

## § ApplyImpulsesAtPoint()

virtual void dgDeformableBody::ApplyImpulsesAtPoint | ( | dgInt32 | count,
|  | dgInt32 | strideInBytes,
|  | const dgFloat32 *const | impulseArray,
|  | const dgFloat32 *const | pointArray
| ) |  |

inlineprotectedvirtual

Reimplemented from dgBody.

## § AttachCollision()

void dgDeformableBody::AttachCollision | ( | dgCollisionInstance *const | collision | ) |

protectedvirtual

Reimplemented from dgBody.

## § CalculateInertiaMatrix()

virtual dgMatrix dgDeformableBody::CalculateInertiaMatrix | ( |  | ) | const

inlineprotectedvirtual

Reimplemented from dgBody.

## § CalculateInvInertiaMatrix()

virtual dgMatrix dgDeformableBody::CalculateInvInertiaMatrix | ( |  | ) | const

inlineprotectedvirtual

Reimplemented from dgBody.

## § GetAngularDamping()

virtual dgVector dgDeformableBody::GetAngularDamping | ( |  | ) | const

inlineprotectedvirtual

Implements dgBody.

## § GetExtForceAndTorqueCallback()

dgBody::OnApplyExtForceAndTorque dgDeformableBody::GetExtForceAndTorqueCallback | ( |  | ) | const

protectedvirtual

Implements dgBody.

## § GetForce()

const dgVector & dgDeformableBody::GetForce | ( |  | ) | const

protectedvirtual

Implements dgBody.

## § GetInertiaMatrix()

virtual const dgMatrix& dgDeformableBody::GetInertiaMatrix | ( |  | ) | const

inlineprotectedvirtual

## § GetLinearDamping()

virtual dgFloat32 dgDeformableBody::GetLinearDamping | ( |  | ) | const

inlineprotectedvirtual

Implements dgBody.

## § GetTorque()

virtual const dgVector& dgDeformableBody::GetTorque | ( |  | ) | const

inlineprotectedvirtual

Implements dgBody.

## § IsDeformable()

bool dgDeformableBody::IsDeformable | ( |  | ) | const

inlineprotectedvirtual

## § IsInEquilibrium()

bool dgDeformableBody::IsInEquilibrium | ( |  | ) | const

protectedvirtual

Implements dgBody.

## § PredictAngularVelocity()

virtual dgVector dgDeformableBody::PredictAngularVelocity | ( | dgFloat32 | timestep | ) | const

inlineprotectedvirtual

Implements dgBody.

## § PredictLinearVelocity()

virtual dgVector dgDeformableBody::PredictLinearVelocity | ( | dgFloat32 | timestep | ) | const

inlineprotectedvirtual

Implements dgBody.

## § Serialize()

void dgDeformableBody::Serialize | ( | const dgTree< dgInt32, const dgCollision *> *const | collisionNode,
|  | dgSerialize | serializeCallback,
|  | void *const | userData
| ) |  |

virtual

Reimplemented from dgBody.

## § SetAngularDamping()

virtual void dgDeformableBody::SetAngularDamping | ( | const dgVector & | angularDamp | ) |

inlineprotectedvirtual

Implements dgBody.

## § SetCollidable()

virtual void dgDeformableBody::SetCollidable | ( | bool | state | ) |

inlineprotectedvirtual

Implements dgBody.

## § SetExtForceAndTorqueCallback()

void dgDeformableBody::SetExtForceAndTorqueCallback | ( | OnApplyExtForceAndTorque | callback | ) |

protectedvirtual

Implements dgBody.

## § SetForce()

void dgDeformableBody::SetForce | ( | const dgVector & | force | ) |

protectedvirtual

Implements dgBody.

## § SetLinearDamping()

virtual void dgDeformableBody::SetLinearDamping | ( | dgFloat32 | linearDamp | ) |

inlineprotectedvirtual

Implements dgBody.

## § SetMassMatrix()

void dgDeformableBody::SetMassMatrix | ( | dgFloat32 | mass,
|  | dgFloat32 | Ix,
|  | dgFloat32 | Iy,
|  | dgFloat32 | Iz
| ) |  |

protectedvirtual

Reimplemented from dgBody.

## § SetMassProperties()

void dgDeformableBody::SetMassProperties | ( | dgFloat32 | mass,
|  | const dgCollisionInstance *const | collision
| ) |  |

protectedvirtual

Reimplemented from dgBody.

## § SetMatrix()

void dgDeformableBody::SetMatrix | ( | const dgMatrix & | matrix | ) |

protectedvirtual

Reimplemented from dgBody.

## § SetTorque()

virtual void dgDeformableBody::SetTorque | ( | const dgVector & | torque | ) |

inlineprotectedvirtual

Implements dgBody.

## § SetVelocity()

void dgDeformableBody::SetVelocity | ( | const dgVector & | velocity | ) |

protectedvirtual

## Member Data Documentation

## § m_applyExtForces

OnApplyExtForceAndTorque dgDeformableBody::m_applyExtForces

protected

## § m_dummy

dgVector dgDeformableBody::m_dummy

staticprotected

## § m_force

dgVector dgDeformableBody::m_force

protected

## § m_torque

dgVector dgDeformableBody::m_torque

protected

The documentation for this class was generated from the following files:

- dynamics.mod/NewtonDynamics/source/physics/dgDeformableBody.h
- dynamics.mod/NewtonDynamics/source/physics/dgDeformableBody.cpp