#include <retrievable_surface.h>
Nevrax France
Definition at line 68 of file retrievable_surface.h.
Public Types | |
enum | { IsFloorBit = 24, IsSlantBit = 25, IsCeilingBit = 26, IsUnderWaterBit = 27, ClusterHintBit = 28, NormalQuantasStartBit = 0, NormalQuantasStopBit = 3, NormalQuantasBitMask = 0x0000000f, CharacterQuantasStartBit = 8, CharacterQuantasStopBit = 11, CharacterQuantasBitMask = 0x00000f00, MaterialQuantasStartBit = 16, MaterialQuantasStopBit = 23, MaterialQuantasBitMask = 0x00ff0000 } |
Public Member Functions | |
bool | clusterHint () const |
CRetrievableSurface () | |
const NLMISC::CVector & | getCenter () const |
CSurfaceLink | getChain (uint n) const |
Gets nth link form this surface to its neighbor. | |
const std::vector< CSurfaceLink > & | getChains () const |
Gets links from this surface to its neighbors through chains... | |
uint8 | getCharacter () const |
uint32 | getFlags () const |
uint8 | getLevel () const |
const TLoop & | getLoop (uint n) const |
Get nth loop. | |
const std::vector< TLoop > & | getLoops () const |
Get loops. | |
uint8 | getMaterial () const |
float | getMeanHeight () const |
uint8 | getNormalQuanta () const |
uint8 | getOrientationQuanta () const |
const CSurfaceQuadTree & | getQuadTree () const |
sint8 | getQuantHeight () const |
sint32 | getTopology (uint model) const |
float | getWaterHeight () const |
bool | isCeiling () const |
bool | isFloor () const |
void | serial (NLMISC::IStream &f) |
Serialises the CRetrievableSurface. | |
void | translate (const NLMISC::CVector &translation) |
Translates the surface by the translation vector. | |
Protected Attributes | |
NLMISC::CVector | _Center |
The center of the surface. | |
std::vector< CSurfaceLink > | _Chains |
The links to the neighbor surfaces. | |
uint32 | _Flags |
Various flags. | |
std::vector< TLoop > | _Loops |
The loops of chains. | |
CSurfaceQuadTree | _Quad |
A Height QuadTree that allows to easily find the height out for a given 2D point. -- deprecated. | |
sint32 | _Topologies [NumMaxCreatureModels] |
The topologies associated with the surface, for each type of model. | |
float | _WaterHeight |
Surface features. | |
uint8 | _Character |
bool | _IsCeiling |
bool | _IsFloor |
uint8 | _Level |
uint8 | _Material |
uint8 | _NormalQuanta |
uint8 | _OrientationQuanta |
sint8 | _QuantHeight |
Friends | |
class | CLocalRetriever |
|
Definition at line 93 of file retrievable_surface.h.
00094 { 00095 IsFloorBit = 24, 00096 IsSlantBit = 25, 00097 IsCeilingBit = 26, 00098 IsUnderWaterBit = 27, 00099 ClusterHintBit = 28, 00100 NormalQuantasStartBit = 0, 00101 NormalQuantasStopBit = 3, 00102 NormalQuantasBitMask = 0x0000000f, 00103 CharacterQuantasStartBit = 8, 00104 CharacterQuantasStopBit = 11, 00105 CharacterQuantasBitMask = 0x00000f00, 00106 MaterialQuantasStartBit = 16, 00107 MaterialQuantasStopBit = 23, 00108 MaterialQuantasBitMask = 0x00ff0000 00109 }; |
|
Definition at line 152 of file retrievable_surface.h. References _QuantHeight, _WaterHeight, NLPACS::NumMaxCreatureModels, and uint.
00153 { 00154 uint i; 00155 for (i=0; i<NumMaxCreatureModels; ++i) 00156 _Topologies[i] = -1; 00157 00158 _WaterHeight = 0.0f; 00159 _QuantHeight = 0; 00160 } |
|
Definition at line 169 of file retrievable_surface.h. References ClusterHintBit.
00169 { return (_Flags & ClusterHintBit) != 0; } |
|
Definition at line 186 of file retrievable_surface.h.
00186 { return _Center; } |
|
Gets nth link form this surface to its neighbor.
Definition at line 180 of file retrievable_surface.h. References uint. Referenced by NLPACS::CLocalRetriever::insurePosition().
00180 { return _Chains[n]; } |
|
Gets links from this surface to its neighbors through chains...
Definition at line 178 of file retrievable_surface.h. Referenced by NLPACS::CGlobalRetriever::findAStarPath(), and NLPACS::CLocalRetriever::insurePosition().
00178 { return _Chains; } |
|
Definition at line 165 of file retrievable_surface.h. References _Character, and uint8.
00165 { return _Character; } |
|
Definition at line 172 of file retrievable_surface.h. References uint32. Referenced by NLPACS::CGlobalRetriever::findAStarPath(), NLPACS::CGlobalRetriever::getBorders(), and NLPACS::CGlobalRetriever::isWaterPosition().
00172 { return _Flags; } |
|
Definition at line 166 of file retrievable_surface.h.
00166 { return _Level; } |
|
Get nth loop.
Definition at line 182 of file retrievable_surface.h.
00182 { return _Loops[n]; } |
|
Get loops.
Definition at line 184 of file retrievable_surface.h. References _Loops.
00184 { return _Loops; } |
|
Definition at line 164 of file retrievable_surface.h. References uint8. Referenced by NLPACS::CGlobalRetriever::getMaterial().
00164 { return _Material; } |
|
Definition at line 175 of file retrievable_surface.h. References _QuantHeight.
00175 { return _QuantHeight*2.0f + 1.0f; } |
|
Definition at line 162 of file retrievable_surface.h. References _NormalQuanta, and uint8.
00162 { return _NormalQuanta; } |
|
Definition at line 163 of file retrievable_surface.h. References _OrientationQuanta, and uint8.
00163 { return _OrientationQuanta; } |
|
Definition at line 170 of file retrievable_surface.h.
00170 { return _Quad; } |
|
Definition at line 174 of file retrievable_surface.h. References _QuantHeight, and sint8. Referenced by NLPACS::CRetrieverInstance::retrievePosition().
00174 { return _QuantHeight; } |
|
Definition at line 171 of file retrievable_surface.h.
00171 { return _Topologies[model]; } |
|
Definition at line 173 of file retrievable_surface.h. References _WaterHeight. Referenced by NLPACS::CGlobalRetriever::isWaterPosition().
00173 { return _WaterHeight; } |
|
Definition at line 168 of file retrievable_surface.h. References _IsCeiling. Referenced by NLPACS::CGlobalRetriever::testCollisionWithCollisionChains(), NLPACS::CGlobalRetriever::testMovementWithCollisionChains(), and NLPACS::CGlobalRetriever::verticalChain().
00168 { return _IsCeiling; } |
|
Definition at line 167 of file retrievable_surface.h. References _IsFloor. Referenced by NLPACS::CGlobalRetriever::testCollisionWithCollisionChains(), NLPACS::CGlobalRetriever::testMovementWithCollisionChains(), and NLPACS::CGlobalRetriever::verticalChain().
00167 { return _IsFloor; } |
|
Serialises the CRetrievableSurface.
Definition at line 51 of file retrievable_surface.cpp. References _Character, _IsCeiling, _IsFloor, _Level, _Loops, _NormalQuanta, _OrientationQuanta, _QuantHeight, _WaterHeight, NLPACS::NumMaxCreatureModels, NLMISC::IStream::serial(), NLMISC::IStream::serialCont(), NLMISC::IStream::serialVersion(), sint, and uint.
00052 { 00053 /* 00054 Version 0: 00055 - base version. 00056 Version 1: 00057 - absolute water height and flag 00058 Version 2: 00059 - no more topologies in stream (obsolete) 00060 - no more height quad 00061 - quantized height (_QuantHeight) 00062 */ 00063 sint ver= f.serialVersion(2); 00064 00065 if (ver < 2) 00066 throw EOlderStream(); 00067 00068 uint i; 00069 f.serial(_NormalQuanta); 00070 f.serial(_OrientationQuanta); 00071 f.serial(_Material); 00072 f.serial(_Character); 00073 f.serial(_Level); 00074 f.serialCont(_Chains); 00075 f.serialCont(_Loops); 00076 if (ver <= 1) 00077 { 00078 f.serial(_Quad); 00079 for (i=0; i<NumMaxCreatureModels; ++i) 00080 f.serial(_Topologies[i]); 00081 } 00082 f.serial(_Center); 00083 f.serial(_IsFloor, _IsCeiling); 00084 f.serial(_Flags); 00085 00086 if (ver >= 1) 00087 { 00088 f.serial(_WaterHeight); 00089 } 00090 00091 if (ver >= 2) 00092 { 00093 f.serial(_QuantHeight); 00094 } 00095 } |
|
Translates the surface by the translation vector.
Definition at line 189 of file retrievable_surface.h. References NLPACS::CSurfaceQuadTree::translate().
|
|
Definition at line 118 of file retrievable_surface.h. |
|
The center of the surface.
Definition at line 149 of file retrievable_surface.h. Referenced by NLPACS::CLocalRetriever::addSurface(). |
|
|
Definition at line 125 of file retrievable_surface.h. Referenced by NLPACS::CLocalRetriever::addSurface(), NLPACS::CLocalRetriever::computeTopologies(), getCharacter(), and serial(). |
|
Various flags.
Definition at line 133 of file retrievable_surface.h. Referenced by NLPACS::CLocalRetriever::addSurface(). |
|
Definition at line 129 of file retrievable_surface.h. Referenced by NLPACS::CLocalRetriever::addSurface(), isCeiling(), and serial(). |
|
Definition at line 128 of file retrievable_surface.h. Referenced by NLPACS::CLocalRetriever::addSurface(), isFloor(), and serial(). |
|
Definition at line 126 of file retrievable_surface.h. Referenced by NLPACS::CLocalRetriever::addSurface(), getLevel(), and serial(). |
|
The loops of chains.
Definition at line 140 of file retrievable_surface.h. Referenced by NLPACS::CLocalRetriever::build3dSurfacePolygons(), NLPACS::CLocalRetriever::buildSurfacePolygons(), NLPACS::CLocalRetriever::computeLoopsAndTips(), NLPACS::CLocalRetriever::dumpSurface(), NLPACS::CLocalRetriever::findPath(), getLoop(), getLoops(), NLPACS::CLocalRetriever::getNextChain(), NLPACS::CLocalRetriever::getPreviousChain(), and serial(). |
|
Definition at line 124 of file retrievable_surface.h. Referenced by NLPACS::CLocalRetriever::addSurface(). |
|
Definition at line 122 of file retrievable_surface.h. Referenced by NLPACS::CLocalRetriever::addSurface(), getNormalQuanta(), and serial(). |
|
Definition at line 123 of file retrievable_surface.h. Referenced by NLPACS::CLocalRetriever::addSurface(), getOrientationQuanta(), and serial(). |
|
A Height QuadTree that allows to easily find the height out for a given 2D point. -- deprecated.
Definition at line 143 of file retrievable_surface.h. Referenced by NLPACS::CLocalRetriever::addSurface(). |
|
Definition at line 127 of file retrievable_surface.h. Referenced by NLPACS::CLocalRetriever::addSurface(), CRetrievableSurface(), getMeanHeight(), getQuantHeight(), and serial(). |
|
The topologies associated with the surface, for each type of model.
Definition at line 146 of file retrievable_surface.h. Referenced by NLPACS::CLocalRetriever::computeTopologies(). |
|
Definition at line 134 of file retrievable_surface.h. Referenced by NLPACS::CLocalRetriever::addSurface(), CRetrievableSurface(), getWaterHeight(), and serial(). |