2 #include "TerrainCommon.h" 3 #include "DetailTexture.h" 29 typedef std::vector<DetailTexture*> DetailTextureArray_type;
62 DeviceTexturePtr_type
BindMask(
int index);
137 DetailTextureArray_type m_DetailTextures;
void UnbindAll()
Unbinds the overall texture and all DetailTexture masks and detail textures.
Definition: TextureCell.cpp:285
int GetNumberOfDetails()
Gets the number of DetailTexture layers that have been added.
Definition: TextureCell.cpp:246
Definition: SceneObject.h:15
DeviceTexturePtr_type BindTexture()
Binds the overall texture to a texture object. Used for rendering.
Definition: TextureCell.cpp:250
bool RemoveDetail(int nIndex)
remove a detailed texture by local index.
Definition: TextureCell.cpp:323
bool RemoveAllDetail()
remove all detailed textures.
Definition: TextureCell.cpp:341
Texture * GetTexture()
Gets the overall base detail texture's texture object.
Definition: TextureCell.cpp:41
DetailTexture * GetDetailBase()
get the base detailed texture.
Definition: TextureCell.cpp:36
different physics engine has different winding order.
Definition: EventBinding.h:32
int GetDetailMaskImageBitsPerPixel(int detailIndex)
Gets the color depth of the specified detail texture mask.
Definition: TextureCell.cpp:88
static int GetDetailMaskImageWidth(int detailIndex)
Gets the width of the specified detail texture mask in pixels.
Definition: TextureCell.cpp:78
void OptimizeLayer()
optimize layers in the cell, by removing those layers whose texture mask is constant 0...
Definition: TextureCell.cpp:294
void AddDetail(DetailTexture *pDetailTexture)
Adds a new detail texture layer to this cell.
Definition: TextureCell.cpp:241
int GetDetailIndex(Texture *pTexture)
same as GetDetail(), except that the local detail texture index is returned.
Definition: TextureCell.cpp:225
int GetDetailTextureImageHeight(int detailIndex)
Gets the height of the specified detail texture in pixels.
Definition: TextureCell.cpp:59
void FlipHorizontal()
Performs Texture::FlipHorizontal on the overall texture and all DetailTexture layers.
Definition: TextureCell.cpp:117
DeviceTexturePtr_type BindMask()
Binds the overall mask to a texture object.Used for rendering.
Definition: TextureCell.cpp:258
Represents a square region on a Terrain surface that is textured.
Definition: TextureCell.h:26
int GetBaseTextureImageHeight()
Gets the height of the overall texture in pixels.
Definition: TextureCell.cpp:101
int GetDetailTextureImageBitsPerPixel(int detailIndex)
Gets the color depth of the specified detail texture.
Definition: TextureCell.cpp:68
int GetBaseTextureImageBitsPerPixel()
Gets the color depth of the overall texture.
Definition: TextureCell.cpp:109
int GetDetailTextureImageWidth(int detailIndex)
Gets the width of the specified detail texture in pixels.
Definition: TextureCell.cpp:50
int NormalizeMask(int index, float fScale=1.0f)
normalize the given texture mask layer, so that the alpha of the specified layer is unchanged(or scal...
Definition: TextureCell.cpp:375
void SetTexture(Texture *pTexture)
Sets the overall Texture for this cell.
Definition: TextureCell.cpp:186
it presents a real or virtual file in ParaEngine.
Definition: ParaFile.h:31
void WriteMask(CParaFile &file, Terrain *pTerrain)
optimize and then write to disk.
Definition: TextureCell.cpp:133
TextureCell()
Constructs an empty TextureCell.
Definition: TextureCell.cpp:17
A DetailTexture is a "layer" that can be painted onto to put texture "splats" on a terrain surface...
Definition: DetailTexture.h:23
void FlipVertical()
Performs Texture::FlipVertical on the overall texture and all DetailTexture layers.
Definition: TextureCell.cpp:125
void ResizeTextureMaskWidth(int nWidth)
resize all texture mask width of all layers
Definition: TextureCell.cpp:353
static int GetDetailMaskImageHeight(int detailIndex)
Gets the height of the specified detail texture mask in pixels.
Definition: TextureCell.cpp:83
int GetBaseTextureImageWidth()
Gets the width of the overall texture in pixels.
Definition: TextureCell.cpp:93
DetailTexture * GetDetail(int index)
Gets the specified DetailTexture layer.
Definition: TextureCell.cpp:203
This class represents a single, contiguous chunk of terrain and is the primary public interface to De...
Definition: Terrain.h:386
void ReadMask(CParaFile &file, Terrain *pTerrain)
read mask file from disk.
Definition: TextureCell.cpp:150
DeviceTexturePtr_type BindDetail(int index)
Binds the detail texture of the specified DetailTexture layer.
Definition: TextureCell.cpp:276