MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Blast / getRenderMeshForShape

Method getRenderMeshForShape

samples/SampleBase/physx/PhysXController.cpp:759–779  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

757}
758
759IRenderMesh* PhysXController::getRenderMeshForShape(const PxShape* shape)
760{
761 switch (shape->getGeometryType())
762 {
763 case PxGeometryType::eBOX:
764 return getRenderer().getPrimitiveRenderMesh(PrimitiveRenderMeshType::Box);
765 case PxGeometryType::ePLANE:
766 return getRenderer().getPrimitiveRenderMesh(PrimitiveRenderMeshType::Plane);
767 case PxGeometryType::eSPHERE:
768 return getRenderer().getPrimitiveRenderMesh(PrimitiveRenderMeshType::Sphere);
769 case PxGeometryType::eCONVEXMESH:
770 {
771 PxConvexMeshGeometry geom;
772 shape->getConvexMeshGeometry(geom);
773 return getConvexRenderMesh(geom.convexMesh);
774 }
775 default:
776 PX_ALWAYS_ASSERT_MESSAGE("Unsupported PxGeometryType");
777 return NULL;
778 }
779}
780
781PxVec3 PhysXController::getMeshScaleForShape(const PxShape* shape)
782{

Callers 1

ActorMethod · 0.80

Calls 1

Tested by

no test coverage detected