Go to the documentation of this file.
29 #ifndef __Ogre_TerrainLayerBlendMap_H__
30 #define __Ogre_TerrainLayerBlendMap_H__
void convertTerrainToImageSpace(Real x, Real y, size_t *outX, size_t *outY)
Convert terrain space values (0,1) to image space (0, imageSize).
void convertWorldToUVSpace(const Vector3 &worldPos, Real *outX, Real *outY)
Helper method - convert a point in world space to UV space based on the terrain settings.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
uint8 getLayerIndex() const
Get the index of the layer this is targeting.
virtual ~TerrainLayerBlendMap()
void loadImage(const Image &img)
Load an image into this blend layer.
Class representing an image file.
Class exposing an interface to a blend map for a given layer.
#define _OgreTerrainExport
void update()
Publish any changes you made to the blend data back to the blend map.
The main containing class for a chunk of terrain.
Specialisation of HardwareBuffer for a pixel buffer.
void convertImageToUVSpace(size_t x, size_t y, Real *outX, Real *outY)
Convert image space (0, imageSize) to local space values (0,1).
vector< TerrainLayerBlendMap * >::type TerrainLayerBlendMapList
void blit(const PixelBox &src)
Blits a set of values into the entire map.
HardwarePixelBuffer * mBuffer
static const String BLANK
Constant blank string, useful for returning by ref where local does not exist.
void setBlendValue(size_t x, size_t y, float val)
Set a single value of blend information (0 = transparent, 255 = solid)
void dirtyRect(const Rect &rect)
Indicate that a portion of the blend data is dirty and needs updating.
void blit(const PixelBox &src, const Box &dstBox)
Blits a set of values into a region on the blend map.
void convertUVToImageSpace(Real x, Real y, size_t *outX, size_t *outY)
Convert local space values (0,1) to image space (0, imageSize).
void convertUVToWorldSpace(Real x, Real y, Vector3 *outWorldPos)
Helper method - convert a point in local space to worldspace based on the terrain settings.
Terrain * getParent() const
Get the parent terrain.
Structure used to define a box in a 3-D integer space.
TerrainLayerBlendMap(Terrain *parent, uint8 layerIndex, HardwarePixelBuffer *buf)
Constructor.
A primitive describing a volume (3D), image (2D) or line (1D) of pixels in memory.
void dirty()
Indicate that all of the blend data is dirty and needs updating.
float Real
Software floating point type.
void convertImageToTerrainSpace(size_t x, size_t y, Real *outX, Real *outY)
Convert image space (0, imageSize) to terrain space values (0,1).
void loadImage(const String &filename, const String &groupName)
Load an image into this blend layer.
float getBlendValue(size_t x, size_t y)
Get a single value of blend information, in image space.
void loadImage(DataStreamPtr &stream, const String &ext=StringUtil::BLANK)
Load an image into this blend layer.
Standard 3-dimensional vector.
float * getBlendPointer()
Get a pointer to the whole blend data.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.