Computes the aabb points. \param pts [out] 8 box points */
| 45 | \param pts [out] 8 box points |
| 46 | */ |
| 47 | void 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 | |
| 75 | PxPlane Gu::getPlane(const PxTransform& pose) |
| 76 | { |