Changing to Actors;NPCAnimation;CreatureAnimation

actorid
Jason Hooks 13 years ago
parent e8ec9093f8
commit 16ff2a7a1b

@ -16,7 +16,7 @@ set(GAME_HEADER
source_group(game FILES ${GAME} ${GAME_HEADER})
add_openmw_dir (mwrender
renderingmanager debugging sky player npcs creatures objects renderinginterface
renderingmanager debugging sky player animation npcanimation creatureanimation actors objects renderinginterface
)
add_openmw_dir (mwinput

@ -2,7 +2,7 @@
#define GAME_MWCLASS_CREATURE_H
#include "../mwworld/class.hpp"
#include "../mwrender/creatures.hpp"
namespace MWClass
{

@ -2,7 +2,7 @@
#define GAME_MWCLASS_NPC_H
#include "../mwworld/class.hpp"
#include "../mwrender/npcs.hpp"
namespace MWClass
{

@ -0,0 +1,23 @@
#ifndef _GAME_RENDER_ACTORS_H
#define _GAME_RENDER_ACTORS_H
#include "components/esm_store/cell_store.hpp"
#include "../mwworld/refdata.hpp"
#include "../mwworld/ptr.hpp"
#include <openengine/ogre/renderer.hpp>
namespace MWRender{
class Actors{
OEngine::Render::OgreRenderer &mRend;
std::map<MWWorld::Ptr::CellStore *, Ogre::SceneNode *> mCellSceneNodes;
std::map<MWWorld::Ptr::CellStore *, Ogre::StaticGeometry*> mSG;
Ogre::SceneNode* mMwRoot;
bool isStatic;
static int uniqueID;
public:
Actors(OEngine::Render::OgreRenderer& _rend): mRend(_rend){}
~Actors(){}
};
}
#endif

@ -0,0 +1,10 @@
#ifndef _GAME_RENDER_ANIMATION_H
#define _GAME_RENDER_ANIMATION_H
#include <components/nif/data.hpp>
namespace MWRender{
class Animation{
std::vector<Nif::NiKeyframeData> transformations;
std::map<std::string,float> textmappings;
};
}
#endif

@ -0,0 +1,12 @@
#ifndef _GAME_RENDER_CREATUREANIMATION_H
#define _GAME_RENDER_CREATUREANIMATION_H
#include "animation.hpp"
#include <components/nif/node.hpp>
namespace MWRender{
class CreatureAnimation: Animation{
std::vector<Nif::NiTriShapeCopy> shapes; //All the NiTriShapeData for this creature
};
}
#endif

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

@ -1,10 +0,0 @@
#ifndef _GAME_RENDER_CREATURES_H
#define _GAME_RENDER_CREATURES_H
#include <openengine/ogre/renderer.hpp>
namespace MWRender{
class Creatures{
};
}
#endif

@ -0,0 +1,12 @@
#ifndef _GAME_RENDER_NPCANIMATION_H
#define _GAME_RENDER_NPCANIMATION_H
#include "animation.hpp"
#include <components/nif/data.hpp>
#include <components/nif/node.hpp>
namespace MWRender{
class NpcAnimation: Animation{
std::vector<std::vector<Nif::NiTriShapeCopy>> shapeparts; //All the NiTriShape data that we need for animating this particular npc
};
}
#endif

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

@ -1,9 +0,0 @@
#ifndef _GAME_RENDER_NPCS_H
#define _GAME_RENDER_NPCS_H
#include <openengine/ogre/renderer.hpp>
namespace MWRender{
class Npcs{
};
}
#endif

@ -1,16 +1,15 @@
#ifndef _GAME_RENDERING_INTERFACE_H
#define _GAME_RENDERING_INTERFACE_H
namespace MWRender{
class Npcs;
class Creatures;
class Objects;
class Actors;
class Player;
class RenderingInterface{
public:
virtual MWRender::Npcs& getNPCs() = 0;
virtual MWRender::Creatures& getCreatures() = 0;
virtual MWRender::Objects& getObjects() = 0;
virtual MWRender::Player& getPlayer() = 0;
virtual MWRender::Actors& getActors() = 0;
virtual ~RenderingInterface(){};
};
}

@ -22,7 +22,7 @@ namespace MWRender {
RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const boost::filesystem::path& resDir, OEngine::Physic::PhysicEngine* engine)
:mRendering(_rend), mObjects(mRendering), mDebugging(engine)
:mRendering(_rend), mObjects(mRendering), mDebugging(engine), mActors(mRendering)
{
mRendering.createScene("PlayerCam", 55, 5);
mSkyManager = MWRender::SkyManager::create(mRendering.getWindow(), mRendering.getCamera(), resDir);
@ -61,15 +61,14 @@ RenderingManager::~RenderingManager ()
delete mSkyManager;
}
MWRender::Npcs& RenderingManager::getNPCs(){
return mNpcs;
}
MWRender::Objects& RenderingManager::getObjects(){
return mObjects;
}
MWRender::Creatures& RenderingManager::getCreatures(){
return mCreatures;
MWRender::Actors& RenderingManager::getActors(){
return mActors;
}
MWRender::Player& RenderingManager::getPlayer(){
return (*mPlayer);
}

@ -19,9 +19,9 @@
#include <boost/filesystem.hpp>
#include "renderinginterface.hpp"
#include "npcs.hpp"
#include "creatures.hpp"
#include "objects.hpp"
#include "actors.hpp"
#include "player.hpp"
namespace Ogre
@ -49,9 +49,9 @@ class RenderingManager: private RenderingInterface {
private:
virtual MWRender::Npcs& getNPCs();
virtual MWRender::Creatures& getCreatures();
virtual MWRender::Objects& getObjects();
virtual MWRender::Actors& getActors();
public:
RenderingManager(OEngine::Render::OgreRenderer& _rend, const boost::filesystem::path& resDir, OEngine::Physic::PhysicEngine* engine);
@ -110,9 +110,9 @@ class RenderingManager: private RenderingInterface {
void setAmbientMode();
SkyManager* mSkyManager;
OEngine::Render::OgreRenderer &mRendering;
MWRender::Npcs mNpcs;
MWRender::Creatures mCreatures;
MWRender::Objects mObjects;
MWRender::Actors mActors;
// 0 normal, 1 more bright, 2 max
int mAmbientMode;

Loading…
Cancel
Save