00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef PX_PHYSICS_EXTENSIONS_TRIANGLE_MESH_H
00032 #define PX_PHYSICS_EXTENSIONS_TRIANGLE_MESH_H
00033
00037 #include "PxPhysXConfig.h"
00038 #include "common/PxPhysXCommonConfig.h"
00039
00040 #if !PX_DOXYGEN
00041 namespace physx
00042 {
00043 #endif
00044
00045 class PxGeometry;
00046 class PxTriangleMeshGeometry;
00047 class PxHeightFieldGeometry;
00048
00061 class PxMeshOverlapUtil
00062 {
00063 public:
00064 PxMeshOverlapUtil();
00065 ~PxMeshOverlapUtil();
00077 PxU32 findOverlap(const PxGeometry& geom, const PxTransform& geomPose, const PxTriangleMeshGeometry& meshGeom, const PxTransform& meshPose);
00078
00090 PxU32 findOverlap(const PxGeometry& geom, const PxTransform& geomPose, const PxHeightFieldGeometry& hfGeom, const PxTransform& hfPose);
00091
00096 PX_FORCE_INLINE const PxU32* getResults() const { return mResultsMemory; }
00097
00102 PX_FORCE_INLINE PxU32 getNbResults() const { return mNbResults; }
00103
00104 private:
00105 PxU32* mResultsMemory;
00106 PxU32 mResults[256];
00107 PxU32 mNbResults;
00108 PxU32 mMaxNbResults;
00109 };
00110
00138 bool PxComputeTriangleMeshPenetration(PxVec3& direction,
00139 PxReal& depth,
00140 const PxGeometry& geom,
00141 const PxTransform& geomPose,
00142 const PxTriangleMeshGeometry& meshGeom,
00143 const PxTransform& meshPose,
00144 PxU32 maxIter,
00145 PxU32* usedIter = NULL);
00146
00174 bool PxComputeHeightFieldPenetration(PxVec3& direction,
00175 PxReal& depth,
00176 const PxGeometry& geom,
00177 const PxTransform& geomPose,
00178 const PxHeightFieldGeometry& heightFieldGeom,
00179 const PxTransform& heightFieldPose,
00180 PxU32 maxIter,
00181 PxU32* usedIter = NULL);
00182
00183 #if !PX_DOXYGEN
00184 }
00185 #endif
00186
00188 #endif