ET::SplattingManager Class Reference

#include <ETSplattingManager.h>

List of all members.

Public Member Functions

 SplattingManager (const std::string &baseName, const std::string &group, unsigned int width, unsigned int height, unsigned int channels=4)
 ~SplattingManager ()
void setNumTextures (unsigned int numTextures)
unsigned int getNumTextures () const
void setNumMaps (unsigned int numMaps)
unsigned int getNumMaps () const
NameList getMapTextureNames () const
void loadMapFromImage (unsigned int mapNum, const Ogre::Image &image)
void saveMapToImage (unsigned int mapNum, Ogre::Image &image)
void paint (unsigned int textureNum, int x, int y, const Brush &brush, float intensity=1.0f)
void createColourMap (Ogre::Image &image, const ColourList &colours)
void createBaseTexture (Ogre::Image &image, size_t width, size_t height, ImageList textures, float repeatX, float repeatZ)

Private Attributes

Impl::SplattingImpl * mImpl

Detailed Description

SplattingManager allows you to create and edit an arbitrary amount of alpha splatting maps which can be used with a splatting shader to render multiple splatting textures per pass onto the terrain. You can use 1 to 4 channels per map.

Constructor & Destructor Documentation

ET::SplattingManager::SplattingManager ( const std::string &  baseName,
const std::string &  group,
unsigned int  width,
unsigned int  height,
unsigned int  channels = 4 

Constructs the splatting manager.

baseName base name for the map textures (will be appended by their number)
group the resource group the textures will be placed in
width width of the textures in pixels
height height of the textures in pixels
channels Number of channels per texture (must be in {1, 2, 3, 4})

ET::SplattingManager::~SplattingManager (  ) 

Member Function Documentation

void ET::SplattingManager::setNumTextures ( unsigned int  numTextures  ) 

Sets the amount of splatting textures you need coverage maps for. Note that this will round up to the next multiple of the channels per map.

unsigned int ET::SplattingManager::getNumTextures (  )  const

Retrieves the current amount of splatting textures covered.

void ET::SplattingManager::setNumMaps ( unsigned int  numMaps  ) 

Sets the number of coverage maps to manage.

unsigned int ET::SplattingManager::getNumMaps (  )  const

Retrieves the current amount of coverage maps.

NameList ET::SplattingManager::getMapTextureNames (  )  const

Retrieves the names of the map textures for use in materials.

void ET::SplattingManager::loadMapFromImage ( unsigned int  mapNum,
const Ogre::Image &  image 

Loads a coverage map texture from an Ogre::Image.

void ET::SplattingManager::saveMapToImage ( unsigned int  mapNum,
Ogre::Image &  image 

Saves a coverage map texture to an Ogre::Image.

void ET::SplattingManager::paint ( unsigned int  textureNum,
int  x,
int  y,
const Brush brush,
float  intensity = 1.0f 

Paint with the specified texture and selected brush and intensity.

void ET::SplattingManager::createColourMap ( Ogre::Image &  image,
const ColourList colours 

Create a colour map with a given list of colours for the textures.

void ET::SplattingManager::createBaseTexture ( Ogre::Image &  image,
size_t  width,
size_t  height,
ImageList  textures,
float  repeatX,
float  repeatZ 

Create base texture using the given list of splatting texture images. Be aware that this is expensive!

image An Ogre image which is used as the output target.
width The desired width of the base texture.
height The desired height of the base texture.
textures A list of splatting textures to use for the generation.
repeatX How often should the textures be splatted in X direction?
repeatZ How often should the textures be splatted in Z direction?

Member Data Documentation

Impl::SplattingImpl* ET::SplattingManager::mImpl [private]

The documentation for this class was generated from the following file:
Generated on Tue Sep 4 21:46:02 2007 for Editable Terrain Manager by  doxygen 1.5.3