| 320 | |
| 321 | template<class T> |
| 322 | static PX_FORCE_INLINE bool getGeometryT(const NpShape* npShape, PxGeometryType::Enum type, T& geom) |
| 323 | { |
| 324 | NP_READ_CHECK(npShape->getOwnerScene()); |
| 325 | |
| 326 | if(npShape->getGeometryTypeFast() != type) |
| 327 | return false; |
| 328 | |
| 329 | geom = static_cast<const T&>(npShape->getScbShape().getGeometry()); |
| 330 | return true; |
| 331 | } |
| 332 | |
| 333 | bool NpShape::getBoxGeometry(PxBoxGeometry& g) const { return getGeometryT(this, PxGeometryType::eBOX, g); } |
| 334 | bool NpShape::getSphereGeometry(PxSphereGeometry& g) const { return getGeometryT(this, PxGeometryType::eSPHERE, g); } |
no test coverage detected