|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLPACS::CRetrieverInstance Class ReferenceAn instance of a local retriever.
More...
#include <retriever_instance.h>
List of all members.
Public Methods |
| CRetrieverInstance () |
| Default constructor. More...
|
void | reset () |
| Resets the instance. This doesn't affect any neighboring instances... More...
|
void | resetLinks (uint32 id) |
| Resets links to the given instance. This doesn't affect any neighbor. More...
|
void | resetLinks () |
| Resets links of the instance. This doesn't affect any neighboring instances... More...
|
sint32 | getInstanceId () const |
| Returns the id of this instance. More...
|
sint32 | getRetrieverId () const |
| Returns the id of the retriever associated to this instance. More...
|
uint8 | getOrientation () const |
| Returns the orientation of the instance in relation to the retriever. More...
|
NLMISC::CVector | getOrigin () const |
| Returns the origin translation of this instance. More...
|
CLocalRetriever::EType | getType () const |
| Returns the type of the instance. More...
|
std::vector< sint32 > | getNeighbors () const |
| Gets the neighbors. More...
|
sint32 | getNeighbor (uint n) const |
| Gets the id of the neighbor on the edge. More...
|
const std::vector< CLink > & | getBorderChainLinks () const |
| Gets the ids of the neighbor chains on the given edge. More...
|
CLink | getBorderChainLink (uint n) const |
| Gets the id of the nth neighbor chain on the given edge. More...
|
uint8 | getInstanceEdge (uint8 retrieverEdge) const |
| Returns the number of the edge on the instance corresponding to the edge on the retriever. More...
|
uint8 | getRetrieverEdge (uint8 instanceEdge) const |
| Returns the number of the edge on the retriever corresponding to the edge on the instance. More...
|
const NLMISC::CAABBox & | getBBox () const |
| Returns the bbox of the instance (using the translation and orientation of the retriever). More...
|
void | init (const CLocalRetriever &retriever) |
| Inits the instance (after a serial for instance.). More...
|
void | initEdgeQuad (CGlobalRetriever &gr) |
| Inits the edgequad (only for Interior instances, and only after all the landscape instances have been built. More...
|
void | linkEdgeQuad (CGlobalRetriever &gr) |
| link the edge quad of the interior with the the landscape instances. More...
|
void | make (sint32 instanceId, sint32 retrieverId, const CLocalRetriever &retriever, uint8 orientation, const NLMISC::CVector &origin) |
| Builds the instance. More...
|
void | link (CRetrieverInstance &neighbor, const std::vector< CLocalRetriever > &retrievers) |
| Links the instance to a given neighbor on the given edge. More...
|
void | unlink (std::vector< CRetrieverInstance > &instances) |
| Unlinks the instance. The neighbor instance are AFFECTED. More...
|
void | retrievePosition (const NLMISC::CVector &estimated, const CLocalRetriever &retriever, CCollisionSurfaceTemp &cst) const |
| Retrieves the position in the instance from an estimated position. More...
|
void | retrievePosition (const NLMISC::CVectorD &estimated, const CLocalRetriever &retriever, CCollisionSurfaceTemp &cst) const |
| Retrieves the position in the instance from an estimated position (double instead.) WARNING: the estimated position is a GLOBAL position, and the returned position is a LOCAL position (to the retriever). More...
|
void | snapToInteriorGround (ULocalPosition &position, const CLocalRetriever &retriever) const |
| For the interior instances, snaps the point to the ground. More...
|
void | snap (ULocalPosition &position, const CLocalRetriever &retriever) const |
void | serial (NLMISC::IStream &f) |
| Serialises this CRetrieverInstance. More...
|
NLMISC::CVector | getLocalPosition (const NLMISC::CVector &globalPosition) const |
| Computes the position in the local axis of the retriever from a global position. More...
|
NLMISC::CVector | getLocalPosition (const NLMISC::CVectorD &globalPosition) const |
| Computes the position in the local axis of the retriever from a global position. More...
|
NLMISC::CVector | getGlobalPosition (const NLMISC::CVector &localPosition) const |
| Computes the position in the global axis from a local position (in the retriever axis). More...
|
NLMISC::CVectorD | getDoubleGlobalPosition (const NLMISC::CVector &localPosition) const |
| Computes the position (as double) in the global axis from a local position (in the retriever axis). More...
|
|
void | testExteriorCollision (CCollisionSurfaceTemp &cst, const NLMISC::CAABBox &bboxMoveLocal, const NLMISC::CVector2f &transBase, const CLocalRetriever &localRetriever) const |
| Test for collisions with the exterior mesh of an interior instance. More...
|
Static Public Methods |
|
void | snapVector (CVector &v) |
| Snap a vector at 1mm (1/1024). More...
|
void | snapVector (CVector2f &v) |
| Snap a vector at 1mm (1/1024). More...
|
Protected Attributes |
std::vector< CAStarNodeInfo > | _NodesInformation |
sint32 | _InstanceId |
| The id of this instance. More...
|
sint32 | _RetrieverId |
| The id of the retrievable surface pattern. More...
|
CLocalRetriever::EType | _Type |
| The type of the instance (see CLocalRetriever::_Type). More...
|
|
uint8 | _Orientation |
NLMISC::CVector | _Origin |
NLMISC::CAABBox | _BBox |
| The BBox of the instance. More...
|
|
std::vector< sint32 > | _Neighbors |
| The instance ids of the neighbors. More...
|
std::vector< CLink > | _BorderChainLinks |
| The neighbor chains on the border. More...
|
|
CEdgeQuad | _ExteriorEdgeQuad |
| The edges of the exterior collision mesh, stored in a quad grid. More...
|
Friends |
class | CGlobalRetriever |
Detailed Description
An instance of a local retriever.
It defines a physical/geographic zone of landscape. -
Author:
-
Benjamin Legros , Nevrax France
-
Date:
-
2001
Definition at line 56 of file retriever_instance.h.
Constructor & Destructor Documentation
NLPACS::CRetrieverInstance::CRetrieverInstance |
( |
|
) |
|
|
Member Function Documentation
const NLMISC::CAABBox& NLPACS::CRetrieverInstance::getBBox |
( |
|
) |
const [inline] |
|
|
Returns the bbox of the instance (using the translation and orientation of the retriever).
Definition at line 196 of file retriever_instance.h. |
CLink NLPACS::CRetrieverInstance::getBorderChainLink |
( |
uint |
n |
) |
const [inline] |
|
const std::vector<CLink>& NLPACS::CRetrieverInstance::getBorderChainLinks |
( |
|
) |
const [inline] |
|
CVectorD NLPACS::CRetrieverInstance::getDoubleGlobalPosition |
( |
const NLMISC::CVector & |
localPosition |
) |
const |
|
CVector NLPACS::CRetrieverInstance::getGlobalPosition |
( |
const NLMISC::CVector & |
localPosition |
) |
const |
|
uint8 NLPACS::CRetrieverInstance::getInstanceEdge |
( |
uint8 |
retrieverEdge |
) |
const [inline] |
|
sint32 NLPACS::CRetrieverInstance::getInstanceId |
( |
|
) |
const [inline] |
|
CVector NLPACS::CRetrieverInstance::getLocalPosition |
( |
const NLMISC::CVectorD & |
globalPosition |
) |
const |
|
CVector NLPACS::CRetrieverInstance::getLocalPosition |
( |
const NLMISC::CVector & |
globalPosition |
) |
const |
|
sint32 NLPACS::CRetrieverInstance::getNeighbor |
( |
uint |
n |
) |
const [inline] |
|
std::vector<sint32> NLPACS::CRetrieverInstance::getNeighbors |
( |
|
) |
const [inline] |
|
uint8 NLPACS::CRetrieverInstance::getOrientation |
( |
|
) |
const [inline] |
|
uint8 NLPACS::CRetrieverInstance::getRetrieverEdge |
( |
uint8 |
instanceEdge |
) |
const [inline] |
|
sint32 NLPACS::CRetrieverInstance::getRetrieverId |
( |
|
) |
const [inline] |
|
void NLPACS::CRetrieverInstance::init |
( |
const CLocalRetriever & |
retriever |
) |
|
|
void NLPACS::CRetrieverInstance::link |
( |
CRetrieverInstance & |
neighbor, |
|
|
const std::vector< CLocalRetriever > & |
retrievers |
|
) |
|
|
|
Links the instance to a given neighbor on the given edge.
Referenced by linkEdgeQuad. |
|
Builds the instance.
Definition at line 105 of file retriever_instance.cpp.
References _BBox, _InstanceId, _Orientation, _Origin, _RetrieverId, NLMISC::CAABBox::getCenter, NLMISC::CAABBox::getHalfSize, init, nlerror, nlwarning, NLMISC::CAABBox::setCenter, and NLMISC::CAABBox::setHalfSize. |
void NLPACS::CRetrieverInstance::reset |
( |
|
) |
|
|
void NLPACS::CRetrieverInstance::resetLinks |
( |
|
) |
|
|
void NLPACS::CRetrieverInstance::resetLinks |
( |
uint32 |
id |
) |
|
|
|
Retrieves the position in the instance from an estimated position.
WARNING: the estimated position is a GLOBAL position, and the returned position is a LOCAL position (to the retriever).
Definition at line 281 of file retriever_instance.cpp. |
|
Serialises this CRetrieverInstance.
Definition at line 703 of file retriever_instance.cpp.
References _BBox, _BorderChainLinks, _ExteriorEdgeQuad, _InstanceId, _Neighbors, _NodesInformation, _Orientation, _Origin, _RetrieverId, _Type, NLMISC::IStream::isReading, NLMISC::IStream::serial, NLMISC::IStream::serialCont, NLMISC::IStream::serialEnum, and NLMISC::IStream::serialVersion. |
void NLPACS::CRetrieverInstance::snapVector |
( |
CVector2f & |
v |
) |
[inline, static] |
|
|
Snap a vector at 1mm (1/1024).
v must be a local position (ie range from -80 to +240). Doing this, we are sure we have precision of 9+10 bits, which is enough for 24 bits float precision.
Definition at line 270 of file retriever_instance.h.
References NLPACS::SnapPrecision, and v. |
void NLPACS::CRetrieverInstance::snapVector |
( |
CVector & |
v |
) |
[inline, static] |
|
void NLPACS::CRetrieverInstance::unlink |
( |
std::vector< CRetrieverInstance > & |
instances |
) |
|
|
Friends And Related Function Documentation
friend class CGlobalRetriever [friend]
|
|
Member Data Documentation
std::vector<CLink> NLPACS::CRetrieverInstance::_BorderChainLinks [protected]
|
|
CEdgeQuad NLPACS::CRetrieverInstance::_ExteriorEdgeQuad [protected]
|
|
sint32 NLPACS::CRetrieverInstance::_InstanceId [protected]
|
|
std::vector<sint32> NLPACS::CRetrieverInstance::_Neighbors [protected]
|
|
std::vector<CAStarNodeInfo> NLPACS::CRetrieverInstance::_NodesInformation [protected]
|
|
uint8 NLPACS::CRetrieverInstance::_Orientation [protected]
|
|
sint32 NLPACS::CRetrieverInstance::_RetrieverId [protected]
|
|
The documentation for this class was generated from the following files:
|
|