MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / getGeometryT

Function getGeometryT

deps/physx/physx/source/physx/src/NpShape.cpp:322–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320
321template<class T>
322static 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
333bool NpShape::getBoxGeometry(PxBoxGeometry& g) const { return getGeometryT(this, PxGeometryType::eBOX, g); }
334bool 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