My Project: dgWorld Class Reference

My Project

Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
dgWorld Class Reference

`#include <dgWorld.h>`

Inheritance diagram for dgWorld:

## Classes

class | dgListener
class | dgListenerList

## Public Types

typedef dgUnsigned32(dgApi * | OnIslandUpdate) (const dgWorld *const world, void *island, dgInt32 bodyCount)
typedef void(dgApi * | OnListenerBodyDestroyCallback) (const dgWorld *const world, void *const listener, dgBody *const body)
typedef void(dgApi * | OnListenerUpdateCallback) (const dgWorld *const world, void *const listener, dgFloat32 timestep)
typedef void(dgApi * | OnListenerDestroyCallback) (const dgWorld *const world, void *const listener)
typedef void(dgApi * | OnBodySerialize) (dgBody &me, dgSerialize funt, void *const serilalizeObject)
typedef void(dgApi * | OnBodyDeserialize) (dgBody &me, dgDeserialize funt, void *const serilalizeObject)
typedef void(dgApi * | OnCollisionInstanceDestroy) (const dgWorld *const world, const dgCollisionInstance *const collision)
typedef void(dgApi * | OnCollisionInstanceDuplicate) (const dgWorld *const world, dgCollisionInstance *const collision, const dgCollisionInstance *const sourceCollision)

## Public Member Functions

| dgWorld (dgMemoryAllocator *const allocator)
| ~dgWorld ()
dgBroadPhase * | GetBroadPhase () const
void | SetSolverMode (dgInt32 mode)
void | SetFrictionMode (dgInt32 mode)
dgInt32 | EnumerateHardwareModes () const
dgInt32 | GetCurrentHardwareMode () const
void | SetCurrentHardwareMode (dgInt32 deviceIndex)
void | GetHardwareVendorString (dgInt32 deviceIndex, char *const description, dgInt32 maxlength) const
void | EnableThreadOnSingleIsland (dgInt32 mode)
dgInt32 | GetThreadOnSingleIsland () const
void | FlushCache ()
void * | GetUserData () const
void | SetUserData (void *const userData)
void | Update (dgFloat32 timestep)
void | UpdateAsync (dgFloat32 timestep)
void | StepDynamics (dgFloat32 timestep)
dgInt32 | Collide (const dgCollisionInstance *const collisionA, const dgMatrix &matrixA, const dgCollisionInstance *const collisionB, const dgMatrix &matrixB, dgTriplex *const points, dgTriplex *const normals, dgFloat32 *const penetration, dgInt64 *const attibuteA, dgInt64 *const attibuteB, dgInt32 maxContacts, dgInt32 threadIndex)
dgInt32 | CollideContinue (const dgCollisionInstance *const collisionA, const dgMatrix &matrixA, const dgVector &velocA, const dgVector &omegaA, const dgCollisionInstance *const collisionB, const dgMatrix &matrixB, const dgVector &velocB, const dgVector &omegaB, dgFloat32 &timeStep, dgTriplex *const points, dgTriplex *const normals, dgFloat32 *const penetration, dgInt64 *const attibuteA, dgInt64 *const attibuteB, dgInt32 maxContacts, dgInt32 threadIndex)
bool | IntersectionTest (const dgCollisionInstance *const collisionA, const dgMatrix &matrixA, const dgCollisionInstance *const collisionB, const dgMatrix &matrixB, dgInt32 threadIndex)
dgInt32 | ClosestPoint (dgTriplex &point, const dgCollisionInstance *const collision, const dgMatrix &matrix, dgTriplex &contact, dgTriplex &normal, dgInt32 threadIndex)
dgInt32 | ClosestPoint (const dgCollisionInstance *const collisionA, const dgMatrix &matrixA, const dgCollisionInstance *const collisionB, const dgMatrix &matrixB, dgTriplex &contactA, dgTriplex &contactB, dgTriplex &normalAB, dgInt32 threadIndex)
void | SetFrictionThreshold (dgFloat32 acceletion)
dgBody * | GetIslandBody (const void *const island, dgInt32 index) const
void * | GetListenerUserData (void *const listener) const
void * | FindPreListener (const char *const nameid) const
void * | FindPostListener (const char *const nameid) const
void * | AddPreListener (const char *const nameid, void *const userData, OnListenerUpdateCallback updateCallback, OnListenerDestroyCallback destroyCallback)
void * | AddPostListener (const char *const nameid, void *const userData, OnListenerUpdateCallback updateCallback, OnListenerDestroyCallback destroyCallback)
void | SetListenerBodyDestroyCallback (void *const listener, OnListenerBodyDestroyCallback callback)
OnListenerBodyDestroyCallback | GetListenerBodyDestroyCallback (void *const listener) const
void | SetIslandUpdateCallback (OnIslandUpdate callback)
void | InitBody (dgBody *const body, dgCollisionInstance *const collision, const dgMatrix &matrix)
dgDynamicBody * | CreateDynamicBody (dgCollisionInstance *const collision, const dgMatrix &matrix)
dgKinematicBody * | CreateKinematicBody (dgCollisionInstance *const collision, const dgMatrix &matrix)
dgBody * | CreateDeformableBody (dgCollisionInstance *const collision, const dgMatrix &matrix)
void | DestroyBody (dgBody *const body)
void | DestroyAllBodies ()
void | BodySetMatrix (dgBody *const body, const dgMatrix &matrix)
dgInt32 | GetBodiesCount () const
dgInt32 | GetConstraintsCount () const
dgCollisionInstance * | CreateInstance (const dgCollision *const child, dgInt32 shapeID, const dgMatrix &offsetMatrix)
dgCollisionInstance * | CreateNull ()
dgCollisionInstance * | CreateSphere (dgFloat32 radiusdg, dgInt32 shapeID, const dgMatrix &offsetMatrix=dgGetIdentityMatrix())
dgCollisionInstance * | CreateCone (dgFloat32 radius, dgFloat32 height, dgInt32 shapeID, const dgMatrix &offsetMatrix=dgGetIdentityMatrix())
dgCollisionInstance * | CreateCapsule (dgFloat32 radius, dgFloat32 height, dgInt32 shapeID, const dgMatrix &offsetMatrix=dgGetIdentityMatrix())
dgCollisionInstance * | CreateCylinder (dgFloat32 radius, dgFloat32 height, dgInt32 shapeID, const dgMatrix &offsetMatrix=dgGetIdentityMatrix())
dgCollisionInstance * | CreateBox (dgFloat32 dx, dgFloat32 dy, dgFloat32 dz, dgInt32 shapeID, const dgMatrix &offsetMatrix=dgGetIdentityMatrix())
dgCollisionInstance * | CreateConvexHull (dgInt32 count, const dgFloat32 *const points, dgInt32 strideInBytes, dgFloat32 thickness, dgInt32 shapeID, const dgMatrix &offsetMatrix=dgGetIdentityMatrix())
dgCollisionInstance * | CreateTaperedCapsule (dgFloat32 radio0, dgFloat32 radio1, dgFloat32 height, dgInt32 shapeID, const dgMatrix &offsetMatrix=dgGetIdentityMatrix())
dgCollisionInstance * | CreateTaperedCylinder (dgFloat32 radio0, dgFloat32 radio1, dgFloat32 height, dgInt32 shapeID, const dgMatrix &offsetMatrix=dgGetIdentityMatrix())
dgCollisionInstance * | CreateChamferCylinder (dgFloat32 radius, dgFloat32 height, dgInt32 shapeID, const dgMatrix &offsetMatrix=dgGetIdentityMatrix())
dgCollisionInstance * | CreateCompound ()
dgCollisionInstance * | CreateFracturedCompound (dgMeshEffect *const solidMesh, int shapeID, int fracturePhysicsMaterialID, int pointcloudCount, const dgFloat32 *const vertexCloud, int strideInBytes, int materialID, const dgMatrix &textureMatrix, dgCollisionCompoundFractured::OnEmitFractureChunkCallBack emitFrafuredChunk, dgCollisionCompoundFractured::OnEmitNewCompundFractureCallBack emitFracturedCompound, dgCollisionCompoundFractured::OnReconstructFractureMainMeshCallBack reconstructMainMesh)
dgCollisionInstance * | CreateDeformableMesh (dgMeshEffect *const mesh, dgInt32 shapeID)
dgCollisionInstance * | CreateClothPatchMesh (dgMeshEffect *const mesh, dgInt32 shapeID, const dgClothPatchMaterial &structuralMaterial, const dgClothPatchMaterial &bendMaterial)
dgCollisionInstance * | CreateBVH ()
dgCollisionInstance * | CreateStaticUserMesh (const dgVector &boxP0, const dgVector &boxP1, const dgUserMeshCreation &data)
dgCollisionInstance * | CreateHeightField (dgInt32 width, dgInt32 height, dgInt32 contructionMode, dgInt32 elevationDataType, const void *const elevationMap, const dgInt8 *const atributeMap, dgFloat32 verticalScale, dgFloat32 horizontalScale)
dgCollisionInstance * | CreateScene ()
void | SetCollisionInstanceConstructorDestructor (OnCollisionInstanceDuplicate constructor, OnCollisionInstanceDestroy destructor)
void | SerializeToFile (const char *const fileName) const
void | SerializeBodyArray (dgBody **const array, dgInt32 count, OnBodySerialize bodyCallback, dgSerialize serializeCallback, void *const userData) const
void | DeserializeBodyArray (OnBodyDeserialize bodyCallback, dgDeserialize deserializeCallback, void *const userData)
void | SerializeCollision (dgCollisionInstance *const shape, dgSerialize deserialization, void *const userData) const
dgCollisionInstance * | CreateCollisionFromSerialization (dgDeserialize deserialization, void *const userData)
void | ReleaseCollision (const dgCollision *const collision)
dgUpVectorConstraint * | CreateUpVectorConstraint (const dgVector &pin, dgBody *body)
dgBallConstraint * | CreateBallConstraint (const dgVector &pivot, dgBody *const body0, dgBody *refBody=NULL)
dgHingeConstraint * | CreateHingeConstraint (const dgVector &pivot, const dgVector &pin, dgBody *const body0, dgBody *refBody=NULL)
dgSlidingConstraint * | CreateSlidingConstraint (const dgVector &pivot, const dgVector &pin, dgBody *const body0, dgBody *refBody=NULL)
dgCorkscrewConstraint * | CreateCorkscrewConstraint (const dgVector &pivot, const dgVector &pin, dgBody *const body0, dgBody *refBody=NULL)
dgUniversalConstraint * | CreateUniversalConstraint (const dgVector &pivot, const dgVector &pin0, const dgVector &pin1, dgBody *const body0, dgBody *body1=NULL)
void | DestroyConstraint (dgConstraint *constraint)
dgUnsigned32 | CreateBodyGroupID ()
void | RemoveAllGroupID ()
dgUnsigned32 | GetDefualtBodyGroupID () const
dgContactMaterial * | GetMaterial (dgUnsigned32 bodyGroupId0, dgUnsigned32 bodyGroupId1) const
dgContactMaterial * | GetFirstMaterial () const
dgContactMaterial * | GetNextMaterial (dgContactMaterial *material) const
OnGetPerformanceCountCallback | GetPerformaceFuntion () const
void | SetPerfomanceCounter (OnGetPerformanceCountCallback callback)
void | SetThreadsCount (dgInt32 count)
dgUnsigned32 | GetPerfomanceTicks (dgUnsigned32 entry) const
dgUnsigned32 | GetThreadPerfomanceTicks (dgUnsigned32 threadIndex) const
void | ExecuteUserJob (dgWorkerThreadTaskCallback userJobKernel, void *const userJobKernelContext)
void | BodyEnableSimulation (dgBody *const body)
void | BodyDisableSimulation (dgBody *const body)
bool | GetBodyEnableDisableSimulationState (dgBody *const body) const
dgBody * | GetSentinelBody () const
dgMemoryAllocator * | GetAllocator () const
dgFloat32 | GetContactMergeTolerance () const
void | SetContactMergeTolerance (dgFloat32 tolerenace)
void | Sync ()
Public Member Functions inherited from dgBodyMasterList
| dgBodyMasterList (dgMemoryAllocator *const allocator)
| ~dgBodyMasterList ()
void | AddBody (dgBody *const body)
void | RemoveBody (dgBody *const body)
void | RemoveConstraint (dgConstraint *const constraint)
void | AttachConstraint (dgConstraint *const constraint, dgBody *const body0, dgBody *const body1)
dgBodyMasterListRow::dgListNode * | FindConstraintLink (const dgBody *const body0, const dgBody *const body1) const
dgBodyMasterListRow::dgListNode * | FindConstraintLinkNext (const dgBodyMasterListRow::dgListNode *const me, const dgBody *const body) const
dgUnsigned32 | MakeSortMask (const dgBody *const body) const
void | SortMasterList ()
Public Member Functions inherited from dgList< dgBodyMasterListRow >
| dgList (dgMemoryAllocator *const allocator)
virtual | ~dgList ()
dgMemoryAllocator * | GetAllocator () const
void | SetAllocator (dgMemoryAllocator *const allocator)
| operator dgInt32 () const
dgInt32 | GetCount () const
dgListNode * | GetLast () const
dgListNode * | GetFirst () const
dgListNode * | Append ()
dgListNode * | Append (dgListNode *const node)
dgListNode * | Append (const dgBodyMasterListRow &element)
dgListNode * | Addtop ()
dgListNode * | Addtop (dgListNode *const node)
dgListNode * | Addtop (const dgBodyMasterListRow &element)
void | RotateToEnd (dgListNode *const node)
void | RotateToBegin (dgListNode *const node)
void | InsertAfter (dgListNode *const root, dgListNode *const node)
void | InsertBefore (dgListNode *const root, dgListNode *const node)
dgListNode * | Find (const dgBodyMasterListRow &element) const
dgListNode * | GetNodeFromInfo (dgBodyMasterListRow &m_info) const
void | Remove (dgListNode *const node)
void | Remove (const dgBodyMasterListRow &element)
void | RemoveAll ()
void | Merge (dgList< dgBodyMasterListRow > &list)
void | Unlink (dgListNode *const node)
bool | SanityCheck () const
Public Member Functions inherited from dgBodyMaterialList
| dgBodyMaterialList (dgMemoryAllocator *const allocator)
Public Member Functions inherited from dgTree< dgContactMaterial, dgUnsigned32 >
| dgTree (dgMemoryAllocator *const allocator)
virtual | ~dgTree ()
dgMemoryAllocator * | GetAllocator () const
void | SetAllocator (dgMemoryAllocator *const allocator)
| operator dgInt32 () const
dgInt32 | GetCount () const
dgTreeNode * | GetRoot () const
dgTreeNode * | Minimum () const
dgTreeNode * | Maximum () const
dgTreeNode * | Find (dgUnsigned32 key) const
dgTreeNode * | FindGreater (dgUnsigned32 key) const
dgTreeNode * | FindGreaterEqual (dgUnsigned32 key) const
dgTreeNode * | FindLessEqual (dgUnsigned32 key) const
dgTreeNode * | GetNodeFromInfo (dgContactMaterial &info) const
dgTreeNode * | Insert (const dgContactMaterial &element, dgUnsigned32 key, bool &elementWasInTree)
dgTreeNode * | Insert (const dgContactMaterial &element, dgUnsigned32 key)
dgTreeNode * | Insert (dgTreeNode *const node, dgUnsigned32 key)
dgTreeNode * | Replace (dgContactMaterial &element, dgUnsigned32 key)
dgTreeNode * | ReplaceKey (dgUnsigned32 oldKey, dgUnsigned32 newKey)
dgTreeNode * | ReplaceKey (dgTreeNode *const node, dgUnsigned32 key)
void | Remove (dgUnsigned32 key)
void | Remove (dgTreeNode *const node)
void | RemoveAll ()
void | Unlink (dgTreeNode *const node)
void | SwapInfo (dgTree &tree)
bool | SanityCheck () const
Public Member Functions inherited from dgBodyCollisionList
| dgBodyCollisionList (dgMemoryAllocator *const allocator)
Public Member Functions inherited from dgTree< const dgCollision *, dgUnsigned32 >
| dgTree (dgMemoryAllocator *const allocator)
virtual | ~dgTree ()
dgMemoryAllocator * | GetAllocator () const
void | SetAllocator (dgMemoryAllocator *const allocator)
| operator dgInt32 () const
dgInt32 | GetCount () const
dgTreeNode * | GetRoot () const
dgTreeNode * | Minimum () const
dgTreeNode * | Maximum () const
dgTreeNode * | Find (dgUnsigned32 key) const
dgTreeNode * | FindGreater (dgUnsigned32 key) const
dgTreeNode * | FindGreaterEqual (dgUnsigned32 key) const
dgTreeNode * | FindLessEqual (dgUnsigned32 key) const
dgTreeNode * | GetNodeFromInfo (const dgCollision * &info) const
dgTreeNode * | Insert (const const dgCollision * &element, dgUnsigned32 key, bool &elementWasInTree)
dgTreeNode * | Insert (const const dgCollision * &element, dgUnsigned32 key)
dgTreeNode * | Insert (dgTreeNode *const node, dgUnsigned32 key)
dgTreeNode * | Replace (const dgCollision * &element, dgUnsigned32 key)
dgTreeNode * | ReplaceKey (dgUnsigned32 oldKey, dgUnsigned32 newKey)
dgTreeNode * | ReplaceKey (dgTreeNode *const node, dgUnsigned32 key)
void | Remove (dgUnsigned32 key)
void | Remove (dgTreeNode *const node)
void | RemoveAll ()
void | Unlink (dgTreeNode *const node)
void | SwapInfo (dgTree &tree)
bool | SanityCheck () const
Public Member Functions inherited from dgDeformableBodiesUpdate
| dgDeformableBodiesUpdate (dgMemoryAllocator *const allocator)
void | AddShape (dgCollisionDeformableMesh *const shape)
void | RemoveShape (dgCollisionDeformableMesh *const shape)
Public Member Functions inherited from dgList< dgCollisionDeformableMesh *>
| dgList (dgMemoryAllocator *const allocator)
virtual | ~dgList ()
dgMemoryAllocator * | GetAllocator () const
void | SetAllocator (dgMemoryAllocator *const allocator)
| operator dgInt32 () const
dgInt32 | GetCount () const
dgListNode * | GetLast () const
dgListNode * | GetFirst () const
dgListNode * | Append ()
dgListNode * | Append (dgListNode *const node)
dgListNode * | Append (const dgCollisionDeformableMesh * &element)
dgListNode * | Addtop ()
dgListNode * | Addtop (dgListNode *const node)
dgListNode * | Addtop (const dgCollisionDeformableMesh * &element)
void | RotateToEnd (dgListNode *const node)
void | RotateToBegin (dgListNode *const node)
void | InsertAfter (dgListNode *const root, dgListNode *const node)
void | InsertBefore (dgListNode *const root, dgListNode *const node)
dgListNode * | Find (const dgCollisionDeformableMesh * &element) const
dgListNode * | GetNodeFromInfo (dgCollisionDeformableMesh * &m_info) const
void | Remove (dgListNode *const node)
void | Remove (const dgCollisionDeformableMesh * &element)
void | RemoveAll ()
void | Merge (dgList< dgCollisionDeformableMesh * > &list)
void | Unlink (dgListNode *const node)
bool | SanityCheck () const
Public Member Functions inherited from dgActiveContacts
| dgActiveContacts (dgMemoryAllocator *const allocator)
Public Member Functions inherited from dgList< dgContact *>
| dgList (dgMemoryAllocator *const allocator)
virtual | ~dgList ()
dgMemoryAllocator * | GetAllocator () const
void | SetAllocator (dgMemoryAllocator *const allocator)
| operator dgInt32 () const
dgInt32 | GetCount () const
dgListNode * | GetLast () const
dgListNode * | GetFirst () const
dgListNode * | Append ()
dgListNode * | Append (dgListNode *const node)
dgListNode * | Append (const dgContact * &element)
dgListNode * | Addtop ()
dgListNode * | Addtop (dgListNode *const node)
dgListNode * | Addtop (const dgContact * &element)
void | RotateToEnd (dgListNode *const node)
void | RotateToBegin (dgListNode *const node)
void | InsertAfter (dgListNode *const root, dgListNode *const node)
void | InsertBefore (dgListNode *const root, dgListNode *const node)
dgListNode * | Find (const dgContact * &element) const
dgListNode * | GetNodeFromInfo (dgContact * &m_info) const
void | Remove (dgListNode *const node)
void | Remove (const dgContact * &element)
void | RemoveAll ()
void | Merge (dgList< dgContact * > &list)
void | Unlink (dgListNode *const node)
bool | SanityCheck () const
Public Member Functions inherited from dgCollidingPairCollector
| dgCollidingPairCollector ()
| ~dgCollidingPairCollector ()
void | Init ()
void | AddPair (dgContact *const contatJoint, dgInt32 threadIndex)
Public Member Functions inherited from dgMutexThread
| dgMutexThread (const char *const name, dgInt32 id)
virtual | ~dgMutexThread (void)
void | Tick ()
void | Terminate ()
bool | IsBusy () const
Public Member Functions inherited from dgThread
| dgThread ()
| dgThread (const char *const name, dgInt32 id)
virtual | ~dgThread ()
bool | StillBusy () const
void | SuspendExecution (dgSemaphore &mutex)
void | SuspendExecution (dgInt32 count, dgSemaphore *const mutexes)
dgInt32 | GetPriority () const
void | SetPriority (int priority)
Public Member Functions inherited from dgAsyncThread
| dgAsyncThread (const char *const name, dgInt32 id)
virtual | ~dgAsyncThread (void)
void | Tick ()
void | Terminate ()
Public Member Functions inherited from dgWorldThreadPool
| dgWorldThreadPool (dgMemoryAllocator *const allocator)
virtual void | OnBeginWorkerThread (dgInt32 threadId)
virtual void | OnEndWorkerThread (dgInt32 threadId)
Public Member Functions inherited from dgThreadHive
| dgThreadHive (dgMemoryAllocator *const allocator)
virtual | ~dgThreadHive ()
void | SetMatertThread (dgThread *const mastertThread)
void | GlobalLock () const
void | GlobalUnlock () const
void | GetIndirectLock (dgThread::dgCriticalSection *const criticalSectionLock) const
void | ReleaseIndirectLock (dgThread::dgCriticalSection *const criticalSectionLock) const
void | ClearTimers ()
dgInt32 | GetThreadCount () const
dgInt32 | GetMaxThreadCount () const
void | SetThreadsCount (dgInt32 count)
void | QueueJob (dgWorkerThreadTaskCallback callback, void *const context0, void *const context1)
void | SynchronizationBarrier ()
void | SetPerfomanceCounter (OnGetPerformanceCountCallback callback)
dgUnsigned32 | GetPerfomanceTicks (dgUnsigned32 threadIndex) const

## Static Public Member Functions

static void | OnSerializeToFile (void *const userData, const void *const buffer, size_t size)
static void | OnBodySerializeToFile (dgBody &body, dgSerialize serializeCallback, void *const userData)

## Friends

class | dgBody
class | dgBroadPhase
class | dgAmpInstance
class | dgDeformableBody
class | dgActiveContacts
class | dgUserConstraint
class | dgBodyMasterList
class | dgJacobianMemory
class | dgCollisionScene
class | dgCollisionConvex
class | dgCollisionInstance
class | dgCollisionCompound
class | dgWorldDynamicUpdate
class | dgParallelSolverClear
class | dgParallelSolverSolve
class | dgCollisionHeightField
class | dgSolverWorlkerThreads
class | dgCollisionConvexPolygon
class | dgCollidingPairCollector
class | dgCollisionDeformableMesh
class | dgParallelSolverUpdateForce
class | dgParallelSolverUpdateVeloc
class | dgParallelSolverBodyInertia
class | dgCollisionDeformableSolidMesh
class | dgBroadPhaseApplyExternalForce
class | dgParallelSolverCalculateForces
class | dgParallelSolverJointAcceleration
class | dgParallelSolverBuildJacobianRows
class | dgParallelSolverInitFeedbackUpdate
class | dgParallelSolverInitInternalForces
class | dgParallelSolverBuildJacobianMatrix
class | dgBroadPhaseMaterialCallbackWorkerThread
class | dgBroadPhaseCalculateContactsWorkerThread

## Additional Inherited Members

Public Attributes inherited from dgBodyMasterList
dgTree< int, dgBody * > | m_disableBodies
dgInt32 | m_deformableCount
dgUnsigned32 | m_constraintCount
Public Attributes inherited from dgCollidingPairCollector
dgInt32 | m_count
dgInt32 | m_maxSize
dgBody * | m_sentinel
dgThread::dgCriticalSection | m_lock
Protected Member Functions inherited from dgThread
void | Init ()
void | Init (const char *const name, dgInt32 id)
void | Close ()
Static Protected Member Functions inherited from dgThread
static void * | dgThreadSystemCallback (void *threadData)
Protected Attributes inherited from dgThread
pthread_t | m_handle
dgInt32 | m_id
dgInt32 | m_terminate
dgInt32 | m_threadRunning
char | m_name [32]

## Member Typedef Documentation

## § OnBodyDeserialize

typedef void(dgApi * dgWorld::OnBodyDeserialize) (dgBody &me, dgDeserialize funt, void *const serilalizeObject)

## § OnBodySerialize

typedef void(dgApi * dgWorld::OnBodySerialize) (dgBody &me, dgSerialize funt, void *const serilalizeObject)

## § OnCollisionInstanceDestroy

typedef void(dgApi * dgWorld::OnCollisionInstanceDestroy) (const dgWorld *const world, const dgCollisionInstance *const collision)

## § OnCollisionInstanceDuplicate

typedef void(dgApi * dgWorld::OnCollisionInstanceDuplicate) (const dgWorld *const world, dgCollisionInstance *const collision, const dgCollisionInstance *const sourceCollision)

## § OnIslandUpdate

typedef dgUnsigned32(dgApi * dgWorld::OnIslandUpdate) (const dgWorld *const world, void *island, dgInt32 bodyCount)

## § OnListenerBodyDestroyCallback

typedef void(dgApi * dgWorld::OnListenerBodyDestroyCallback) (const dgWorld *const world, void *const listener, dgBody *const body)

## § OnListenerDestroyCallback

typedef void(dgApi * dgWorld::OnListenerDestroyCallback) (const dgWorld *const world, void *const listener)

## § OnListenerUpdateCallback

typedef void(dgApi * dgWorld::OnListenerUpdateCallback) (const dgWorld *const world, void *const listener, dgFloat32 timestep)

## Constructor & Destructor Documentation

## § dgWorld()

dgWorld::dgWorld | ( | dgMemoryAllocator *const | allocator | ) |

## § ~dgWorld()

dgWorld::~dgWorld | ( |  | ) |

## Member Function Documentation

## § AddPostListener()

void * dgWorld::AddPostListener | ( | const char *const | nameid,
|  | void *const | userData,
|  | OnListenerUpdateCallback | updateCallback,
|  | OnListenerDestroyCallback | destroyCallback
| ) |  |

## § AddPreListener()

void * dgWorld::AddPreListener | ( | const char *const | nameid,
|  | void *const | userData,
|  | OnListenerUpdateCallback | updateCallback,
|  | OnListenerDestroyCallback | destroyCallback
| ) |  |

## § BodyDisableSimulation()

void dgWorld::BodyDisableSimulation | ( | dgBody *const | body | ) |

## § BodyEnableSimulation()

void dgWorld::BodyEnableSimulation | ( | dgBody *const | body | ) |

## § BodySetMatrix()

void dgWorld::BodySetMatrix | ( | dgBody *const | body,
|  | const dgMatrix & | matrix
| ) |  |

## § ClosestPoint() [1/2]

dgInt32 dgWorld::ClosestPoint | ( | dgTriplex & | point,
|  | const dgCollisionInstance *const | collision,
|  | const dgMatrix & | matrix,
|  | dgTriplex & | contact,
|  | dgTriplex & | normal,
|  | dgInt32 | threadIndex
| ) |  |

## § ClosestPoint() [2/2]

dgInt32 dgWorld::ClosestPoint | ( | const dgCollisionInstance *const | collisionA,
|  | const dgMatrix & | matrixA,
|  | const dgCollisionInstance *const | collisionB,
|  | const dgMatrix & | matrixB,
|  | dgTriplex & | contactA,
|  | dgTriplex & | contactB,
|  | dgTriplex & | normalAB,
|  | dgInt32 | threadIndex
| ) |  |

## § Collide()

dgInt32 dgWorld::Collide | ( | const dgCollisionInstance *const | collisionA,
|  | const dgMatrix & | matrixA,
|  | const dgCollisionInstance *const | collisionB,
|  | const dgMatrix & | matrixB,
|  | dgTriplex *const | points,
|  | dgTriplex *const | normals,
|  | dgFloat32 *const | penetration,
|  | dgInt64 *const | attibuteA,
|  | dgInt64 *const | attibuteB,
|  | dgInt32 | maxContacts,
|  | dgInt32 | threadIndex
| ) |  |

## § CollideContinue()

dgInt32 dgWorld::CollideContinue | ( | const dgCollisionInstance *const | collisionA,
|  | const dgMatrix & | matrixA,
|  | const dgVector & | velocA,
|  | const dgVector & | omegaA,
|  | const dgCollisionInstance *const | collisionB,
|  | const dgMatrix & | matrixB,
|  | const dgVector & | velocB,
|  | const dgVector & | omegaB,
|  | dgFloat32 & | timeStep,
|  | dgTriplex *const | points,
|  | dgTriplex *const | normals,
|  | dgFloat32 *const | penetration,
|  | dgInt64 *const | attibuteA,
|  | dgInt64 *const | attibuteB,
|  | dgInt32 | maxContacts,
|  | dgInt32 | threadIndex
| ) |  |

## § CreateBallConstraint()

dgBallConstraint * dgWorld::CreateBallConstraint | ( | const dgVector & | pivot,
|  | dgBody *const | body0,
|  | dgBody * | refBody = `NULL`
| ) |  |

## § CreateBodyGroupID()

dgUnsigned32 dgWorld::CreateBodyGroupID | ( |  | ) |

## § CreateBox()

dgCollisionInstance * dgWorld::CreateBox | ( | dgFloat32 | dx,
|  | dgFloat32 | dy,
|  | dgFloat32 | dz,
|  | dgInt32 | shapeID,
|  | const dgMatrix & | offsetMatrix = `dgGetIdentityMatrix()`
| ) |  |

## § CreateBVH()

dgCollisionInstance * dgWorld::CreateBVH | ( |  | ) |

## § CreateCapsule()

dgCollisionInstance * dgWorld::CreateCapsule | ( | dgFloat32 | radius,
|  | dgFloat32 | height,
|  | dgInt32 | shapeID,
|  | const dgMatrix & | offsetMatrix = `dgGetIdentityMatrix()`
| ) |  |

## § CreateChamferCylinder()

dgCollisionInstance * dgWorld::CreateChamferCylinder | ( | dgFloat32 | radius,
|  | dgFloat32 | height,
|  | dgInt32 | shapeID,
|  | const dgMatrix & | offsetMatrix = `dgGetIdentityMatrix()`
| ) |  |

## § CreateClothPatchMesh()

dgCollisionInstance * dgWorld::CreateClothPatchMesh | ( | dgMeshEffect *const | mesh,
|  | dgInt32 | shapeID,
|  | const dgClothPatchMaterial & | structuralMaterial,
|  | const dgClothPatchMaterial & | bendMaterial
| ) |  |

## § CreateCollisionFromSerialization()

dgCollisionInstance * dgWorld::CreateCollisionFromSerialization | ( | dgDeserialize | deserialization,
|  | void *const | userData
| ) |  |

## § CreateCompound()

dgCollisionInstance * dgWorld::CreateCompound | ( |  | ) |

## § CreateCone()

dgCollisionInstance * dgWorld::CreateCone | ( | dgFloat32 | radius,
|  | dgFloat32 | height,
|  | dgInt32 | shapeID,
|  | const dgMatrix & | offsetMatrix = `dgGetIdentityMatrix()`
| ) |  |

## § CreateConvexHull()

dgCollisionInstance * dgWorld::CreateConvexHull | ( | dgInt32 | count,
|  | const dgFloat32 *const | points,
|  | dgInt32 | strideInBytes,
|  | dgFloat32 | thickness,
|  | dgInt32 | shapeID,
|  | const dgMatrix & | offsetMatrix = `dgGetIdentityMatrix()`
| ) |  |

## § CreateCorkscrewConstraint()

dgCorkscrewConstraint * dgWorld::CreateCorkscrewConstraint | ( | const dgVector & | pivot,
|  | const dgVector & | pin,
|  | dgBody *const | body0,
|  | dgBody * | refBody = `NULL`
| ) |  |

## § CreateCylinder()

dgCollisionInstance * dgWorld::CreateCylinder | ( | dgFloat32 | radius,
|  | dgFloat32 | height,
|  | dgInt32 | shapeID,
|  | const dgMatrix & | offsetMatrix = `dgGetIdentityMatrix()`
| ) |  |

## § CreateDeformableBody()

dgBody * dgWorld::CreateDeformableBody | ( | dgCollisionInstance *const | collision,
|  | const dgMatrix & | matrix
| ) |  |

## § CreateDeformableMesh()

dgCollisionInstance * dgWorld::CreateDeformableMesh | ( | dgMeshEffect *const | mesh,
|  | dgInt32 | shapeID
| ) |  |

## § CreateDynamicBody()

dgDynamicBody * dgWorld::CreateDynamicBody | ( | dgCollisionInstance *const | collision,
|  | const dgMatrix & | matrix
| ) |  |

## § CreateFracturedCompound()

dgCollisionInstance * dgWorld::CreateFracturedCompound | ( | dgMeshEffect *const | solidMesh,
|  | int | shapeID,
|  | int | fracturePhysicsMaterialID,
|  | int | pointcloudCount,
|  | const dgFloat32 *const | vertexCloud,
|  | int | strideInBytes,
|  | int | materialID,
|  | const dgMatrix & | textureMatrix,
|  | dgCollisionCompoundFractured::OnEmitFractureChunkCallBack | emitFrafuredChunk,
|  | dgCollisionCompoundFractured::OnEmitNewCompundFractureCallBack | emitFracturedCompound,
|  | dgCollisionCompoundFractured::OnReconstructFractureMainMeshCallBack | reconstructMainMesh
| ) |  |

## § CreateHeightField()

dgCollisionInstance * dgWorld::CreateHeightField | ( | dgInt32 | width,
|  | dgInt32 | height,
|  | dgInt32 | contructionMode,
|  | dgInt32 | elevationDataType,
|  | const void *const | elevationMap,
|  | const dgInt8 *const | atributeMap,
|  | dgFloat32 | verticalScale,
|  | dgFloat32 | horizontalScale
| ) |  |

## § CreateHingeConstraint()

dgHingeConstraint * dgWorld::CreateHingeConstraint | ( | const dgVector & | pivot,
|  | const dgVector & | pin,
|  | dgBody *const | body0,
|  | dgBody * | refBody = `NULL`
| ) |  |

## § CreateInstance()

dgCollisionInstance * dgWorld::CreateInstance | ( | const dgCollision *const | child,
|  | dgInt32 | shapeID,
|  | const dgMatrix & | offsetMatrix
| ) |  |

## § CreateKinematicBody()

dgKinematicBody * dgWorld::CreateKinematicBody | ( | dgCollisionInstance *const | collision,
|  | const dgMatrix & | matrix
| ) |  |

## § CreateNull()

dgCollisionInstance * dgWorld::CreateNull | ( |  | ) |

## § CreateScene()

dgCollisionInstance * dgWorld::CreateScene | ( |  | ) |

## § CreateSlidingConstraint()

dgSlidingConstraint * dgWorld::CreateSlidingConstraint | ( | const dgVector & | pivot,
|  | const dgVector & | pin,
|  | dgBody *const | body0,
|  | dgBody * | refBody = `NULL`
| ) |  |

## § CreateSphere()

dgCollisionInstance * dgWorld::CreateSphere | ( | dgFloat32 | radiusdg,
|  | dgInt32 | shapeID,
|  | const dgMatrix & | offsetMatrix = `dgGetIdentityMatrix()`
| ) |  |

## § CreateStaticUserMesh()

dgCollisionInstance * dgWorld::CreateStaticUserMesh | ( | const dgVector & | boxP0,
|  | const dgVector & | boxP1,
|  | const dgUserMeshCreation & | data
| ) |  |

## § CreateTaperedCapsule()

dgCollisionInstance * dgWorld::CreateTaperedCapsule | ( | dgFloat32 | radio0,
|  | dgFloat32 | radio1,
|  | dgFloat32 | height,
|  | dgInt32 | shapeID,
|  | const dgMatrix & | offsetMatrix = `dgGetIdentityMatrix()`
| ) |  |

## § CreateTaperedCylinder()

dgCollisionInstance * dgWorld::CreateTaperedCylinder | ( | dgFloat32 | radio0,
|  | dgFloat32 | radio1,
|  | dgFloat32 | height,
|  | dgInt32 | shapeID,
|  | const dgMatrix & | offsetMatrix = `dgGetIdentityMatrix()`
| ) |  |

## § CreateUniversalConstraint()

dgUniversalConstraint * dgWorld::CreateUniversalConstraint | ( | const dgVector & | pivot,
|  | const dgVector & | pin0,
|  | const dgVector & | pin1,
|  | dgBody *const | body0,
|  | dgBody * | body1 = `NULL`
| ) |  |

## § CreateUpVectorConstraint()

dgUpVectorConstraint * dgWorld::CreateUpVectorConstraint | ( | const dgVector & | pin,
|  | dgBody * | body
| ) |  |

## § DeserializeBodyArray()

void dgWorld::DeserializeBodyArray | ( | OnBodyDeserialize | bodyCallback,
|  | dgDeserialize | deserializeCallback,
|  | void *const | userData
| ) |  |

## § DestroyAllBodies()

void dgWorld::DestroyAllBodies | ( |  | ) |

## § DestroyBody()

void dgWorld::DestroyBody | ( | dgBody *const | body | ) |

## § DestroyConstraint()

void dgWorld::DestroyConstraint | ( | dgConstraint * | constraint | ) |

## § EnableThreadOnSingleIsland()

void dgWorld::EnableThreadOnSingleIsland | ( | dgInt32 | mode | ) |

## § EnumerateHardwareModes()

dgInt32 dgWorld::EnumerateHardwareModes | ( |  | ) | const

## § ExecuteUserJob()

void dgWorld::ExecuteUserJob | ( | dgWorkerThreadTaskCallback | userJobKernel,
|  | void *const | userJobKernelContext
| ) |  |

## § FindPostListener()

void * dgWorld::FindPostListener | ( | const char *const | nameid | ) | const

## § FindPreListener()

void * dgWorld::FindPreListener | ( | const char *const | nameid | ) | const

## § FlushCache()

void dgWorld::FlushCache | ( |  | ) |

## § GetAllocator()

dgMemoryAllocator * dgWorld::GetAllocator | ( |  | ) | const

inline

## § GetBodiesCount()

dgInt32 dgWorld::GetBodiesCount | ( |  | ) | const

## § GetBodyEnableDisableSimulationState()

bool dgWorld::GetBodyEnableDisableSimulationState | ( | dgBody *const | body | ) | const

## § GetBroadPhase()

dgBroadPhase * dgWorld::GetBroadPhase | ( |  | ) | const

inline

## § GetConstraintsCount()

dgInt32 dgWorld::GetConstraintsCount | ( |  | ) | const

## § GetContactMergeTolerance()

dgFloat32 dgWorld::GetContactMergeTolerance | ( |  | ) | const

## § GetCurrentHardwareMode()

dgInt32 dgWorld::GetCurrentHardwareMode | ( |  | ) | const

## § GetDefualtBodyGroupID()

dgUnsigned32 dgWorld::GetDefualtBodyGroupID | ( |  | ) | const

## § GetFirstMaterial()

dgContactMaterial * dgWorld::GetFirstMaterial | ( |  | ) | const

## § GetHardwareVendorString()

void dgWorld::GetHardwareVendorString | ( | dgInt32 | deviceIndex,
|  | char *const | description,
|  | dgInt32 | maxlength
| ) |  | const

## § GetIslandBody()

dgBody * dgWorld::GetIslandBody | ( | const void *const | island,
|  | dgInt32 | index
| ) |  | const

## § GetListenerBodyDestroyCallback()

dgWorld::OnListenerBodyDestroyCallback dgWorld::GetListenerBodyDestroyCallback | ( | void *const | listener | ) | const

## § GetListenerUserData()

void * dgWorld::GetListenerUserData | ( | void *const | listener | ) | const

## § GetMaterial()

dgContactMaterial * dgWorld::GetMaterial | ( | dgUnsigned32 | bodyGroupId0,
|  | dgUnsigned32 | bodyGroupId1
| ) |  | const

## § GetNextMaterial()

dgContactMaterial * dgWorld::GetNextMaterial | ( | dgContactMaterial * | material | ) | const

## § GetPerfomanceTicks()

dgUnsigned32 dgWorld::GetPerfomanceTicks | ( | dgUnsigned32 | entry | ) | const

## § GetPerformaceFuntion()

OnGetPerformanceCountCallback dgWorld::GetPerformaceFuntion | ( |  | ) | const

## § GetSentinelBody()

dgBody * dgWorld::GetSentinelBody | ( |  | ) | const

## § GetThreadOnSingleIsland()

dgInt32 dgWorld::GetThreadOnSingleIsland | ( |  | ) | const

## § GetThreadPerfomanceTicks()

dgUnsigned32 dgWorld::GetThreadPerfomanceTicks | ( | dgUnsigned32 | threadIndex | ) | const

## § GetUserData()

void * dgWorld::GetUserData | ( |  | ) | const

## § InitBody()

void dgWorld::InitBody | ( | dgBody *const | body,
|  | dgCollisionInstance *const | collision,
|  | const dgMatrix & | matrix
| ) |  |

## § IntersectionTest()

bool dgWorld::IntersectionTest | ( | const dgCollisionInstance *const | collisionA,
|  | const dgMatrix & | matrixA,
|  | const dgCollisionInstance *const | collisionB,
|  | const dgMatrix & | matrixB,
|  | dgInt32 | threadIndex
| ) |  |

## § OnBodySerializeToFile()

void dgWorld::OnBodySerializeToFile | ( | dgBody & | body,
|  | dgSerialize | serializeCallback,
|  | void *const | userData
| ) |  |

static

## § OnSerializeToFile()

void dgWorld::OnSerializeToFile | ( | void *const | userData,
|  | const void *const | buffer,
|  | size_t | size
| ) |  |

static

## § ReleaseCollision()

void dgWorld::ReleaseCollision | ( | const dgCollision *const | collision | ) |

## § RemoveAllGroupID()

void dgWorld::RemoveAllGroupID | ( |  | ) |

## § SerializeBodyArray()

void dgWorld::SerializeBodyArray | ( | dgBody **const | array,
|  | dgInt32 | count,
|  | OnBodySerialize | bodyCallback,
|  | dgSerialize | serializeCallback,
|  | void *const | userData
| ) |  | const

## § SerializeCollision()

void dgWorld::SerializeCollision | ( | dgCollisionInstance *const | shape,
|  | dgSerialize | deserialization,
|  | void *const | userData
| ) |  | const

## § SerializeToFile()

void dgWorld::SerializeToFile | ( | const char *const | fileName | ) | const

## § SetCollisionInstanceConstructorDestructor()

void dgWorld::SetCollisionInstanceConstructorDestructor | ( | OnCollisionInstanceDuplicate | constructor,
|  | OnCollisionInstanceDestroy | destructor
| ) |  |

## § SetContactMergeTolerance()

void dgWorld::SetContactMergeTolerance | ( | dgFloat32 | tolerenace | ) |

## § SetCurrentHardwareMode()

void dgWorld::SetCurrentHardwareMode | ( | dgInt32 | deviceIndex | ) |

## § SetFrictionMode()

void dgWorld::SetFrictionMode | ( | dgInt32 | mode | ) |

## § SetFrictionThreshold()

void dgWorld::SetFrictionThreshold | ( | dgFloat32 | acceletion | ) |

## § SetIslandUpdateCallback()

void dgWorld::SetIslandUpdateCallback | ( | OnIslandUpdate | callback | ) |

## § SetListenerBodyDestroyCallback()

void dgWorld::SetListenerBodyDestroyCallback | ( | void *const | listener,
|  | OnListenerBodyDestroyCallback | callback
| ) |  |

## § SetPerfomanceCounter()

void dgWorld::SetPerfomanceCounter | ( | OnGetPerformanceCountCallback | callback | ) |

## § SetSolverMode()

void dgWorld::SetSolverMode | ( | dgInt32 | mode | ) |

## § SetThreadsCount()

void dgWorld::SetThreadsCount | ( | dgInt32 | count | ) |

## § SetUserData()

void dgWorld::SetUserData | ( | void *const | userData | ) |

## § StepDynamics()

void dgWorld::StepDynamics | ( | dgFloat32 | timestep | ) |

## § Sync()

void dgWorld::Sync | ( |  | ) |

## § Update()

void dgWorld::Update | ( | dgFloat32 | timestep | ) |

## § UpdateAsync()

void dgWorld::UpdateAsync | ( | dgFloat32 | timestep | ) |

## Friends And Related Function Documentation

## § dgActiveContacts

friend class dgActiveContacts

friend

## § dgAmpInstance

friend class dgAmpInstance

friend

## § dgBody

friend class dgBody

friend

## § dgBodyMasterList

friend class dgBodyMasterList

friend

## § dgBroadPhase

friend class dgBroadPhase

friend

## § dgBroadPhaseApplyExternalForce

friend class dgBroadPhaseApplyExternalForce

friend

## § dgBroadPhaseCalculateContactsWorkerThread

friend class dgBroadPhaseCalculateContactsWorkerThread

friend

## § dgBroadPhaseMaterialCallbackWorkerThread

friend class dgBroadPhaseMaterialCallbackWorkerThread

friend

## § dgCollidingPairCollector

friend class dgCollidingPairCollector

friend

## § dgCollisionCompound

friend class dgCollisionCompound

friend

## § dgCollisionConvex

friend class dgCollisionConvex

friend

## § dgCollisionConvexPolygon

friend class dgCollisionConvexPolygon

friend

## § dgCollisionDeformableMesh

friend class dgCollisionDeformableMesh

friend

## § dgCollisionDeformableSolidMesh

friend class dgCollisionDeformableSolidMesh

friend

## § dgCollisionHeightField

friend class dgCollisionHeightField

friend

## § dgCollisionInstance

friend class dgCollisionInstance

friend

## § dgCollisionScene

friend class dgCollisionScene

friend

## § dgDeformableBody

friend class dgDeformableBody

friend

## § dgJacobianMemory

friend class dgJacobianMemory

friend

## § dgParallelSolverBodyInertia

friend class dgParallelSolverBodyInertia

friend

## § dgParallelSolverBuildJacobianMatrix

friend class dgParallelSolverBuildJacobianMatrix

friend

## § dgParallelSolverBuildJacobianRows

friend class dgParallelSolverBuildJacobianRows

friend

## § dgParallelSolverCalculateForces

friend class dgParallelSolverCalculateForces

friend

## § dgParallelSolverClear

friend class dgParallelSolverClear

friend

## § dgParallelSolverInitFeedbackUpdate

friend class dgParallelSolverInitFeedbackUpdate

friend

## § dgParallelSolverInitInternalForces

friend class dgParallelSolverInitInternalForces

friend

## § dgParallelSolverJointAcceleration

friend class dgParallelSolverJointAcceleration

friend

## § dgParallelSolverSolve

friend class dgParallelSolverSolve

friend

## § dgParallelSolverUpdateForce

friend class dgParallelSolverUpdateForce

friend

## § dgParallelSolverUpdateVeloc

friend class dgParallelSolverUpdateVeloc

friend

## § dgSolverWorlkerThreads

friend class dgSolverWorlkerThreads

friend

## § dgUserConstraint

friend class dgUserConstraint

friend

## § dgWorldDynamicUpdate

friend class dgWorldDynamicUpdate

friend

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

- dynamics.mod/NewtonDynamics/source/physics/dgWorld.h
- dynamics.mod/NewtonDynamics/source/physics/dgNarrowPhaseCollision.cpp
- dynamics.mod/NewtonDynamics/source/physics/dgWorld.cpp
- dynamics.mod/NewtonDynamics/source/physics/dgWorldDynamicUpdate.cpp