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

Method addAABB

physx/samples/samplebase/RenderPhysX3Debug.cpp:215–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215void RenderPhysX3Debug::addAABB(const PxBounds3& box, const RendererColor& color, PxU32 renderFlags)
216{
217 const PxVec3& min = box.minimum;
218 const PxVec3& max = box.maximum;
219
220 // 7+------+6 0 = ---
221 // /| /| 1 = +--
222 // / | / | 2 = ++-
223 // / 4+---/--+5 3 = -+-
224 // 3+------+2 / y z 4 = --+
225 // | / | / | / 5 = +-+
226 // |/ |/ |/ 6 = +++
227 // 0+------+1 *---x 7 = -++
228
229 // Generate 8 corners of the bbox
230 PxVec3 pts[8];
231 pts[0] = PxVec3(min.x, min.y, min.z);
232 pts[1] = PxVec3(max.x, min.y, min.z);
233 pts[2] = PxVec3(max.x, max.y, min.z);
234 pts[3] = PxVec3(min.x, max.y, min.z);
235 pts[4] = PxVec3(min.x, min.y, max.z);
236 pts[5] = PxVec3(max.x, min.y, max.z);
237 pts[6] = PxVec3(max.x, max.y, max.z);
238 pts[7] = PxVec3(min.x, max.y, max.z);
239
240 addBox(pts, color, renderFlags);
241}
242
243void RenderPhysX3Debug::addBox(const PxBoxGeometry& bg, const PxTransform& tr, const RendererColor& color, PxU32 renderFlags)
244{

Callers 1

onTickPreRenderMethod · 0.80

Calls 1

PxVec3Class · 0.50

Tested by

no test coverage detected