| 193 | } |
| 194 | |
| 195 | static PX_FORCE_INLINE Vec4V basisExtentV(const PxMat33Padded& basis, const PxVec3& extent, float offset, float inflation) |
| 196 | { |
| 197 | // extended basis vectors |
| 198 | const Vec4V c0V = V4Scale(V4LoadU(&basis.column0.x), FLoad(extent.x)); |
| 199 | const Vec4V c1V = V4Scale(V4LoadU(&basis.column1.x), FLoad(extent.y)); |
| 200 | const Vec4V c2V = V4Scale(V4LoadU(&basis.column2.x), FLoad(extent.z)); |
| 201 | |
| 202 | // find combination of base vectors that produces max. distance for each component = sum of abs() |
| 203 | Vec4V extentsV = V4Add(V4Abs(c0V), V4Abs(c1V)); |
| 204 | extentsV = V4Add(extentsV, V4Abs(c2V)); |
| 205 | extentsV = V4Add(extentsV, V4Load(offset)); |
| 206 | extentsV = V4Scale(extentsV, FLoad(inflation)); |
| 207 | return extentsV; |
| 208 | } |
| 209 | |
| 210 | void Gu::computeBounds(PxBounds3& bounds, const PxGeometry& geometry, const PxTransform& pose, float contactOffset, const CenterExtentsPadded* PX_RESTRICT localSpaceBounds, float inflation) |
| 211 | { |