|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLPACS::CLocalRetriever Class ReferenceA surface retriever, located by its bounding box.
More...
#include <local_retriever.h>
List of all members.
Public Types |
enum | EType { Landscape = 0,
Interior
} |
| The different types of retriever (landscape or interior.). More...
|
Public Methods |
bool | insurePosition (ULocalPosition &local) const |
| Assures a position is really inside a surface (and independent from any accuracy issue) and returns true if the position was moved. More...
|
void | retrievePosition (NLMISC::CVector estimated, CCollisionSurfaceTemp &cst) const |
| Retrieves a position inside the retriever (from the local position), returns true if the position is close to a border. More...
|
void | snapToInteriorGround (ULocalPosition &position, bool &snapped) const |
| Snaps on the ground. More...
|
float | getHeight (const ULocalPosition &position) const |
void | findPath (const CLocalPosition &A, const CLocalPosition &B, std::vector< CVector2s > &path, NLPACS::CCollisionSurfaceTemp &cst) const |
| Finds a path in a given surface, from the point A to the point B. More...
|
void | unify () |
const NLMISC::CVector & | getStartVector (uint32 chain) const |
const NLMISC::CVector & | getStopVector (uint32 chain) const |
const NLMISC::CVector & | getStartVector (uint32 chain, sint32 surface) const |
const NLMISC::CVector & | getStopVector (uint32 chain, sint32 surface) const |
uint16 | getStartTip (uint32 chain, sint32 surface) const |
uint16 | getStopTip (uint32 chain, sint32 surface) const |
void | setStartTip (uint32 chain, sint32 surface, uint16 startTip) |
void | setStopTip (uint32 chain, sint32 surface, uint16 stopTip) |
uint32 | getPreviousChain (uint32 chain, sint32 surface) const |
uint32 | getNextChain (uint32 chain, sint32 surface) const |
void | dumpSurface (uint surf, const NLMISC::CVector &vect=NLMISC::CVector::Null) const |
float | distanceToBorder (const ULocalPosition &pos) const |
|
| CLocalRetriever () |
|
const std::vector< CTip > & | getTips () const |
| Returns the chain tips inside the local retrievers. More...
|
const CTip & | getTip (uint n) const |
| Returns the nth tip in the retriever. More...
|
const std::vector< COrderedChain > & | getOrderedChains () const |
| Returns the ordered chains. More...
|
const COrderedChain & | getOrderedChain (uint n) const |
| Returns the nth ordered chain. More...
|
const std::vector< COrderedChain3f > & | getFullOrderedChains () const |
| Returns the full ordered chains. More...
|
const COrderedChain3f & | getFullOrderedChain (uint n) const |
| Returns the nth full ordered chain. More...
|
const std::vector< CChain > & | getChains () const |
| Returns the chains. More...
|
const CChain & | getChain (uint n) const |
| retruns the nth chain. More...
|
const std::vector< uint16 > & | getBorderChains () const |
| Returns the ids of the chains on the edges of the retriever. More...
|
uint16 | getBorderChain (uint n) const |
| Returns the id of the nth chain on the edges of the retriever. More...
|
const std::vector< CRetrievableSurface > & | getSurfaces () const |
| Returns the surfaces. More...
|
const CRetrievableSurface & | getSurface (uint n) const |
| Returns the nth surface. More...
|
EType | getType () const |
| Returns the type of the retriever. More...
|
const NLMISC::CAABBox & | getBBox () const |
| Returns the bbox. More...
|
const CExteriorMesh & | getExteriorMesh () const |
| Returns the exterior mesh of the retriever. More...
|
const std::vector< NLMISC::CVector > & | getInteriorVertices () const |
| Returns the interior vertices. More...
|
const std::vector< CInteriorFace > & | getInteriorFaces () const |
| Returns the interior faces. More...
|
const std::string & | getIdentifier () const |
| Returns the identifier of the retriever. More...
|
void | buildInteriorSurfaceBBoxes (std::vector< NLMISC::CAABBox > &surfaceBBoxes) const |
| build BBoxes of interior surfaces in surfaceBBoxes (cleared first). More...
|
void | buildSurfacePolygons (uint32 surface, std::list< NLMISC::CPolygon > &polygons) const |
| Builds the polygons (loops) of a given surface. More...
|
void | buildSurfacePolygons (std::list< std::list< NLMISC::CPolygon > > &polygons) const |
| Builds the polygons (loops) of all surfaces in the retriever. More...
|
|
sint32 | addSurface (uint8 normalq, uint8 orientationq, uint8 mat, uint8 charact, uint8 level, bool isUnderWater, float waterHeight, const NLMISC::CVector ¢er, const CSurfaceQuadTree &quad) |
| Adds a surface to the local retriever, using its features. Returns the id of the newly created surface. More...
|
sint32 | addChain (const std::vector< NLMISC::CVector > &vertices, sint32 left, sint32 right) |
| Adds a chain to the local retriever, using the vertices of the chain, the left and right surfaces id and the edge on which the chain is stuck. More...
|
void | setType (EType type) |
| Set the type of the retriever (see EType). More...
|
void | setExteriorMesh (const CExteriorMesh &em) |
| Sets the exterior mesh. More...
|
void | setBBox (const NLMISC::CAABBox &bbox) |
| Sets the bbox of the retriever. More...
|
std::vector< NLMISC::CVector > & | getInteriorVertices () |
| Returns the interior vertices. More...
|
std::vector< CInteriorFace > & | getInteriorFaces () |
| Returns the interior faces. More...
|
void | setIdentifier (const std::string &id) |
| Returns the identifier of the retriever. More...
|
CChainQuad & | getChainQuad () |
| Returns the chain quad. More...
|
void | initFaceGrid () |
| Inits the face grid. More...
|
void | computeTopologies () |
| Builds topologies tables. More...
|
void | computeLoopsAndTips () |
| Builds tips. More...
|
void | findBorderChains () |
| Found chains on the edges of the retriever and fills _BorderChains tables. More...
|
void | updateChainIds () |
| Updates surfaces links from the links contained in the chains... More...
|
void | sortTips () |
| Sorts chains references inside the tips. NOT IMPLEMENTED YET. More...
|
void | translate (const NLMISC::CVector &translation) |
| Translates the local retriever by the translation vector. More...
|
void | flushFullOrderedChains () |
void | serial (NLMISC::IStream &f) |
| Serialises the CLocalRetriever. More...
|
|
void | computeCollisionChainQuad () |
| compute the chain quad, used for collisions. the ChainQuad is serialised in serial(). _OrderedChains must be OK. More...
|
void | testCollision (CCollisionSurfaceTemp &cst, const NLMISC::CAABBox &bboxMove, const NLMISC::CVector2f &transBase) const |
| add possible collisions chains to the temp result. More...
|
Protected Attributes |
std::vector< COrderedChain > | _OrderedChains |
| The chains insinde the zone. More...
|
std::vector< COrderedChain3f > | _FullOrderedChains |
std::vector< CChain > | _Chains |
| The chains insinde the zone. More...
|
std::vector< CRetrievableSurface > | _Surfaces |
| The surfaces inside the zone. More...
|
NLMISC::CAABBox | _BBox |
| The bbox of the local retriever. More...
|
std::vector< CTip > | _Tips |
| The tips making links between different chains. More...
|
std::vector< uint16 > | _BorderChains |
| The chains on the edges of the zone. More...
|
std::vector< CTopology > | _Topologies [NumCreatureModels] |
| The topologies within the zone. More...
|
CChainQuad | _ChainQuad |
| For collisions, the chainquad. More...
|
EType | _Type |
| The type of the retriever. More...
|
|
CExteriorMesh | _ExteriorMesh |
| The exterior mesh, for collisions. More...
|
std::vector< NLMISC::CVector > | _InteriorVertices |
| The vertices of the collision mesh. More...
|
std::vector< CInteriorFace > | _InteriorFaces |
| The faces of the collision mesh. More...
|
CFaceGrid | _FaceGrid |
| The face selection grid. More...
|
std::string | _Id |
| An human readable identifier of the retriever. More...
|
Static Protected Attributes |
const float | _TipThreshold = 0.1f |
| The tip recognition threshold. More...
|
const float | _EdgeTipThreshold = 0.1f |
| The tip recognition threshold. More...
|
Friends |
class | CRetrieverInstance |
Detailed Description
A surface retriever, located by its bounding box.
-
Author:
-
Benjamin Legros , Nevrax France
-
Date:
-
2001
Definition at line 63 of file local_retriever.h.
Member Enumeration Documentation
enum NLPACS::CLocalRetriever::EType
|
|
|
The different types of retriever (landscape or interior.).
-
Author:
-
Benjamin Legros , Nevrax France
-
Date:
-
2001
-
Enumeration values:
-
Definition at line 160 of file local_retriever.h.
Referenced by getType, and setType. |
Constructor & Destructor Documentation
NLPACS::CLocalRetriever::CLocalRetriever |
( |
|
) |
|
|
Member Function Documentation
|
Adds a chain to the local retriever, using the vertices of the chain, the left and right surfaces id and the edge on which the chain is stuck.
|
|
Adds a surface to the local retriever, using its features. Returns the id of the newly created surface.
Definition at line 292 of file local_retriever.cpp.
References _Surfaces, and level. |
void NLPACS::CLocalRetriever::buildInteriorSurfaceBBoxes |
( |
std::vector< NLMISC::CAABBox > & |
surfaceBBoxes |
) |
const |
|
void NLPACS::CLocalRetriever::computeCollisionChainQuad |
( |
|
) |
|
|
void NLPACS::CLocalRetriever::computeLoopsAndTips |
( |
|
) |
|
|
|
Builds tips.
Definition at line 423 of file local_retriever.cpp.
References _Chains, _Surfaces, _Tips, dumpSurface, getNextChain, getPreviousChain, getStartVector, getStopVector, nlerror, nlinfo, and nlwarning. |
void NLPACS::CLocalRetriever::computeTopologies |
( |
|
) |
|
|
float NLPACS::CLocalRetriever::distanceToBorder |
( |
const ULocalPosition & |
pos |
) |
const |
|
void NLPACS::CLocalRetriever::findBorderChains |
( |
|
) |
|
|
|
Finds a path in a given surface, from the point A to the point B.
|
void NLPACS::CLocalRetriever::flushFullOrderedChains |
( |
|
) |
[inline] |
|
uint16 NLPACS::CLocalRetriever::getBorderChain |
( |
uint |
n |
) |
const [inline] |
|
const std::vector<uint16>& NLPACS::CLocalRetriever::getBorderChains |
( |
|
) |
const [inline] |
|
const CChain& NLPACS::CLocalRetriever::getChain |
( |
uint |
n |
) |
const [inline] |
|
CChainQuad& NLPACS::CLocalRetriever::getChainQuad |
( |
|
) |
[inline] |
|
const std::vector<CChain>& NLPACS::CLocalRetriever::getChains |
( |
|
) |
const [inline] |
|
const CExteriorMesh& NLPACS::CLocalRetriever::getExteriorMesh |
( |
|
) |
const [inline] |
|
const std::vector<COrderedChain3f>& NLPACS::CLocalRetriever::getFullOrderedChains |
( |
|
) |
const [inline] |
|
float NLPACS::CLocalRetriever::getHeight |
( |
const ULocalPosition & |
position |
) |
const |
|
const std::string& NLPACS::CLocalRetriever::getIdentifier |
( |
|
) |
const [inline] |
|
std::vector<CInteriorFace>& NLPACS::CLocalRetriever::getInteriorFaces |
( |
|
) |
[inline] |
|
const std::vector<CInteriorFace>& NLPACS::CLocalRetriever::getInteriorFaces |
( |
|
) |
const [inline] |
|
std::vector<NLMISC::CVector>& NLPACS::CLocalRetriever::getInteriorVertices |
( |
|
) |
[inline] |
|
const std::vector<NLMISC::CVector>& NLPACS::CLocalRetriever::getInteriorVertices |
( |
|
) |
const [inline] |
|
const COrderedChain& NLPACS::CLocalRetriever::getOrderedChain |
( |
uint |
n |
) |
const [inline] |
|
const std::vector<COrderedChain>& NLPACS::CLocalRetriever::getOrderedChains |
( |
|
) |
const [inline] |
|
const CVector & NLPACS::CLocalRetriever::getStartVector |
( |
uint32 |
chain, |
|
|
sint32 |
surface |
|
) |
const |
|
const CVector & NLPACS::CLocalRetriever::getStartVector |
( |
uint32 |
chain |
) |
const |
|
const CVector & NLPACS::CLocalRetriever::getStopVector |
( |
uint32 |
chain, |
|
|
sint32 |
surface |
|
) |
const |
|
const CVector & NLPACS::CLocalRetriever::getStopVector |
( |
uint32 |
chain |
) |
const |
|
const std::vector<CRetrievableSurface>& NLPACS::CLocalRetriever::getSurfaces |
( |
|
) |
const [inline] |
|
const CTip& NLPACS::CLocalRetriever::getTip |
( |
uint |
n |
) |
const [inline] |
|
const std::vector<CTip>& NLPACS::CLocalRetriever::getTips |
( |
|
) |
const [inline] |
|
EType NLPACS::CLocalRetriever::getType |
( |
void |
|
) |
const [inline] |
|
void NLPACS::CLocalRetriever::initFaceGrid |
( |
|
) |
|
|
bool NLPACS::CLocalRetriever::insurePosition |
( |
ULocalPosition & |
local |
) |
const |
|
|
Assures a position is really inside a surface (and independent from any accuracy issue) and returns true if the position was moved.
Definition at line 851 of file local_retriever.cpp.
References _Chains, _OrderedChains, _Surfaces, NLPACS::ULocalPosition::Estimation, NLPACS::CRetrievableSurface::getChain, NLPACS::CRetrievableSurface::getChains, NLPACS::COrderedChain::getVertices, InsurePositionThreshold, NLPACS::COrderedChain::isForward, nlassert, nlwarning, NLPACS::CRetrieverInstance::snapVector, NLPACS::ULocalPosition::Surface, NLMISC::CVector::x, and NLMISC::CVector::y. |
|
Serialises the CLocalRetriever.
Definition at line 797 of file local_retriever.cpp.
References _BBox, _BorderChains, _ChainQuad, _Chains, _ExteriorMesh, _FaceGrid, _FullOrderedChains, _Id, _InteriorFaces, _InteriorVertices, _OrderedChains, _Surfaces, _Tips, _Topologies, _Type, NLPACS::NumCreatureModels, NLMISC::IStream::serial, NLMISC::IStream::serialCont, NLMISC::IStream::serialEnum, and NLMISC::IStream::serialVersion. |
void NLPACS::CLocalRetriever::setBBox |
( |
const NLMISC::CAABBox & |
bbox |
) |
[inline] |
|
void NLPACS::CLocalRetriever::setExteriorMesh |
( |
const CExteriorMesh & |
em |
) |
[inline] |
|
void NLPACS::CLocalRetriever::setIdentifier |
( |
const std::string & |
id |
) |
[inline] |
|
void NLPACS::CLocalRetriever::setStartTip |
( |
uint32 |
chain, |
|
|
sint32 |
surface, |
|
|
uint16 |
startTip |
|
) |
|
|
void NLPACS::CLocalRetriever::setType |
( |
EType |
type |
) |
[inline] |
|
void NLPACS::CLocalRetriever::snapToInteriorGround |
( |
ULocalPosition & |
position, |
|
|
bool & |
snapped |
|
) |
const |
|
void NLPACS::CLocalRetriever::sortTips |
( |
|
) |
|
|
|
Sorts chains references inside the tips. NOT IMPLEMENTED YET.
Definition at line 679 of file local_retriever.cpp. |
void NLPACS::CLocalRetriever::translate |
( |
const NLMISC::CVector & |
translation |
) |
|
|
void NLPACS::CLocalRetriever::unify |
( |
|
) |
|
|
void NLPACS::CLocalRetriever::updateChainIds |
( |
|
) |
|
|
Friends And Related Function Documentation
friend class CRetrieverInstance [friend]
|
|
Member Data Documentation
std::vector<uint16> NLPACS::CLocalRetriever::_BorderChains [protected]
|
|
CChainQuad NLPACS::CLocalRetriever::_ChainQuad [protected]
|
|
std::vector<CChain> NLPACS::CLocalRetriever::_Chains [protected]
|
|
|
The chains insinde the zone.
Definition at line 191 of file local_retriever.h.
Referenced by buildSurfacePolygons, computeLoopsAndTips, computeTopologies, distanceToBorder, dumpSurface, findBorderChains, getChain, getChains, getNextChain, getPreviousChain, getStartTip, getStartVector, getStopTip, getStopVector, insurePosition, retrievePosition, serial, setStartTip, setStopTip, unify, and updateChainIds. |
const float NLPACS::CLocalRetriever::_EdgeTipThreshold = 0.1f [static, protected]
|
|
CFaceGrid NLPACS::CLocalRetriever::_FaceGrid [protected]
|
|
std::vector<COrderedChain3f> NLPACS::CLocalRetriever::_FullOrderedChains [protected]
|
|
std::string NLPACS::CLocalRetriever::_Id [protected]
|
|
std::vector<CInteriorFace> NLPACS::CLocalRetriever::_InteriorFaces [protected]
|
|
std::vector<NLMISC::CVector> NLPACS::CLocalRetriever::_InteriorVertices [protected]
|
|
std::vector<COrderedChain> NLPACS::CLocalRetriever::_OrderedChains [protected]
|
|
|
The chains insinde the zone.
Definition at line 187 of file local_retriever.h.
Referenced by buildSurfacePolygons, computeCollisionChainQuad, distanceToBorder, dumpSurface, getOrderedChain, getOrderedChains, insurePosition, retrievePosition, serial, translate, and unify. |
|
The surfaces inside the zone.
Definition at line 194 of file local_retriever.h.
Referenced by addSurface, buildInteriorSurfaceBBoxes, buildSurfacePolygons, computeLoopsAndTips, computeTopologies, distanceToBorder, dumpSurface, getHeight, getNextChain, getPreviousChain, getSurface, getSurfaces, insurePosition, serial, translate, and updateChainIds. |
std::vector<CTip> NLPACS::CLocalRetriever::_Tips [protected]
|
|
const float NLPACS::CLocalRetriever::_TipThreshold = 0.1f [static, protected]
|
|
std::vector<CTopology> NLPACS::CLocalRetriever::_Topologies[NumCreatureModels] [protected]
|
|
EType NLPACS::CLocalRetriever::_Type [protected]
|
|
The documentation for this class was generated from the following files:
|
|