MCPcopy Create free account
hub / github.com/OGRECave/ogre / convertToMesh

Method convertToMesh

OgreMain/src/OgreManualObject.cpp:437–458  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

435 }
436 //-----------------------------------------------------------------------------
437 MeshPtr ManualObject::convertToMesh(const String& meshName, const String& groupName)
438 {
439 OgreAssert(!mCurrentSection, "You cannot call convertToMesh() whilst you are in the middle of "
440 "defining the object; call end() first.");
441 OgreAssert(!mSectionList.empty(), "No data defined to convert to a mesh.");
442
443 MeshPtr m = MeshManager::getSingleton().createManual(meshName, groupName);
444
445 for (auto sec : mSectionList)
446 {
447 SubMesh* sm = m->createSubMesh();
448 sec->convertToSubMesh(sm);
449 sm->setMaterial(sec->getMaterial());
450 }
451 // update bounds
452 m->_setBounds(mAABB);
453 m->_setBoundingSphereRadius(mRadius);
454
455 m->load();
456
457 return m;
458 }
459 //-----------------------------------------------------------------------------
460 void ManualObject::setUseIdentityProjection(bool useIdentityProjection)
461 {

Callers 8

getOctreeGridMethod · 0.80
getDualGridMethod · 0.80
setupContentMethod · 0.80
TEST_FFunction · 0.80
createMeshWithMaterialFunction · 0.80
TEST_FFunction · 0.80
createGrassMeshFunction · 0.80

Calls 9

convertToSubMeshMethod · 0.80
getMaterialMethod · 0.80
_setBoundsMethod · 0.80
emptyMethod · 0.45
createManualMethod · 0.45
createSubMeshMethod · 0.45
setMaterialMethod · 0.45
loadMethod · 0.45

Tested by 4

setupContentMethod · 0.64
TEST_FFunction · 0.64
createMeshWithMaterialFunction · 0.64
TEST_FFunction · 0.64