1 #ifndef GAME_RENDER_LOCALMAP_H
2 #define GAME_RENDER_LOCALMAP_H
8 #include <osg/BoundingBox>
10 #include <osg/ref_ptr>
50 void requestMap (std::set<const MWWorld::CellStore*> cells);
80 void updatePlayer (
const osg::Vec3f& position,
const osg::Quat& orientation,
81 float& u,
float& v,
int& x,
int& y, osg::Vec3f& direction);
144 const osg::Vec2f
rotatePoint(
const osg::Vec2f& point,
const osg::Vec2f& center,
const float angle);
149 osg::ref_ptr<osg::Camera>
createOrthographicCamera(
float left,
float top,
float width,
float height,
const osg::Vec3d& upVector,
float zmin,
float zmax);
osg::BoundingBox mBounds
Definition: localmap.hpp:153
void worldToInteriorMapPosition(osg::Vec2f pos, float &nX, float &nY, int &x, int &y)
Definition: localmap.cpp:464
osg::ref_ptr< osg::Image > mFogOfWarImage
Definition: localmap.hpp:125
bool isPositionExplored(float nX, float nY, int x, int y)
Definition: localmap.cpp:487
int mCellDistance
Definition: localmap.hpp:141
bool mInterior
Definition: localmap.hpp:152
osg::Group * getRoot()
Definition: localmap.cpp:504
SegmentMap mSegments
Definition: localmap.hpp:131
void createFogOfWarTexture()
Definition: localmap.cpp:600
CameraVector mCamerasPendingRemoval
Definition: localmap.hpp:111
void initFogOfWar()
Definition: localmap.cpp:614
void loadFogOfWar(const ESM::FogTexture &fog)
Definition: localmap.cpp:630
CameraVector mActiveCameras
Definition: localmap.hpp:109
void removeCell(MWWorld::CellStore *cell)
Definition: localmap.cpp:246
void saveFogOfWar(MWWorld::CellStore *cell)
Definition: localmap.cpp:104
std::vector< osg::ref_ptr< osg::Camera > > CameraVector
Definition: localmap.hpp:107
osg::ref_ptr< osg::Texture2D > getMapTexture(int x, int y)
Definition: localmap.cpp:256
std::map< std::pair< int, int >, MapSegment > SegmentMap
Definition: localmap.hpp:130
void removeCamera(osg::Camera *cam)
Definition: localmap.cpp:274
static const int sFogOfWarResolution
Definition: localmap.hpp:136
void setupRenderToTexture(osg::ref_ptr< osg::Camera > camera, int x, int y)
Definition: localmap.cpp:214
bool mHasFogState
Definition: localmap.hpp:127
void clear()
Definition: localmap.cpp:99
Definition: fogstate.hpp:11
void requestInteriorMap(const MWWorld::CellStore *cell)
Definition: localmap.cpp:328
osg::ref_ptr< osg::Texture2D > getFogOfWarTexture(int x, int y)
Definition: localmap.cpp:265
osg::ref_ptr< osg::Texture2D > mFogOfWarTexture
Definition: localmap.hpp:124
Local map rendering.
Definition: localmap.hpp:36
osg::ref_ptr< osg::Camera > createOrthographicCamera(float left, float top, float width, float height, const osg::Vec3d &upVector, float zmin, float zmax)
Definition: localmap.cpp:160
Mutable state of a cell.
Definition: cellstore.hpp:53
osg::ref_ptr< osg::Group > mRoot
Definition: localmap.hpp:104
osg::ref_ptr< osg::Texture2D > mMapTexture
Definition: localmap.hpp:123
LocalMap(osg::Group *root)
Definition: localmap.cpp:70
void markForRemoval(osg::Camera *cam)
Definition: localmap.cpp:280
Definition: localmap.hpp:113
int mMapResolution
Definition: localmap.hpp:133
void saveFogOfWar(ESM::FogTexture &fog) const
Definition: localmap.cpp:666
osg::ref_ptr< osg::Node > mSceneRoot
Definition: localmap.hpp:105
void cleanupCameras()
Definition: localmap.cpp:292
void requestMap(std::set< const MWWorld::CellStore * > cells)
Definition: localmap.cpp:234
~LocalMap()
Definition: localmap.cpp:85
const osg::Vec2f rotatePoint(const osg::Vec2f &point, const osg::Vec2f ¢er, const float angle)
Definition: localmap.cpp:93
osg::Vec2f interiorMapToWorldPosition(float nX, float nY, int x, int y)
Definition: localmap.cpp:477
float mAngle
Definition: localmap.hpp:143
MapSegment()
Definition: localmap.cpp:590
~MapSegment()
Definition: localmap.cpp:595
void updatePlayer(const osg::Vec3f &position, const osg::Quat &orientation, float &u, float &v, int &x, int &y, osg::Vec3f &direction)
Definition: localmap.cpp:509
void requestExteriorMap(const MWWorld::CellStore *cell)
Definition: localmap.cpp:303
float mMapWorldSize
Definition: localmap.hpp:139