My Project: dgCollisionInstance Class Reference

My Project

Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
dgCollisionInstance Class Reference

`#include <dgCollisionInstance.h>`

## Public Types

enum | dgScaleType { m_unit, m_uniform, m_nonUniform, m_global }

## Public Member Functions

| dgCollisionInstance ()
| dgCollisionInstance (const dgCollisionInstance &instance)
| dgCollisionInstance (const dgCollisionInstance &meshInstance, const dgCollision *const shape)
| dgCollisionInstance (const dgWorld *const world, const dgCollision *const childCollision, dgInt32 shapeID, const dgMatrix &matrix)
| dgCollisionInstance (const dgWorld *const world, dgDeserialize deserialization, void *const userData)
| ~dgCollisionInstance ()
dgCollisionInstance * | AddRef ()
dgInt32 | Release ()
void | SetScale (const dgVector &scale)
const dgVector & | GetScale () const
const dgVector & | GetInvScale () const
void | SetGlobalScale (const dgVector &scale)
dgScaleType | GetScaleType () const
dgScaleType | GetCombinedScaleType (dgScaleType type) const
const dgMatrix & | GetLocalMatrix () const
const dgMatrix & | GetGlobalMatrix () const
const dgMatrix & | GetAlignMatrix () const
void | SetLocalMatrix (const dgMatrix &matrix)
void | SetGlobalMatrix (const dgMatrix &matrix)
dgUnsigned32 | GetUserDataID () const
void | SetUserDataID (dgUnsigned32 userData)
void * | GetUserData () const
void | SetUserData (void *const userData)
const void * | GetCollisionHandle () const
const dgCollisionInstance * | GetParent () const
dgVector | GetBoxSize () const
dgVector | GetBoxOrigin () const
dgFloat32 | GetUmbraClipSize () const
const dgWorld * | GetWorld () const
const dgCollision * | GetChildShape () const
void | SetWorld (dgWorld *const world)
void | SetChildShape (dgCollision *const shape)
dgFloat32 | GetVolume () const
void | GetCollisionInfo (dgCollisionInfo *const info) const
dgInt32 | IsType (dgCollision::dgRTTI type) const
dgMemoryAllocator * | GetAllocator () const
bool | GetCollisionMode () const
void | SetCollisionMode (bool mode)
void | SetBreakImpulse (dgFloat32 force)
dgFloat32 | GetBreakImpulse () const
dgUnsigned32 | GetSignature () const
dgCollisionID | GetCollisionPrimityType () const
void | CalcObb (dgVector &origin, dgVector &size) const
void | CalcAABB (const dgMatrix &matrix, dgVector &p0, dgVector &p1) const
dgFloat32 | RayCast (const dgVector &localP0, const dgVector &localP1, dgFloat32 maxT, dgContactPoint &contactOut, OnRayPrecastAction preFilter, const dgBody *const body, void *const userData) const
dgFloat32 | ConvexRayCast (const dgCollisionInstance *const convexShape, const dgMatrix &localMatrix, const dgVector &localVeloc, dgFloat32 maxT, dgContactPoint &contactOut, OnRayPrecastAction preFilter, const dgBody *const referenceBody, void *const userData, dgInt32 threadId) const
dgFloat32 | GetBoxMinRadius () const
dgFloat32 | GetBoxMaxRadius () const
dgMatrix | CalculateInertia () const
void | DebugCollision (const dgMatrix &matrix, dgCollision::OnDebugCollisionMeshCallback callback, void *const userData) const
dgVector | SupportVertex (const dgVector &dir, dgInt32 *const vertexIndex) const
dgInt32 | CalculatePlaneIntersection (const dgVector &normal, const dgVector &point, dgVector *const contactsOut, dgFloat32 normalSign) const
dgInt32 | CalculateSignature () const
void | SetCollisionBBox (const dgVector &p0, const dgVector &p1)
dgInt32 | GetConvexVertexCount () const
void | Serialize (dgSerialize callback, void *const userData, bool saveShape=true) const
void | CalculateBuoyancyAcceleration (const dgMatrix &matrix, const dgVector &origin, const dgVector &gravity, const dgVector &fluidPlane, dgFloat32 fluidDensity, dgFloat32 fluidViscosity, dgVector &accel, dgVector &alpha)

## Public Attributes

dgMatrix | m_globalMatrix
dgMatrix | m_localMatrix
dgMatrix | m_aligmentMatrix
dgVector | m_scale
dgVector | m_invScale
dgVector | m_maxScale
dgUnsigned32 | m_userDataID
dgInt32 | m_refCount
void * | m_userData
const dgWorld * | m_world
const dgCollision * | m_childShape
const void * | m_subCollisionHandle
const dgCollisionInstance * | m_parent
dgInt32 | m_collisionMode
dgScaleType | m_scaleType

## Static Public Attributes

static dgVector | m_padding

## Member Enumeration Documentation

## § dgScaleType

enum dgCollisionInstance::dgScaleType

Enumerator
m_unit |
m_uniform |
m_nonUniform |
m_global |

## Constructor & Destructor Documentation

## § dgCollisionInstance() [1/5]

dgCollisionInstance::dgCollisionInstance | ( |  | ) |

## § dgCollisionInstance() [2/5]

dgCollisionInstance::dgCollisionInstance | ( | const dgCollisionInstance & | instance | ) |

## § dgCollisionInstance() [3/5]

DG_INLINE dgCollisionInstance::dgCollisionInstance | ( | const dgCollisionInstance & | meshInstance,
|  | const dgCollision *const | shape
| ) |  |

## § dgCollisionInstance() [4/5]

dgCollisionInstance::dgCollisionInstance | ( | const dgWorld *const | world,
|  | const dgCollision *const | childCollision,
|  | dgInt32 | shapeID,
|  | const dgMatrix & | matrix
| ) |  |

## § dgCollisionInstance() [5/5]

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

## § ~dgCollisionInstance()

dgCollisionInstance::~dgCollisionInstance | ( |  | ) |

## Member Function Documentation

## § AddRef()

DG_INLINE dgCollisionInstance * dgCollisionInstance::AddRef | ( |  | ) |

## § CalcAABB()

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

## § CalcObb()

DG_INLINE void dgCollisionInstance::CalcObb | ( | dgVector & | origin,
|  | dgVector & | size
| ) |  | const

## § CalculateBuoyancyAcceleration()

void dgCollisionInstance::CalculateBuoyancyAcceleration | ( | const dgMatrix & | matrix,
|  | const dgVector & | origin,
|  | const dgVector & | gravity,
|  | const dgVector & | fluidPlane,
|  | dgFloat32 | fluidDensity,
|  | dgFloat32 | fluidViscosity,
|  | dgVector & | accel,
|  | dgVector & | alpha
| ) |  |

## § CalculateInertia()

dgMatrix dgCollisionInstance::CalculateInertia | ( |  | ) | const

## § CalculatePlaneIntersection()

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

## § CalculateSignature()

DG_INLINE dgInt32 dgCollisionInstance::CalculateSignature | ( |  | ) | const

## § ConvexRayCast()

dgFloat32 dgCollisionInstance::ConvexRayCast | ( | const dgCollisionInstance *const | convexShape,
|  | const dgMatrix & | localMatrix,
|  | const dgVector & | localVeloc,
|  | dgFloat32 | maxT,
|  | dgContactPoint & | contactOut,
|  | OnRayPrecastAction | preFilter,
|  | const dgBody *const | referenceBody,
|  | void *const | userData,
|  | dgInt32 | threadId
| ) |  | const

## § DebugCollision()

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

## § GetAlignMatrix()

DG_INLINE const dgMatrix & dgCollisionInstance::GetAlignMatrix | ( |  | ) | const

## § GetAllocator()

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

## § GetBoxMaxRadius()

DG_INLINE dgFloat32 dgCollisionInstance::GetBoxMaxRadius | ( |  | ) | const

## § GetBoxMinRadius()

DG_INLINE dgFloat32 dgCollisionInstance::GetBoxMinRadius | ( |  | ) | const

## § GetBoxOrigin()

DG_INLINE dgVector dgCollisionInstance::GetBoxOrigin | ( |  | ) | const

## § GetBoxSize()

DG_INLINE dgVector dgCollisionInstance::GetBoxSize | ( |  | ) | const

## § GetBreakImpulse()

DG_INLINE dgFloat32 dgCollisionInstance::GetBreakImpulse | ( |  | ) | const

## § GetChildShape()

DG_INLINE const dgCollision * dgCollisionInstance::GetChildShape | ( |  | ) | const

## § GetCollisionHandle()

DG_INLINE const void * dgCollisionInstance::GetCollisionHandle | ( |  | ) | const

## § GetCollisionInfo()

DG_INLINE void dgCollisionInstance::GetCollisionInfo | ( | dgCollisionInfo *const | info | ) | const

## § GetCollisionMode()

DG_INLINE bool dgCollisionInstance::GetCollisionMode | ( |  | ) | const

## § GetCollisionPrimityType()

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

## § GetCombinedScaleType()

DG_INLINE dgCollisionInstance::dgScaleType dgCollisionInstance::GetCombinedScaleType | ( | dgCollisionInstance::dgScaleType | type | ) | const

## § GetConvexVertexCount()

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

## § GetGlobalMatrix()

DG_INLINE const dgMatrix & dgCollisionInstance::GetGlobalMatrix | ( |  | ) | const

## § GetInvScale()

DG_INLINE const dgVector & dgCollisionInstance::GetInvScale | ( |  | ) | const

## § GetLocalMatrix()

DG_INLINE const dgMatrix & dgCollisionInstance::GetLocalMatrix | ( |  | ) | const

## § GetParent()

DG_INLINE const dgCollisionInstance * dgCollisionInstance::GetParent | ( |  | ) | const

## § GetScale()

DG_INLINE const dgVector & dgCollisionInstance::GetScale | ( |  | ) | const

## § GetScaleType()

DG_INLINE dgCollisionInstance::dgScaleType dgCollisionInstance::GetScaleType | ( |  | ) | const

## § GetSignature()

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

## § GetUmbraClipSize()

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

## § GetUserData()

DG_INLINE void * dgCollisionInstance::GetUserData | ( |  | ) | const

## § GetUserDataID()

DG_INLINE dgUnsigned32 dgCollisionInstance::GetUserDataID | ( |  | ) | const

## § GetVolume()

DG_INLINE dgFloat32 dgCollisionInstance::GetVolume | ( |  | ) | const

## § GetWorld()

DG_INLINE const dgWorld * dgCollisionInstance::GetWorld | ( |  | ) | const

## § IsType()

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

## § RayCast()

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

## § Release()

DG_INLINE dgInt32 dgCollisionInstance::Release | ( |  | ) |

## § Serialize()

void dgCollisionInstance::Serialize | ( | dgSerialize | callback,
|  | void *const | userData,
|  | bool | saveShape = `true`
| ) |  | const

## § SetBreakImpulse()

DG_INLINE void dgCollisionInstance::SetBreakImpulse | ( | dgFloat32 | force | ) |

## § SetChildShape()

DG_INLINE void dgCollisionInstance::SetChildShape | ( | dgCollision *const | shape | ) |

## § SetCollisionBBox()

DG_INLINE void dgCollisionInstance::SetCollisionBBox | ( | const dgVector & | p0,
|  | const dgVector & | p1
| ) |  |

## § SetCollisionMode()

DG_INLINE void dgCollisionInstance::SetCollisionMode | ( | bool | mode | ) |

## § SetGlobalMatrix()

DG_INLINE void dgCollisionInstance::SetGlobalMatrix | ( | const dgMatrix & | matrix | ) |

## § SetGlobalScale()

void dgCollisionInstance::SetGlobalScale | ( | const dgVector & | scale | ) |

## § SetLocalMatrix()

void dgCollisionInstance::SetLocalMatrix | ( | const dgMatrix & | matrix | ) |

## § SetScale()

void dgCollisionInstance::SetScale | ( | const dgVector & | scale | ) |

## § SetUserData()

DG_INLINE void dgCollisionInstance::SetUserData | ( | void *const | userData | ) |

## § SetUserDataID()

DG_INLINE void dgCollisionInstance::SetUserDataID | ( | dgUnsigned32 | userData | ) |

## § SetWorld()

DG_INLINE void dgCollisionInstance::SetWorld | ( | dgWorld *const | world | ) |

## § SupportVertex()

DG_INLINE dgVector dgCollisionInstance::SupportVertex | ( | const dgVector & | dir,
|  | dgInt32 *const | vertexIndex
| ) |  | const

## Member Data Documentation

## § m_aligmentMatrix

dgMatrix dgCollisionInstance::m_aligmentMatrix

## § m_childShape

const dgCollision* dgCollisionInstance::m_childShape

## § m_collisionMode

dgInt32 dgCollisionInstance::m_collisionMode

## § m_globalMatrix

dgMatrix dgCollisionInstance::m_globalMatrix

## § m_invScale

dgVector dgCollisionInstance::m_invScale

## § m_localMatrix

dgMatrix dgCollisionInstance::m_localMatrix

## § m_maxScale

dgVector dgCollisionInstance::m_maxScale

## § m_padding

dgVector dgCollisionInstance::m_padding

static

## § m_parent

const dgCollisionInstance* dgCollisionInstance::m_parent

## § m_refCount

dgInt32 dgCollisionInstance::m_refCount

## § m_scale

dgVector dgCollisionInstance::m_scale

## § m_scaleType

dgScaleType dgCollisionInstance::m_scaleType

## § m_subCollisionHandle

const void* dgCollisionInstance::m_subCollisionHandle

## § m_userData

void* dgCollisionInstance::m_userData

## § m_userDataID

dgUnsigned32 dgCollisionInstance::m_userDataID

## § m_world

const dgWorld* dgCollisionInstance::m_world

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

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