PxGeometryQuery.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
11 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
12 
13 
14 #ifndef PX_PHYSICS_GEOMUTILS_PX_GEOMETRY_QUERY
15 #define PX_PHYSICS_GEOMUTILS_PX_GEOMETRY_QUERY
16 
23 #define PX_MAX_SWEEP_DISTANCE 1e8f
24 
30 #include "PxQueryReport.h"
31 
32 #ifndef PX_DOXYGEN
33 namespace physx
34 {
35 #endif
36 
37 class PxGeometry;
38 struct PxSweepHit;
39 struct PxRaycastHit;
40 
41 class PxTriangle;
42 
47 {
48 public:
49 
74  PX_PHYSX_COMMON_API static bool sweep(const PxVec3& unitDir,
75  const PxReal maxDist,
76  const PxGeometry& geom0,
77  const PxTransform& pose0,
78  const PxGeometry& geom1,
79  const PxTransform& pose1,
80  PxSweepHit& sweepHit,
81  PxHitFlags hitFlags = PxHitFlag::eDEFAULT,
82  const PxReal inflation = 0.f);
83 
84 
101  PX_PHYSX_COMMON_API static bool overlap(const PxGeometry& geom0, const PxTransform& pose0,
102  const PxGeometry& geom1, const PxTransform& pose1);
103 
104 
123  PX_PHYSX_COMMON_API static PxU32 raycast(const PxVec3& origin,
124  const PxVec3& unitDir,
125  const PxGeometry& geom,
126  const PxTransform& pose,
127  PxReal maxDist,
128  PxHitFlags hitFlags,
129  PxU32 maxHits,
130  PxRaycastHit* PX_RESTRICT rayHits,
131  bool anyHit = false);
132 
163  PX_PHYSX_COMMON_API static bool computePenetration(PxVec3& direction, PxF32& depth,
164  const PxGeometry& geom0, const PxTransform& pose0,
165  const PxGeometry& geom1, const PxTransform& pose1);
166 
180  PX_PHYSX_COMMON_API static PxReal pointDistance(const PxVec3& point, const PxGeometry& geom, const PxTransform& pose, PxVec3* closestPoint=NULL);
181 
182 
193  PX_PHYSX_COMMON_API static PxBounds3 getWorldBounds(const PxGeometry& geom, const PxTransform& pose, float inflation=1.01f);
194 };
195 
196 
197 #ifndef PX_DOXYGEN
198 }
199 #endif
200 
202 #endif


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com