# 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  

NLPACS::COrderedChain Class Reference

A list of ordered vertices, partially delimiting 2 different surfaces. More...

#include <chain.h>

List of all members.

Public Methods

const std::vector< CVector2s > & getVertices () const
 Returns the vertices of the chain. More...

bool isForward () const
 Returns true if the chain should be accessed forward within the parent CChain (see _Forward.). More...

uint16 getParentId () const
 Returns the parent chain Id of this ordered chain. More...

uint16 getIndexInParent () const
 Returns the index of the ochain within the parent chain. More...

float getLength () const
 Returns the length of the chain. More...

const CVector2soperator[] (uint n) const
const CVector2sgetMin () const
 Returns the min vector of the chain. More...

const CVector2sgetMax () const
 Returns the max vector of the chain. More...

void translate (const NLMISC::CVector &translation)
void pack (const COrderedChain3f &chain)
void computeMinMax ()
void traverse (sint from, sint to, bool forward, std::vector< CVector2s > &path) const
float distance (const NLMISC::CVector &position) const
void serial (NLMISC::IStream &f)

Protected Attributes

std::vector< CVector2s_Vertices
 The vertices of the chain, ordered following x growth. More...

bool _Forward
 Set if the chain should be read forward within the parent CChain (for sequential access to vertices.). More...

uint16 _ParentId
 The parent chain Id. More...

uint16 _IndexInParent
 The index of the ochain within the parent chain. More...

float _Length
 The length of the chain. More...

CVector2s _Min
 The min and max vertices of the chain. More...

CVector2s _Max
 The min and max vertices of the chain. More...


Friends

class CChain
class CRetrievableSurface


Detailed Description

A list of ordered vertices, partially delimiting 2 different surfaces.

In the vertex list, we consider the following order v1 < v2 iff v1.x < v2.x || v1.x == v2.x && v1.y < v2.y The vertices composing the chain are only 2 coordinates (x, y) wide, packed on 16 bits each (which is 4 bytes per vertex.) This is the packed form of the COrderedChain3f. (4 bytes per vertex.)

Author:
Benjamin Legros , Nevrax France
Date:
2001

Definition at line 107 of file chain.h.


Member Function Documentation

void NLPACS::COrderedChain::computeMinMax   [inline]
 

Definition at line 178 of file chain.h.

References _Max, _Min, _Vertices, and uint.

float NLPACS::COrderedChain::distance const NLMISC::CVector   position const
 

Definition at line 115 of file chain.cpp.

References _Vertices, NLAISCRIPT::l, len, and uint.

uint16 NLPACS::COrderedChain::getIndexInParent   const [inline]
 

Returns the index of the ochain within the parent chain.

Definition at line 142 of file chain.h.

References _IndexInParent, and uint16.

float NLPACS::COrderedChain::getLength   const [inline]
 

Returns the length of the chain.

Definition at line 145 of file chain.h.

References _Length.

const CVector2s& NLPACS::COrderedChain::getMax   const [inline]
 

Returns the max vector of the chain.

Definition at line 154 of file chain.h.

References _Max.

const CVector2s& NLPACS::COrderedChain::getMin   const [inline]
 

Returns the min vector of the chain.

Definition at line 151 of file chain.h.

References _Min.

uint16 NLPACS::COrderedChain::getParentId   const [inline]
 

Returns the parent chain Id of this ordered chain.

Definition at line 139 of file chain.h.

References _ParentId, and uint16.

const std::vector<CVector2s>& NLPACS::COrderedChain::getVertices   const [inline]
 

Returns the vertices of the chain.

Definition at line 133 of file chain.h.

References _Vertices.

Referenced by NLPACS::CLocalRetriever::insurePosition.

bool NLPACS::COrderedChain::isForward   const [inline]
 

Returns true if the chain should be accessed forward within the parent CChain (see _Forward.).

Definition at line 136 of file chain.h.

References _Forward.

Referenced by NLPACS::CLocalRetriever::insurePosition.

const CVector2s& NLPACS::COrderedChain::operator[] uint    n const [inline]
 

Definition at line 148 of file chain.h.

References _Vertices, and uint.

void NLPACS::COrderedChain::pack const COrderedChain3f   chain [inline]
 

Definition at line 161 of file chain.h.

References _Forward, _IndexInParent, _Max, _Min, _ParentId, _Vertices, and uint.

void NLPACS::COrderedChain::serial NLMISC::IStream   f
 

Definition at line 158 of file chain.cpp.

References _Forward, _IndexInParent, _Length, _Max, _Min, _ParentId, _Vertices, sint, and uint.

void NLPACS::COrderedChain::translate const NLMISC::CVector   translation
 

Definition at line 83 of file chain.cpp.

References _Vertices, and uint.

void NLPACS::COrderedChain::traverse sint    from,
sint    to,
bool    forward,
std::vector< CVector2s > &    path
const
 


Friends And Related Function Documentation

friend class CChain [friend]
 

Definition at line 110 of file chain.h.

friend class CRetrievableSurface [friend]
 

Definition at line 111 of file chain.h.


Member Data Documentation

bool NLPACS::COrderedChain::_Forward [protected]
 

Set if the chain should be read forward within the parent CChain (for sequential access to vertices.).

Definition at line 117 of file chain.h.

Referenced by isForward, pack, and serial.

uint16 NLPACS::COrderedChain::_IndexInParent [protected]
 

The index of the ochain within the parent chain.

Definition at line 123 of file chain.h.

Referenced by getIndexInParent, pack, and serial.

float NLPACS::COrderedChain::_Length [protected]
 

The length of the chain.

Definition at line 126 of file chain.h.

Referenced by getLength, and serial.

CVector2s NLPACS::COrderedChain::_Max [protected]
 

The min and max vertices of the chain.

Definition at line 129 of file chain.h.

Referenced by computeMinMax, getMax, pack, and serial.

CVector2s NLPACS::COrderedChain::_Min [protected]
 

The min and max vertices of the chain.

Definition at line 129 of file chain.h.

Referenced by computeMinMax, getMin, pack, and serial.

uint16 NLPACS::COrderedChain::_ParentId [protected]
 

The parent chain Id.

Definition at line 120 of file chain.h.

Referenced by getParentId, pack, and serial.

std::vector<CVector2s> NLPACS::COrderedChain::_Vertices [protected]
 

The vertices of the chain, ordered following x growth.

Definition at line 114 of file chain.h.

Referenced by computeMinMax, distance, getVertices, operator[], pack, serial, and translate.


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