22 #ifndef __DGCOLLIIONBVH__ 23 #define __DGCOLLIIONBVH__ 25 #include "dgCollision.h" 26 #include "dgCollisionMesh.h" 30 typedef dgFloat32(*dgCollisionBVHUserRayCastCallback)(
const dgBody *
const body,
const dgCollisionBVH *
const heightFieldCollision, dgFloat32 interception, dgFloat32 *normal, dgInt32 faceId,
void *usedData);
34 DG_MSC_VECTOR_ALIGMENT
47 } DG_GCC_VECTOR_ALIGMENT;
54 void AddFace(dgInt32 vertexCount,
const dgFloat32 *
const vertexPtr, dgInt32 strideInBytes, dgInt32 faceAttribute);
55 void EndBuild(dgInt32 optimize);
57 void SetCollisionRayCastCallback(dgCollisionBVHUserRayCastCallback rayCastCallback);
58 dgCollisionBVHUserRayCastCallback GetDebugRayCastCallback()
const {
59 return m_userRayCastCallback;
68 static dgFloat32 RayHit(
void *context,
const dgFloat32 *
const polygon, dgInt32 strideInBytes,
const dgInt32 *
const indexArray, dgInt32 indexCount);
69 static dgFloat32 RayHitSimd(
void *context,
const dgFloat32 *
const polygon, dgInt32 strideInBytes,
const dgInt32 *
const indexArray, dgInt32 indexCount);
70 static dgFloat32 RayHitUser(
void *context,
const dgFloat32 *
const polygon, dgInt32 strideInBytes,
const dgInt32 *
const indexArray, dgInt32 indexCount);
71 static dgFloat32 RayHitUserSimd(
void *context,
const dgFloat32 *
const polygon, dgInt32 strideInBytes,
const dgInt32 *
const indexArray, dgInt32 indexCount);
72 static dgIntersectStatus GetPolygon(
void *context,
const dgFloat32 *
const polygon, dgInt32 strideInBytes,
const dgInt32 *
const indexArray, dgInt32 indexCount);
73 static dgIntersectStatus ShowDebugPolygon(
void *context,
const dgFloat32 *
const polygon, dgInt32 strideInBytes,
const dgInt32 *
const indexArray, dgInt32 indexCount);
74 static dgIntersectStatus GetTriangleCount(
void *context,
const dgFloat32 *
const polygon, dgInt32 strideInBytes,
const dgInt32 *
const indexArray, dgInt32 indexCount);
75 static dgIntersectStatus CollectVertexListIndexList(
void *context,
const dgFloat32 *
const polygon, dgInt32 strideInBytes,
const dgInt32 *
const indexArray, dgInt32 indexCount);
77 void Serialize(dgSerialize callback,
void *
const userData)
const;
79 virtual dgFloat32 RayCast(
const dgVector &localP0,
const dgVector &localP1,
dgContactPoint &contactOut, OnRayPrecastAction preFilter,
const dgBody *
const body,
void *
const userData)
const;
80 virtual dgFloat32 RayCastSimd(
const dgVector &localP0,
const dgVector &localP1,
dgContactPoint &contactOut, OnRayPrecastAction preFilter,
const dgBody *
const body,
void *
const userData)
const;
85 void DebugCollision(
const dgMatrix &matrixPtr, OnDebugCollisionMeshCallback callback,
void *
const userData)
const;
88 dgCollisionBVHUserRayCastCallback m_userRayCastCallback;
Definition: dgCollisionBVH.h:35
Definition: dgCollisionBVH.h:32
Definition: dgIntersections.h:35
Definition: dgCollision.h:73
Definition: dgCollisionMesh.h:39
Definition: dgVector.h:86
Definition: dgPolygonSoupBuilder.h:45
Definition: dgCollisionMesh.h:101
Definition: dgCollisionMesh.h:90
Definition: dgMatrix.h:41
Definition: dgMemory.h:80
Definition: dgWorld.h:118
Definition: dgAABBPolygonSoup.h:37
Definition: dgCollisionCompound.h:31