Local map rendering.
More...
#include <localmap.hpp>
List of all members.
Public Member Functions |
| LocalMap (OEngine::Render::OgreRenderer *, MWRender::RenderingManager *rendering) |
| ~LocalMap () |
void | requestMap (MWWorld::CellStore *cell, float zMin, float zMax) |
void | requestMap (MWWorld::CellStore *cell, Ogre::AxisAlignedBox bounds) |
void | updatePlayer (const Ogre::Vector3 &position, const Ogre::Quaternion &orientation) |
void | saveFogOfWar (MWWorld::CellStore *cell) |
void | getInteriorMapPosition (Ogre::Vector2 pos, float &nX, float &nY, int &x, int &y) |
bool | isPositionExplored (float nX, float nY, int x, int y, bool interior) |
Private Member Functions |
const Ogre::Vector2 | rotatePoint (const Ogre::Vector2 &p, const Ogre::Vector2 &c, const float angle) |
void | render (const float x, const float y, const float zlow, const float zhigh, const float xw, const float yw, const std::string &texture) |
void | saveTexture (const std::string &texname, const std::string &filename) |
std::string | coordStr (const int x, const int y) |
void | deleteBuffers () |
Private Attributes |
OEngine::Render::OgreRenderer * | mRendering |
MWRender::RenderingManager * | mRenderingManager |
Ogre::Camera * | mCellCamera |
Ogre::SceneNode * | mCameraNode |
Ogre::SceneNode * | mCameraPosNode |
Ogre::SceneNode * | mCameraRotNode |
Ogre::Light * | mLight |
float | mAngle |
std::map< std::string,
std::vector< Ogre::uint32 > > | mBuffers |
bool | mInterior |
int | mCellX |
int | mCellY |
Ogre::AxisAlignedBox | mBounds |
std::string | mInteriorName |
Static Private Attributes |
static const int | sMapResolution = 512 |
static const int | sFogOfWarResolution = 32 |
static const int | sFogOfWarSkip = 2 |
static const int | sSize = 8192 |
Detailed Description
Constructor & Destructor Documentation
Member Function Documentation
Get the interior map texture index and normalized position on this texture, given a world position (in ogre coordinates)
Check if a given position is explored by the player (i.e. not obscured by fog of war)
void LocalMap::render |
( |
const float |
x, |
|
|
const float |
y, |
|
|
const float |
zlow, |
|
|
const float |
zhigh, |
|
|
const float |
xw, |
|
|
const float |
yw, |
|
|
const std::string & |
texture |
|
) |
| [private] |
Request the local map for an exterior cell.
- Parameters:
-
cell | exterior cell |
zMin | min height of objects or terrain in cell |
zMax | max height of objects or terrain in cell |
Request the local map for an interior cell.
- Parameters:
-
cell | interior cell |
bounds | bounding box of the cell |
const Ogre::Vector2 LocalMap::rotatePoint |
( |
const Ogre::Vector2 & |
p, |
|
|
const Ogre::Vector2 & |
c, |
|
|
const float |
angle |
|
) |
| [private] |
Save the fog of war for the current cell to disk.
- Parameters:
-
Set the position & direction of the player.
- Parameters:
-
position | (OGRE coordinates) |
camera | orientation (OGRE coordinates) |
Member Data Documentation
The documentation for this class was generated from the following files: