MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / computeBoxPoints

Method computeBoxPoints

physx/source/geomutils/src/GuInternal.cpp:47–73  ·  view source on GitHub ↗

Computes the aabb points. \param pts [out] 8 box points */

Source from the content-addressed store, hash-verified

45\param pts [out] 8 box points
46*/
47void Gu::computeBoxPoints(const PxBounds3& bounds, PxVec3* PX_RESTRICT pts)
48{
49 PX_ASSERT(pts);
50
51 // Get box corners
52 const PxVec3& minimum = bounds.minimum;
53 const PxVec3& maximum = bounds.maximum;
54
55 // 7+------+6 0 = ---
56 // /| /| 1 = +--
57 // / | / | 2 = ++-
58 // / 4+---/--+5 3 = -+-
59 // 3+------+2 / y z 4 = --+
60 // | / | / | / 5 = +-+
61 // |/ |/ |/ 6 = +++
62 // 0+------+1 *---x 7 = -++
63
64 // Generate 8 corners of the bbox
65 pts[0] = PxVec3(minimum.x, minimum.y, minimum.z);
66 pts[1] = PxVec3(maximum.x, minimum.y, minimum.z);
67 pts[2] = PxVec3(maximum.x, maximum.y, minimum.z);
68 pts[3] = PxVec3(minimum.x, maximum.y, minimum.z);
69 pts[4] = PxVec3(minimum.x, minimum.y, maximum.z);
70 pts[5] = PxVec3(maximum.x, minimum.y, maximum.z);
71 pts[6] = PxVec3(maximum.x, maximum.y, maximum.z);
72 pts[7] = PxVec3(minimum.x, maximum.y, maximum.z);
73}
74
75PxPlane Gu::getPlane(const PxTransform& pose)
76{

Callers 8

computePlane_BoxMTDMethod · 0.80
computeMTD_PlaneBoxFunction · 0.80
sweepBoxVsTrianglesFunction · 0.80
sweepBox_PlaneGeomFunction · 0.80
sweepBoxBoxMethod · 0.80
sweepBoxSphereMethod · 0.80
GuGenerateEEContactsFunction · 0.80
GuGenerateEEContacts2Function · 0.80

Calls 1

PxVec3Class · 0.50

Tested by 2

sweepBoxVsTrianglesFunction · 0.64
sweepBox_PlaneGeomFunction · 0.64