RavEngine
Loading...
Searching...
No Matches
physx::Gu Namespace Reference

Represents a sphere defined by its center point and radius. More...

Classes

struct  AABBAABBTest
 
class  AABBPruner
 
struct  AABBPrunerMergeData
 
class  AABBTree
 AABB-tree, N primitives/leaf. More...
 
class  AABBTreeBounds
 
class  AABBTreeBuildNode
 AABB tree node used for building. More...
 
class  AABBTreeBuildParams
 Contains AABB-tree build parameters. More...
 
struct  AABBTreeIndices
 
class  AABBTreeMergeData
 Contains AABB-tree merge parameters. More...
 
class  AABBTreeNode
 
class  AABBTreeOverlap
 
class  AABBTreeRaycast
 
class  AABBTreeUpdateMap
 
class  ActorShapeMap
 
class  Adapter
 
class  Adjacencies
 
class  AdjacenciesBuilder
 
struct  ADJACENCIESCREATE
 The adjacencies creation structure. More...
 
class  AdjTriangle
 A triangle class used to compute the adjacency structures. More...
 
class  BasePruner
 
struct  BigConvexRawData
 
class  BitArray
 
class  Box
 Represents an oriented bounding box. More...
 
class  BoxPadded
 A padded version of Gu::Box, to safely load its data using SIMD. More...
 
struct  BoxShapeCast
 
class  BoxV
 
class  BucketPruner
 
class  BucketPrunerCore
 
class  BucketPrunerMap
 
struct  BucketPrunerPair
 
struct  BuildStats
 Contains AABB-tree build statistics. More...
 
struct  BV32Data
 
struct  BV32DataDepthInfo
 
struct  BV32DataPacked
 
class  BV32Tree
 
class  BV4_AABBTree
 
class  BV4Tree
 
class  BV4TriangleData
 
class  BV4TriangleMesh
 
struct  BVDataPackedT
 
struct  BVDataSwizzledNQ
 
struct  BVDataSwizzledQ
 
class  BVH
 Represents a BVH. More...
 
class  BVHCoreData
 
class  BVHData
 
struct  BVHNode
 
class  BVHPartialRefitData
 
class  BVTetrahedronMesh
 
struct  Cache
 
struct  CachedEdge
 
struct  CachedFuncs
 
class  CachedMeshPersistentContact
 
struct  CachedVertex
 
struct  CacheMap
 
struct  CallbackMode
 
class  Capsule
 Represents a capsule. More...
 
struct  CapsuleAABBTest
 
struct  CapsuleShapeCast
 
struct  CapsuleTriangleOverlapData
 
class  CapsuleV
 
struct  CCDShape
 
class  CenterExtents
 
class  CenterExtentsPadded
 A padded version of CenterExtents, to safely load its data using SIMD. More...
 
class  ClosestDistanceToTrimeshTraversalController
 
struct  ClusterApproximationT
 
class  CollisionMeshMappingData
 
class  CollisionTetrahedronMeshData
 
class  CompanionPruner
 
struct  ConvexEdge
 
struct  ConvexGeom
 
struct  ConvexGeom< BoxV >
 
struct  ConvexGeom< ConvexHullNoScaleV >
 
struct  ConvexGeom< ConvexHullV >
 
struct  ConvexHullData
 
struct  ConvexHullInitData
 
class  ConvexHullNoScaleV
 
class  ConvexHullV
 
class  ConvexMesh
 
struct  ConvexShapeCast
 
struct  ConvexType
 
class  ConvexV
 
struct  CoreTree
 
struct  DefaultAABBAABBTest
 
struct  DefaultCapsuleAABBTest
 
struct  DefaultOBBAABBTest
 
struct  DefaultPrunerOverlapCallback
 
struct  DefaultPrunerRaycastAnyCallback
 
struct  DefaultPrunerRaycastCallback
 
struct  DefaultPrunerRaycastClosestCallback
 
struct  DefaultPrunerSweepCallback
 
struct  DefaultPrunerSweepCallbackT
 
struct  DefaultSphereAABBTest
 
class  DenseSDF
 
class  Dim3
 Represents dimensions of signed distance field. More...
 
class  DynamicPruner
 
class  Edge
 
struct  Edge8Data
 Basic edge-data using 8-bit references. More...
 
class  EdgeBuffer
 
class  EdgeCache
 
struct  EdgeData
 Basic edge-data. More...
 
struct  EdgeDescData
 A count/offset pair = an edge descriptor. More...
 
class  EdgeList
 
struct  EDGELISTCREATE
 The edge-list creation structure. More...
 
class  EdgeTriangleAC
 
struct  EdgeTriangleData
 Edge<->triangle mapping. More...
 
class  EntityReport
 
class  EPA
 
class  ExtendedBucketPruner
 
struct  ExtendedBucketPrunerData
 
struct  ExtendedBucketPrunerHash
 
class  Facet
 
struct  FacetDistanceComparator
 
class  FIFOStack
 
struct  GeomSweepFuncs
 
struct  GjkConvex
 
struct  GjkOutput
 
class  GridQueryPointSampler
 
class  HeightField
 
struct  HeightFieldData
 
class  HeightFieldTraceUtil
 
class  HeightFieldUtil
 
struct  HullPolygonData
 
class  IncrementalAABBPruner
 
class  IncrementalAABBPrunerCore
 
class  IncrementalAABBTree
 
class  IncrementalAABBTreeNode
 
struct  IncrementalAABBTreeNodePair
 
struct  IndexedTriangleT
 
class  IndTetrahedron16
 
class  IndTetrahedron32
 
struct  InternalObjectsData
 
struct  Interval
 
class  LargePersistentContactManifold
 
struct  LeafTriangles
 
struct  LimitedResults
 
class  LineSegmentTrimeshIntersectionTraversalController
 
struct  LocalBounds
 
struct  LocalConvex
 
class  MaverickNode
 
struct  MergedTree
 
class  MeshAnalyzer
 
class  MeshCleaner
 
class  MeshDataBase
 
class  MeshFactory
 
class  MeshFactoryListener
 
struct  MeshHitCallback
 
class  MeshPersistentContact
 
struct  MultiPersistentManifoldHeader
 
class  MultiplePersistentContactManifold
 
struct  Mutation
 
struct  NarrowPhaseParams
 
class  NodeAllocator
 
struct  OBBAABBTests
 
struct  OverlapCallbackAdapter
 
class  OverlapReport
 
class  PCMCapsuleVsMeshContactGeneration
 
struct  PCMContactPatch
 
class  PCMConvexVsMeshContactGeneration
 
struct  PCMDeferredPolyData
 
struct  PCMHeightfieldContactGenerationCallback
 
class  PCMMeshContactGeneration
 
struct  PCMMeshContactGenerationCallback
 
class  PCMPolygonalBox
 
class  PCMSphereVsMeshContactGeneration
 
struct  PCMTetMeshContactGenerationCallback
 
class  PersistentContact
 
class  PersistentContactManifold
 
struct  PixelProcessor
 
class  PlaneV
 
class  PolygonalBox
 
struct  PolygonalData
 
class  Pruner
 
class  PrunerFilter
 
struct  PrunerFilterCallback
 
struct  PrunerOverlapCallback
 
struct  PrunerPayload
 
struct  PrunerPayloadData
 
struct  PrunerPayloadRemovalCallback
 
struct  PrunerRaycastCallback
 
class  PruningPool
 
struct  PxI32x3
 
class  QuantizedAABB
 
class  Quantizer
 
class  QuerySystem
 
struct  Range
 
struct  RayAABBTest
 
struct  RaycastCallbackAdapter
 
class  RaycastHitInternal
 
struct  REDUCEDCLOUD
 Vertex cloud reduction result structure. More...
 
class  ReducedVertexCloud
 
struct  RelativeConvex
 
struct  RTree
 
struct  RTreeNodeQ
 
struct  RTreePage
 
class  RTreeTriangleData
 
class  RTreeTriangleMesh
 
struct  SAH_Buffers
 
class  SDF
 Represents a signed distance field. More...
 
struct  SDFCalculationData
 
struct  SecondOrderClusterApproximationT
 
struct  Section
 
class  Segment
 Represents a line segment. More...
 
class  SeparatingAxes
 
class  ShapeData
 
class  SimulationTetrahedronMeshData
 
struct  SingleManifoldHeader
 
class  SinglePersistentContactManifold
 
class  SoftBodyAuxData
 
class  SoftBodyCollisionData
 
class  SoftBodyMesh
 
class  SoftBodyMeshData
 
class  SoftBodySimulationData
 
struct  SortedTriangle
 
class  SourceMesh
 
class  SourceMeshBase
 
class  Sphere
 
struct  SphereAABBTest
 
class  SpherePersistentContactManifold
 
struct  SphereShapeCast
 
class  SphereV
 
class  SupportLocal
 
class  SupportLocalImpl
 
struct  SweepBoxMeshHitCallback
 
struct  SweepCapsuleMeshHitCallback
 
struct  SweepConvexMeshHitCallback
 
class  SweepHit
 
struct  SweepShapeMeshHitCallback
 
struct  TetMeshHitCallback
 
struct  TetrahedronCache
 
class  TetrahedronMesh
 
class  TetrahedronMeshData
 
struct  TetrahedronPointers
 
class  TetrahedronSourceMesh
 
struct  TetrahedronT
 Structure used to store indices for a triangles points. T is either PxU32 or PxU16. More...
 
class  TetrahedronV
 
struct  TraversalControl
 
struct  TriangleCache
 
class  TriangleMesh
 
class  TriangleMeshData
 
class  TriangleV
 
struct  TriggerCache
 
struct  uint4
 
struct  Valency
 
struct  VertexPointers
 
class  WindingNumberTraversalController
 

Typedefs

typedef PxU64 ActorShapeData
 
typedef bool(* GeomOverlapFunc) (GU_OVERLAP_FUNC_PARAMS)
 
typedef GeomOverlapFunc GeomOverlapTable[PxGeometryType::eGEOMETRY_COUNT]
 
typedef PxU32 PrunerHandle
 
typedef PxU32 PoolIndex
 
typedef PxU32 TreeNodeIndex
 
typedef PxU32 PrunerInfo
 
typedef DefaultPrunerSweepCallbackT< SphereShapeCast > DefaultPrunerSphereSweepCallback
 
typedef DefaultPrunerSweepCallbackT< BoxShapeCast > DefaultPrunerBoxSweepCallback
 
typedef DefaultPrunerSweepCallbackT< CapsuleShapeCast > DefaultPrunerCapsuleSweepCallback
 
typedef DefaultPrunerSweepCallbackT< ConvexShapeCast > DefaultPrunerConvexSweepCallback
 
typedef PxU32(* RaycastFunc) (GU_RAY_FUNC_PARAMS)
 
typedef RaycastFunc GeomRaycastTable[PxGeometryType::eGEOMETRY_COUNT]
 
typedef bool(* SweepCapsuleFunc) (GU_CAPSULE_SWEEP_FUNC_PARAMS)
 
typedef bool(* SweepBoxFunc) (GU_BOX_SWEEP_FUNC_PARAMS)
 
typedef bool(* SweepConvexFunc) (GU_CONVEX_SWEEP_FUNC_PARAMS)
 
typedef SweepCapsuleFunc GeomSweepCapsuleTable[PxGeometryType::eGEOMETRY_COUNT]
 
typedef SweepBoxFunc GeomSweepBoxTable[PxGeometryType::eGEOMETRY_COUNT]
 
typedef SweepConvexFunc GeomSweepConvexTable[PxGeometryType::eGEOMETRY_COUNT]
 
typedef PxReal(* SweepMethod) (GU_SWEEP_METHOD_ARGS)
 
typedef PxReal(* TriangleSweepMethod) (GU_TRIANGLE_SWEEP_METHOD_ARGS)
 
using Triangle = Gu::IndexedTriangleT< PxI32 >
 
typedef void(* HullPrefetchCB) (PxU32 numVerts, const PxVec3 *PX_RESTRICT verts)
 
typedef void(* HullProjectionCB) (const PolygonalData &data, const PxVec3 &dir, const PxMat34 &world2hull, const Cm::FastVertex2ShapeScaling &scaling, PxReal &minimum, PxReal &maximum)
 
typedef PxU32(* SelectClosestEdgeCB) (const PolygonalData &data, const Cm::FastVertex2ShapeScaling &scaling, const PxVec3 &localDirection)
 
typedef Cm::InlineDeferredIDPool< MaxFacets > EPAFacetManager
 
typedef PxU32 BucketWord
 
typedef OBBAABBTests< true > OBBAABBTest
 
typedef PxHashMap< PrunerPayload, ExtendedBucketPrunerData, ExtendedBucketPrunerHash > ExtendedBucketPrunerMap
 
typedef PxHashMap< PoolIndex, IncrementalAABBTreeNode * > IncrementalPrunerMap
 
typedef PxArray< IncrementalAABBTreeNode * > NodeList
 
typedef bool(* GeomMTDFunc) (GU_MTD_FUNC_PARAMS)
 
typedef ClusterApproximationT< PxReal, PxVec3 > ClusterApproximation
 
typedef IndexedTriangle32 IndTri32
 
typedef IndexedTriangle16 IndTri16
 
typedef BVDataPackedT< QuantizedAABB > BVDataPackedQ
 
typedef BVDataPackedT< CenterExtents > BVDataPackedNQ
 
typedef HitCode(* MeshRayCallback) (void *userData, const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &p2, PxU32 triangleIndex, float dist, float u, float v)
 
typedef bool(* MeshOverlapCallback) (void *userData, const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &p2, PxU32 triangleIndex, const PxU32 *vertexIndices)
 
typedef bool(* TetMeshOverlapCallback) (void *userData, const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &p2, const PxVec3 &p3, PxU32 tetIndex, const PxU32 *vertexIndices)
 
typedef bool(* MeshSweepCallback) (void *userData, const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &p2, PxU32 triangleIndex, float &dist)
 
typedef bool(* SweepUnlimitedCallback) (void *userData, const SweepHit &hit)
 
typedef bool(* WalkingCallback) (const AABBTreeNode *current, PxU32 depth, void *userData)
 
typedef bool(* WalkingDistanceCallback) (const AABBTreeNode *current, void *userData)
 
typedef PxU32(* MidphaseRaycastFunction) (const TriangleMesh *mesh, const PxTriangleMeshGeometry &meshGeom, const PxTransform &pose, const PxVec3 &rayOrigin, const PxVec3 &rayDir, PxReal maxDist, PxHitFlags hitFlags, PxU32 maxHits, PxGeomRaycastHit *PX_RESTRICT hits, PxU32 stride)
 
typedef bool(* MidphaseSphereOverlapFunction) (const Sphere &sphere, const TriangleMesh &triMesh, const PxTransform &meshTransform, const PxMeshScale &meshScale, LimitedResults *results)
 
typedef bool(* MidphaseBoxOverlapFunction) (const Box &box, const TriangleMesh &triMesh, const PxTransform &meshTransform, const PxMeshScale &meshScale, LimitedResults *results)
 
typedef bool(* MidphaseCapsuleOverlapFunction) (const Capsule &capsule, const TriangleMesh &triMesh, const PxTransform &meshTransform, const PxMeshScale &meshScale, LimitedResults *results)
 
typedef void(* MidphaseBoxCBOverlapFunction) (const TriangleMesh *mesh, const Box &obb, MeshHitCallback< PxGeomRaycastHit > &callback, bool bothTriangleSidesCollide, bool checkObbIsAligned)
 
typedef bool(* MidphaseCapsuleSweepFunction) (const TriangleMesh *mesh, const PxTriangleMeshGeometry &triMeshGeom, const PxTransform &pose, const Gu::Capsule &lss, const PxVec3 &unitDir, const PxReal distance, PxGeomSweepHit &sweepHit, PxHitFlags hitFlags, const PxReal inflation)
 
typedef bool(* MidphaseBoxSweepFunction) (const TriangleMesh *mesh, const PxTriangleMeshGeometry &triMeshGeom, const PxTransform &pose, const Gu::Box &box, const PxVec3 &unitDir, const PxReal distance, PxGeomSweepHit &sweepHit, PxHitFlags hitFlags, const PxReal inflation)
 
typedef void(* MidphaseConvexSweepFunction) (const TriangleMesh *mesh, const Gu::Box &hullBox, const PxVec3 &localDir, const PxReal distance, SweepConvexMeshHitCallback &callback, bool anyHit)
 
typedef void(* MidphasePointMeshFunction) (const TriangleMesh *mesh, const PxTriangleMeshGeometry &meshGeom, const PxTransform &pose, const PxVec3 &point, float maxDist, PxU32 &index, float &dist, PxVec3 &closestPt)
 
typedef PxF32 RTreeValue
 
typedef IndexedTriangleT< PxU32 > IndexedTriangle32
 
typedef IndexedTriangleT< PxU16 > IndexedTriangle16
 

Enumerations

enum  TriggerStatus { TRIGGER_DISJOINT , TRIGGER_INSIDE , TRIGGER_OVERLAP }
 
enum  CompanionPrunerType { COMPANION_PRUNER_NONE , COMPANION_PRUNER_BUCKET , COMPANION_PRUNER_INCREMENTAL , COMPANION_PRUNER_AABB_TREE }
 
enum  BVHBuildStrategy { BVH_SPLATTER_POINTS , BVH_SPLATTER_POINTS_SPLIT_GEOM_CENTER , BVH_SAH }
 
enum  SharedEdgeIndex { EDGE01 = 0 , EDGE02 = 1 , EDGE12 = 2 }
 
enum  EdgeType {
  PX_EDGE_UNDEFINED , PX_EDGE_BOUNDARY , PX_EDGE_INTERNAL , PX_EDGE_SINGULAR ,
  PX_EDGE_FORCE_DWORD = 0x7fffffff
}
 
enum  EdgeFlag { PX_EDGE_ACTIVE = (1<<0) }
 
enum  { MSH_EDGE_LINK_MASK = 0x0fffffff , MSH_ACTIVE_EDGE_MASK = 0x80000000 , MSH_ACTIVE_VERTEX_MASK = 0x40000000 }
 
enum  PxcSepAxisType { SA_NORMAL0 , SA_NORMAL1 , SA_EE }
 
enum  ManifoldFlags { IS_MANIFOLD = (1<<0) , IS_MULTI_MANIFOLD = (1<<1) }
 
enum  FeatureCode {
  FC_VERTEX0 , FC_VERTEX1 , FC_VERTEX2 , FC_EDGE01 ,
  FC_EDGE12 , FC_EDGE20 , FC_FACE , FC_UNDEFINED
}
 
enum  ExtraTrigDataFlag {
  ETD_SILHOUETTE_EDGE_01 = (1 << 0) , ETD_SILHOUETTE_EDGE_12 = (1 << 1) , ETD_SILHOUETTE_EDGE_20 = (1 << 2) , ETD_CONVEX_EDGE_01 = (1<<3) ,
  ETD_CONVEX_EDGE_12 = (1<<4) , ETD_CONVEX_EDGE_20 = (1<<5) , ETD_CONVEX_EDGE_ALL = ETD_CONVEX_EDGE_01|ETD_CONVEX_EDGE_12|ETD_CONVEX_EDGE_20
}
 
enum  GjkStatus {
  GJK_NON_INTERSECT , GJK_CLOSE , GJK_CONTACT , GJK_UNDEFINED ,
  GJK_DEGENERATE , EPA_CONTACT , EPA_DEGENERATE , EPA_FAIL
}
 
enum  BuildStatus {
  BUILD_NOT_STARTED , BUILD_INIT , BUILD_IN_PROGRESS , BUILD_NEW_MAPPING ,
  BUILD_FULL_REFIT , BUILD_LAST_FRAME , BUILD_FINISHED , BUILD_FORCE_DWORD = 0xffffffff
}
 
enum  TransformCacheMode { TRANSFORM_CACHE_UNUSED , TRANSFORM_CACHE_LOCAL , TRANSFORM_CACHE_GLOBAL }
 
enum  QueryModifierFlag { QUERY_MODIFIER_ANY_HIT = (1<<0) , QUERY_MODIFIER_DOUBLE_SIDED = (1<<1) , QUERY_MODIFIER_MESH_BOTH_SIDES = (1<<2) }
 
enum  HitCode { HIT_NONE = 0 , HIT_CONTINUE = 1 , HIT_EXIT = 2 }
 
enum  BV4_BuildStrategy { BV4_SPLATTER_POINTS , BV4_SPLATTER_POINTS_SPLIT_GEOM_CENTER , BV4_SAH }
 
enum  InternalMeshSerialFlag {
  IMSF_MATERIALS = (1<<0) , IMSF_FACE_REMAP = (1<<1) , IMSF_8BIT_INDICES = (1<<2) , IMSF_16BIT_INDICES = (1<<3) ,
  IMSF_ADJACENCIES = (1<<4) , IMSF_GRB_DATA = (1<<5) , IMSF_SDF = (1<<6) , IMSF_VERT_MAPPING = (1<<7) ,
  IMSF_GRB_INV_REMAP = (1<<8) , IMSF_INERTIA = (1<<9)
}
 
enum  FeatureStatus { POLYDATA0 , POLYDATA1 , EDGE }
 

Functions

PX_FORCE_INLINE void computeCapsuleBounds (PxBounds3 &bounds, const PxCapsuleGeometry &capsuleGeom, const PxTransform &pose, float contactOffset=0.0f, float inflation=1.0f)
 
PX_PHYSX_COMMON_API void computeBounds (PxBounds3 &bounds, const PxGeometry &geometry, const PxTransform &transform, float contactOffset, float inflation)
 
PX_FORCE_INLINE PxBounds3 computeBounds (const PxGeometry &geometry, const PxTransform &pose)
 
void computeGlobalBox (PxBounds3 &bounds, PxU32 nbPrims, const PxBounds3 *PX_RESTRICT boxes, const PxU32 *PX_RESTRICT primitives)
 
PX_PHYSX_COMMON_API void computeBoundsAroundVertices (PxBounds3 &bounds, PxU32 nbVerts, const PxVec3 *PX_RESTRICT verts)
 
PX_PHYSX_COMMON_API void computeLocalBoundsAndGeomEpsilon (const PxVec3 *vertices, PxU32 nbVerties, PxBounds3 &localBounds, PxReal &geomEpsilon)
 
template<const bool useSIMD>
PX_FORCE_INLINE void inflateBounds (PxBounds3 &dst, const PxBounds3 &src, float enlargement)
 
 PX_COMPILE_TIME_ASSERT (sizeof(ShapeData)==128)
 
PX_PHYSX_COMMON_API void computeOBBPoints (PxVec3 *PX_RESTRICT pts, const PxVec3 &center, const PxVec3 &extents, const PxVec3 &base0, const PxVec3 &base1, const PxVec3 &base2)
 
 PX_COMPILE_TIME_ASSERT (sizeof(Gu::Box)==60)
 
 PX_COMPILE_TIME_ASSERT (sizeof(Gu::BoxPadded)==64)
 
 PX_COMPILE_TIME_ASSERT (sizeof(CenterExtentsPadded)==7 *4)
 
PX_PHYSX_COMMON_API PxVec4 PointOutsideOfPlane4 (const PxVec3 &p, const PxVec3 &_a, const PxVec3 &_b, const PxVec3 &_c, const PxVec3 &_d)
 
PX_PHYSX_COMMON_API PxVec3 closestPtPointTetrahedron (const PxVec3 &p, const PxVec3 &a, const PxVec3 &b, const PxVec3 &c, const PxVec3 &d, const PxVec4 &result)
 
PX_INLINE PX_CUDA_CALLABLE PxVec3 closestPtPointTetrahedron (const PxVec3 &p, const PxVec3 &a, const PxVec3 &b, const PxVec3 &c, const PxVec3 &d)
 
PX_INLINE PX_CUDA_CALLABLE PxVec3 closestPtPointTetrahedronWithInsideCheck (const PxVec3 &p, const PxVec3 &a, const PxVec3 &b, const PxVec3 &c, const PxVec3 &d, const PxReal eps=0)
 
PX_FORCE_INLINE PX_CUDA_CALLABLE PxVec3 closestPtPointTriangle2 (const PxVec3 &p, const PxVec3 &a, const PxVec3 &b, const PxVec3 &c, const PxVec3 &ab, const PxVec3 &ac)
 
PX_PHYSX_COMMON_API PxVec3 closestPtPointTriangle (const PxVec3 &p, const PxVec3 &a, const PxVec3 &b, const PxVec3 &c, float &s, float &t)
 
PX_FORCE_INLINE PxReal distancePointTriangleSquared (const PxVec3 &point, const PxVec3 &triangleOrigin, const PxVec3 &triangleEdge0, const PxVec3 &triangleEdge1, PxReal *param0=NULL, PxReal *param1=NULL)
 
PX_PHYSX_COMMON_API PxReal distanceSegmentBoxSquared (const PxVec3 &segmentPoint0, const PxVec3 &segmentPoint1, const PxVec3 &boxOrigin, const PxVec3 &boxExtent, const PxMat33 &boxBase, PxReal *segmentParam=NULL, PxVec3 *boxParam=NULL)
 Compute the smallest distance from the (finite) line segment to the box.
 
PX_FORCE_INLINE PxReal distanceSegmentBoxSquared (const Gu::Segment &segment, const Gu::Box &box, PxReal *t=NULL, PxVec3 *p=NULL)
 
PX_PHYSX_COMMON_API PxReal distanceSegmentSegmentSquared (const PxVec3 &origin0, const PxVec3 &dir0, PxReal extent0, const PxVec3 &origin1, const PxVec3 &dir1, PxReal extent1, PxReal *s=NULL, PxReal *t=NULL)
 
PX_PHYSX_COMMON_API PxReal distanceSegmentSegmentSquared (const PxVec3 &origin0, const PxVec3 &extent0, const PxVec3 &origin1, const PxVec3 &extent1, PxReal *s=NULL, PxReal *t=NULL)
 
PX_FORCE_INLINE PxReal distanceSegmentSegmentSquared (const Gu::Segment &segment0, const Gu::Segment &segment1, PxReal *s=NULL, PxReal *t=NULL)
 
PX_C_EXPORT PX_PHYSX_COMMON_API Gu::Pruner * createBucketPruner (PxU64 contextID)
 
PX_C_EXPORT PX_PHYSX_COMMON_API Gu::Pruner * createAABBPruner (PxU64 contextID, bool dynamic, Gu::CompanionPrunerType type, Gu::BVHBuildStrategy buildStrategy, PxU32 nbObjectsPerNode)
 
PX_C_EXPORT PX_PHYSX_COMMON_API Gu::Pruner * createIncrementalPruner (PxU64 contextID)
 
PX_PHYSX_COMMON_API bool intersectOBBOBB (const PxVec3 &e0, const PxVec3 &c0, const PxMat33 &r0, const PxVec3 &e1, const PxVec3 &c1, const PxMat33 &r1, bool full_test)
 
PX_FORCE_INLINE bool intersectOBBAABB (const Gu::Box &obb, const PxBounds3 &aabb)
 
PX_PHYSX_COMMON_API bool intersectTetrahedronBox (const PxVec3 &a, const PxVec3 &b, const PxVec3 &c, const PxVec3 &d, const PxBounds3 &box)
 
PX_PHYSX_COMMON_API PxIntBool intersectTriangleBox_ReferenceCode (const PxVec3 &center, const PxVec3 &extents, const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &p2)
 
PX_PHYSX_COMMON_API PxIntBool intersectTriangleBox_Unsafe (const PxVec3 &center, const PxVec3 &extents, const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &p2)
 
PX_PHYSX_COMMON_API PxIntBool intersectTriangleBox (const BoxPadded &box, const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &p2)
 
PX_PHYSX_COMMON_API bool trianglesIntersect (const PxVec3 &a1, const PxVec3 &b1, const PxVec3 &c1, const PxVec3 &a2, const PxVec3 &b2, const PxVec3 &c2, Segment *intersection=NULL)
 
PX_PHYSX_COMMON_API const GeomOverlapTable * getOverlapFuncTable ()
 
PX_PHYSX_COMMON_API void registerHeightFields ()
 
PX_FORCE_INLINE bool overlap (const PxGeometry &geom0, const PxTransform &pose0, const PxGeometry &geom1, const PxTransform &pose1, const GeomOverlapTable *PX_RESTRICT overlapFuncs, PxOverlapThreadContext *threadContext)
 
PX_FORCE_INLINE PrunerInfo createPrunerInfo (PxU32 prunerIndex, bool isDynamic)
 
PX_FORCE_INLINE PxU32 getPrunerIndex (PrunerInfo info)
 
PX_FORCE_INLINE PxU32 getDynamic (PrunerInfo info)
 
PX_FORCE_INLINE ActorShapeData createActorShapeData (PrunerInfo info, PrunerHandle h)
 
PX_FORCE_INLINE PrunerInfo getPrunerInfo (ActorShapeData data)
 
PX_FORCE_INLINE PrunerHandle getPrunerHandle (ActorShapeData data)
 
PX_PHYSX_COMMON_API const GeomRaycastTable & getRaycastFuncTable ()
 
 PX_COMPILE_TIME_ASSERT (sizeof(Gu::Segment)==24)
 
PX_PHYSX_COMMON_API const GeomSweepFuncs & getSweepFuncTable ()
 
bool sweepCapsuleTriangles (GU_SWEEP_TRIANGLES_FUNC_PARAMS(PxCapsuleGeometry))
 
bool sweepBoxTriangles (GU_SWEEP_TRIANGLES_FUNC_PARAMS(PxBoxGeometry))
 
bool sweepBoxTriangles_Precise (GU_SWEEP_TRIANGLES_FUNC_PARAMS(PxBoxGeometry))
 
PxReal SweepShapeTriangle (GU_TRIANGLE_SWEEP_METHOD_ARGS)
 
PxReal SweepAnyShapeHeightfield (GU_SWEEP_METHOD_ARGS)
 
PxReal SweepEstimateAnyShapeHeightfield (GU_SWEEP_ESTIMATE_ARGS)
 
PxReal SweepAnyShapeMesh (GU_SWEEP_METHOD_ARGS)
 
PxReal SweepEstimateAnyShapeMesh (GU_SWEEP_ESTIMATE_ARGS)
 This code performs a conservative estimate of the TOI of a shape v mesh.
 
PX_FORCE_INLINE PxF32 sweepAABBAABB (const PxVec3 &centerA, const PxVec3 &extentsA, const PxVec3 &centerB, const PxVec3 &extentsB, const PxVec3 &trA, const PxVec3 &trB)
 
PX_PHYSX_COMMON_API PxReal SweepShapeShape (GU_SWEEP_METHOD_ARGS)
 
template<typename Geom >
PX_FORCE_INLINE PxReal getRadius (const PxGeometry &)
 
template<>
PX_FORCE_INLINE PxReal getRadius< CapsuleV > (const PxGeometry &g)
 
PxReal UnimplementedSweep (GU_SWEEP_METHOD_ARGS_UNUSED)
 
 PX_COMPILE_TIME_ASSERT (sizeof(g_SweepMethodTable)/sizeof(g_SweepMethodTable[0])==PxGeometryType::eGEOMETRY_COUNT)
 
PxReal UnimplementedTriangleSweep (GU_TRIANGLE_SWEEP_METHOD_ARGS)
 
template<typename Geom >
PxReal SweepGeomTriangles (GU_TRIANGLE_SWEEP_METHOD_ARGS)
 
 PX_COMPILE_TIME_ASSERT (sizeof(g_TriangleSweepMethodTable)/sizeof(g_TriangleSweepMethodTable[0])==PxGeometryType::eGEOMETRY_COUNT)
 
void barycentricCoordinates (const aos::Vec3VArg p, const aos::Vec3VArg a, const aos::Vec3VArg b, aos::FloatV &v)
 
void barycentricCoordinates (const aos::Vec3VArg p, const aos::Vec3VArg a, const aos::Vec3VArg b, const aos::Vec3VArg c, aos::FloatV &v, aos::FloatV &w)
 
void barycentricCoordinates (const aos::Vec3VArg v0, const aos::Vec3VArg v1, const aos::Vec3VArg v2, aos::FloatV &v, aos::FloatV &w)
 
PX_INLINE aos::BoolV isValidTriangleBarycentricCoord (const aos::FloatVArg v, const aos::FloatVArg w)
 
PX_INLINE aos::BoolV isValidTriangleBarycentricCoord2 (const aos::Vec4VArg vwvw)
 
 PX_COMPILE_TIME_ASSERT (sizeof(EdgeData)==8)
 
 PX_COMPILE_TIME_ASSERT (sizeof(Edge8Data)==2)
 
 PX_COMPILE_TIME_ASSERT (sizeof(EdgeDescData)==8)
 
 PX_COMPILE_TIME_ASSERT (sizeof(EdgeTriangleData)==12)
 
Quantizer * createQuantizer ()
 
PX_PHYSX_COMMON_API bool contactSphereSphere (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactSphereCapsule (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactSphereBox (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactCapsuleCapsule (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactCapsuleBox (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactCapsuleConvex (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactBoxBox (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactBoxConvex (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactConvexConvex (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactSphereMesh (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactCapsuleMesh (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactBoxMesh (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactConvexMesh (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactSphereHeightfield (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactCapsuleHeightfield (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactBoxHeightfield (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactConvexHeightfield (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactSpherePlane (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactPlaneBox (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactPlaneCapsule (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactPlaneConvex (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactCustomGeometryGeometry (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool contactGeometryCustomGeometry (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactSphereMesh (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactCapsuleMesh (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactBoxMesh (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactConvexMesh (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactSphereHeightField (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactCapsuleHeightField (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactBoxHeightField (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactConvexHeightField (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactPlaneCapsule (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactPlaneBox (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactPlaneConvex (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactSphereSphere (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactSpherePlane (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactSphereCapsule (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactSphereBox (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactSphereConvex (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactCapsuleCapsule (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactCapsuleBox (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactCapsuleConvex (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactBoxBox (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactBoxConvex (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactConvexConvex (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API bool pcmContactGeometryCustomGeometry (GU_CONTACT_METHOD_ARGS)
 
PX_PHYSX_COMMON_API PxMat33 findRotationMatrixFromZ (const PxVec3 &to)
 
PX_PHYSX_COMMON_API bool contactPolygonPolygonExt (PxU32 numVerts0, const PxVec3 *vertices0, const PxU8 *indices0, const PxMat34 &world0, const PxPlane &localPlane0, const PxMat33 &RotT0, PxU32 numVerts1, const PxVec3 *vertices1, const PxU8 *indices1, const PxMat34 &world1, const PxPlane &localPlane1, const PxMat33 &RotT1, const PxVec3 &worldSepAxis, const PxMat34 &transform0to1, const PxMat34 &transform1to0, PxU32 polyIndex0, PxU32 polyIndex1, PxContactBuffer &contactBuffer, bool flipNormal, const PxVec3 &posShift, float sepShift)
 
bool selectNormal (PxU8 data, PxReal u, PxReal v)
 
 PX_COMPILE_TIME_ASSERT (sizeof(Gu::Valency)==4)
 
 PX_COMPILE_TIME_ASSERT (sizeof(Gu::BigConvexRawData)==24)
 
PX_FORCE_INLINE PxU8 getConvexEdgeFlags (const PxU8 *extraTrigData, PxU32 triangleIndex)
 
PX_FORCE_INLINE void flipConvexEdgeFlags (PxU8 &extraData)
 
void getScaledConvex (PxVec3 *&scaledVertices, PxU8 *&scaledIndices, PxVec3 *dstVertices, PxU8 *dstIndices, bool idtConvexScale, const PxVec3 *srcVerts, const PxU8 *srcIndices, PxU32 nbVerts, const Cm::FastVertex2ShapeScaling &convexScaling)
 
bool getConvexData (const PxConvexMeshGeometry &shapeConvex, Cm::FastVertex2ShapeScaling &scaling, PxBounds3 &bounds, PolygonalData &polyData)
 
PxU32 findUniqueConvexEdges (PxU32 maxNbEdges, ConvexEdge *PX_RESTRICT edges, PxU32 numPolygons, const Gu::HullPolygonData *PX_RESTRICT polygons, const PxU8 *PX_RESTRICT vertexData)
 
PX_INLINE PxU32 computeBufferSize (const Gu::ConvexHullData &data, PxU32 nb)
 
PX_FORCE_INLINE const Gu::ConvexHullData * _getHullData (const PxConvexMeshGeometry &convexGeom)
 
PX_FORCE_INLINE void flipData (Gu::HullPolygonData &data)
 
 PX_COMPILE_TIME_ASSERT (sizeof(Gu::HullPolygonData)==20)
 
 PX_COMPILE_TIME_ASSERT (sizeof(Gu::InternalObjectsData)==16)
 
 PX_COMPILE_TIME_ASSERT (sizeof(Gu::ConvexHullData)==68)
 
 PX_COMPILE_TIME_ASSERT (PX_OFFSET_OF(Gu::ConvexHullData, mCenterOfMass)>=PX_OFFSET_OF(Gu::ConvexHullData, mAABB)+4)
 
void computeHullOBB (Gu::Box &hullOBB, const PxBounds3 &hullAABB, float offset, const PxMat34 &world0, const PxMat34 &world1, const Cm::FastVertex2ShapeScaling &meshScaling, bool idtScaleMesh)
 
void computeVertexSpaceOBB (Gu::Box &dst, const Gu::Box &src, const PxTransform &meshPose, const PxMeshScale &meshScale)
 
PX_PHYSX_COMMON_API void computeOBBAroundConvex (Gu::Box &obb, const PxConvexMeshGeometry &convexGeom, const PxConvexMesh *cm, const PxTransform &convexPose)
 
void getPolygonalData_Convex (PolygonalData *PX_RESTRICT dst, const Gu::ConvexHullData *PX_RESTRICT src, const Cm::FastVertex2ShapeScaling &scaling)
 
struct physx::Gu::uint4 PX_ALIGN_SUFFIX (16)
 
PX_PHYSX_COMMON_API PxReal distancePointBoxSquared (const PxVec3 &point, const PxVec3 &boxOrigin, const PxVec3 &boxExtent, const PxMat33 &boxBase, PxVec3 *boxParam=NULL)
 
PX_FORCE_INLINE PxReal distancePointBoxSquared (const PxVec3 &point, const Gu::Box &box, PxVec3 *boxParam=NULL)
 
PX_FORCE_INLINE PxReal distancePointSegmentSquaredInternal (const PxVec3 &p0, const PxVec3 &dir, const PxVec3 &point, PxReal *param=NULL)
 
PX_FORCE_INLINE PxReal distancePointSegmentSquared (const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &point, PxReal *param=NULL)
 
PX_INLINE PxReal distancePointSegmentSquared (const Gu::Segment &segment, const PxVec3 &point, PxReal *param=NULL)
 
PX_PHYSX_COMMON_API aos::FloatV distancePointTriangleSquared (const aos::Vec3VArg point, const aos::Vec3VArg a, const aos::Vec3VArg b, const aos::Vec3VArg c, aos::FloatV &u, aos::FloatV &v, aos::Vec3V &closestP)
 
PX_PHYSX_COMMON_API aos::FloatV distanceSegmentSegmentSquared (const aos::Vec3VArg p1, const aos::Vec3VArg d1, const aos::Vec3VArg p2, const aos::Vec3VArg d2, aos::FloatV &param0, aos::FloatV &param1)
 
aos::Vec4V distanceSegmentSegmentSquared4 (const aos::Vec3VArg p, const aos::Vec3VArg d, const aos::Vec3VArg p02, const aos::Vec3VArg d02, const aos::Vec3VArg p12, const aos::Vec3VArg d12, const aos::Vec3VArg p22, const aos::Vec3VArg d22, const aos::Vec3VArg p32, const aos::Vec3VArg d32, aos::Vec4V &s, aos::Vec4V &t)
 
PX_PHYSX_COMMON_API PxReal distanceSegmentTriangleSquared (const PxVec3 &segmentOrigin, const PxVec3 &segmentExtent, const PxVec3 &triangleOrigin, const PxVec3 &triangleEdge0, const PxVec3 &triangleEdge1, PxReal *t=NULL, PxReal *u=NULL, PxReal *v=NULL)
 
PX_INLINE PxReal distanceSegmentTriangleSquared (const Gu::Segment &segment, const PxVec3 &triangleOrigin, const PxVec3 &triangleEdge0, const PxVec3 &triangleEdge1, PxReal *t=NULL, PxReal *u=NULL, PxReal *v=NULL)
 
PX_PHYSX_COMMON_API aos::FloatV distanceSegmentTriangleSquared (const aos::Vec3VArg p, const aos::Vec3VArg q, const aos::Vec3VArg a, const aos::Vec3VArg b, const aos::Vec3VArg c, aos::Vec3V &closest0, aos::Vec3V &closest1)
 
GjkStatus epaPenetration (const GjkConvex &a, const GjkConvex &b, const PxU8 *PX_RESTRICT aInd, const PxU8 *PX_RESTRICT bInd, const PxU8 size, const bool takeCoreShape, const FloatV tolerenceLength, GjkOutput &output)
 
GjkStatus epaPenetration (const GjkConvex &a, const GjkConvex &b, const aos::Vec3V *PX_RESTRICT aPnt, const aos::Vec3V *PX_RESTRICT bPnt, const PxU8 size, const bool takeCoreShape, const FloatV tolerenceLength, GjkOutput &output)
 
PX_FORCE_INLINE PxU32 incMod3 (PxU32 i)
 
template<typename ConvexA , typename ConvexB >
GjkStatus gjk (const ConvexA &a, const ConvexB &b, const aos::Vec3V &initialSearchDir, const aos::FloatV &contactDist, aos::Vec3V &closestA, aos::Vec3V &closestB, aos::Vec3V &normal, aos::FloatV &distance)
 
PX_FORCE_INLINE void assignWarmStartValue (PxU8 *PX_RESTRICT aIndices, PxU8 *PX_RESTRICT bIndices, PxU8 &size_, PxI32 *PX_RESTRICT aInd, PxI32 *PX_RESTRICT bInd, PxU32 size)
 
PX_FORCE_INLINE void validateDuplicateVertex (const aos::Vec3V *Q, const aos::Vec3VArg support, const PxU32 size)
 
template<typename ConvexA , typename ConvexB >
PX_NOINLINE GjkStatus gjkPenetration (const ConvexA &a, const ConvexB &b, const aos::Vec3VArg initialSearchDir, const aos::FloatVArg contactDist, const bool takeCoreShape, PxU8 *PX_RESTRICT aIndices, PxU8 *PX_RESTRICT bIndices, aos::Vec3V *PX_RESTRICT aPoints, aos::Vec3V *PX_RESTRICT bPoints, PxU8 &warmStartSize, GjkOutput &output)
 
template<typename ConvexA , typename ConvexB >
PX_NOINLINE GjkStatus gjkPenetration (const ConvexA &a, const ConvexB &b, const aos::Vec3VArg initialSearchDir, const aos::FloatVArg contactDist, const bool takeCoreShape, PxU8 *PX_RESTRICT aIndices, PxU8 *PX_RESTRICT bIndices, PxU8 &warmStartSize, GjkOutput &output)
 
template<typename ConvexA , typename ConvexB >
PX_NOINLINE GjkStatus gjkPenetration (const ConvexA &a, const ConvexB &b, const aos::Vec3VArg initialSearchDir, const aos::FloatVArg contactDist, const bool takeCoreShape, aos::Vec3V *PX_RESTRICT aPoints, aos::Vec3V *PX_RESTRICT bPoints, PxU8 &warmStartSize, GjkOutput &output)
 
template<class ConvexA , class ConvexB >
bool gjkRaycast (const ConvexA &a, const ConvexB &b, const aos::Vec3VArg initialDir, const aos::FloatVArg initialLambda, const aos::Vec3VArg s, const aos::Vec3VArg r, aos::FloatV &lambda, aos::Vec3V &normal, aos::Vec3V &closestA, const PxReal _inflation)
 
template<class ConvexA , class ConvexB >
bool gjkRaycastPenetration (const ConvexA &a, const ConvexB &b, const aos::Vec3VArg initialDir, const aos::FloatVArg initialLambda, const aos::Vec3VArg s, const aos::Vec3VArg r, aos::FloatV &lambda, aos::Vec3V &normal, aos::Vec3V &closestA, const PxReal _inflation, const bool initialOverlap)
 
PX_NOALIAS Vec3V closestPtPointTetrahedron (Vec3V *PX_RESTRICT Q, Vec3V *PX_RESTRICT A, Vec3V *PX_RESTRICT B, PxU32 &size)
 
PX_NOALIAS Vec3V closestPtPointTetrahedron (Vec3V *PX_RESTRICT Q, Vec3V *PX_RESTRICT A, Vec3V *PX_RESTRICT B, PxI32 *PX_RESTRICT aInd, PxI32 *PX_RESTRICT bInd, PxU32 &size)
 
PX_NOALIAS PX_FORCE_INLINE aos::BoolV PointOutsideOfPlane4 (const aos::Vec3VArg _a, const aos::Vec3VArg _b, const aos::Vec3VArg _c, const aos::Vec3VArg _d)
 
PX_NOALIAS PX_FORCE_INLINE aos::Vec3V closestPtPointSegment (aos::Vec3V *PX_RESTRICT Q, PxU32 &size)
 
PX_FORCE_INLINE void getClosestPoint (const aos::Vec3V *PX_RESTRICT Q, const aos::Vec3V *PX_RESTRICT A, const aos::Vec3V *PX_RESTRICT B, const aos::Vec3VArg closest, aos::Vec3V &closestA, aos::Vec3V &closestB, const PxU32 size)
 
PX_NOALIAS PX_GJK_FORCE_INLINE aos::FloatV closestPtPointTriangleBaryCentric (const aos::Vec3VArg a, const aos::Vec3VArg b, const aos::Vec3VArg c, PxU32 *PX_RESTRICT indices, PxU32 &size, aos::Vec3V &closestPt)
 
PX_NOALIAS PX_GJK_FORCE_INLINE aos::Vec3V closestPtPointTriangle (aos::Vec3V *PX_RESTRICT Q, aos::Vec3V *A, aos::Vec3V *B, PxU32 &size)
 
PX_NOALIAS PX_GJK_FORCE_INLINE aos::Vec3V closestPtPointTriangle (aos::Vec3V *PX_RESTRICT Q, aos::Vec3V *A, aos::Vec3V *B, PxI32 *PX_RESTRICT aInd, PxI32 *PX_RESTRICT bInd, PxU32 &size)
 
PX_NOALIAS PX_FORCE_INLINE aos::Vec3V GJKCPairDoSimplex (aos::Vec3V *PX_RESTRICT Q, aos::Vec3V *PX_RESTRICT A, aos::Vec3V *PX_RESTRICT B, const aos::Vec3VArg support, PxU32 &size)
 
PX_NOALIAS PX_FORCE_INLINE aos::Vec3V GJKCPairDoSimplex (aos::Vec3V *PX_RESTRICT Q, aos::Vec3V *PX_RESTRICT A, aos::Vec3V *PX_RESTRICT B, PxI32 *PX_RESTRICT aInd, PxI32 *PX_RESTRICT bInd, const aos::Vec3VArg support, PxU32 &size)
 
GjkStatus testGjk (const GjkConvex &a, const GjkConvex &b, const Vec3VArg initialSearchDir, const FloatVArg contactDist, Vec3V &closestA, Vec3V &closestB, Vec3V &normal, FloatV &dist)
 
bool testGjkRaycast (const GjkConvex &a, const GjkConvex &b, const Vec3VArg initialSearchDir, const aos::FloatVArg initialLambda, const aos::Vec3VArg s, const aos::Vec3VArg r, aos::FloatV &lambda, aos::Vec3V &normal, aos::Vec3V &closestA, const PxReal inflation)
 
GjkStatus testGjkPenetration (const GjkConvex &a, const GjkConvex &b, const Vec3VArg initialSearchDir, const FloatVArg contactDist, PxU8 *aIndices, PxU8 *bIndices, PxU8 &size, GjkOutput &output)
 
GjkStatus testEpaPenetration (const GjkConvex &a, const GjkConvex &b, const PxU8 *aIndices, const PxU8 *bIndices, const PxU8 size, GjkOutput &output)
 
PX_PHYSX_COMMON_API GjkStatus testGjk (const GjkConvex &a, const GjkConvex &b, const aos::Vec3VArg initialSearchDir, const aos::FloatVArg contactDist, aos::Vec3V &closestA, aos::Vec3V &closestB, aos::Vec3V &normal, aos::FloatV &dist)
 
PX_PHYSX_COMMON_API bool testGjkRaycast (const GjkConvex &a, const GjkConvex &b, const aos::Vec3VArg initialSearchDir, const aos::FloatVArg initialLambda, const aos::Vec3VArg s, const aos::Vec3VArg r, aos::FloatV &lambda, aos::Vec3V &normal, aos::Vec3V &closestA, const PxReal _inflation, const bool initialOverlap)
 
PX_PHYSX_COMMON_API GjkStatus testGjkPenetration (const GjkConvex &a, const GjkConvex &b, const aos::Vec3VArg initialSearchDir, const aos::FloatVArg contactDist, PxU8 *aIndices, PxU8 *bIndices, PxU8 &size, GjkOutput &output)
 
PX_FORCE_INLINE void CalculateBoxMargin (const aos::Vec3VArg extent, PxReal &margin, PxReal &minMargin, PxReal &sweepMargin, const PxReal marginR=BOX_MARGIN_RATIO, const PxReal minMarginR=BOX_MIN_MARGIN_RATIO)
 
PX_FORCE_INLINE aos::FloatV CalculateBoxTolerance (const aos::Vec3VArg extent)
 
PX_FORCE_INLINE aos::FloatV CalculatePCMBoxMargin (const aos::Vec3VArg extent, const PxReal toleranceLength, const PxReal toleranceMarginRatio=BOX_MARGIN_RATIO)
 
PX_FORCE_INLINE aos::FloatV CalculateMTDBoxMargin (const aos::Vec3VArg extent)
 
PX_FORCE_INLINE aos::FloatV CalculateCapsuleMinMargin (const aos::FloatVArg radius)
 
PX_FORCE_INLINE aos::FloatV getContactEps (const aos::FloatV &_marginA, const aos::FloatV &_marginB)
 
PX_FORCE_INLINE aos::FloatV getSweepContactEps (const aos::FloatV &_marginA, const aos::FloatV &_marginB)
 
PX_SUPPORT_FORCE_INLINE aos::FloatV CalculatePCMConvexMargin (const Gu::ConvexHullData *hullData, const aos::Vec3VArg scale, const PxReal toleranceLength, const PxReal toleranceRatio=TOLERANCE_MIN_MARGIN_RATIO)
 
PX_SUPPORT_FORCE_INLINE aos::FloatV CalculateMTDConvexMargin (const Gu::ConvexHullData *hullData, const aos::Vec3VArg scale)
 
PX_SUPPORT_FORCE_INLINE void CalculateConvexMargin (const InternalObjectsData &internalObject, PxReal &margin, PxReal &minMargin, PxReal &sweepMargin, const aos::Vec3VArg scale)
 
PX_SUPPORT_FORCE_INLINE aos::Mat33V ConstructSkewMatrix (const aos::Vec3VArg scale, const aos::QuatVArg rotation)
 
PX_SUPPORT_FORCE_INLINE void ConstructSkewMatrix (const aos::Vec3VArg scale, const aos::QuatVArg rotation, aos::Mat33V &vertex2Shape, aos::Mat33V &shape2Vertex, aos::Vec3V &center, const bool idtScale)
 
PX_SUPPORT_FORCE_INLINE aos::Mat33V ConstructVertex2ShapeMatrix (const aos::Vec3VArg scale, const aos::QuatVArg rotation)
 
PX_PHYSX_COMMON_API PxU32 * buildAABBTree (const AABBTreeBuildParams &params, NodeAllocator &nodeAllocator, BuildStats &stats)
 
PX_PHYSX_COMMON_API void flattenTree (const NodeAllocator &nodeAllocator, BVHNode *dest, const PxU32 *remap=NULL)
 
PX_PHYSX_COMMON_API void buildAABBTree (PxU32 nbBounds, const AABBTreeBounds &bounds, PxArray< BVHNode > &tree)
 
PxU32 reshuffle (PxU32 nb, PxU32 *const PX_RESTRICT prims, const PxVec3 *PX_RESTRICT centers, float splitValue, PxU32 axis)
 
template<typename T >
void traverseBVH (const Gu::BVHNode *nodes, T &traversalController, PxI32 rootNodeIndex=0)
 
uint32_t PxComputeHash (const ActorShapeMap::ActorShape &owner)
 
 PX_ALIGN_PREFIX (16) struct BucketBox
 
PX_FORCE_INLINE PxU32 PxComputeHash (const PrunerPayload &payload)
 
PX_PHYSX_COMMON_API const PxU8 * getBoxEdges ()
 
PX_PHYSX_COMMON_API void computeBoxPoints (const PxBounds3 &bounds, PxVec3 *PX_RESTRICT pts)
 
void computeBoxAroundCapsule (const Capsule &capsule, Box &box)
 
PxPlane getPlane (const PxTransform &pose)
 
PX_FORCE_INLINE PxVec3 getCapsuleHalfHeightVector (const PxTransform &transform, const PxCapsuleGeometry &capsuleGeom)
 
PX_FORCE_INLINE void getCapsuleSegment (const PxTransform &transform, const PxCapsuleGeometry &capsuleGeom, Gu::Segment &segment)
 
PX_FORCE_INLINE void getCapsule (Gu::Capsule &capsule, const PxCapsuleGeometry &capsuleGeom, const PxTransform &pose)
 
void computeSweptBox (Gu::Box &box, const PxVec3 &extents, const PxVec3 &center, const PxMat33 &rot, const PxVec3 &unitDir, const PxReal distance)
 
PX_FORCE_INLINE PxReal computeAlignmentValue (const PxVec3 &triNormal, const PxVec3 &unitDir)
 
PX_FORCE_INLINE bool keepTriangle (float triImpactDistance, float triAlignmentValue, float bestImpactDistance, float bestAlignmentValue, float maxDistance)
 
PX_FORCE_INLINE bool keepTriangleBasic (float triImpactDistance, float bestImpactDistance, float maxDistance)
 
PX_FORCE_INLINE PxVec3 cross100 (const PxVec3 &b)
 
PX_FORCE_INLINE PxVec3 cross010 (const PxVec3 &b)
 
PX_FORCE_INLINE PxVec3 cross001 (const PxVec3 &b)
 
PX_FORCE_INLINE PxVec3 computeBarycentricPoint (const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &p2, PxReal u, PxReal v)
 Compute point as combination of barycentric coordinates.
 
PX_FORCE_INLINE PxReal computeTetrahedronVolume (const PxVec3 &x0, const PxVec3 &x1, const PxVec3 &x2, const PxVec3 &x3, PxMat33 &edgeMatrix)
 
PX_FORCE_INLINE PxReal computeTetrahedronVolume (const PxVec3 &x0, const PxVec3 &x1, const PxVec3 &x2, const PxVec3 &x3)
 
template<typename IndexType >
PX_FORCE_INLINE PxReal computeTriangleMeshVolume (const PxVec3 *vertices, const IndexType *indices, const PxU32 numTriangles)
 
template<typename IndexType >
PX_FORCE_INLINE PxReal computeTriangleMeshVolume (const PxVec4 *vertices, const IndexType *indices, const PxU32 numTriangles)
 
PX_FORCE_INLINE void makeFatEdge (PxVec3 &p0, PxVec3 &p1, PxReal fatCoeff)
 
PX_FORCE_INLINE PxU32 closestAxis (const PxVec3 &v, PxU32 &j, PxU32 &k)
 
PX_FORCE_INLINE bool isAlmostZero (const PxVec3 &v)
 
template<typename T >
PX_INLINE void onRefCountZero (T *object, Gu::MeshFactory *mf, bool cndt, const char *errorMsg)
 
PX_FORCE_INLINE PxF32 manualNormalize (PxVec3 &mtd, const PxVec3 &normal, PxReal lenSq)
 
void buildTree (const PxU32 *triangles, const PxU32 numTriangles, const PxVec3 *points, PxArray< Gu::BVHNode > &tree, PxF32 enlargement=1e-4f)
 
void windingNumbers (const PxVec3 *vertices, const PxU32 *indices, PxU32 numTriangleIndices, PxU32 width, PxU32 height, PxU32 depth, PxReal *windingNumbers, PxVec3 minExtents, PxVec3 maxExtents, PxVec3 *sampleLocations=NULL)
 Returns the number of times a point is enclosed by a triangle mesh. Therefore points with a winding number of 0 lie oufside of the mesh, others lie inside. The sign of the winding number is dependent ond the triangle orientation. For close meshes, a robust inside/outside check should not test for a value of 0 exactly, inside = PxAbs(windingNumber) > 0.5f should be preferred.
 
void windingNumbersInsideCheck (const PxVec3 *vertices, const PxU32 *indices, PxU32 numTriangleIndices, PxU32 width, PxU32 height, PxU32 depth, bool *insideResult, PxVec3 minExtents, PxVec3 maxExtents, PxVec3 *sampleLocations=NULL)
 Returns if a point is enclosed by a triangle mesh.
 
void idToXYZ (PxU32 id, PxU32 sizeX, PxU32 sizeY, PxU32 &xi, PxU32 &yi, PxU32 &zi)
 
void idToXY (PxU32 id, PxU32 sizeX, PxU32 &xi, PxU32 &yi)
 
void * computeSDFThreadJob (void *data)
 
PxU32 idx (PxU32 x, PxU32 y, PxU32 z, PxU32 width, PxU32 height)
 
PX_FORCE_INLINE PxU32 idxCompact (PxU32 x, PxU32 y, PxU32 z, PxU32 width, PxU32 height)
 
void applyMutations (PxArray< Mutation > &mutations, PxU32 start, PxU32 end, PxReal *sdfs, PxU32 width, PxU32 height)
 
void fixSdfForNonClosedGeometry (PxU32 width, PxU32 height, PxU32 depth, PxReal *sdf, const PxVec3 &cellSize)
 
void SDFUsingWindingNumbers (PxArray< Gu::BVHNode > &tree, PxHashMap< PxU32, Gu::ClusterApproximation > &clusters, const PxVec3 *vertices, const PxU32 *indices, PxU32 numTriangleIndices, PxU32 width, PxU32 height, PxU32 depth, PxReal *sdf, GridQueryPointSampler &sampler, PxVec3 *sampleLocations, PxU32 numThreads, bool isWatertight, bool allVerticesInsideSamplingBox)
 
void SDFUsingWindingNumbers (const PxVec3 *vertices, const PxU32 *indices, PxU32 numTriangleIndices, PxU32 width, PxU32 height, PxU32 depth, PxReal *sdf, PxVec3 minExtents, PxVec3 maxExtents, PxVec3 *sampleLocations=NULL, bool cellCenteredSamples=true, PxU32 numThreads=1)
 Returns the distance to the mesh's surface for all samples in a grid. The sign is dependent on the triangle orientation. Negative distances indicate that a sample is inside the mesh, positive distances mean the sample is outside of the mesh.
 
PX_FORCE_INLINE void getCellCoords (PxU32 numCellsX, PxU32 numCellsY, PxU32 cellNr, PxU32 &x, PxU32 &y, PxU32 &z)
 
PX_FORCE_INLINE PxU32 encodeTriple (PxU32 x, PxU32 y, PxU32 z)
 
void convertSparseSDFTo3DTextureLayout (PxU32 width, PxU32 height, PxU32 depth, PxU32 cellsPerSubgrid, PxU32 *sdfFineStartSlots, const PxReal *sdfFineSubgridsIn, PxU32 sdfFineSubgridsSize, PxArray< PxReal > &subgrids3DTexFormat, PxU32 &numSubgridsX, PxU32 &numSubgridsY, PxU32 &numSubgridsZ)
 Converts a sparse grid sdf to a format that can be used to create a 3d texture. 3d textures support very efficient trilinear interpolation on the GPU which is very important during sdf evaluation.
 
PX_FORCE_INLINE PxReal lerp (PxReal a, PxReal b, float t)
 
PX_FORCE_INLINE PxReal bilerp (PxReal f00, PxReal f10, PxReal f01, PxReal f11, PxReal tx, PxReal ty)
 
PX_FORCE_INLINE PxReal trilerp (PxReal f000, PxReal f100, PxReal f010, PxReal f110, PxReal f001, PxReal f101, PxReal f011, PxReal f111, PxReal tx, PxReal ty, PxReal tz)
 
void SDFUsingWindingNumbersSparse (const PxVec3 *vertices, const PxU32 *indices, PxU32 numTriangleIndices, PxU32 width, PxU32 height, PxU32 depth, const PxVec3 &minExtents, const PxVec3 &maxExtents, PxReal narrowBandThicknessRelativeToExtentDiagonal, PxU32 cellsPerSubgrid, PxArray< PxReal > &sdfCoarse, PxArray< PxU32 > &sdfFineStartSlots, PxArray< PxReal > &subgridData, PxArray< PxReal > &denseSdf, PxReal &subgridsMinSdfValue, PxReal &subgridsMaxSdfValue, PxU32 numThreads=1)
 Returns the distance to the mesh's surface for all samples in a grid. The sign is dependent on the triangle orientation. Negative distances indicate that a sample is inside the mesh, positive distances mean the sample is outside of the mesh. Near mesh surfaces, a higher resolution is available than further away from the surface (sparse sdf format) to save memory. The samples are not cell centered but located at the cell origin. This is a requirement of the sparse grid format.
 
PX_FORCE_INLINE void decodeTriple (PxU32 id, PxU32 &x, PxU32 &y, PxU32 &z)
 
PX_FORCE_INLINE PxReal decode (PxU8 *data, PxU32 bytesPerSparsePixel, PxReal subgridsMinSdfValue, PxReal subgridsMaxSdfValue)
 
PX_FORCE_INLINE PxReal decode (const Gu::SDF &sdf, PxI32 xx, PxI32 yy, PxI32 zz)
 
PX_FORCE_INLINE PxU64 key (PxI32 xId, PxI32 yId, PxI32 zId)
 
PX_FORCE_INLINE PxReal dirSign (PxI32 principalDirection, const PxVec3 &start, const PxVec3 &middle, const PxVec3 &end)
 
PX_FORCE_INLINE PxI32 indexOfMostConcaveCorner (PxI32 principalDirection, const PxVec3 &a, const PxVec3 &b, const PxVec3 &c, const PxVec3 &d)
 
bool generatePointInCell (const Gu::SDF &sdf, PxI32 x, PxI32 y, PxI32 z, PxVec3 &point, PxReal corners[2][2][2])
 
PX_FORCE_INLINE bool generatePointInCell (const Gu::SDF &sdf, PxI32 x, PxI32 y, PxI32 z, PxVec3 &point)
 
PX_FORCE_INLINE bool generatePointInCellUsingCache (const Gu::SDF &sdf, PxI32 xBase, PxI32 yBase, PxI32 zBase, PxI32 x, PxI32 y, PxI32 z, PxVec3 &point, const PxArray< PxReal > &cache)
 
PX_FORCE_INLINE PxReal getDenseSDFValue (const Gu::SDF &sdf, PxI32 x, PxI32 y, PxI32 z)
 
PX_FORCE_INLINE bool generatePointInCellDense (const Gu::SDF &sdf, PxI32 x, PxI32 y, PxI32 z, PxVec3 &point)
 
PX_FORCE_INLINE bool canSkipSubgrid (const Gu::SDF &sdf, PxI32 i, PxI32 j, PxI32 k)
 
void createTriangles (PxI32 xId, PxI32 yId, PxI32 zId, PxReal d0, PxReal ds[3], const PxHashMap< PxU64, PxU32 > &cellToPoint, const PxArray< PxVec3 > &points, PxArray< PxU32 > &triangleIndices)
 
void extractIsosurfaceFromSDF (const Gu::SDF &sdf, PxArray< PxVec3 > &isosurfaceVertices, PxArray< PxU32 > &isosurfaceTriangleIndices)
 Extracts an isosurface as a triangular mesh from a signed distance function.
 
CompanionPruner * createCompanionPruner (PxU64 contextID, CompanionPrunerType type, const PruningPool *pool)
 
bool computeCapsule_TriangleMeshMTD (const PxTriangleMeshGeometry &triMeshGeom, const PxTransform &pose, Gu::CapsuleV &capsuleV, PxReal inflatedRadius, bool isDoubleSided, PxGeomSweepHit &hit)
 
bool computeCapsule_HeightFieldMTD (const PxHeightFieldGeometry &heightFieldGeom, const PxTransform &pose, Gu::CapsuleV &capsuleV, PxReal inflatedRadius, bool isDoubleSided, PxGeomSweepHit &hit)
 
bool computeBox_TriangleMeshMTD (const PxTriangleMeshGeometry &triMeshGeom, const PxTransform &pose, const Gu::Box &box, const PxTransform &boxTransform, PxReal inflation, bool isDoubleSided, PxGeomSweepHit &hit)
 
bool computeBox_HeightFieldMTD (const PxHeightFieldGeometry &heightFieldGeom, const PxTransform &pose, const Gu::Box &box, const PxTransform &boxTransform, PxReal inflation, bool isDoubleSided, PxGeomSweepHit &hit)
 
bool computeConvex_TriangleMeshMTD (const PxTriangleMeshGeometry &triMeshGeom, const PxTransform &pose, const PxConvexMeshGeometry &convexGeom, const PxTransform &convexTransform, PxReal inflation, bool isDoubleSided, PxGeomSweepHit &hit)
 
bool computeConvex_HeightFieldMTD (const PxHeightFieldGeometry &heightFieldGeom, const PxTransform &pose, const PxConvexMeshGeometry &convexGeom, const PxTransform &convexTransform, PxReal inflation, bool isDoubleSided, PxGeomSweepHit &hit)
 
bool computeSphere_SphereMTD (const Sphere &sphere0, const Sphere &sphere1, PxGeomSweepHit &hit)
 
bool computeSphere_CapsuleMTD (const Sphere &sphere, const Capsule &capsule, PxGeomSweepHit &hit)
 
bool computeCapsule_CapsuleMTD (const Capsule &capsule0, const Capsule &capsule1, PxGeomSweepHit &hit)
 
bool computePlane_CapsuleMTD (const PxPlane &plane, const Capsule &capsule, PxGeomSweepHit &hit)
 
bool computePlane_BoxMTD (const PxPlane &plane, const Box &box, PxGeomSweepHit &hit)
 
bool computePlane_ConvexMTD (const PxPlane &plane, const PxConvexMeshGeometry &convexGeom, const PxTransform &convexPose, PxGeomSweepHit &hit)
 
PX_FORCE_INLINE void setupSweepHitForMTD (PxGeomSweepHit &sweepHit, bool hasContacts, const PxVec3 &unitDir)
 
PxF32 computeWindingNumber (const Gu::BVHNode *tree, const PxVec3 &q, PxF32 beta, const PxHashMap< PxU32, ClusterApproximation > &clusters, const PxU32 *triangles, const PxVec3 *points)
 
PxF32 computeWindingNumber (const Gu::BVHNode *tree, const PxVec3 &q, const PxHashMap< PxU32, ClusterApproximation > &clusters, const PxU32 *triangles, const PxVec3 *points)
 
void precomputeClusterInformation (const Gu::BVHNode *tree, const PxU32 *triangles, const PxU32 numTriangles, const PxVec3 *points, PxHashMap< PxU32, ClusterApproximation > &result, PxI32 rootNodeIndex)
 
template<typename R , typename V3 >
PX_FORCE_INLINE R firstOrderClusterApproximation (const V3 &weightedCentroid, const V3 &weightedNormalSum, const V3 &evaluationPoint)
 
template<typename R , typename V3 >
PX_FORCE_INLINE R clusterApproximation (const ClusterApproximationT< R, V3 > &c, const V3 &evaluationPoint)
 
template<typename R , typename V3 >
PX_FORCE_INLINE R secondOrderClusterApproximation (const V3 &weightedCentroid, const V3 &weightedNormalSum, const PxMat33 &weightedOuterProductSum, const V3 &evaluationPoint)
 
template<typename R , typename V3 >
PX_FORCE_INLINE R clusterApproximation (const SecondOrderClusterApproximationT< R, V3 > &c, const V3 &evaluationPoint)
 
template<typename R , typename V3 >
void approximateCluster (const PxArray< PxI32 > &triangleSet, PxU32 start, PxU32 end, const PxU32 *triangles, const V3 *points, const PxArray< R > &triangleAreas, const PxArray< V3 > &triangleNormalsTimesTriangleArea, const PxArray< V3 > &triangleCentroids, ClusterApproximationT< R, V3 > &cluster)
 
template<typename R , typename V3 >
void approximateCluster (const PxArray< PxI32 > &triangleSet, PxU32 start, PxU32 end, const PxU32 *triangles, const V3 *points, const PxArray< R > &triangleAreas, const PxArray< V3 > &triangleNormalsTimesTriangleArea, const PxArray< V3 > &triangleCentroids, SecondOrderClusterApproximationT< R, V3 > &cluster)
 
template<typename R , typename V3 >
PX_FORCE_INLINE R evaluateExact (V3 a, V3 b, V3 c, const V3 &p)
 
template<typename R , typename V3 >
void precomputeClusterInformation (PxI32 nodeId, const BVHNode *tree, const PxU32 *triangles, const PxU32 numTriangles, const V3 *points, PxHashMap< PxU32, ClusterApproximationT< R, V3 > > &infos, const PxArray< R > triangleAreas, const PxArray< V3 > &triangleNormalsTimesTriangleArea, const PxArray< V3 > &triangleCentroids)
 
template<typename R , typename V3 >
void precomputeClusterInformation (const BVHNode *tree, const PxU32 *triangles, const PxU32 numTriangles, const V3 *points, PxHashMap< PxU32, ClusterApproximationT< R, V3 > > &result, PxI32 rootNodeIndex)
 
template<typename R , typename V3 >
R computeWindingNumber (const BVHNode *tree, const V3 &q, R beta, const PxHashMap< PxU32, ClusterApproximationT< R, V3 > > &clusters, const PxU32 *triangles, const V3 *points)
 
 PX_COMPILE_TIME_ASSERT (PX_OFFSET_OF(Gu::HeightFieldData, rows)>=PX_OFFSET_OF(Gu::HeightFieldData, mAABB)+4)
 
PX_FORCE_INLINE PxVec3 getLocalSphereData (PxBounds3 &localBounds, const PxTransform &pose0, const PxTransform &pose1, float radius)
 
PX_FORCE_INLINE PxBounds3 getLocalCapsuleBounds (float radius, float halfHeight)
 
PX_FORCE_INLINE PxU32 testAxis (const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &p2, const Capsule &capsule, const PxVec3 &axis)
 
PX_FORCE_INLINE PxVec3 computeEdgeAxis (const PxVec3 &p, const PxVec3 &a, const PxVec3 &q, const PxVec3 &b, float BDotB, float oneOverBDotB)
 
bool intersectCapsuleTriangle (const PxVec3 &normal, const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &p2, const Gu::Capsule &capsule, const CapsuleTriangleOverlapData &params)
 
PX_PHYSX_COMMON_API bool intersectEdgeEdge (const PxVec3 &p1, const PxVec3 &p2, const PxVec3 &dir, const PxVec3 &p3, const PxVec3 &p4, PxReal &dist, PxVec3 &ip)
 
bool rayAABBIntersect (const PxVec3 &minimum, const PxVec3 &maximum, const PxVec3 &origin, const PxVec3 &_dir, PxVec3 &coord)
 
PxU32 rayAABBIntersect2 (const PxVec3 &minimum, const PxVec3 &maximum, const PxVec3 &origin, const PxVec3 &_dir, PxVec3 &coord, PxReal &t)
 
int PX_PHYSX_COMMON_API intersectRayAABB (const PxVec3 &minimum, const PxVec3 &maximum, const PxVec3 &rayOrigin, const PxVec3 &rayDirection, float &tnear, float &tfar)
 
int intersectRayAABB (const PxVec3 &minimum, const PxVec3 &maximum, const PxVec3 &rayOrigin, const PxVec3 &rayDirection, const PxVec3 &invDirection, float &tnear, float &tfar)
 
bool PX_PHYSX_COMMON_API intersectRayAABB2 (const PxVec3 &minimum, const PxVec3 &maximum, const PxVec3 &ro, const PxVec3 &rd, float maxDist, float &tnear, float &tfar)
 
bool PX_PHYSX_COMMON_API intersectRayAABB2 (const aos::Vec3VArg minimum, const aos::Vec3VArg maximum, const aos::Vec3VArg ro, const aos::Vec3VArg rd, const aos::FloatVArg maxDist, aos::FloatV &tnear, aos::FloatV &tfar)
 
PxU32 intersectRayCapsuleInternal (const PxVec3 &origin, const PxVec3 &dir, const PxVec3 &p0, const PxVec3 &p1, float radius, PxReal s[2])
 
PX_FORCE_INLINE bool intersectRayCapsule (const PxVec3 &origin, const PxVec3 &dir, const PxVec3 &p0, const PxVec3 &p1, float radius, PxReal &t)
 
PX_FORCE_INLINE bool intersectRayCapsule (const PxVec3 &origin, const PxVec3 &dir, const Gu::Capsule &capsule, PxReal &t)
 
PX_INLINE bool intersectRayPlane (const PxVec3 &orig, const PxVec3 &dir, const PxPlane &plane, float &distanceAlongLine, PxVec3 *pointOnPlane=NULL)
 
PX_PHYSX_COMMON_API bool intersectRaySphereBasic (const PxVec3 &origin, const PxVec3 &dir, PxReal length, const PxVec3 &center, PxReal radius, PxReal &dist, PxVec3 *hit_pos=NULL)
 
PX_PHYSX_COMMON_API bool intersectRaySphere (const PxVec3 &origin, const PxVec3 &dir, PxReal length, const PxVec3 &center, PxReal radius, PxReal &dist, PxVec3 *hit_pos=NULL)
 
PX_FORCE_INLINE bool intersectRayTriangle (const PxVec3 &orig, const PxVec3 &dir, const PxVec3 &vert0, const PxVec3 &vert1, const PxVec3 &vert2, PxReal &at, PxReal &au, PxReal &av, bool cull, float enlarge=0.0f)
 
PX_FORCE_INLINE bool intersectRayTriangleCulling (const PxVec3 &orig, const PxVec3 &dir, const PxVec3 &vert0, const PxVec3 &vert1, const PxVec3 &vert2, PxReal &t, PxReal &u, PxReal &v, float enlarge=0.0f)
 
PX_FORCE_INLINE bool intersectRayTriangleNoCulling (const PxVec3 &orig, const PxVec3 &dir, const PxVec3 &vert0, const PxVec3 &vert1, const PxVec3 &vert2, PxReal &t, PxReal &u, PxReal &v, float enlarge=0.0f)
 
bool intersectSphereBox (const Gu::Sphere &sphere, const Gu::Box &box)
 
bool BuildBV32Ex (BV32Tree &tree, SourceMeshBase &mesh, float epsilon, PxU32 nbPrimitivesPerLeaf)
 
 PX_COMPILE_TIME_ASSERT (sizeof(IndTetrahedron32)==16)
 
 PX_COMPILE_TIME_ASSERT (sizeof(IndTetrahedron16)==8)
 
PX_FORCE_INLINE void getVertexReferences (PxU32 &vref0, PxU32 &vref1, PxU32 &vref2, PxU32 index, const IndTri32 *T32, const IndTri16 *T16)
 
PX_FORCE_INLINE void getVertexReferences (PxU32 &vref0, PxU32 &vref1, PxU32 &vref2, PxU32 &vref3, PxU32 index, const IndTetrahedron32 *T32, const IndTetrahedron16 *T16)
 
 PX_COMPILE_TIME_ASSERT (sizeof(QuantizedAABB)==12)
 
template<class ParamsT >
PX_FORCE_INLINE void setupParamsFlags (ParamsT *PX_RESTRICT params, PxU32 flags)
 
template<class ParamsT >
PX_FORCE_INLINE void reportUnlimitedCallbackHit (ParamsT *PX_RESTRICT params, const SweepHit &hit)
 
PX_FORCE_INLINE void invertPRMatrix (PxMat44 *PX_RESTRICT dest, const PxMat44 *PX_RESTRICT src)
 
PX_FORCE_INLINE void invertBoxMatrix (PxMat33 &m, PxVec3 &t, const Gu::Box &box)
 
PX_FORCE_INLINE PxU32 getNbPrimitives (PxU32 &primIndex)
 
template<class ParamsT >
PX_FORCE_INLINE void setupMeshPointersAndQuantizedCoeffs (ParamsT *PX_RESTRICT params, const SourceMesh *PX_RESTRICT mesh, const BV4Tree *PX_RESTRICT tree)
 
template<class ParamsT >
PX_FORCE_INLINE void setupMeshPointersAndQuantizedCoeffs (ParamsT *PX_RESTRICT params, const TetrahedronSourceMesh *PX_RESTRICT mesh, const BV4Tree *PX_RESTRICT tree)
 
PX_FORCE_INLINE void rotateBox (Gu::Box &dst, const PxMat44 &m, const Gu::Box &src)
 
PX_FORCE_INLINE PxVec3 inverseRotate (const PxMat44 *PX_RESTRICT src, const PxVec3 &p)
 
PX_FORCE_INLINE PxVec3 inverseTransform (const PxMat44 *PX_RESTRICT src, const PxVec3 &p)
 
PX_FORCE_INLINE void computeLocalRay (PxVec3 &localDir, PxVec3 &localOrigin, const PxVec3 &dir, const PxVec3 &origin, const PxMat44 *PX_RESTRICT worldm_Aligned)
 
PX_FORCE_INLINE void computeLocalSphere (float &radius2, PxVec3 &local_center, const Sphere &sphere, const PxMat44 *PX_RESTRICT worldm_Aligned)
 
PX_FORCE_INLINE void computeLocalCapsule (Capsule &localCapsule, const Capsule &capsule, const PxMat44 *PX_RESTRICT worldm_Aligned)
 
PX_FORCE_INLINE void computeLocalBox (Gu::Box &dst, const Gu::Box &src, const PxMat44 *PX_RESTRICT worldm_Aligned)
 
template<class LeafFunction_AnyT , class LeafFunction_ClosestT , class ParamsT >
void doBruteForceTests (PxU32 nbTris, ParamsT *PX_RESTRICT params)
 
bool BuildBV4Ex (BV4Tree &tree, SourceMeshBase &mesh, float epsilon, PxU32 nbPrimitivePerLeaf, bool quantized, BV4_BuildStrategy strategy=BV4_SPLATTER_POINTS)
 
PX_PHYSX_COMMON_API PxU32 raycast_triangleMesh_RTREE (const TriangleMesh *mesh, const PxTriangleMeshGeometry &meshGeom, const PxTransform &pose, const PxVec3 &rayOrigin, const PxVec3 &rayDir, PxReal maxDist, PxHitFlags hitFlags, PxU32 maxHits, PxGeomRaycastHit *PX_RESTRICT hits, PxU32 stride)
 
PX_PHYSX_COMMON_API bool intersectSphereVsMesh_RTREE (const Sphere &sphere, const TriangleMesh &triMesh, const PxTransform &meshTransform, const PxMeshScale &meshScale, LimitedResults *results)
 
PX_PHYSX_COMMON_API bool intersectBoxVsMesh_RTREE (const Box &box, const TriangleMesh &triMesh, const PxTransform &meshTransform, const PxMeshScale &meshScale, LimitedResults *results)
 
PX_PHYSX_COMMON_API bool intersectCapsuleVsMesh_RTREE (const Capsule &capsule, const TriangleMesh &triMesh, const PxTransform &meshTransform, const PxMeshScale &meshScale, LimitedResults *results)
 
PX_PHYSX_COMMON_API void intersectOBB_RTREE (const TriangleMesh *mesh, const Box &obb, MeshHitCallback< PxGeomRaycastHit > &callback, bool bothTriangleSidesCollide, bool checkObbIsAligned)
 
PX_PHYSX_COMMON_API bool sweepCapsule_MeshGeom_RTREE (const TriangleMesh *mesh, const PxTriangleMeshGeometry &triMeshGeom, const PxTransform &pose, const Gu::Capsule &lss, const PxVec3 &unitDir, const PxReal distance, PxGeomSweepHit &sweepHit, PxHitFlags hitFlags, const PxReal inflation)
 
PX_PHYSX_COMMON_API bool sweepBox_MeshGeom_RTREE (const TriangleMesh *mesh, const PxTriangleMeshGeometry &triMeshGeom, const PxTransform &pose, const Gu::Box &box, const PxVec3 &unitDir, const PxReal distance, PxGeomSweepHit &sweepHit, PxHitFlags hitFlags, const PxReal inflation)
 
PX_PHYSX_COMMON_API void sweepConvex_MeshGeom_RTREE (const TriangleMesh *mesh, const Gu::Box &hullBox, const PxVec3 &localDir, const PxReal distance, SweepConvexMeshHitCallback &callback, bool anyHit)
 
PX_PHYSX_COMMON_API void pointMeshDistance_RTREE (const TriangleMesh *mesh, const PxTriangleMeshGeometry &meshGeom, const PxTransform &pose, const PxVec3 &point, float maxDist, PxU32 &index, float &dist, PxVec3 &closestPt)
 
PX_PHYSX_COMMON_API PxU32 raycast_triangleMesh_BV4 (const TriangleMesh *mesh, const PxTriangleMeshGeometry &meshGeom, const PxTransform &pose, const PxVec3 &rayOrigin, const PxVec3 &rayDir, PxReal maxDist, PxHitFlags hitFlags, PxU32 maxHits, PxGeomRaycastHit *PX_RESTRICT hits, PxU32 stride)
 
PX_PHYSX_COMMON_API bool intersectSphereVsMesh_BV4 (const Sphere &sphere, const TriangleMesh &triMesh, const PxTransform &meshTransform, const PxMeshScale &meshScale, LimitedResults *results)
 
PX_PHYSX_COMMON_API bool intersectBoxVsMesh_BV4 (const Box &box, const TriangleMesh &triMesh, const PxTransform &meshTransform, const PxMeshScale &meshScale, LimitedResults *results)
 
PX_PHYSX_COMMON_API bool intersectCapsuleVsMesh_BV4 (const Capsule &capsule, const TriangleMesh &triMesh, const PxTransform &meshTransform, const PxMeshScale &meshScale, LimitedResults *results)
 
PX_PHYSX_COMMON_API void intersectOBB_BV4 (const TriangleMesh *mesh, const Box &obb, MeshHitCallback< PxGeomRaycastHit > &callback, bool bothTriangleSidesCollide, bool checkObbIsAligned)
 
PX_PHYSX_COMMON_API void intersectOBB_BV4 (const TetrahedronMesh *mesh, const Box &obb, TetMeshHitCallback< PxGeomRaycastHit > &callback)
 
PX_PHYSX_COMMON_API bool sweepCapsule_MeshGeom_BV4 (const TriangleMesh *mesh, const PxTriangleMeshGeometry &triMeshGeom, const PxTransform &pose, const Gu::Capsule &lss, const PxVec3 &unitDir, const PxReal distance, PxGeomSweepHit &sweepHit, PxHitFlags hitFlags, const PxReal inflation)
 
PX_PHYSX_COMMON_API bool sweepBox_MeshGeom_BV4 (const TriangleMesh *mesh, const PxTriangleMeshGeometry &triMeshGeom, const PxTransform &pose, const Gu::Box &box, const PxVec3 &unitDir, const PxReal distance, PxGeomSweepHit &sweepHit, PxHitFlags hitFlags, const PxReal inflation)
 
PX_PHYSX_COMMON_API void sweepConvex_MeshGeom_BV4 (const TriangleMesh *mesh, const Gu::Box &hullBox, const PxVec3 &localDir, const PxReal distance, SweepConvexMeshHitCallback &callback, bool anyHit)
 
PX_PHYSX_COMMON_API void pointMeshDistance_BV4 (const TriangleMesh *mesh, const PxTriangleMeshGeometry &meshGeom, const PxTransform &pose, const PxVec3 &point, float maxDist, PxU32 &index, float &dist, PxVec3 &closestPt)
 
PX_PHYSX_COMMON_API bool intersectMeshVsMesh_BV4 (PxReportCallback< PxGeomIndexPair > &callback, const TriangleMesh &triMesh0, const TriangleMesh &triMesh1, const PxTransform &meshPose0, const PxTransform &meshPose1, const PxMeshScale &meshScale0, const PxMeshScale &meshScale1, PxMeshMeshQueryFlags meshMeshFlags)
 
PX_FORCE_INLINE PxU32 LeafGetNbTriangles (PxU32 Data)
 
PX_FORCE_INLINE PxU32 LeafGetTriangleIndex (PxU32 Data)
 
PX_FORCE_INLINE PxU32 LeafSetData (PxU32 nb, PxU32 index)
 
 PX_COMPILE_TIME_ASSERT (sizeof(LeafTriangles)==4)
 
PX_FORCE_INLINE const Gu::TetrahedronMesh * _getTetraMeshData (const PxTetrahedronMeshGeometry &meshGeom)
 
 PX_COMPILE_TIME_ASSERT (sizeof(IndexedTriangle32)==12)
 
 PX_COMPILE_TIME_ASSERT (sizeof(IndexedTriangle16)==6)
 
PX_FORCE_INLINE void getVertexRefs (PxU32 triangleIndex, PxU32 &vref0, PxU32 &vref1, PxU32 &vref2, const void *indices, bool has16BitIndices)
 
bool generateFullContactManifold (Gu::PolygonalData &polyData0, Gu::PolygonalData &polyData1, Gu::SupportLocal *map0, Gu::SupportLocal *map1, Gu::PersistentContact *manifoldContacts, PxU32 &numContacts, const aos::FloatVArg contactDist, const aos::Vec3VArg normal, const aos::Vec3VArg closestA, const aos::Vec3VArg closestB, const PxReal toleranceA, const PxReal toleranceB, bool doOverlapTest, PxRenderOutput *renderOutput, const PxReal toleranceLength)
 
bool generateFullContactManifold (const Gu::CapsuleV &capsule, Gu::PolygonalData &polyData, Gu::SupportLocal *map, const aos::PxMatTransformV &aToB, Gu::PersistentContact *manifoldContacts, PxU32 &numContacts, const aos::FloatVArg contactDist, aos::Vec3V &normal, const aos::Vec3VArg closest, const PxReal tolerance, bool doOverlapTest, const PxReal toleranceScale)
 
bool generateCapsuleBoxFullContactManifold (const Gu::CapsuleV &capsule, Gu::PolygonalData &polyData, Gu::SupportLocal *map, const aos::PxMatTransformV &aToB, Gu::PersistentContact *manifoldContacts, PxU32 &numContacts, const aos::FloatVArg contactDist, aos::Vec3V &normal, const aos::Vec3VArg closest, const PxReal boxMargin, const bool doOverlapTest, const PxReal toeranceScale, PxRenderOutput *renderOutput)
 
bool addGJKEPAContacts (const Gu::GjkConvex *relativeConvex, const Gu::GjkConvex *localConvex, const aos::PxMatTransformV &aToB, Gu::GjkStatus status, Gu::PersistentContact *manifoldContacts, const aos::FloatV replaceBreakingThreshold, const aos::FloatV toleranceLength, GjkOutput &output, Gu::PersistentContactManifold &manifold)
 
bool computeMTD (Gu::PolygonalData &polyData0, Gu::PolygonalData &polyData1, SupportLocal *map0, SupportLocal *map1, aos::FloatV &penDepth, aos::Vec3V &normal)
 
bool computeMTD (const Gu::CapsuleV &capsule, Gu::PolygonalData &polyData, Gu::SupportLocal *map, aos::FloatV &penDepth, aos::Vec3V &normal)
 
void buildPartialHull (const Gu::PolygonalData &polyData, SupportLocal *map, Gu::SeparatingAxes &validAxes, const aos::Vec3VArg v, const aos::Vec3VArg _dir)
 
bool generateSphereFullContactManifold (const Gu::CapsuleV &capsule, Gu::PolygonalData &polyData, Gu::SupportLocal *map, Gu::PersistentContact *manifoldContacts, PxU32 &numContacts, const aos::FloatVArg contactDist, aos::Vec3V &normal, const bool doOverlapTest)
 
void buildPartialHull (const PolygonalData &polyData, SupportLocal *map, SeparatingAxes &validAxes, const Vec3VArg planeP, const Vec3VArg planeDir)
 
void generatedContacts (PolygonalData &polyData0, PolygonalData &polyData1, const HullPolygonData &referencePolygon, const HullPolygonData &incidentPolygon, SupportLocal *map0, SupportLocal *map1, const PxMatTransformV &transform0To1, PersistentContact *manifoldContacts, PxU32 &numContacts, const FloatVArg contactDist, PxRenderOutput *renderOutput)
 
bool generateFullContactManifold (PolygonalData &polyData0, PolygonalData &polyData1, SupportLocal *map0, SupportLocal *map1, PersistentContact *manifoldContacts, PxU32 &numContacts, const FloatVArg contactDist, const Vec3VArg normal, const Vec3VArg closestA, const Vec3VArg closestB, const PxReal marginA, const PxReal marginB, const bool doOverlapTest, PxRenderOutput *renderOutput, const PxReal toleranceLength)
 
bool contains (aos::Vec3V *verts, const PxU32 numVerts, const aos::Vec3VArg p, const aos::Vec3VArg min, const aos::Vec3VArg max)
 
PX_FORCE_INLINE aos::FloatV signed2DTriArea (const aos::Vec3VArg a, const aos::Vec3VArg b, const aos::Vec3VArg c)
 
PxI32 getPolygonIndex (const Gu::PolygonalData &polyData, SupportLocal *map, const aos::Vec3VArg normal, PxI32 &polyIndex2)
 
PX_FORCE_INLINE PxI32 getPolygonIndex (const Gu::PolygonalData &polyData, SupportLocal *map, const aos::Vec3VArg normal)
 
PxU32 getWitnessPolygonIndex (const Gu::PolygonalData &polyData, SupportLocal *map, const aos::Vec3VArg normal, const aos::Vec3VArg closest, const PxReal tolerance)
 
void getPCMConvexData (const Gu::ConvexHullV &convexHull, const bool idtScale, PolygonalData &polyData)
 
bool getPCMConvexData (const PxConvexMeshGeometry &shapeConvex, Cm::FastVertex2ShapeScaling &scaling, PxBounds3 &bounds, PolygonalData &polyData)
 
bool PCMContactConvexMesh (const Gu::PolygonalData &polyData0, Gu::SupportLocal *polyMap, const aos::FloatVArg minMargin, const PxBounds3 &hullAABB, const PxTriangleMeshGeometry &shapeMesh, const PxTransform &transform0, const PxTransform &transform1, PxReal contactDistance, PxContactBuffer &contactBuffer, const Cm::FastVertex2ShapeScaling &convexScaling, const Cm::FastVertex2ShapeScaling &meshScaling, bool idtConvexScale, bool idtMeshScale, Gu::MultiplePersistentContactManifold &multiManifold, PxRenderOutput *renderOutput)
 
bool PCMContactConvexHeightfield (const Gu::PolygonalData &polyData0, Gu::SupportLocal *polyMap, const aos::FloatVArg minMargin, const PxBounds3 &hullAABB, const PxHeightFieldGeometry &shapeHeightfield, const PxTransform &transform0, const PxTransform &transform1, PxReal contactDistance, PxContactBuffer &contactBuffer, const Cm::FastVertex2ShapeScaling &convexScaling, bool idtConvexScale, Gu::MultiplePersistentContactManifold &multiManifold, PxRenderOutput *renderOutput)
 
aos::Mat33V findRotationMatrixFromZAxis (const aos::Vec3VArg to)
 
void addManifoldPoint (PersistentContact *manifoldContacts, PersistentContactManifold &manifold, GjkOutput &output, const aos::PxMatTransformV &aToB, const aos::FloatV replaceBreakingThreshold)
 
bool sweepBoxBox (const Box &box0, const Box &box1, const PxVec3 &dir, PxReal length, PxHitFlags hitFlags, PxGeomSweepHit &sweepHit)
 
bool sweepBoxSphere (const Box &box, PxReal sphereRadius, const PxVec3 &spherePos, const PxVec3 &dir, PxReal length, PxReal &min_dist, PxVec3 &normal, PxHitFlags hitFlags)
 
bool sweepBoxTriangle (const PxTriangle &tri, const PxBounds3 &box, const PxVec3 &motion, const PxVec3 &oneOverMotion, PxVec3 &hit, PxVec3 &normal, PxReal &d, bool isDoubleSided=false)
 
PX_FORCE_INLINE int testSeparationAxes (const PxTriangle &tri, const PxVec3 &extents, const PxVec3 &normal, const PxVec3 &dir, const PxVec3 &oneOverDir, float tmax, float &tcoll)
 
PX_FORCE_INLINE int triBoxSweepTestBoxSpace_inlined (const PxTriangle &tri, const PxVec3 &extents, const PxVec3 &dir, const PxVec3 &oneOverDir, float tmax, float &toi, PxU32 doBackfaceCulling)
 Inlined version of triBoxSweepTestBoxSpace. See that other function for comments.
 
int triBoxSweepTestBoxSpace (const PxTriangle &tri, const PxVec3 &extents, const PxVec3 &dir, const PxVec3 &oneOverDir, float tmax, float &toi, bool doBackfaceCulling)
 
bool sweepCapsuleBox (const Capsule &capsule, const PxTransform &boxWorldPose, const PxVec3 &boxDim, const PxVec3 &dir, PxReal length, PxVec3 &hit, PxReal &min_dist, PxVec3 &normal, PxHitFlags hitFlags)
 
bool sweepCapsuleCapsule (const Capsule &capsule0, const Capsule &capsule1, const PxVec3 &dir, PxReal length, PxReal &min_dist, PxVec3 &ip, PxVec3 &normal, PxU32 inHitFlags, PxU16 &outHitFlags)
 
bool sweepCapsuleTriangles_Precise (PxU32 nbTris, const PxTriangle *PX_RESTRICT triangles, const Capsule &capsule, const PxVec3 &unitDir, const PxReal distance, const PxU32 *PX_RESTRICT cachedIndex, PxGeomSweepHit &hit, PxVec3 &triNormalOut, PxHitFlags hitFlags, bool isDoubleSided, const BoxPadded *cullBox=NULL)
 
bool sweepSphereCapsule (const Sphere &sphere, const Capsule &lss, const PxVec3 &dir, PxReal length, PxReal &d, PxVec3 &ip, PxVec3 &nrm, PxHitFlags hitFlags)
 
bool sweepSphereSphere (const PxVec3 &center0, PxReal radius0, const PxVec3 &center1, PxReal radius1, const PxVec3 &motion, PxReal &d, PxVec3 &nrm)
 
bool sweepSphereVSTri (const PxVec3 *PX_RESTRICT triVerts, const PxVec3 &triUnitNormal, const PxVec3 &sphereCenter, PxReal sphereRadius, const PxVec3 &unitDir, PxReal &impactDistance, bool &directHit, bool testInitialOverlap)
 
bool sweepSphereVSQuad (const PxVec3 *PX_RESTRICT quadVerts, const PxVec3 &quadUnitNormal, const PxVec3 &sphereCenter, float sphereRadius, const PxVec3 &unitDir, float &impactDistance)
 
PX_FORCE_INLINE bool computeSphereTriangleImpactData (PxGeomSweepHit &h, PxVec3 &triNormalOut, PxU32 index, PxReal curT, const PxVec3 &center, const PxVec3 &unitDir, const PxVec3 &bestTriNormal, const PxTriangle *PX_RESTRICT triangles, bool isDoubleSided, bool meshBothSides)
 
bool sweepSphereTriangles (PxU32 nbTris, const PxTriangle *PX_RESTRICT triangles, const PxVec3 &center, 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)
 
void computeSphereTriImpactData (PxVec3 &hit, PxVec3 &normal, const PxVec3 &center, const PxVec3 &dir, float t, const PxTriangle &tri)
 
void computeBoxTriImpactData (PxVec3 &hit, PxVec3 &normal, const PxVec3 &boxExtents, const PxVec3 &localDir, const PxTriangle &triInBoxSpace, PxReal impactDist)
 
void computeEdgeEdgeNormal (PxVec3 &normal, const PxVec3 &p1, const PxVec3 &p2_p1, const PxVec3 &p3, const PxVec3 &p4_p3, const PxVec3 &dir, float d)
 
PX_FORCE_INLINE PxU32 getInitIndex (const PxU32 *PX_RESTRICT cachedIndex, PxU32 nbTris)
 
PX_FORCE_INLINE bool cullTriangle (const PxVec3 *PX_RESTRICT triVerts, const PxVec3 &dir, PxReal radius, PxReal t, const PxReal dpc0)
 
PX_FORCE_INLINE bool cullQuad (const PxVec3 *PX_RESTRICT quadVerts, const PxVec3 &dir, PxReal radius, PxReal t, const PxReal dpc0)
 
PX_FORCE_INLINE PxReal squareDistance (const PxVec3 &p0, const PxVec3 &dir, PxReal t, const PxVec3 &point)
 
PX_FORCE_INLINE bool coarseCullingTri (const PxVec3 &center, const PxVec3 &dir, PxReal t, PxReal radius, const PxVec3 *PX_RESTRICT triVerts)
 
PX_FORCE_INLINE bool coarseCullingQuad (const PxVec3 &center, const PxVec3 &dir, PxReal t, PxReal radius, const PxVec3 *PX_RESTRICT quadVerts)
 
PX_FORCE_INLINE bool rejectTriangle (const PxVec3 &center, const PxVec3 &unitDir, PxReal curT, PxReal radius, const PxVec3 *PX_RESTRICT triVerts, const PxReal dpc0)
 
PX_FORCE_INLINE bool rejectQuad (const PxVec3 &center, const PxVec3 &unitDir, PxReal curT, PxReal radius, const PxVec3 *PX_RESTRICT quadVerts, const PxReal dpc0)
 
PX_FORCE_INLINE bool shouldFlipNormal (const PxVec3 &normal, bool meshBothSides, bool isDoubleSided, const PxVec3 &triangleNormal, const PxVec3 &dir)
 
PX_FORCE_INLINE bool shouldFlipNormal (const PxVec3 &normal, bool meshBothSides, bool isDoubleSided, const PxTriangle &triangle, const PxVec3 &dir, const PxTransform *pose)
 
PX_FORCE_INLINE bool setInitialOverlapResults (PxGeomSweepHit &hit, const PxVec3 &unitDir, PxU32 faceIndex)
 
PX_FORCE_INLINE void computeBoxLocalImpact (PxVec3 &pos, PxVec3 &normal, PxHitFlags &outFlags, const Box &box, const PxVec3 &localDir, const PxTriangle &triInBoxSpace, const PxHitFlags inFlags, bool isDoubleSided, bool meshBothSides, PxReal impactDist)
 

Variables

SweepMethod g_SweepMethodTable [][PxGeometryType::eGEOMETRY_COUNT]
 
TriangleSweepMethod g_TriangleSweepMethodTable []
 
const PxU32 lookUp [3] = {1, 2, 0}
 
const PxI32 offsets [3][3][3]
 
const PxI32 projections [3][2] = { {1, 2}, {2, 0}, {0, 1} }
 
struct physx::Gu::BV32DataDepthInfo PX_ALIGN_SUFFIX
 
const PxU8 gPCMBoxPolygonData [24]
 
const PxF32 invalidateThresholds [5] = { 0.5f, 0.125f, 0.25f, 0.375f, 0.375f }
 
const PxF32 invalidateThresholds2 [3] = { 0.5f, 0.1f, 0.75f }
 
const PxF32 invalidateQuatThresholds [5] = { 0.9998f, 0.9999f, 0.9999f, 0.9999f, 0.9999f }
 
const PxF32 invalidateQuatThresholds2 [3] = { 0.9995f, 0.9999f, 0.9997f }
 

Detailed Description

Represents a sphere defined by its center point and radius.

Enumeration Type Documentation

◆ EdgeType

Enumerator
PX_EDGE_BOUNDARY 

Edge belongs to a single triangle.

PX_EDGE_INTERNAL 

Edge belongs to exactly two triangles.

PX_EDGE_SINGULAR 

Edge belongs to three or more triangles.

◆ HitCode

Enumerator
HIT_NONE 

No hit.

HIT_CONTINUE 

Hit found, but keep looking for closer one.

HIT_EXIT 

Hit found, you can early-exit (raycast any)

◆ InternalMeshSerialFlag

Enumerator
IMSF_MATERIALS 

if set, the cooked mesh file contains per-triangle material indices

IMSF_FACE_REMAP 

if set, the cooked mesh file contains a remap table

IMSF_8BIT_INDICES 

if set, the cooked mesh file contains 8bit indices (topology)

IMSF_16BIT_INDICES 

if set, the cooked mesh file contains 16bit indices (topology)

IMSF_ADJACENCIES 

if set, the cooked mesh file contains adjacency structures

IMSF_GRB_DATA 

if set, the cooked mesh file contains GRB data structures

IMSF_SDF 

if set, the cooked mesh file contains SDF data structures

IMSF_VERT_MAPPING 

if set, the cooked mesh file contains vertex mapping information

IMSF_GRB_INV_REMAP 

if set, the cooked mesh file contains vertex inv mapping information. Required for cloth

IMSF_INERTIA 

if set, the cooked mesh file contains inertia tensor for the mesh

Function Documentation

◆ computeAlignmentValue()

PX_FORCE_INLINE PxReal physx::Gu::computeAlignmentValue ( const PxVec3 &  triNormal,
const PxVec3 &  unitDir 
)

PT: computes "alignment value" used to select the "best" triangle in case of identical impact distances (for sweeps). This simply computes how much a triangle is aligned with a given sweep direction. Captured in a function to make sure it is always computed correctly, i.e. working for double-sided triangles.

Parameters
triNormal[in] triangle's normal
unitDir[in] sweep direction (normalized)
Returns
alignment value in [-1.0f, 0.0f]. -1.0f for fully aligned, 0.0f for fully orthogonal.

◆ computeBoxAroundCapsule()

void physx::Gu::computeBoxAroundCapsule ( const Capsule &  capsule,
Gu::Box &  box 
)

Computes an OBB surrounding the capsule.

Parameters
box[out] the OBB

◆ computeBoxPoints()

void physx::Gu::computeBoxPoints ( const PxBounds3 &  bounds,
PxVec3 *PX_RESTRICT  pts 
)

Computes the aabb points.

Parameters
pts[out] 8 box points

◆ convertSparseSDFTo3DTextureLayout()

PX_PHYSX_COMMON_API void physx::Gu::convertSparseSDFTo3DTextureLayout ( PxU32  width,
PxU32  height,
PxU32  depth,
PxU32  cellsPerSubgrid,
PxU32 *  sdfFineStartSlots,
const PxReal *  sdfFineSubgridsIn,
PxU32  sdfFineSubgridsSize,
PxArray< PxReal > &  subgrids3DTexFormat,
PxU32 &  numSubgridsX,
PxU32 &  numSubgridsY,
PxU32 &  numSubgridsZ 
)

Converts a sparse grid sdf to a format that can be used to create a 3d texture. 3d textures support very efficient trilinear interpolation on the GPU which is very important during sdf evaluation.

Parameters
[in]widthThe number of grid points along the x direction
[in]heightThe number of grid points along the y direction
[in]depthThe number of grid points along the z direction
[in]cellsPerSubgridThe number of cells in a sparse subgrid block (full block has mSubgridSize^3 cells and (mSubgridSize+1)^3 samples)
[in,out]sdfFineStartSlotsArray with linear start indices into the subgrid data array. This array gets converted by this method to start indices for every subgrid block in the 3d texture. The result uses 10bits for z coordinate, 10bits for y and 10bits for x
[in]sdfFineSubgridsInSubgrid data array
[in]sdfFineSubgridsSizeNumber of elements in sdfFineSubgridsIn
[out]subgrids3DTexFormatThe subgrid data organized in a 3d texture compatible order
[out]numSubgridsXNumber of subgrid blocks in the 3d texture along x. The full texture dimension along x will be numSubgridsX*(cellsPerSubgrid+1).
[out]numSubgridsYNumber of subgrid blocks in the 3d texture along y. The full texture dimension along y will be numSubgridsY*(cellsPerSubgrid+1).
[out]numSubgridsZNumber of subgrid blocks in the 3d texture along z. The full texture dimension along z will be numSubgridsZ*(cellsPerSubgrid+1).

◆ distancePointBoxSquared() [1/2]

PX_FORCE_INLINE PxReal physx::Gu::distancePointBoxSquared ( const PxVec3 &  point,
const Gu::Box &  box,
PxVec3 *  boxParam = NULL 
)

Return the square of the minimum distance from the surface of the box to the given point.

Parameters
pointThe point
boxThe box
boxParamSet to coordinates of the closest point on the box in its local space

◆ distancePointBoxSquared() [2/2]

PxReal physx::Gu::distancePointBoxSquared ( const PxVec3 &  point,
const PxVec3 &  boxOrigin,
const PxVec3 &  boxExtent,
const PxMat33 &  boxBase,
PxVec3 *  boxParam = NULL 
)

Return the square of the minimum distance from the surface of the box to the given point.

Parameters
pointThe point
boxOriginThe origin of the box
boxExtentThe extent of the box
boxBaseThe orientation of the box
boxParamSet to coordinates of the closest point on the box in its local space

◆ distancePointSegmentSquared()

PX_FORCE_INLINE PxReal physx::Gu::distancePointSegmentSquared ( const PxVec3 &  p0,
const PxVec3 &  p1,
const PxVec3 &  point,
PxReal *  param = NULL 
)

A segment is defined by S(t) = mP0 * (1 - t) + mP1 * t, with 0 <= t <= 1 Alternatively, a segment is S(t) = Origin + t * Direction for 0 <= t <= 1. Direction is not necessarily unit length. The end points are Origin = mP0 and Origin + Direction = mP1.

◆ extractIsosurfaceFromSDF()

PX_PHYSX_COMMON_API void physx::Gu::extractIsosurfaceFromSDF ( const Gu::SDF &  sdf,
PxArray< PxVec3 > &  isosurfaceVertices,
PxArray< PxU32 > &  isosurfaceTriangleIndices 
)

Extracts an isosurface as a triangular mesh from a signed distance function.

Parameters
[in]sdfThe signed distance function
[out]isosurfaceVerticesThe vertices of the extracted isosurface
[out]isosurfaceTriangleIndicesThe triangles of the extracted isosurface

◆ getBoxEdges()

const PxU8 * physx::Gu::getBoxEdges ( )

Returns edges.

Returns
24 indices (12 edges) indexing the list returned by ComputePoints()

◆ intersectCapsuleTriangle()

bool physx::Gu::intersectCapsuleTriangle ( const PxVec3 &  normal,
const PxVec3 &  p0,
const PxVec3 &  p1,
const PxVec3 &  p2,
const Gu::Capsule &  capsule,
const CapsuleTriangleOverlapData &  params 
)

Checks if a capsule intersects a triangle.

Parameters
normal[in] triangle normal (orientation does not matter)
p0[in] triangle's first point
p1[in] triangle's second point
p2[in] triangle's third point
capsule[in] capsule
params[in] precomputed capsule params
Returns
true if capsule overlaps triangle

◆ intersectRayTriangle()

PX_FORCE_INLINE bool physx::Gu::intersectRayTriangle ( const PxVec3 &  orig,
const PxVec3 &  dir,
const PxVec3 &  vert0,
const PxVec3 &  vert1,
const PxVec3 &  vert2,
PxReal &  at,
PxReal &  au,
PxReal &  av,
bool  cull,
float  enlarge = 0.0f 
)

Computes a ray-triangle intersection test. From Tomas Moeller's "Fast Minimum Storage Ray-Triangle Intersection" Could be optimized and cut into 2 methods (culled or not). Should make a batch one too to avoid the call overhead, or make it inline.

Parameters
orig[in] ray origin
dir[in] ray direction
vert0[in] triangle vertex
vert1[in] triangle vertex
vert2[in] triangle vertex
at[out] distance
au[out] impact barycentric coordinate
av[out] impact barycentric coordinate
cull[in] true to use backface culling
enlarge[in] enlarge triangle by specified epsilon in UV space to avoid false near-edge rejections
Returns
true on overlap
Note
u, v and t will remain unchanged if false is returned.

◆ intersectSphereBox()

bool physx::Gu::intersectSphereBox ( const Gu::Sphere &  sphere,
const Gu::Box &  box 
)

Checks if a sphere intersects a box. Based on: Jim Arvo, A Simple Method for Box-Sphere Intersection Testing, Graphics Gems, pp. 247-250.

Parameters
sphere[in] sphere
box[in] box
Returns
true if sphere overlaps box (or exactly touches it)

◆ intersectTetrahedronBox()

bool physx::Gu::intersectTetrahedronBox ( const PxVec3 &  a,
const PxVec3 &  b,
const PxVec3 &  c,
const PxVec3 &  d,
const PxBounds3 &  box 
)

Tests if a tetrahedron overlaps a box (AABB).

Parameters
a[in] tetrahedron's first point
b[in] tetrahedron's second point
c[in] tetrahedron's third point
d[in] tetrahedron's fourth point
box[in] The axis aligned box box to check for overlap
Returns
true if tetrahedron overlaps box

◆ intersectTriangleBox()

PxIntBool physx::Gu::intersectTriangleBox ( const BoxPadded &  box,
const PxVec3 &  p0,
const PxVec3 &  p1,
const PxVec3 &  p2 
)

Tests if a triangle overlaps a box (OBB).

There are currently no SIMD-related requirements for p0, p1, p2.

Parameters
box[in] the box
p0[in] triangle's first point
p1[in] triangle's second point
p2[in] triangle's third point
Returns
true if triangle overlaps box

◆ intersectTriangleBox_ReferenceCode()

PxIntBool physx::Gu::intersectTriangleBox_ReferenceCode ( const PxVec3 &  center,
const PxVec3 &  extents,
const PxVec3 &  p0,
const PxVec3 &  p1,
const PxVec3 &  p2 
)

Tests if a triangle overlaps a box (AABB). This is the reference non-SIMD code.

Parameters
center[in] the box center
extents[in] the box extents
p0[in] triangle's first point
p1[in] triangle's second point
p2[in] triangle's third point
Returns
true if triangle overlaps box

◆ intersectTriangleBox_Unsafe()

PxIntBool physx::Gu::intersectTriangleBox_Unsafe ( const PxVec3 &  center,
const PxVec3 &  extents,
const PxVec3 &  p0,
const PxVec3 &  p1,
const PxVec3 &  p2 
)

Tests if a triangle overlaps a box (AABB). This is the optimized SIMD code.

WARNING: the function has various SIMD requirements, left to the calling code:

  • function will load 4 bytes after 'center'. Make sure it's safe to load from there.
  • function will load 4 bytes after 'extents'. Make sure it's safe to load from there.
  • function will load 4 bytes after 'p0'. Make sure it's safe to load from there.
  • function will load 4 bytes after 'p1'. Make sure it's safe to load from there.
  • function will load 4 bytes after 'p2'. Make sure it's safe to load from there. If you can't guarantee these requirements, please use the non-SIMD reference code instead.
Parameters
center[in] the box center.
extents[in] the box extents
p0[in] triangle's first point
p1[in] triangle's second point
p2[in] triangle's third point
Returns
true if triangle overlaps box

◆ keepTriangle()

PX_FORCE_INLINE bool physx::Gu::keepTriangle ( float  triImpactDistance,
float  triAlignmentValue,
float  bestImpactDistance,
float  bestAlignmentValue,
float  maxDistance 
)

PT: sweeps: determines if a newly touched triangle is "better" than best one so far. In this context "better" means either clearly smaller impact distance, or a similar impact distance but a normal more aligned with the sweep direction.

Parameters
triImpactDistance[in] new triangle's impact distance
triAlignmentValue[in] new triangle's alignment value (as computed by computeAlignmentValue)
bestImpactDistance[in] current best triangle's impact distance
bestAlignmentValue[in] current best triangle's alignment value (as computed by computeAlignmentValue)
maxDistance[in] maximum distance of the query, hit cannot be longer than this maxDistance
Returns
true if new triangle is better

◆ makeFatEdge()

PX_FORCE_INLINE void physx::Gu::makeFatEdge ( PxVec3 &  p0,
PxVec3 &  p1,
PxReal  fatCoeff 
)

Extend an edge along its length by a factor

◆ rayAABBIntersect2()

PxU32 physx::Gu::rayAABBIntersect2 ( const PxVec3 &  minimum,
const PxVec3 &  maximum,
const PxVec3 &  origin,
const PxVec3 &  _dir,
PxVec3 &  coord,
PxReal &  t 
)

Computes a ray-AABB intersection. Original code by Andrew Woo, from "Graphics Gems", Academic Press, 1990 Optimized code by Pierre Terdiman, 2000 (~20-30% faster on my Celeron 500) Epsilon value added by Klaus Hartmann. (discarding it saves a few cycles only) Return of intersected face code and parameter by Adam! Also modified behavior for ray starts inside AABB. 2004 :-p

Hence this version is faster as well as more robust than the original one.

Should work provided: 1) the integer representation of 0.0f is 0x00000000 2) the sign bit of the float is the most significant one

Report bugs: p.ter.nosp@m.dima.nosp@m.n@cod.nosp@m.erco.nosp@m.rner..nosp@m.com

Parameters
minimum[in] the smaller corner of the bounding box
maximum[in] the larger corner of the bounding box
origin[in] ray origin
_dir[in] ray direction
coord[out] impact coordinates
t[out] t such that coord = origin + dir * t
Returns
false if ray does not intersect AABB, or ray origin is inside AABB. Else: 1 + coordinate index of box axis that was hit

Note: sign bit that determines if the minimum (0) or maximum (1) of the axis was hit is equal to sign(coord[returnVal-1]).

◆ SDFUsingWindingNumbers()

PX_PHYSX_COMMON_API void physx::Gu::SDFUsingWindingNumbers ( const PxVec3 *  vertices,
const PxU32 *  indices,
PxU32  numTriangleIndices,
PxU32  width,
PxU32  height,
PxU32  depth,
PxReal *  sdf,
PxVec3  minExtents,
PxVec3  maxExtents,
PxVec3 *  sampleLocations = NULL,
bool  cellCenteredSamples = true,
PxU32  numThreads = 1 
)

Returns the distance to the mesh's surface for all samples in a grid. The sign is dependent on the triangle orientation. Negative distances indicate that a sample is inside the mesh, positive distances mean the sample is outside of the mesh.

Parameters
[in]verticesThe triangle mesh's vertices
[in]indicesThe triangle mesh's indices
[in]numTriangleIndicesThe number of indices
[in]widthThe number of grid points along the x direction
[in]heightThe number of grid points along the y direction
[in]depthThe number of grid points along the z direction
[out]sdfThe signed distance field (negative values indicate that a point is inside of the mesh), index rule is: index = z * width * height + y * width + x
[in]minExtentsThe grid's lower corner, the box formed by minExtent and maxExtent must include all vertices
[in]maxExtentsThe grid's upper corner, the box formed by minExtent and maxExtent must include all vertices
[out]sampleLocationsOptional buffer to output the grid sample locations, index rule is: index = z * width * height + y * width + x
[in]cellCenteredSamplesDetermines if the sample points are chosen at cell centers or at cell origins
[in]numThreadsThe number of cpu threads to use during the computation

◆ SDFUsingWindingNumbersSparse()

PX_PHYSX_COMMON_API void physx::Gu::SDFUsingWindingNumbersSparse ( const PxVec3 *  vertices,
const PxU32 *  indices,
PxU32  numTriangleIndices,
PxU32  width,
PxU32  height,
PxU32  depth,
const PxVec3 &  minExtents,
const PxVec3 &  maxExtents,
PxReal  narrowBandThicknessRelativeToExtentDiagonal,
PxU32  cellsPerSubgrid,
PxArray< PxReal > &  sdfCoarse,
PxArray< PxU32 > &  sdfFineStartSlots,
PxArray< PxReal > &  subgridData,
PxArray< PxReal > &  denseSdf,
PxReal &  subgridsMinSdfValue,
PxReal &  subgridsMaxSdfValue,
PxU32  numThreads = 1 
)

Returns the distance to the mesh's surface for all samples in a grid. The sign is dependent on the triangle orientation. Negative distances indicate that a sample is inside the mesh, positive distances mean the sample is outside of the mesh. Near mesh surfaces, a higher resolution is available than further away from the surface (sparse sdf format) to save memory. The samples are not cell centered but located at the cell origin. This is a requirement of the sparse grid format.

Parameters
[in]verticesThe triangle mesh's vertices
[in]indicesThe triangle mesh's indices
[in]numTriangleIndicesThe number of indices
[in]widthThe number of grid points along the x direction
[in]heightThe number of grid points along the y direction
[in]depthThe number of grid points along the z direction
[in]minExtentsThe grid's lower corner, the box formed by minExtent and maxExtent must include all vertices
[in]maxExtentsThe grid's upper corner, the box formed by minExtent and maxExtent must include all vertices
[in]narrowBandThicknessRelativeToExtentDiagonalThe thickness of the narrow band as a fraction of the sdf box diagonal length. Can be as small as 0 but a value of at least 0.01 is recommended.
[in]cellsPerSubgridThe number of cells in a sparse subgrid block (full block has mSubgridSize^3 cells and (mSubgridSize+1)^3 samples)
[out]sdfCoarseThe coarse sdf as a dense 3d array of lower resolution (resulution is (with/cellsPerSubgrid+1, height/cellsPerSubgrid+1, depth/cellsPerSubgrid+1))
[out]sdfFineStartSlotsThe start slot indices of the subgrid blocks. If a subgrid block is empty, the start slot will be 0xFFFFFFFF
[out]subgridDataThe array containing subgrid data blocks
[out]denseSdfProvides acces to the denxe sdf that is used for compuation internally
[out]subgridsMinSdfValueThe minimum value over all subgrid blocks. Used if normalized textures are used which is the case for 8 and 16bit formats
[out]subgridsMaxSdfValueThe maximum value over all subgrid blocks. Used if normalized textures are used which is the case for 8 and 16bit formats
[in]numThreadsThe number of cpu threads to use during the computation

◆ sweepBoxTriangle()

bool physx::Gu::sweepBoxTriangle ( const PxTriangle &  tri,
const PxBounds3 &  box,
const PxVec3 &  motion,
const PxVec3 &  oneOverMotion,
PxVec3 &  hit,
PxVec3 &  normal,
PxReal &  d,
bool  isDoubleSided = false 
)

Sweeps a box against a triangle, using a 'feature-based' approach.

This is currently only used for computing the box-sweep impact data, in a second pass, after the best triangle has been identified using faster approaches (SAT/GJK).

Warning
Returned impact normal is not normalized
Parameters
tri[in] the triangle
box[in] the box
motion[in] (box) motion vector
oneOverMotion[in] precomputed inverse of motion vector
hit[out] impact point
normal[out] impact normal (warning: not normalized)
d[in/out] impact distance (please initialize with best current distance)
isDoubleSided[in] whether triangle is double-sided or not
Returns
true if an impact has been found

◆ sweepCapsuleTriangles_Precise()

bool physx::Gu::sweepCapsuleTriangles_Precise ( PxU32  nbTris,
const PxTriangle *PX_RESTRICT  triangles,
const Capsule &  capsule,
const PxVec3 &  unitDir,
const PxReal  distance,
const PxU32 *PX_RESTRICT  cachedIndex,
PxGeomSweepHit &  hit,
PxVec3 &  triNormalOut,
PxHitFlags  hitFlags,
bool  isDoubleSided,
const BoxPadded *  cullBox = NULL 
)

Sweeps a capsule against a set of triangles.

Parameters
nbTris[in] number of triangles in input array
triangles[in] array of input triangles
capsule[in] the capsule
unitDir[in] sweep's unit direcion
distance[in] sweep's length
cachedIndex[in] cached triangle index, or NULL. Cached triangle will be tested first.
hit[out] results
triNormalOut[out] triangle normal
hitFlags[in] query modifiers
isDoubleSided[in] true if input triangles are double-sided
cullBox[in] additional/optional culling box. Triangles not intersecting the box are quickly discarded.
Warning
if using a cullbox, make sure all triangles can be safely V4Loaded (i.e. allocate 4 more bytes after last triangle)
Returns
true if an impact has been found

◆ sweepSphereTriangles()

bool physx::Gu::sweepSphereTriangles ( PxU32  nbTris,
const PxTriangle *PX_RESTRICT  triangles,
const PxVec3 &  center,
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 
)

Sweeps a sphere against a set of triangles.

Parameters
nbTris[in] number of triangles in input array
triangles[in] array of input triangles
center[in] sphere's center
radius[in] sphere's radius
unitDir[in] sweep's unit direcion
distance[in] sweep's length
cachedIndex[in] cached triangle index, or NULL. Cached triangle will be tested first.
hit[out] results
triNormalOut[out] triangle normal
isDoubleSided[in] true if input triangles are double-sided
meshBothSides[in] true if PxHitFlag::eMESH_BOTH_SIDES is used
anyHit[in] true if PxHitFlag::eMESH_ANY is used
testInitialOverlap[in] true if PxHitFlag::eASSUME_NO_INITIAL_OVERLAP is not used
Returns
true if an impact has been found

◆ sweepSphereVSQuad()

bool physx::Gu::sweepSphereVSQuad ( const PxVec3 *PX_RESTRICT  quadVerts,
const PxVec3 &  quadUnitNormal,
const PxVec3 &  sphereCenter,
float  sphereRadius,
const PxVec3 &  unitDir,
float &  impactDistance 
)

Sweeps a sphere against a quad.

All input parameters (sphere, quad, sweep direction) must be in the same space. Sweep length is assumed to be infinite.

Quad must be formed by 2 tris like this:

p0___p2 | /| | / | | / | |/ | p1—p3

Parameters
quadVerts[in] quad vertices
quadUnitNormal[in] quad's normalized normal
sphereCenter[in] sphere's center
sphereRadius[in] sphere's radius
unitDir[in] normalized sweep direction.
impactDistance[out] impact distance, if a hit has been found. Does not need to be initialized before calling the function.
Returns
true if an impact has been found (in which case returned result values are valid)

◆ sweepSphereVSTri()

bool physx::Gu::sweepSphereVSTri ( const PxVec3 *PX_RESTRICT  triVerts,
const PxVec3 &  triUnitNormal,
const PxVec3 &  sphereCenter,
PxReal  sphereRadius,
const PxVec3 &  unitDir,
PxReal &  impactDistance,
bool &  directHit,
bool  testInitialOverlap 
)

Sweeps a sphere against a triangle.

All input parameters (sphere, triangle, sweep direction) must be in the same space. Sweep length is assumed to be infinite.

By default, 'testInitialOverlap' must be set to true to properly handle the case where the sphere already overlaps the triangle at the start of the sweep. In such a case, returned impact distance is exactly 0.0f. If it is known ahead of time that the sphere cannot overlap the triangle at t=0.0, then 'testInitialOverlap' can be set to false to skip the initial overlap test and make the function run faster.

If the ray defined by the sphere's center and the unit direction directly intersects the triangle-related part of the TSS (*) (i.e. the prism from the Minkowski sum of the inflated triangle) then 'directHit' is set to true. Otherwise it is set to false.

(*) For Triangle Swept Sphere, see http://gamma.cs.unc.edu/SSV/ssv.pdf for the origin of these names.

Parameters
triVerts[in] triangle vertices
triUnitNormal[in] triangle's normalized normal
sphereCenter[in] sphere's center
sphereRadius[in] sphere's radius
unitDir[in] normalized sweep direction.
impactDistance[out] impact distance, if a hit has been found. Does not need to be initialized before calling the function.
directHit[out] true if a direct hit has been found, see comments above.
testInitialOverlap[in] true if an initial sphere-vs-triangle overlap test must be performed, see comments above.
Returns
true if an impact has been found (in which case returned result values are valid)

◆ trianglesIntersect()

bool physx::Gu::trianglesIntersect ( const PxVec3 &  a1,
const PxVec3 &  b1,
const PxVec3 &  c1,
const PxVec3 &  a2,
const PxVec3 &  b2,
const PxVec3 &  c2,
Segment *  intersection = NULL 
)

Tests if a two triangles intersect

Parameters
a1[in] Fist point of the first triangle
b1[in] Second point of the first triangle
c1[in] Third point of the first triangle
a2[in] Fist point of the second triangle
b2[in] Second point of the second triangle
c2[in] Third point of the second triangle
intersection[out] Line segment that represents all points that lie on the first and the second triangle
Returns
true if triangles intersect

◆ triBoxSweepTestBoxSpace()

int physx::Gu::triBoxSweepTestBoxSpace ( const PxTriangle &  tri,
const PxVec3 &  extents,
const PxVec3 &  dir,
const PxVec3 &  oneOverDir,
float  tmax,
float &  toi,
bool  doBackfaceCulling 
)

Sweeps a box against a triangle, using a 'SAT' approach (Separating Axis Theorem).

The test is performed in box-space, i.e. the box is axis-aligned and its center is (0,0,0). In other words it is defined by its extents alone. The triangle must have been transformed to this "box-space" before calling the function.

Parameters
tri[in] triangle in box-space
extents[in] box extents
dir[in] sweep direction. Does not need to be normalized.
oneOverDir[in] precomputed inverse of sweep direction
tmax[in] sweep length
toi[out] time of impact/impact distance. Does not need to be initialized before calling the function.
doBackfaceCulling[in] true to enable backface culling, false for double-sided triangles
Returns
non-zero value if an impact has been found (in which case returned 'toi' value is valid)

◆ windingNumbers()

PX_PHYSX_COMMON_API void physx::Gu::windingNumbers ( const PxVec3 *  vertices,
const PxU32 *  indices,
PxU32  numTriangleIndices,
PxU32  width,
PxU32  height,
PxU32  depth,
PxReal *  windingNumbers,
PxVec3  minExtents,
PxVec3  maxExtents,
PxVec3 *  sampleLocations = NULL 
)

Returns the number of times a point is enclosed by a triangle mesh. Therefore points with a winding number of 0 lie oufside of the mesh, others lie inside. The sign of the winding number is dependent ond the triangle orientation. For close meshes, a robust inside/outside check should not test for a value of 0 exactly, inside = PxAbs(windingNumber) > 0.5f should be preferred.

Parameters
[in]verticesThe triangle mesh's vertices
[in]indicesThe triangle mesh's indices
[in]numTriangleIndicesThe number of indices
[in]widthThe number of grid points along the x direction
[in]heightThe number of grid points along the y direction
[in]depthThe number of grid points along the z direction
[out]windingNumbersThe winding number for the center of every grid cell, index rule is: index = z * width * height + y * width + x
[in]minExtentsThe grid's lower corner
[in]maxExtentsThe grid's upper corner
[out]sampleLocationsOptional buffer to output the grid sample locations, index rule is: index = z * width * height + y * width + x

◆ windingNumbersInsideCheck()

PX_PHYSX_COMMON_API void physx::Gu::windingNumbersInsideCheck ( const PxVec3 *  vertices,
const PxU32 *  indices,
PxU32  numTriangleIndices,
PxU32  width,
PxU32  height,
PxU32  depth,
bool *  insideResult,
PxVec3  minExtents,
PxVec3  maxExtents,
PxVec3 *  sampleLocations = NULL 
)

Returns if a point is enclosed by a triangle mesh.

Parameters
[in]verticesThe triangle mesh's vertices
[in]indicesThe triangle mesh's indices
[in]numTriangleIndicesThe number of indices
[in]widthThe number of grid points along the x direction
[in]heightThe number of grid points along the y direction
[in]depthThe number of grid points along the z direction
[out]insideResultBooleans that indicate if the center of a grid cell is inside or outside, index rule is: index = z * width * height + y * width + x
[in]minExtentsThe grid's lower corner, the box formed by minExtent and maxExtent must include all vertices
[in]maxExtentsThe grid's upper corner, the box formed by minExtent and maxExtent must include all vertices
[out]sampleLocationsOptional buffer to output the grid sample locations, index rule is: index = z * width * height + y * width + x

Variable Documentation

◆ g_TriangleSweepMethodTable

TriangleSweepMethod physx::Gu::g_TriangleSweepMethodTable[]
Initial value:
=
{
SweepGeomTriangles<CapsuleV>,
UnimplementedTriangleSweep,
SweepGeomTriangles<CapsuleV>,
SweepGeomTriangles<BoxV>,
SweepGeomTriangles<ConvexHullV>,
UnimplementedTriangleSweep,
UnimplementedTriangleSweep,
UnimplementedTriangleSweep,
UnimplementedTriangleSweep,
UnimplementedTriangleSweep,
UnimplementedTriangleSweep,
}

◆ gPCMBoxPolygonData

const PxU8 physx::Gu::gPCMBoxPolygonData
Initial value:
=
{
0, 3, 2, 1,
1, 2, 6, 5,
5, 6, 7, 4,
4, 7, 3, 0,
3, 7, 6, 2,
4, 0, 1, 5,
}

◆ offsets

const PxI32 physx::Gu::offsets[3][3][3]
Initial value:
= { { {0,-1,0}, {0,-1,-1}, {0,0,-1} },
{ {0,0,-1}, {-1,0,-1}, {-1,0,0} } ,
{ {-1,0,0}, {-1,-1,0}, {0,-1,0} } }