|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CTextureFar Class ReferenceA CTextureFar is a set of NL_NUM_FAR_PATCHES_BY_TEXTURE texture used to map a whole patch when it is in far Mode.
More...
#include <texture_far.h>
Inheritance diagram for NL3D::CTextureFar
[legend]Collaboration diagram for NL3D::CTextureFar:
[legend]List of all members.
Detailed Description
A CTextureFar is a set of NL_NUM_FAR_PATCHES_BY_TEXTURE texture used to map a whole patch when it is in far Mode.
(ie not in tile mode). A CTextureFar handle several patch texture.\
Before adding patch to the texture, you must call setSizeOfFarPatch, to intialize the texture.
TODO: keeping the far texture level1 alive when the tile pass in level0 (tile mode), don't erase it. TODO: add an hysteresis to avoid swap of far texture on boundaries of levels TODO: set the upload format in rgba565
-
Author(s):
-
Cyril Corvazier , Nevrax France
-
Date:
-
2000
Definition at line 68 of file texture_far.h.
Constructor & Destructor Documentation
NL3D::CTextureFar::CTextureFar (
|
) [inline]
|
|
Member Function Documentation
NL3D::CTextureFar::NLMISC_DECLARE_CLASS (
|
CTextureFar ) [private]
|
|
bool NL3D::CTextureFar::addPatch (
|
CPatch * pPatch,
|
|
float & farUScale,
|
|
float & farVScale,
|
|
float & farUBias,
|
|
float & farVBias,
|
|
bool & bRot )
|
|
|
Add a patch in the CTexture Patch.
Must not be full! Return true if the texture is full after adding this patch else false. -
Parameters:
-
pPatch
|
is the pointer to the patch to add in the landscape |
far1UVScale
|
will receive the scale to use to compute the UV coordinates |
far1UBias
|
will receive the U Bias to use to compute the UV coordinates |
far1VBias
|
will receive the V Bias to use to compute the UV coordinates |
bRot
|
will receive true if the texture is rotated of 90° to the left or false. You should take care of this value to compute UV coordinates. |
Definition at line 74 of file texture_far.cpp. |
void NL3D::CTextureFar::doGenerate (
|
) [virtual]
|
|
void NL3D::CTextureFar::rebuildRectangle (
|
uint x,
|
|
uint y ) [private]
|
|
|
Rebuild the rectangle passed in parameter.
Definition at line 199 of file texture_far.cpp. |
bool NL3D::CTextureFar::removePatch (
|
CPatch * pPatch )
|
|
void NL3D::CTextureFar::setSizeOfFarPatch (
|
sint width,
|
|
sint height )
|
|
|
Set the size of the patch stored in this texture far.
Note that width must be larger than height. For patch with a bigger height than width, invert width and height value. So, in this texture far, you can store patches with a size of width*height but also patches with a size of height*width. -
Parameters:
-
width
|
is the width of the texture far stored in this texture. Can be 64, 32, 16, 8, 4 or 2 |
height
|
is the height of the texture far stored in this texture. Can be 64, 32, 16, 8, 4 or 2 |
Definition at line 42 of file texture_far.cpp. |
Member Data Documentation
CRGBA NL3D::CTextureFar::_LightmapExpanded[NL_NUM_PIXELS_ON_FAR_TILE_EDGE *NL_MAX_TILES_BY_PATCH_EDGE *NL_NUM_PIXELS_ON_FAR_TILE_EDGE *NL_MAX_TILES_BY_PATCH_EDGE] [static, private]
|
|
CTileLumel NL3D::CTextureFar::_LumelExpanded [static, private]
|
|
uint32 NL3D::CTextureFar::_OriginalHeight [private]
|
|
uint32 NL3D::CTextureFar::_OriginalWidth [private]
|
|
uint32 NL3D::CTextureFar::_PatchCount
|
|
|
Vector of patches which texture far is stored in this CTextureFar Should be == to _WidthPatches*_HeightPatches.
Definition at line 136 of file texture_far.h. |
The documentation for this class was generated from the following files:
|
|