Objects started, RenderingInterface

actorid
Jason Hooks 13 years ago
parent 3761271c59
commit f1bc5b0ab6

@ -16,7 +16,7 @@ set(GAME_HEADER
source_group(game FILES ${GAME} ${GAME_HEADER})
add_openmw_dir (mwrender
renderingmanager debugging cellimp interior exterior sky player
renderingmanager debugging cellimp interior exterior sky player npcs creatures objects
)
add_openmw_dir (mwinput

@ -28,15 +28,6 @@ namespace MWRender
/// Base class for cell render, that implements inserting references into a cell in a
/// cell type- and render-engine-independent way.
class NPC{
};
class Creature{
};
class Obj{
};
class CellRenderImp
{
public:

@ -0,0 +1,2 @@
#include "creatures.hpp"
using namespace MWRender;

@ -0,0 +1,5 @@
namespace MWRender{
class Creatures{
};
}

@ -0,0 +1,2 @@
#include "npcs.hpp"
using namespace MWRender;

@ -0,0 +1,5 @@
namespace MWRender{
class Npcs{
};
}

@ -0,0 +1,16 @@
#include "objects.hpp"
using namespace MWRender;
void Objects::insertBegin (ESM::CellRef &ref, bool static_){
}
void Objects::insertMesh(const std::string &mesh){
}
void Objects::insertLight(float r, float g, float b, float radius){
}
void Objects::insertObjectPhysics(){
}

@ -0,0 +1,18 @@
#include "components/esm_store/cell_store.hpp"
#include "../mwworld/refdata.hpp"
namespace MWRender{
class Objects{
public:
Objects(){}
~Objects(){}
void insertBegin (ESM::CellRef &ref, bool static_ = false);
void insertMesh(const std::string &mesh);
/// insert a light related to the most recent insertBegin call.
void insertLight(float r, float g, float b, float radius);
void insertObjectPhysics();
};
}

@ -15,6 +15,7 @@
#include "player.hpp"
using namespace MWRender;
using namespace Ogre;
@ -67,6 +68,20 @@ RenderingManager::~RenderingManager ()
delete mSkyManager;
}
MWRender::Npcs& RenderingManager::getNPCs(){
return npcs;
}
MWRender::Objects& RenderingManager::getObjects(){
return objects;
}
MWRender::Creatures& RenderingManager::getCreatures(){
return creatures;
}
MWRender::Player* RenderingManager::getPlayer(){
return mPlayer;
}
void RenderingManager::removeCell (MWWorld::Ptr::CellStore *store){
}

@ -15,6 +15,9 @@
#include "../mwworld/ptr.hpp"
#include <boost/filesystem.hpp>
#include "objects.hpp"
#include "npcs.hpp"
#include "creatures.hpp"
namespace Ogre
{
@ -34,13 +37,22 @@ namespace MWWorld
namespace MWRender
{
class Player;
class Player;
class RenderingInterface{
public:
virtual MWRender::Npcs& getNPCs();
virtual MWRender::Creatures& getCreatures();
virtual MWRender::Objects& getObjects();
virtual MWRender::Player* getPlayer();
};
class RenderingManager {
class RenderingManager: private RenderingInterface {
OEngine::Render::OgreRenderer &rend;
Ogre::Camera* camera;
MWRender::Npcs npcs;
MWRender::Creatures creatures;
MWRender::Objects objects;
/// Root node for all objects added to the scene. This is rotated so
/// that the OGRE coordinate system matches that used internally in
@ -56,6 +68,10 @@ class RenderingManager {
public:
RenderingManager(OEngine::Render::OgreRenderer& _rend, const boost::filesystem::path& resDir, OEngine::Physic::PhysicEngine* engine);
~RenderingManager();
virtual MWRender::Npcs& getNPCs();
virtual MWRender::Creatures& getCreatures();
virtual MWRender::Objects& getObjects();
virtual MWRender::Player* getPlayer();
bool toggleRenderMode(int mode);
void removeCell (MWWorld::Ptr::CellStore *store); // TODO do we want this?
@ -83,7 +99,7 @@ class RenderingManager {
OEngine::Render::OgreRenderer& getOgreRenderer(){return rend;}
Ogre::SceneManager *getMgr() { return rend.getScene(); }
Ogre::SceneNode *getRoot() { return mwRoot; }
MWRender::Player *getPlayer() { return mPlayer; }
private:
SkyManager* mSkyManager;

Loading…
Cancel
Save