Code: Select all
//get the mesh name out
stringc roommesh_name = attribs->getAttributeAsString("Mesh");
attribs->drop();
//get a mesh from name
IMesh* roommesh = smgr->getMesh(roommesh_name.c_str())->getMesh(0);
ITriangleSelector* selector = smgr->createOctTreeTriangleSelector( roommesh->getMesh(0),roommesh_node,128);
roommesh_node->setTriangleSelector(selector);
selector->drop();
Ken