1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 07:23:51 +00:00

Mantis: #18 - Move components from global namespace into their own namespace.

Moving classes from components/nifogre into NifOgre namespace.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
This commit is contained in:
Lukasz Gromanowski 2011-06-19 19:14:14 +02:00
parent 2ddd5dba11
commit e9ff9a446b
5 changed files with 13 additions and 7 deletions

View file

@ -124,7 +124,7 @@ void ExteriorCellRender::insertMesh(const std::string &mesh, Ogre::Vector3 vec,
} }
mNpcPart = parent->createChildSceneNode(sceneNodeName); mNpcPart = parent->createChildSceneNode(sceneNodeName);
MeshPtr good2 = NIFLoader::load(mesh); MeshPtr good2 = NifOgre::NIFLoader::load(mesh);
MovableObject *ent = mScene.getMgr()->createEntity(mesh); MovableObject *ent = mScene.getMgr()->createEntity(mesh);
@ -213,7 +213,7 @@ void ExteriorCellRender::insertMesh(const std::string &mesh)
{ {
assert (mInsert); assert (mInsert);
NIFLoader::load(mesh); NifOgre::NIFLoader::load(mesh);
Entity *ent = mScene.getMgr()->createEntity(mesh); Entity *ent = mScene.getMgr()->createEntity(mesh);
if(!isStatic) if(!isStatic)

View file

@ -106,7 +106,7 @@ void InteriorCellRender::insertMesh(const std::string &mesh, Ogre::Vector3 vec,
npcPart = parent->createChildSceneNode(sceneNodeName); npcPart = parent->createChildSceneNode(sceneNodeName);
//npcPart->showBoundingBox(true); //npcPart->showBoundingBox(true);
MeshPtr good2 = NIFLoader::load(mesh); MeshPtr good2 = NifOgre::NIFLoader::load(mesh);
MovableObject *ent = scene.getMgr()->createEntity(mesh); MovableObject *ent = scene.getMgr()->createEntity(mesh);
//ent->extr //ent->extr
@ -184,7 +184,7 @@ void InteriorCellRender::insertMesh(const std::string &mesh)
{ {
assert (insert); assert (insert);
NIFLoader::load(mesh); NifOgre::NIFLoader::load(mesh);
MovableObject *ent = scene.getMgr()->createEntity(mesh); MovableObject *ent = scene.getMgr()->createEntity(mesh);
insert->attachObject(ent); insert->attachObject(ent);

View file

@ -51,6 +51,7 @@ using namespace Ogre;
using namespace Nif; using namespace Nif;
using namespace Mangle::VFS; using namespace Mangle::VFS;
using namespace Misc; using namespace Misc;
using namespace NifOgre;
NIFLoader& NIFLoader::getSingleton() NIFLoader& NIFLoader::getSingleton()
{ {

View file

@ -49,6 +49,9 @@ namespace Mangle
} }
} }
namespace NifOgre
{
/** Manual resource loader for NIF meshes. This is the main class /** Manual resource loader for NIF meshes. This is the main class
responsible for translating the internal NIF mesh structure into responsible for translating the internal NIF mesh structure into
something Ogre can use. Later it will also handle the insertion of something Ogre can use. Later it will also handle the insertion of
@ -139,4 +142,6 @@ class NIFLoader : Ogre::ManualResourceLoader
Ogre::SkeletonPtr mSkel; Ogre::SkeletonPtr mSkel;
}; };
}
#endif #endif

View file

@ -13,11 +13,11 @@ const char* mesh = "meshes\\f\\ex_ashl_a_banner_r.nif";
void C::doTest() void C::doTest()
{ {
// Add Morrowind.bsa resource location // Add Morrowind.bsa resource location
addBSA("../../data/Morrowind.bsa"); Bsa::addBSA("../../data/Morrowind.bsa");
// Insert the mesh // Insert the mesh
NIFLoader::load(mesh); NifOgre::NIFLoader::load(mesh);
NIFLoader::load(mesh); NifOgre::NIFLoader::load(mesh);
/* /*
SceneNode *node = mgr->getRootSceneNode()->createChildSceneNode("node"); SceneNode *node = mgr->getRootSceneNode()->createChildSceneNode("node");