|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CZoneSymmetrisation Class ReferenceEnvironnement used to symmetrise zones.
More...
#include <zone_symmetrisation.h>
List of all members.
Public Types |
enum | TState { Nothing = 0,
Regular = 1,
Goofy = 2
} |
| Symmetrie state. More...
|
Public Methods |
| CZoneSymmetrisation () |
| Constructor. More...
|
TState | getTileState (uint patch, uint tile, uint layer) const |
| Get tile symmetry state Can return Regular, Goofy or Nothing. More...
|
TState | getTileBorderState (uint patch, uint tile) const |
| Get tile symmetry state Can return Regular, Goofy or Nothing. More...
|
TState | getOrientedTileBorderState (uint patch, uint tile) const |
| Get tile symmetry state for oriented tiles Can return Regular, Goofy or Nothing. More...
|
bool | getOrientedTileCorner (uint patch, uint tile) |
| Set oriented tile corner state. More...
|
bool | build (const std::vector< CPatchInfo > &patchInfo, float snapCell, float weldThreshold, const CTileBank &bank, CError &errorDesc, const NLMISC::CMatrix &toOriginalSpace) |
| Build symmetry informations. More...
|
Private Methods |
bool | propagateTileState (uint i, uint s, uint t, const std::vector< CPatchInfo > &patchInfo, const CTileBank &bank, bool forceRegular) |
| Propagate tile state information for a given tile. More...
|
void | setTileState (uint patch, uint tile, uint layer, TState state) |
| Set orientedtile symmetry state. More...
|
void | setTileBorderState (uint patch, uint tile, TState state) |
| Set border tile symmetry state. More...
|
void | setOrientedTileBorderState (uint patch, uint tile, TState state) |
| Set border oriented tile symmetry state. More...
|
void | setOrientedTileCorner (uint patch, uint tile, bool corner) |
| Set oriented tile corner state. More...
|
bool | setTileState (const NL3D::CPatchInfo &patch, uint patchId, float snapCell, float weldThreshold, TState &state, const NLMISC::CMatrix &toOriginalSpace, const CTileBank &bank) |
| Set tile state of a patch. More...
|
bool | setOrientedTileState (const NL3D::CPatchInfo &patch, uint patchId, float snapCell, float weldThreshold, TState &state, const NLMISC::CMatrix &toOriginalSpace, const CTileBank &bank) |
Static Private Methods |
bool | snapOnGrid (float &value, float resolution, float snap) |
Private Attributes |
std::vector< std::vector<
uint16 > > | _TilesLayerStates |
Detailed Description
Environnement used to symmetrise zones.
This class build symmetry specific informations needed to know how transform tiles when a zone is symmetrise.
There is two states for a tile : Regular or Goofy. If the tile is regular, it doesn't need specific transformation when the zone is symmetrise. If the tile is goofy, the tile must be rotate by 180° more to be correct.
-
Author:
-
Cyril 'Hulud' Corvazier , Nevrax France
-
Date:
-
2002
Definition at line 54 of file zone_symmetrisation.h.
Member Enumeration Documentation
enum NL3D::CZoneSymmetrisation::TState
|
|
Constructor & Destructor Documentation
NL3D::CZoneSymmetrisation::CZoneSymmetrisation |
( |
|
) |
|
|
Member Function Documentation
bool NL3D::CZoneSymmetrisation::build |
( |
const std::vector< CPatchInfo > & |
patchInfo, |
|
|
float |
snapCell, |
|
|
float |
weldThreshold, |
|
|
const CTileBank & |
bank, |
|
|
CError & |
errorDesc, |
|
|
const NLMISC::CMatrix & |
toOriginalSpace |
|
) |
|
|
bool NL3D::CZoneSymmetrisation::getOrientedTileCorner |
( |
uint |
patch, |
|
|
uint |
tile |
|
) |
|
|
bool NL3D::CZoneSymmetrisation::propagateTileState |
( |
uint |
i, |
|
|
uint |
s, |
|
|
uint |
t, |
|
|
const std::vector< CPatchInfo > & |
patchInfo, |
|
|
const CTileBank & |
bank, |
|
|
bool |
forceRegular |
|
) |
[private] |
|
|
Propagate tile state information for a given tile.
-
Parameters:
-
i |
is the patch number in the zone that contain the tile to propagate |
u |
is the tile u coordinate in the patch |
v |
is the tile v coordinate in the patch |
patchInfo |
is a vector of patch information |
bank |
is the tile bank used by the landscape |
forceRegular |
must be true to force the first propagated tile to Regular if Nothing |
-
Returns:
-
false if the patch topology is invalid for this operations true if succesful
Definition at line 658 of file zone_symmetrisation.cpp.
References getOrientedTileCorner, getTileState, Goofy, NL_TILE_ELM_LAYER_EMPTY, nlassert, nlwarning, Nothing, Regular, s, setTileState, t, TState, and type.
Referenced by build. |
void NL3D::CZoneSymmetrisation::setOrientedTileBorderState |
( |
uint |
patch, |
|
|
uint |
tile, |
|
|
TState |
state |
|
) |
[private] |
|
void NL3D::CZoneSymmetrisation::setOrientedTileCorner |
( |
uint |
patch, |
|
|
uint |
tile, |
|
|
bool |
corner |
|
) |
[private] |
|
|
Definition at line 466 of file zone_symmetrisation.cpp.
References Goofy, NL_TILE_ELM_LAYER_EMPTY, Nothing, NL3D::CPatchInfo::OrderS, NL3D::CPatchInfo::OrderT, NL3D::CPatchInfo::Patch, Regular, setOrientedTileBorderState, setOrientedTileCorner, setTileState, snapOnGrid, NL3D::CPatchInfo::Tiles, TState, and type.
Referenced by build. |
void NL3D::CZoneSymmetrisation::setTileBorderState |
( |
uint |
patch, |
|
|
uint |
tile, |
|
|
TState |
state |
|
) |
[private] |
|
|
Set tile state of a patch.
Definition at line 312 of file zone_symmetrisation.cpp.
References Goofy, NL_TILE_ELM_LAYER_EMPTY, Nothing, NL3D::CPatchInfo::OrderS, NL3D::CPatchInfo::OrderT, NL3D::CPatchInfo::Patch, Regular, setTileBorderState, setTileState, snapOnGrid, NL3D::CPatchInfo::Tiles, TState, and type. |
void NL3D::CZoneSymmetrisation::setTileState |
( |
uint |
patch, |
|
|
uint |
tile, |
|
|
uint |
layer, |
|
|
TState |
state |
|
) |
[private] |
|
bool NL3D::CZoneSymmetrisation::snapOnGrid |
( |
float & |
value, |
|
|
float |
resolution, |
|
|
float |
snap |
|
) |
[static, private] |
|
Member Data Documentation
std::vector<std::vector<uint16> > NL3D::CZoneSymmetrisation::_TilesLayerStates [private]
|
|
The documentation for this class was generated from the following files:
|
|