29#ifndef GU_SWEEP_SPHERE_TRIANGLE_H
30#define GU_SWEEP_SPHERE_TRIANGLE_H
32#include "GuSweepTriangleUtils.h"
66 const PxVec3& sphereCenter, PxReal sphereRadius,
67 const PxVec3& unitDir,
68 PxReal& impactDistance,
bool& directHit,
69 bool testInitialOverlap);
95 const PxVec3& sphereCenter,
float sphereRadius,
96 const PxVec3& unitDir,
97 float& impactDistance);
101 PX_FORCE_INLINE bool computeSphereTriangleImpactData(PxGeomSweepHit& h, PxVec3& triNormalOut, PxU32 index, PxReal curT,
102 const PxVec3& center,
const PxVec3& unitDir,
const PxVec3& bestTriNormal,
104 bool isDoubleSided,
bool meshBothSides)
106 if(index==PX_INVALID_U32)
110 PxVec3 hitPos, normal;
111 computeSphereTriImpactData(hitPos, normal, center, unitDir, curT, triangles[index]);
114 if(shouldFlipNormal(normal, meshBothSides, isDoubleSided, bestTriNormal, unitDir))
122 triNormalOut = bestTriNormal;
145 const PxVec3& center,
const PxReal radius,
146 const PxVec3& unitDir, PxReal distance,
148 PxGeomSweepHit& hit, PxVec3& triNormalOut,
149 bool isDoubleSided,
bool meshBothSides,
bool anyHit,
bool testInitialOverlap);
#define PX_RESTRICT
Definition PxPreprocessor.h:355
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
bool sweepSphereVSQuad(const PxVec3 *PX_RESTRICT quadVerts, const PxVec3 &quadUnitNormal, const PxVec3 &sphereCenter, float sphereRadius, const PxVec3 &unitDir, float &impactDistance)
Definition GuSweepSphereTriangle.cpp:612
bool sweepSphereVSTri(const PxVec3 *PX_RESTRICT triVerts, const PxVec3 &triUnitNormal, const PxVec3 &sphereCenter, PxReal sphereRadius, const PxVec3 &unitDir, PxReal &impactDistance, bool &directHit, bool testInitialOverlap)
Definition GuSweepSphereTriangle.cpp:203
bool sweepSphereTriangles(PxU32 nbTris, const PxTriangle *PX_RESTRICT triangles, const PxVec3 ¢er, const PxReal radius, const PxVec3 &unitDir, PxReal distance, const PxU32 *PX_RESTRICT cachedIndex, PxGeomSweepHit &hit, PxVec3 &triNormalOut, bool isDoubleSided, bool meshBothSides, bool anyHit, bool testInitialOverlap)
Definition GuSweepSphereTriangle.cpp:456
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
@ eNORMAL
"normal" member of #PxQueryHit is valid
Definition PxGeometryHit.h:61
@ ePOSITION
"position" member of #PxQueryHit is valid
Definition PxGeometryHit.h:60