| 307 | } |
| 308 | |
| 309 | TSMesh* 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 | |
| 323 | TSMesh* MeshFit::createTriMesh( F32* verts, S32 numVerts, U32* indices, S32 numTris ) const |
| 324 | { |