1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 06:53:52 +00:00
openmw-tes3mp/apps/openmw/mwrender/objects.cpp

34 lines
906 B
C++
Raw Normal View History

2011-11-01 03:59:16 +00:00
#include "objects.hpp"
2011-11-02 04:13:33 +00:00
#include <OgreSceneNode.h>
2011-11-01 03:59:16 +00:00
using namespace MWRender;
2011-11-01 17:46:57 +00:00
void Objects::insertBegin (const MWWorld::Ptr& ptr, bool enabled, bool static_){
2011-11-03 02:41:48 +00:00
Ogre::SceneNode* root = rend.getScene()->getRootSceneNode();
Ogre::SceneNode* cellnode;
if(cellSceneNodes.find(ptr.getCell()) == cellSceneNodes.end())
{
//Create the scenenode and put it in the map
cellnode = root->createChildSceneNode();
cellSceneNodes[ptr.getCell()] = cellnode;
2011-11-03 02:45:58 +00:00
//assert(!cellnode->getChildIterator()->begin()); //Is this right?
2011-11-03 02:41:48 +00:00
}
else
{
cellnode = (cellSceneNodes.find(ptr.getCell()))->second;
}
Ogre::SceneNode* insert = cellnode->createChildSceneNode();
ptr.getRefData().setBaseNode(insert);
2011-11-02 04:13:33 +00:00
isStatic = static_;
2011-11-01 03:59:16 +00:00
2011-11-03 02:41:48 +00:00
2011-11-01 03:59:16 +00:00
}
2011-11-01 17:46:57 +00:00
void Objects::insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh){
2011-11-01 03:59:16 +00:00
}
2011-11-01 17:46:57 +00:00
void Objects::insertLight (const MWWorld::Ptr& ptr, float r, float g, float b, float radius){
2011-11-01 03:59:16 +00:00
}
2011-11-02 04:13:33 +00:00