1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 15:39:02 +00:00
OpenMW/apps/openmw/mwrender/objects.hpp

43 lines
1.3 KiB
C++
Raw Normal View History

2011-11-01 03:59:16 +00:00
#include "components/esm_store/cell_store.hpp"
#include "../mwworld/refdata.hpp"
2011-11-01 17:46:57 +00:00
#include "../mwworld/ptr.hpp"
2011-11-02 04:13:33 +00:00
#include <openengine/ogre/renderer.hpp>
2011-11-01 03:59:16 +00:00
namespace MWRender{
2011-11-01 03:59:16 +00:00
class Objects{
OEngine::Render::OgreRenderer &mRend;
std::map<MWWorld::Ptr::CellStore *, Ogre::SceneNode *> mCellSceneNodes;
2011-11-05 01:48:52 +00:00
std::map<MWWorld::Ptr::CellStore *, Ogre::StaticGeometry*> mSG;
2011-11-05 01:57:39 +00:00
bool isStatic;
static int uniqueID;
static bool lightConst;
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;
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);
void deleteObject (const std::string& handle);
void removeCell(const MWWorld::Ptr& ptr);
void buildStaticGeometry(ESMS::CellStore<MWWorld::RefData> &cell);
2011-11-05 18:57:33 +00:00
2011-11-01 03:59:16 +00:00
/// insert a light related to the most recent insertBegin call.
2011-11-01 17:46:57 +00:00
2011-11-01 03:59:16 +00:00
};
}