2011-11-12 20:58:22 +00:00
|
|
|
#ifndef _GAME_RENDER_OBJECTS_H
|
|
|
|
#define _GAME_RENDER_OBJECTS_H
|
|
|
|
|
2012-02-06 09:29:18 +00:00
|
|
|
#include <openengine/ogre/renderer.hpp>
|
|
|
|
|
|
|
|
#include <components/esm_store/cell_store.hpp>
|
2011-11-01 03:59:16 +00:00
|
|
|
|
|
|
|
#include "../mwworld/refdata.hpp"
|
2011-11-01 17:46:57 +00:00
|
|
|
#include "../mwworld/ptr.hpp"
|
2011-11-01 03:59:16 +00:00
|
|
|
|
|
|
|
namespace MWRender{
|
2011-11-08 04:35:39 +00:00
|
|
|
|
2011-11-01 03:59:16 +00:00
|
|
|
class Objects{
|
2011-11-21 11:52:28 +00:00
|
|
|
OEngine::Render::OgreRenderer &mRend;
|
|
|
|
std::map<MWWorld::Ptr::CellStore *, Ogre::SceneNode *> mCellSceneNodes;
|
|
|
|
std::map<MWWorld::Ptr::CellStore *, Ogre::StaticGeometry*> mSG;
|
2011-11-22 07:39:28 +00:00
|
|
|
Ogre::SceneNode* mMwRoot;
|
2011-11-05 01:57:39 +00:00
|
|
|
bool isStatic;
|
|
|
|
static int uniqueID;
|
|
|
|
static bool lightConst;
|
2011-11-03 23:40:37 +00:00
|
|
|
static float lightConstValue;
|
|
|
|
|
|
|
|
static bool lightLinear;
|
|
|
|
static int lightLinearMethod;
|
|
|
|
static float lightLinearValue;
|
|
|
|
static float lightLinearRadiusMult;
|
|
|
|
|
|
|
|
static bool lightQuadratic;
|
|
|
|
static int lightQuadraticMethod;
|
|
|
|
static float lightQuadraticValue;
|
|
|
|
static float lightQuadraticRadiusMult;
|
|
|
|
|
|
|
|
static bool lightOutQuadInLin;
|
2012-02-06 09:29:18 +00:00
|
|
|
|
|
|
|
void clearSceneNode (Ogre::SceneNode *node);
|
|
|
|
///< Remove all movable objects from \a node.
|
|
|
|
|
2011-11-01 03:59:16 +00:00
|
|
|
public:
|
2011-11-05 01:57:39 +00:00
|
|
|
Objects(OEngine::Render::OgreRenderer& _rend): mRend(_rend){}
|
2011-11-01 03:59:16 +00:00
|
|
|
~Objects(){}
|
2011-11-05 01:57:39 +00:00
|
|
|
void insertBegin (const MWWorld::Ptr& ptr, bool enabled, bool static_);
|
2011-11-01 17:46:57 +00:00
|
|
|
void insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh);
|
2011-11-05 01:57:39 +00:00
|
|
|
void insertLight (const MWWorld::Ptr& ptr, float r, float g, float b, float radius);
|
2011-11-21 11:52:28 +00:00
|
|
|
|
|
|
|
bool deleteObject (const MWWorld::Ptr& ptr);
|
|
|
|
///< \return found?
|
|
|
|
|
2011-11-19 06:01:19 +00:00
|
|
|
void removeCell(MWWorld::Ptr::CellStore* store);
|
2011-11-08 04:35:39 +00:00
|
|
|
void buildStaticGeometry(ESMS::CellStore<MWWorld::RefData> &cell);
|
2011-11-17 22:10:27 +00:00
|
|
|
void setMwRoot(Ogre::SceneNode* root);
|
2011-11-01 03:59:16 +00:00
|
|
|
};
|
2011-11-12 20:58:22 +00:00
|
|
|
}
|
2011-11-21 11:52:28 +00:00
|
|
|
#endif
|