1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00
OpenMW/apps/openmw/mwrender/objects.cpp

34 lines
904 B
C++
Raw Normal View History

2011-10-31 23:59:16 -04:00
#include "objects.hpp"
2011-11-02 00:13:33 -04:00
#include <OgreSceneNode.h>
2011-10-31 23:59:16 -04:00
using namespace MWRender;
2011-11-01 13:46:57 -04:00
void Objects::insertBegin (const MWWorld::Ptr& ptr, bool enabled, bool static_){
2011-11-02 22:41:48 -04: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;
assert(!cellnode->getChildIterator()->begin()); //Is this right?
}
else
{
cellnode = (cellSceneNodes.find(ptr.getCell()))->second;
}
Ogre::SceneNode* insert = cellnode->createChildSceneNode();
ptr.getRefData().setBaseNode(insert);
2011-11-02 00:13:33 -04:00
isStatic = static_;
2011-10-31 23:59:16 -04:00
2011-11-02 22:41:48 -04:00
2011-10-31 23:59:16 -04:00
}
2011-11-01 13:46:57 -04:00
void Objects::insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh){
2011-10-31 23:59:16 -04:00
}
2011-11-01 13:46:57 -04:00
void Objects::insertLight (const MWWorld::Ptr& ptr, float r, float g, float b, float radius){
2011-10-31 23:59:16 -04:00
}
2011-11-02 00:13:33 -04:00