MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / initMeshFromFile

Method initMeshFromFile

Engine/source/ts/tsMeshFit.cpp:309–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309TSMesh* MeshFit::initMeshFromFile( const String& filename ) const
310{
311 // Open the source shape file and make a copy of the mesh
312 Resource<TSShape> hShape = ResourceManager::get().load(filename);
313 if (!bool(hShape) || !((TSShape*)hShape)->meshes.size())
314 {
315 Con::errorf("TSShape::createMesh: Could not load source mesh from %s", filename.c_str());
316 return NULL;
317 }
318
319 TSMesh* srcMesh = ((TSShape*)hShape)->meshes[0];
320 return mShape->copyMesh( srcMesh );
321}
322
323TSMesh* MeshFit::createTriMesh( F32* verts, S32 numVerts, U32* indices, S32 numTris ) const
324{

Callers

nothing calls this directly

Calls 6

copyMeshMethod · 0.80
getFunction · 0.50
errorfFunction · 0.50
loadMethod · 0.45
sizeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected