22 #ifndef AFX_DGCOLLISIONCOMPOUND_BREAKABLE_H__INCLUDED_ 23 #define AFX_DGCOLLISIONCOMPOUND_BREAKABLE_H__INCLUDED_ 25 #include "dgCollisionCompound.h" 26 #include "dgCollisionConvex.h" 34 dgFloat32 m_point[10];
49 DG_CLASS_ALLOCATOR(allocator)
54 void Serialize(dgSerialize callback,
void *
const userData)
const;
55 void GetVertexStreams(dgInt32 vertexStrideInByte, dgFloat32 *vertex, dgInt32 normalStrideInByte, dgFloat32 *normal,
56 dgInt32 uvStrideInByte, dgFloat32 *uv)
const;
58 dgInt32 m_vertexCount;
69 void Serialize(dgSerialize callback,
void *
const userData)
const;
72 dgInt32 m_visibleFaces;
84 void Serialize(dgSerialize callback,
void *
const userData)
const;
85 dgSubMesh *AddgSubMesh(dgInt32 indexCount, dgInt32 material);
100 dgInt32 m_distanceToFixNode;
101 dgInt32 m_islandIndex;
122 void AddNode(
dgFlatVertexArray &vertexArray,
dgMeshEffect *solid, dgInt32 clipperMaterial, dgInt32
id, dgFloat32 density, dgFloat32 padding);
129 const dgInt32 *
const idArray,
const dgFloat32 *
const densities,
const dgInt32 *
const internalFaceMaterial, dgFloat32 gaps);
131 void Serialize(dgSerialize callback,
void *
const userData)
const;
149 virtual dgFloat32 GetVolume()
const;
155 virtual void DebugCollision(
const dgMatrix &matrix, OnDebugCollisionMeshCallback callback,
void *
const userData)
const;
156 virtual dgFloat32 RayCast(
const dgVector &localP0,
const dgVector &localP1,
dgContactPoint &contactOut, OnRayPrecastAction preFilter,
const dgBody *
const body,
void *
const userData)
const;
157 virtual dgFloat32 RayCastSimd(
const dgVector &localP0,
const dgVector &localP1,
dgContactPoint &contactOut, OnRayPrecastAction preFilter,
const dgBody *
const body,
void *
const userData)
const;
158 virtual dgVector CalculateVolumeIntegral(
const dgMatrix &globalMatrix, GetBuoyancyPlane bouyancyPlane,
void *
const context)
const;
161 virtual dgInt32 CalculateSignature()
const;
163 virtual dgFloat32 GetBoxMinRadius()
const;
164 virtual dgFloat32 GetBoxMaxRadius()
const;
165 virtual dgInt32 CalculatePlaneIntersection(
const dgVector &normal,
const dgVector &point,
dgVector *
const contactsOut)
const;
166 virtual dgInt32 CalculatePlaneIntersectionSimd(
const dgVector &normal,
const dgVector &point,
dgVector *
const contactsOut)
const;
168 virtual void Serialize(dgSerialize callback,
void *
const userData)
const;
170 virtual void SetBreakImpulse(dgFloat32 force);
171 virtual dgFloat32 GetBreakImpulse()
const;
175 dgDebriGraph::dgListNode *m_graphNode;
177 dgFloat32 m_destructionImpulse;
188 dgDebriGraph::dgListNode *m_node;
204 const dgFloat32 *
const densities,
const dgInt32 *
const internalFaceMaterial,
205 dgInt32 debriiId, dgFloat32 gaps,
dgWorld *world);
210 void DeleteComponentBegin();
211 dgBody *CreateComponentBody(dgDebriGraph::dgListNode *node)
const;
212 void DeleteComponent(dgDebriGraph::dgListNode *node);
213 void DeleteComponentEnd();
215 dgDebriGraph::dgListNode *GetMainMesh()
const {
216 return m_conectivity.GetLast();
218 dgDebriGraph::dgListNode *GetFirstComponentMesh()
const {
219 return (m_conectivity.GetCount() > 2) ? m_conectivity.GetFirst()->GetNext() : NULL;
221 dgInt32 GetSegmentsInRadius(
const dgVector &origin, dgFloat32 radius, dgDebriGraph::dgListNode **segments, dgInt32 maxCount)
const;
224 void SetAnchoredParts(dgInt32 count,
const dgMatrix *
const matrixArray,
dgCollision *
const *collisionArray);
225 void EnumerateIslands();
229 dgInt32 GetSegmentIndexStream(dgDebriGraph::dgListNode *
const node, dgMesh::dgListNode *segment, dgInt32 *
const index)
const;
230 dgInt32 GetSegmentIndexStreamShort(
const dgDebriGraph::dgListNode *
const node, dgMesh::dgListNode *segment, dgInt16 *
const index)
const;
232 dgInt32 GetVertecCount()
const {
233 return m_vertexBuffer->m_vertexCount;
235 void GetVertexStreams(dgInt32 vertexStrideInByte, dgFloat32 *vertex,
236 dgInt32 normalStrideInByte, dgFloat32 *normal,
237 dgInt32 uvStrideInByte, dgFloat32 *uv)
const {
238 m_vertexBuffer->GetVertexStreams(vertexStrideInByte, vertex, normalStrideInByte, normal, uvStrideInByte, uv);
245 virtual void Serialize(dgSerialize callback,
void *
const userData)
const;
248 dgInt32 m_lastIslandColor;
249 dgInt32 m_visibilityMapIndexCount;
250 dgInt8 *m_visibilityMap;
251 dgInt32 *m_visibilityInderectMap;
Definition: dgCollisionCompoundBreakable.h:95
Definition: dgCollisionCompoundBreakable.h:47
Definition: dgCollision.h:73
Definition: dgCollisionCompoundBreakable.h:37
Definition: dgVector.h:86
Definition: dgRefCounter.h:25
Definition: dgCollisionCompoundBreakable.h:114
Definition: dgCollisionCompoundBreakable.h:134
Definition: dgMeshEffect.h:78
Definition: dgCollisionCompoundBreakable.h:79
Definition: dgCollisionCompoundBreakable.h:30
Definition: dgCollisionCompoundBreakable.h:108
Definition: dgCollisionCompoundBreakable.h:185
Definition: dgCollisionCompoundBreakable.h:90
Definition: dgCollisionCompoundBreakable.h:65
Definition: dgCollisionConvex.h:39
Definition: dgCollisionCompoundBreakable.h:32
Definition: dgCollision.h:178
Definition: dgMatrix.h:41
Definition: dgMemory.h:80
Definition: dgCollisionCompound.h:58
Definition: dgWorld.h:118
Definition: dgCollisionCompoundBreakable.h:141
Definition: dgCollisionCompound.h:31