# 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::CChainQuad Class Reference

a quadgrid of list of edge chain. More...

#include <chain_quad.h>

List of all members.

Public Methods

 CChainQuad ()
 Constructor. More...

 CChainQuad (const CChainQuad &o)
 Copy Constructor. More...

 ~CChainQuad ()
 Destructor. More...

CChainQuad & operator= (const CChainQuad &o)
 operator=. More...

void build (const std::vector< COrderedChain > &ochains)
 build a chain quad, with a list of OrderedChains. More...

sint selectEdges (const NLMISC::CAABBox &bbox, CCollisionSurfaceTemp &cst) const
 look in the quad to select a list of chain from a bbox. More...

sint selectEdges (CVector start, CVector end, CCollisionSurfaceTemp &cst) const
 look in the quad to select a list of chain from a bbox. More...

void serial (NLMISC::IStream &f)
 serial. More...


Private Methods

void addEdgeToQuadNode (std::list< CEdgeChainEntry > &quadNode, sint ochainId, sint edgeId)
void getGridBounds (sint32 &x0, sint32 &y0, sint32 &x1, sint32 &y1, const CVector &minP, const CVector &maxP) const

Private Attributes

std::vector< uint8 * > _Quad
 W*H pointers on array of CEdgeChainEntry. More...

uint32 _Width
 Width of the quadgrid. More...

uint32 _Height
 Height of the quadgrid. More...

sint32 _X
 Postion of the chainquad. More...

sint32 _Y
 Postion of the chainquad. More...

uint8_QuadData
 Single memory block of CEdgeChainEntry chains. More...

uint32 _QuadDataLen
 size (in byte) of _QuadData. More...


Static Private Attributes

const float _QuadElementSize = 4


Detailed Description

a quadgrid of list of edge chain.

Author:
Lionel Berenguier , Nevrax France
Date:
2001

Definition at line 59 of file chain_quad.h.


Constructor & Destructor Documentation

NLPACS::CChainQuad::CChainQuad  
 

Constructor.

Definition at line 43 of file chain_quad.cpp.

References _QuadData, and _QuadDataLen.

NLPACS::CChainQuad::CChainQuad const CChainQuad &    o
 

Copy Constructor.

Definition at line 56 of file chain_quad.cpp.

References _QuadData, and _QuadDataLen.

NLPACS::CChainQuad::~CChainQuad  
 

Destructor.

Definition at line 49 of file chain_quad.cpp.

References _QuadData, and _QuadDataLen.


Member Function Documentation

void NLPACS::CChainQuad::addEdgeToQuadNode std::list< CEdgeChainEntry > &    quadNode,
sint    ochainId,
sint    edgeId
[private]
 

Definition at line 261 of file chain_quad.cpp.

References min.

Referenced by build.

void NLPACS::CChainQuad::build const std::vector< COrderedChain > &    ochains
 

build a chain quad, with a list of OrderedChains.

Definition at line 122 of file chain_quad.cpp.

References _Height, _Quad, _QuadData, _QuadDataLen, _QuadElementSize, _Width, _X, _Y, addEdgeToQuadNode, NLMISC::contReset, getGridBounds, x, and y.

void NLPACS::CChainQuad::getGridBounds sint32   x0,
sint32   y0,
sint32   x1,
sint32   y1,
const CVector &    minP,
const CVector &    maxP
const [private]
 

Definition at line 102 of file chain_quad.cpp.

References _Height, _QuadElementSize, _Width, _X, _Y, and min.

Referenced by build, and selectEdges.

CChainQuad & NLPACS::CChainQuad::operator= const CChainQuad &    o
 

operator=.

Definition at line 63 of file chain_quad.cpp.

References _Height, _Quad, _QuadData, _QuadDataLen, _Width, _X, and _Y.

sint NLPACS::CChainQuad::selectEdges CVector    start,
CVector    end,
CCollisionSurfaceTemp   cst
const
 

look in the quad to select a list of chain from a bbox.

NB: The outpout do not contains any redundant edge. A OChain appears only one time in the result.

Parameters:
start  the starting point of the selection segment.
end  the ending point of the selection segment.
cst  the array of CEdgeChainEntry to fill. contain also OChainLUT, an array for internal use. In: must be filled with 0xFFFF. Out: still filled with 0xFFFF.
Returns:
number of edgechain found. stored in cst.EdgeChainEntries (array cleared first).

Definition at line 356 of file chain_quad.cpp.

References _Height, _Quad, _QuadElementSize, _Width, _X, _Y, id, min, x, and y.

sint NLPACS::CChainQuad::selectEdges const NLMISC::CAABBox   bbox,
CCollisionSurfaceTemp   cst
const
 

look in the quad to select a list of chain from a bbox.

NB: The outpout do not contains any redundant edge. A OChain appears only one time in the result.

Parameters:
bbox  the area of interest.
cst  the array of CEdgeChainEntry to fill. contain also OChainLUT, an array for internal use. In: must be filled with 0xFFFF. Out: still filled with 0xFFFF.
Returns:
number of edgechain found. stored in cst.EdgeChainEntries (array cleared first).

Definition at line 289 of file chain_quad.cpp.

References _Quad, _Width, getGridBounds, NLMISC::CAABBox::getMax, NLMISC::CAABBox::getMin, id, min, x, and y.

void NLPACS::CChainQuad::serial NLMISC::IStream   f
 

serial.

Definition at line 473 of file chain_quad.cpp.

References _Height, _Quad, _QuadData, _QuadDataLen, _Width, _X, _Y, NLMISC::contReset, NLMISC::IStream::isReading, NLMISC::IStream::serial, and NLMISC::IStream::serialVersion.


Member Data Documentation

uint32 NLPACS::CChainQuad::_Height [private]
 

Height of the quadgrid.

Definition at line 109 of file chain_quad.h.

Referenced by build, getGridBounds, operator=, selectEdges, and serial.

std::vector<uint8*> NLPACS::CChainQuad::_Quad [private]
 

W*H pointers on array of CEdgeChainEntry.

NULL if no edge in this quad. Each array is 1xuint16(LEN) + LEN*CEdgeChainEntry.

Definition at line 105 of file chain_quad.h.

Referenced by build, operator=, selectEdges, and serial.

uint8* NLPACS::CChainQuad::_QuadData [private]
 

Single memory block of CEdgeChainEntry chains.

Definition at line 113 of file chain_quad.h.

Referenced by build, CChainQuad, operator=, serial, and ~CChainQuad.

uint32 NLPACS::CChainQuad::_QuadDataLen [private]
 

size (in byte) of _QuadData.

Definition at line 115 of file chain_quad.h.

Referenced by build, CChainQuad, operator=, serial, and ~CChainQuad.

const float NLPACS::CChainQuad::_QuadElementSize = 4 [static, private]
 

Definition at line 39 of file chain_quad.cpp.

Referenced by build, getGridBounds, and selectEdges.

uint32 NLPACS::CChainQuad::_Width [private]
 

Width of the quadgrid.

Definition at line 107 of file chain_quad.h.

Referenced by build, getGridBounds, operator=, selectEdges, and serial.

sint32 NLPACS::CChainQuad::_X [private]
 

Postion of the chainquad.

Definition at line 111 of file chain_quad.h.

Referenced by build, getGridBounds, operator=, selectEdges, and serial.

sint32 NLPACS::CChainQuad::_Y [private]
 

Postion of the chainquad.

Definition at line 111 of file chain_quad.h.

Referenced by build, getGridBounds, operator=, selectEdges, and serial.


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