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

Method requiresObjects

deps/physx/physx/source/physx/src/NpShape.cpp:105–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void NpShape::requiresObjects(PxProcessPxBaseCallback& c)
106{
107 //meshes
108 PxBase* mesh = NULL;
109 switch(mShape.getGeometryType())
110 {
111 case PxGeometryType::eCONVEXMESH:
112 mesh = static_cast<const PxConvexMeshGeometry&>(mShape.getGeometry()).convexMesh;
113 break;
114 case PxGeometryType::eHEIGHTFIELD:
115 mesh = static_cast<const PxHeightFieldGeometry&>(mShape.getGeometry()).heightField;
116 break;
117 case PxGeometryType::eTRIANGLEMESH:
118 mesh = static_cast<const PxTriangleMeshGeometry&>(mShape.getGeometry()).triangleMesh;
119 break;
120 case PxGeometryType::eSPHERE:
121 case PxGeometryType::ePLANE:
122 case PxGeometryType::eCAPSULE:
123 case PxGeometryType::eBOX:
124 case PxGeometryType::eGEOMETRY_COUNT:
125 case PxGeometryType::eINVALID:
126 break;
127 }
128
129 if(mesh)
130 c.process(*mesh);
131
132 //material
133 PxU32 nbMaterials = mShape.getNbMaterials();
134 for (PxU32 i=0; i < nbMaterials; i++)
135 {
136 NpMaterial* mat = static_cast<NpMaterial*>(mShape.getMaterial(i));
137 c.process(*mat);
138 }
139}
140
141void NpShape::resolveReferences(PxDeserializationContext& context)
142{

Callers 1

registerReferencesMethod · 0.45

Calls 5

getGeometryTypeMethod · 0.45
getGeometryMethod · 0.45
processMethod · 0.45
getNbMaterialsMethod · 0.45
getMaterialMethod · 0.45

Tested by

no test coverage detected