# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CTileElement Class Reference

An Element for CPatchTexture. More...

#include <tile_element.h>

List of all members.

Public Types

enum  TVegetableInfo {
  AboveWater = 0, UnderWater, IntersectWater, VegetableDisabled,
  VegetInfoLast
}
 Micro vegetation position. Above water is the default. More...


Public Methods

void copyFlagsFromOther (const CTileElement &other)
 Copy this tile flags from an other tile. More...

void setTileOrient (sint i, uint8 orient)
 Set the tile orientation of pass i, to "orient". More...

uint8 getTileOrient (sint i) const
 Get the tile orientation of pass i. More...

void setTile256Info (bool is256x256, uint8 uvOff=0)
 Set the tile 256x256 information of pass 0. More...

void getTile256Info (bool &is256x256, uint8 &uvOff) const
 Get the tile 256x256 information. More...

void setTileSubNoise (uint8 subNoise)
 Set the tile SubNoise. More...

uint8 getTileSubNoise () const
 Get the tile SubNoise information. More...

void serial (NLMISC::IStream &f)
void setVegetableState (TVegetableInfo state)
 Set the micro vegetation state. More...

TVegetableInfo getVegetableState () const
 Get the micro vegetable state for this tile. More...


Public Attributes

uint16 Tile [3]
 The three tile ident. More...


Private Attributes

uint16 Flags


Detailed Description

An Element for CPatchTexture.

Temporary! since CPatchTexture should be compressed... NB: no default ctor => must init all fields.

Author:
Lionel Berenguier , Nevrax France
Date:
2000

Definition at line 64 of file tile_element.h.


Member Enumeration Documentation

enum NL3D::CTileElement::TVegetableInfo
 

Micro vegetation position. Above water is the default.

Enumeration values:
AboveWater 
UnderWater 
IntersectWater 
VegetableDisabled 
VegetInfoLast 

Definition at line 125 of file tile_element.h.

Referenced by getVegetableState.


Member Function Documentation

void NL3D::CTileElement::copyFlagsFromOther const CTileElement &    other [inline]
 

Copy this tile flags from an other tile.

Definition at line 72 of file tile_element.h.

References Flags.

void NL3D::CTileElement::getTile256Info bool &    is256x256,
uint8   uvOff
const
 

Get the tile 256x256 information.

Definition at line 64 of file tile_element.cpp.

References Flags, NL_TILE_ELM_MASK_UVINFO, and NL_TILE_ELM_OFFSET_UVINFO.

uint8 NL3D::CTileElement::getTileOrient sint    i const
 

Get the tile orientation of pass i.

orient E [0,3]. The rotation is CCW.

Definition at line 46 of file tile_element.cpp.

References Flags, NL_TILE_ELM_MASK_ROTATE, NL_TILE_ELM_OFFSET_ROTATE, NL_TILE_ELM_SIZE_ROTATE, nlassert, and uint8.

uint8 NL3D::CTileElement::getTileSubNoise   const [inline]
 

Get the tile SubNoise information.

Definition at line 116 of file tile_element.h.

References Flags, NL_TILE_ELM_MASK_SUBNOISE, and NL_TILE_ELM_OFFSET_SUBNOISE.

TVegetableInfo NL3D::CTileElement::getVegetableState   const [inline]
 

Get the micro vegetable state for this tile.

Definition at line 131 of file tile_element.h.

References Flags, NL_TILE_ELM_MASK_VEGETABLE, NL_TILE_ELM_OFFSET_VEGETABLE, and TVegetableInfo.

void NL3D::CTileElement::serial NLMISC::IStream   f
 

Definition at line 82 of file tile_element.cpp.

References Flags, Tile, and NLMISC::IStream::xmlSerial.

void NL3D::CTileElement::setTile256Info bool    is256x256,
uint8    uvOff = 0
 

Set the tile 256x256 information of pass 0.

NB: During UV computing, orient is applied first, then tile256x256 uvOffset (only if the tile is 256x256).

Parameters:
is256x256  is this tile a part of a 256x256
uvOff  the UV offset of tile 256x256. uvOff E [0,3]. Meanings: --------- | 0 | 3 | |___|___| | | | | 1 | 2 | ---------

Definition at line 54 of file tile_element.cpp.

References Flags, NL_TILE_ELM_MASK_UVINFO, NL_TILE_ELM_OFFSET_UVINFO, and nlassert.

void NL3D::CTileElement::setTileOrient sint    i,
uint8    orient
 

Set the tile orientation of pass i, to "orient".

orient E [0,3]. The rotation is CCW.

Definition at line 36 of file tile_element.cpp.

References Flags, NL_TILE_ELM_MASK_ROTATE, NL_TILE_ELM_OFFSET_ROTATE, NL_TILE_ELM_SIZE_ROTATE, and nlassert.

void NL3D::CTileElement::setTileSubNoise uint8    subNoise
 

Set the tile SubNoise.

subNoise E [0, 15].

Definition at line 73 of file tile_element.cpp.

References Flags, NL_TILE_ELM_MASK_SUBNOISE, NL_TILE_ELM_OFFSET_SUBNOISE, and nlassert.

void NL3D::CTileElement::setVegetableState TVegetableInfo    state
 

Set the micro vegetation state.

Definition at line 89 of file tile_element.cpp.

References Flags, NL_TILE_ELM_MASK_VEGETABLE, NL_TILE_ELM_OFFSET_VEGETABLE, nlassert, and VegetInfoLast.


Member Data Documentation

uint16 NL3D::CTileElement::Flags [private]
 

Definition at line 67 of file tile_element.h.

Referenced by copyFlagsFromOther, getTile256Info, getTileOrient, getTileSubNoise, getVegetableState, serial, setTile256Info, setTileOrient, setTileSubNoise, and setVegetableState.

uint16 NL3D::CTileElement::Tile[3]
 

The three tile ident.

NL_TILE_ELM_LAYER_EMPTY means no Tile for this pass. Tile[0] should be !=NL_TILE_ELM_LAYER_EMPTY. Else cross are drawn...

Definition at line 77 of file tile_element.h.

Referenced by serial.


The documentation for this class was generated from the following files: