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

Function getGeometryT

physx/source/physx/src/NpShape.cpp:319–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 7

getBoxGeometryMethod · 0.85
getSphereGeometryMethod · 0.85
getCapsuleGeometryMethod · 0.85
getPlaneGeometryMethod · 0.85
getConvexMeshGeometryMethod · 0.85

Calls 2

getOwnerSceneMethod · 0.45
getGeometryMethod · 0.45

Tested by

no test coverage detected