My Project: dgCollision Class Reference

My Project

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
dgCollision Class Referenceabstract

`#include <dgCollision.h>`

Inheritance diagram for dgCollision:

## Public Types

enum

dgRTTI {
dgCollisionNull_RTTI = 1<<0, dgCollisionBox_RTTI = 1<<1, dgCollisionCone_RTTI = 1<<2, dgCollisionSphere_RTTI = 1<<3,
dgCollisionCapsule_RTTI = 1<<4, dgCollisionCylinder_RTTI = 1<<5, dgCollisionConvexHull_RTTI = 1<<6, dgCollisionTaperedCapsule_RTTI = 1<<7,
dgCollisionTaperedCylinder_RTTI = 1<<8, dgCollisionChamferCylinder_RTTI = 1<<9, dgCollisionConvexPolygon_RTTI = 1<<10, dgCollisionConvexShape_RTTI = 1<<11,
dgCollisionCompound_RTTI = 1<<12, dgCollisionBVH_RTTI = 1<<13, dgCollisionMesh_RTTI = 1<<14, dgCollisionDeformableMesh_RTTI = 1<<15,
dgCollisionDeformableSolidMesh_RTTI = 1<<16, dgCollisionDeformableClothPatch_RTTI = 1<<17, dgCollisionUserMesh_RTTI = 1<<18, dgCollisionHeightField_RTTI = 1<<19,
dgCollisionScene_RTTI = 1<<20, dgCollisionCompoundBreakable_RTTI = 1<<21
}

typedef void(dgApi * | OnDebugCollisionMeshCallback) (void *userData, int vertexCount, const dgFloat32 *FaceArray, int faceId)

## Public Member Functions

dgInt32 | IsType (dgRTTI type) const
dgUnsigned32 | GetSignature () const
dgCollisionID | GetCollisionPrimityType () const
virtual dgVector | SupportVertex (const dgVector &dir, dgInt32 *const vertexIndex) const =0
virtual dgInt32 | CalculatePlaneIntersection (const dgVector &normal, const dgVector &point, dgVector *const contactsOut, dgFloat32 normalSign) const =0
virtual void | SetCollisionBBox (const dgVector &p0, const dgVector &p1)=0
virtual void | CalcAABB (const dgMatrix &matrix, dgVector &p0, dgVector &p1) const =0
virtual void | DebugCollision (const dgMatrix &matrix, dgCollision::OnDebugCollisionMeshCallback callback, void *const userData) const =0
virtual dgFloat32 | RayCast (const dgVector &localP0, const dgVector &localP1, dgFloat32 maxT, dgContactPoint &contactOut, const dgBody *const body, void *const userData, OnRayPrecastAction preFilter) const =0
virtual dgFloat32 | ConvexRayCast (const dgCollisionInstance *const convexShape, const dgMatrix &origin, const dgVector &veloc, dgFloat32 maxT, dgContactPoint &contactOut, const dgBody *const referenceBody, const dgCollisionInstance *const referenceInstance, void *const userData, dgInt32 threadId) const =0
virtual dgFloat32 | GetVolume () const =0
virtual void | MassProperties ()
virtual dgFloat32 | CalculateMassProperties (const dgMatrix &offset, dgVector &inertia, dgVector &crossInertia, dgVector &centerOfMass) const
virtual dgMatrix | CalculateInertiaAndCenterOfMass (const dgMatrix &m_alignMatrix, const dgVector &localScale, const dgMatrix &matrix) const
virtual dgFloat32 | GetSkinThickness () const
virtual dgFloat32 | GetBoxMinRadius () const =0
virtual dgFloat32 | GetBoxMaxRadius () const =0
virtual dgVector | CalculateVolumeIntegral (const dgMatrix &globalMatrix, const dgVector &globalPlane, const dgCollisionInstance &parentScale) const =0
virtual void | Serialize (dgSerialize callback, void *const userData) const =0
virtual void | GetCollisionInfo (dgCollisionInfo *const info) const
virtual void | SerializeLow (dgSerialize callback, void *const userData) const
virtual dgInt32 | GetConvexVertexCount () const
const dgCollision * | AddRef () const
dgInt32 | GetRefCount () const
virtual dgInt32 | Release () const
const dgVector & | GetObbOrigin () const
virtual dgVector | GetObbSize () const
dgFloat32 | GetUmbraClipSize () const
dgMemoryAllocator * | GetAllocator () const

## Static Public Member Functions

static dgUnsigned32 | Quantize (dgFloat32 value)
static dgUnsigned32 | Quantize (void *buffer, int size)

## Protected Member Functions

| dgCollision (const dgCollision &source)
| dgCollision (dgMemoryAllocator *const allocator, dgUnsigned32 signature, dgCollisionID id)
| dgCollision (dgWorld *const world, dgDeserialize deserialization, void *const userData)
virtual | ~dgCollision ()
void | SetSignature (dgInt32 signature)
virtual dgInt32 | CalculateSignature () const =0

## Protected Attributes

dgVector | m_inertia
dgVector | m_crossInertia
dgVector | m_centerOfMass
dgVector | m_boxSize
dgVector | m_boxOrigin
dgInt32 | m_rtti
dgInt32 | m_refCount
dgUnsigned32 | m_signature
dgCollisionID | m_collisionId
dgMemoryAllocator * | m_allocator

## Friends

class | dgBody
class | dgWorld
class | dgMinkowskiConv
class | dgCollisionInstance
class | dgCollisionCompound

## Member Typedef Documentation

## § OnDebugCollisionMeshCallback

typedef void(dgApi * dgCollision::OnDebugCollisionMeshCallback) (void *userData, int vertexCount, const dgFloat32 *FaceArray, int faceId)

## Member Enumeration Documentation

## § dgRTTI

enum dgCollision::dgRTTI

Enumerator
dgCollisionNull_RTTI |
dgCollisionBox_RTTI |
dgCollisionCone_RTTI |
dgCollisionSphere_RTTI |
dgCollisionCapsule_RTTI |
dgCollisionCylinder_RTTI |
dgCollisionConvexHull_RTTI |
dgCollisionTaperedCapsule_RTTI |
dgCollisionTaperedCylinder_RTTI |
dgCollisionChamferCylinder_RTTI |
dgCollisionConvexPolygon_RTTI |
dgCollisionConvexShape_RTTI |
dgCollisionCompound_RTTI |
dgCollisionBVH_RTTI |
dgCollisionMesh_RTTI |
dgCollisionDeformableMesh_RTTI |
dgCollisionDeformableSolidMesh_RTTI |
dgCollisionDeformableClothPatch_RTTI |
dgCollisionUserMesh_RTTI |
dgCollisionHeightField_RTTI |
dgCollisionScene_RTTI |
dgCollisionCompoundBreakable_RTTI |

## Constructor & Destructor Documentation

## § dgCollision() [1/3]

dgCollision::dgCollision | ( | const dgCollision & | source | ) |

protected

## § dgCollision() [2/3]

dgCollision::dgCollision | ( | dgMemoryAllocator *const | allocator,
|  | dgUnsigned32 | signature,
|  | dgCollisionID | id
| ) |  |

protected

## § dgCollision() [3/3]

dgCollision::dgCollision | ( | dgWorld *const | world,
|  | dgDeserialize | deserialization,
|  | void *const | userData
| ) |  |

protected

## § ~dgCollision()

dgCollision::~dgCollision | ( |  | ) |

protectedvirtual

## Member Function Documentation

## § AddRef()

DG_INLINE const dgCollision * dgCollision::AddRef | ( |  | ) | const

## § CalcAABB()

virtual void dgCollision::CalcAABB | ( | const dgMatrix & | matrix,
|  | dgVector & | p0,
|  | dgVector & | p1
| ) |  | const

pure virtual

Implemented in dgCollisionCompound, dgCollisionDeformableMesh, dgCollisionConvex, dgCollisionSphere, dgCollisionBox, and dgCollisionNull.

## § CalculateInertiaAndCenterOfMass()

virtual dgMatrix dgCollision::CalculateInertiaAndCenterOfMass | ( | const dgMatrix & | m_alignMatrix,
|  | const dgVector & | localScale,
|  | const dgMatrix & | matrix
| ) |  | const

inlinevirtual

Reimplemented in dgCollisionCompound, and dgCollisionConvex.

## § CalculateMassProperties()

virtual dgFloat32 dgCollision::CalculateMassProperties | ( | const dgMatrix & | offset,
|  | dgVector & | inertia,
|  | dgVector & | crossInertia,
|  | dgVector & | centerOfMass
| ) |  | const

inlinevirtual

Reimplemented in dgCollisionCompound, dgCollisionDeformableMesh, and dgCollisionConvex.

## § CalculatePlaneIntersection()

virtual dgInt32 dgCollision::CalculatePlaneIntersection | ( | const dgVector & | normal,
|  | const dgVector & | point,
|  | dgVector *const | contactsOut,
|  | dgFloat32 | normalSign
| ) |  | const

pure virtual

Implemented in dgCollisionCompound, dgCollisionConvex, dgCollisionSphere, dgCollisionConvexPolygon, dgCollisionChamferCylinder, and dgCollisionBox.

## § CalculateSignature()

virtual dgInt32 dgCollision::CalculateSignature | ( |  | ) | const

protectedpure virtual

Implemented in dgCollisionCompound, dgCollisionDeformableClothPatch, dgCollisionConvexHull, dgCollisionSphere, dgCollisionChamferCylinder, dgCollisionConvexPolygon, dgCollisionDeformableSolidMesh, and dgCollisionBox.

## § CalculateVolumeIntegral()

virtual dgVector dgCollision::CalculateVolumeIntegral | ( | const dgMatrix & | globalMatrix,
|  | const dgVector & | globalPlane,
|  | const dgCollisionInstance & | parentScale
| ) |  | const

pure virtual

Implemented in dgCollisionCompound, dgCollisionConvex, and dgCollisionNull.

## § ConvexRayCast()

virtual dgFloat32 dgCollision::ConvexRayCast | ( | const dgCollisionInstance *const | convexShape,
|  | const dgMatrix & | origin,
|  | const dgVector & | veloc,
|  | dgFloat32 | maxT,
|  | dgContactPoint & | contactOut,
|  | const dgBody *const | referenceBody,
|  | const dgCollisionInstance *const | referenceInstance,
|  | void *const | userData,
|  | dgInt32 | threadId
| ) |  | const

pure virtual

Implemented in dgCollisionCompound, and dgCollisionConvex.

## § DebugCollision()

virtual void dgCollision::DebugCollision | ( | const dgMatrix & | matrix,
|  | dgCollision::OnDebugCollisionMeshCallback | callback,
|  | void *const | userData
| ) |  | const

pure virtual

Implemented in dgCollisionCompound, dgCollisionDeformableMesh, dgCollisionConvex, dgCollisionDeformableSolidMesh, dgCollisionConvexHull, dgCollisionChamferCylinder, dgCollisionSphere, and dgCollisionNull.

## § GetAllocator()

DG_INLINE dgMemoryAllocator * dgCollision::GetAllocator | ( |  | ) | const

## § GetBoxMaxRadius()

virtual dgFloat32 dgCollision::GetBoxMaxRadius | ( |  | ) | const

pure virtual

Implemented in dgCollisionMesh, dgCollisionCompound, dgCollisionConvex, dgCollisionConvexPolygon, and dgCollisionScene.

## § GetBoxMinRadius()

virtual dgFloat32 dgCollision::GetBoxMinRadius | ( |  | ) | const

pure virtual

Implemented in dgCollisionMesh, dgCollisionCompound, dgCollisionConvex, dgCollisionConvexPolygon, and dgCollisionScene.

## § GetCollisionInfo()

void dgCollision::GetCollisionInfo | ( | dgCollisionInfo *const | info | ) | const

virtual

Reimplemented in dgCollisionCompound, dgCollisionSphere, dgCollisionConvexHull, dgCollisionBox, and dgCollisionChamferCylinder.

## § GetCollisionPrimityType()

DG_INLINE dgCollisionID dgCollision::GetCollisionPrimityType | ( |  | ) | const

## § GetConvexVertexCount()

DG_INLINE dgInt32 dgCollision::GetConvexVertexCount | ( |  | ) | const

virtual

Reimplemented in dgCollisionConvex.

## § GetObbOrigin()

DG_INLINE const dgVector & dgCollision::GetObbOrigin | ( |  | ) | const

## § GetObbSize()

DG_INLINE dgVector dgCollision::GetObbSize | ( |  | ) | const

virtual

## § GetRefCount()

DG_INLINE dgInt32 dgCollision::GetRefCount | ( |  | ) | const

## § GetSignature()

DG_INLINE dgUnsigned32 dgCollision::GetSignature | ( |  | ) | const

## § GetSkinThickness()

dgFloat32 dgCollision::GetSkinThickness | ( |  | ) | const

virtual

## § GetUmbraClipSize()

DG_INLINE dgFloat32 dgCollision::GetUmbraClipSize | ( |  | ) | const

## § GetVolume()

virtual dgFloat32 dgCollision::GetVolume | ( |  | ) | const

pure virtual

Implemented in dgCollisionMesh, dgCollisionCompound, dgCollisionConvex, dgCollisionPoint, dgCollisionConvexPolygon, and dgCollisionNull.

## § IsType()

DG_INLINE dgInt32 dgCollision::IsType | ( | dgRTTI | type | ) | const

## § MassProperties()

void dgCollision::MassProperties | ( |  | ) |

virtual

Reimplemented in dgCollisionCompound, dgCollisionConvex, dgCollisionSphere, dgCollisionBox, and dgCollisionScene.

## § Quantize() [1/2]

dgUnsigned32 dgCollision::Quantize | ( | dgFloat32 | value | ) |

static

## § Quantize() [2/2]

dgUnsigned32 dgCollision::Quantize | ( | void * | buffer,
|  | int | size
| ) |  |

static

## § RayCast()

virtual dgFloat32 dgCollision::RayCast | ( | const dgVector & | localP0,
|  | const dgVector & | localP1,
|  | dgFloat32 | maxT,
|  | dgContactPoint & | contactOut,
|  | const dgBody *const | body,
|  | void *const | userData,
|  | OnRayPrecastAction | preFilter
| ) |  | const

pure virtual

Implemented in dgCollisionCompound, dgCollisionConvex, dgCollisionConvexPolygon, dgCollisionNull, dgCollisionSphere, dgCollisionChamferCylinder, and dgCollisionBox.

## § Release()

DG_INLINE dgInt32 dgCollision::Release | ( |  | ) | const

virtual

## § Serialize()

virtual void dgCollision::Serialize | ( | dgSerialize | callback,
|  | void *const | userData
| ) |  | const

pure virtual

Implemented in dgCollisionCompound, dgCollisionDeformableClothPatch, dgCollisionSphere, dgCollisionConvexHull, dgCollisionBox, dgCollisionChamferCylinder, dgCollisionConvexPolygon, dgCollisionDeformableSolidMesh, and dgCollisionScene.

## § SerializeLow()

void dgCollision::SerializeLow | ( | dgSerialize | callback,
|  | void *const | userData
| ) |  | const

virtual

Reimplemented in dgCollisionConvex.

## § SetCollisionBBox()

virtual void dgCollision::SetCollisionBBox | ( | const dgVector & | p0,
|  | const dgVector & | p1
| ) |  |

pure virtual

Implemented in dgCollisionCompound, dgCollisionMesh, dgCollisionDeformableMesh, dgCollisionConvexHull, dgCollisionSphere, dgCollisionConvexPolygon, dgCollisionChamferCylinder, and dgCollisionBox.

## § SetSignature()

DG_INLINE void dgCollision::SetSignature | ( | dgInt32 | signature | ) |

protected

## § SupportVertex()

virtual dgVector dgCollision::SupportVertex | ( | const dgVector & | dir,
|  | dgInt32 *const | vertexIndex
| ) |  | const

pure virtual

Implemented in dgCollisionCompound, dgCollisionPoint, dgCollisionConvex, dgCollisionConvexPolygon, dgCollisionConvexHull, dgCollisionChamferCylinder, dgCollisionBox, dgCollisionNull, and dgCollisionSphere.

## Friends And Related Function Documentation

## § dgBody

friend class dgBody

friend

## § dgCollisionCompound

friend class dgCollisionCompound

friend

## § dgCollisionInstance

friend class dgCollisionInstance

friend

## § dgMinkowskiConv

friend class dgMinkowskiConv

friend

## § dgWorld

friend class dgWorld

friend

## Member Data Documentation

## § m_allocator

dgMemoryAllocator* dgCollision::m_allocator

protected

## § m_boxOrigin

dgVector dgCollision::m_boxOrigin

protected

## § m_boxSize

dgVector dgCollision::m_boxSize

protected

## § m_centerOfMass

dgVector dgCollision::m_centerOfMass

protected

## § m_collisionId

dgCollisionID dgCollision::m_collisionId

protected

## § m_crossInertia

dgVector dgCollision::m_crossInertia

protected

## § m_inertia

dgVector dgCollision::m_inertia

protected

## § m_refCount

dgInt32 dgCollision::m_refCount

mutableprotected

## § m_rtti

dgInt32 dgCollision::m_rtti

protected

## § m_signature

dgUnsigned32 dgCollision::m_signature

protected

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

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