1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

start RenderingManager

This commit is contained in:
Sebastian Wick 2011-08-07 16:40:01 +02:00
parent 74b4a0cbe5
commit 54724d7e7f
7 changed files with 49 additions and 15 deletions

View File

@ -16,7 +16,7 @@ set(GAME_HEADER
source_group(game FILES ${GAME} ${GAME_HEADER}) source_group(game FILES ${GAME} ${GAME_HEADER})
set(GAMEREND set(GAMEREND
mwrender/render_manager.cpp mwrender/rendering_manager.cpp
mwrender/mwscene.cpp mwrender/mwscene.cpp
mwrender/cellimp.cpp mwrender/cellimp.cpp
mwrender/interior.cpp mwrender/interior.cpp
@ -25,7 +25,7 @@ set(GAMEREND
mwrender/player.cpp mwrender/player.cpp
) )
set(GAMEREND_HEADER set(GAMEREND_HEADER
mwrender/render_manager.hpp mwrender/rendering_manager.hpp
mwrender/cell.hpp mwrender/cell.hpp
mwrender/cellimp.hpp mwrender/cellimp.hpp
mwrender/mwscene.hpp mwrender/mwscene.hpp

View File

@ -1 +0,0 @@
#include "render_manager.hpp"

View File

@ -1,9 +0,0 @@
#ifndef _GAME_RENDER_MANAGER_H
#define _GAME_RENDER_MANAGER_H
namespace MWRender
{
}
#endif

View File

@ -0,0 +1 @@
#include "rendering_manager.hpp"

View File

@ -0,0 +1,43 @@
#ifndef _GAME_RENDERING_MANAGER_H
#define _GAME_RENDERING_MANAGER_H
#include "../mwworld/ptr.hpp"
#include <openengine/ogre/renderer.hpp>
#include <openengine/bullet/physic.hpp>
namespace MWRender
{
class RenderingManager {
public:
void removeCell (MWWorld::Ptr::CellStore *store); // TODO do we want this?
void addObject (const MWWorld::Ptr& ptr, MWWorld::Ptr::CellStore *store);
void removeObject (const MWWorld::Ptr& ptr, MWWorld::Ptr::CellStore *store);
void moveObject (const MWWorld::Ptr& ptr, const Ogre::Vector3& position);
void scaleObject (const MWWorld::Ptr& ptr, const Ogre::Vector3& scale);
void rotateObject (const MWWorld::Ptr& ptr, const::Ogre::Quaternion& orientation);
void moveObjectToCell (const MWWorld::Ptr& ptr, const Ogre::Vector3& position, MWWorld::Ptr::CellStore *store);
void setPhysicsDebugRendering (bool);
bool getPhysicsDebugRendering() const;
void update (float duration);
void skyEnable ();
void skyDisable ();
void skySetHour (double hour);
void skySetDate (int day, int month);
int skyGetMasserPhase() const;
int skyGetSecundaPhase() const;
void skySetMoonColour (bool red);
private:
};
}
#endif

View File

@ -152,9 +152,9 @@ namespace MWWorld
Scene::~Scene() Scene::~Scene()
{ {
for (CellRenderCollection::iterator iter (mActiveCells.begin()); /*for (CellRenderCollection::iterator iter (mActiveCells.begin());
iter!=mActiveCells.end(); ++iter) iter!=mActiveCells.end(); ++iter)
delete iter->second; delete iter->second;*/
} }
bool Scene::hasCellChanged() const bool Scene::hasCellChanged() const

View File

@ -320,7 +320,7 @@ namespace MWWorld
delete mPlayer; delete mPlayer;
delete mSkyManager; delete mSkyManager;
delete mGlobalVariables; delete mGlobalVariables;
delete mWorldScene; //delete mWorldScene;
delete mPhysics; delete mPhysics;
} }