NLPACS::CEdgeQuad Class Reference

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

#include <edge_quad.h>

List of all members.

Public Member Functions

 CEdgeQuad ()
 Constructor.
 CEdgeQuad (const CEdgeQuad &o)
 Copy Constructor.
 ~CEdgeQuad ()
 Destructor.
CEdgeQuadoperator= (const CEdgeQuad &o)
 operator=.
void clear ()
 clear
void build (const CExteriorMesh &em, const CGlobalRetriever &global, CCollisionSurfaceTemp &cst, uint32 thisInstance)
 build a chain quad, with a list of exterior Edges and the global retriever
sint selectEdges (const NLMISC::CAABBox &bbox, CCollisionSurfaceTemp &cst) const
 look in the quad to select a list of chain from a bbox.
sint selectEdges (CVector start, CVector end, CCollisionSurfaceTemp &cst) const
 look in the quad to select a list of chain from a line.
const std::vector
< CExteriorEdgeEntry > & 
getEdgeEntries () const
 Get the whole set of edge entries.
const CExteriorEdgeEntrygetEdgeEntry (uint entry) const
 Get a single edge entry.
void serial (NLMISC::IStream &f)
 serial.
void removeLinks (sint32 instanceId)
void removeLinks ()

Private Member Functions

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 CExteriorEdgeEntry indexes.
std::vector< CExteriorEdgeEntry_EdgeEntries
 The real exterior edge entries.
uint32 _Width
 Width of the quadgrid.
uint32 _Height
 Height of the quadgrid.
sint32 _X
 Postion of the chainquad.
sint32 _Y
uint8_QuadData
 Single memory block of CExteriorEdgeEntry chains.
uint32 _QuadDataLen
 size (in byte) of _QuadData.

Static Private Attributes

static const float _QuadElementSize = 4

Detailed Description

a quadgrid of list of edge chain.

Author:
Benjamin Legros
Nevrax France
Date:
2001

Definition at line 59 of file edge_quad.h.


Constructor & Destructor Documentation

NLPACS::CEdgeQuad::CEdgeQuad (  ) 

Constructor.

Definition at line 42 of file edge_quad.cpp.

References _QuadData, and _QuadDataLen.

NLPACS::CEdgeQuad::CEdgeQuad ( const CEdgeQuad o  ) 

Copy Constructor.

Definition at line 53 of file edge_quad.cpp.

References _QuadData, and _QuadDataLen.

NLPACS::CEdgeQuad::~CEdgeQuad (  ) 

Destructor.

Definition at line 48 of file edge_quad.cpp.

References clear().


Member Function Documentation

void NLPACS::CEdgeQuad::build ( const CExteriorMesh em,
const CGlobalRetriever global,
CCollisionSurfaceTemp cst,
uint32  thisInstance 
)
void NLPACS::CEdgeQuad::clear ( void   ) 

clear

Definition at line 98 of file edge_quad.cpp.

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

Referenced by NLPACS::CRetrieverInstance::reset(), and ~CEdgeQuad().

const std::vector<CExteriorEdgeEntry>& NLPACS::CEdgeQuad::getEdgeEntries (  )  const [inline]

Get the whole set of edge entries.

Definition at line 102 of file edge_quad.h.

References _EdgeEntries.

Referenced by NLPACS::CRetrieverInstance::linkEdgeQuad().

const CExteriorEdgeEntry& NLPACS::CEdgeQuad::getEdgeEntry ( uint  entry  )  const [inline]

Get a single edge entry.

Definition at line 104 of file edge_quad.h.

References _EdgeEntries.

Referenced by NLPACS::CRetrieverInstance::testExteriorCollision().

void NLPACS::CEdgeQuad::getGridBounds ( sint32 x0,
sint32 y0,
sint32 x1,
sint32 y1,
const CVector minP,
const CVector maxP 
) const [private]

Definition at line 113 of file edge_quad.cpp.

References _Height, _QuadElementSize, _Width, _X, _Y, min, NLMISC::CVector::x, and NLMISC::CVector::y.

Referenced by build(), and selectEdges().

CEdgeQuad & NLPACS::CEdgeQuad::operator= ( const CEdgeQuad o  ) 

operator=.

Definition at line 60 of file edge_quad.cpp.

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

void NLPACS::CEdgeQuad::removeLinks (  )  [inline]

Definition at line 125 of file edge_quad.h.

References _EdgeEntries.

void NLPACS::CEdgeQuad::removeLinks ( sint32  instanceId  )  [inline]

Definition at line 111 of file edge_quad.h.

References _EdgeEntries.

Referenced by NLPACS::CRetrieverInstance::resetLinks().

sint NLPACS::CEdgeQuad::selectEdges ( CVector  start,
CVector  end,
CCollisionSurfaceTemp cst 
) const

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

NB: The outpout do not contains any redundant edge. An edge 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 CExteriorEdgeEntry to fill. contain also OChainLUT, an array for internal use. In: must be filled with 0xFFFF. Out: still filled with 0xFFFF.
Returns:
number of exterioredge found. stored in cst.ExteriorEdgeEntries (array cleared first).

Definition at line 463 of file edge_quad.cpp.

References _Height, _Quad, _QuadElementSize, _Width, _X, _Y, NLPACS::CCollisionSurfaceTemp::ExteriorEdgeIndexes, NLPACS::CCollisionSurfaceTemp::OChainLUT, NLMISC::CVector::x, and NLMISC::CVector::y.

sint NLPACS::CEdgeQuad::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. An edge appears only one time in the result.

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

Definition at line 408 of file edge_quad.cpp.

References _Quad, _Width, NLPACS::CCollisionSurfaceTemp::ExteriorEdgeIndexes, getGridBounds(), NLMISC::CAABBox::getMax(), NLMISC::CAABBox::getMin(), and NLPACS::CCollisionSurfaceTemp::OChainLUT.

Referenced by NLPACS::CRetrieverInstance::testExteriorCollision().

void NLPACS::CEdgeQuad::serial ( NLMISC::IStream f  ) 

Member Data Documentation

The real exterior edge entries.

Definition at line 143 of file edge_quad.h.

Referenced by build(), clear(), getEdgeEntries(), getEdgeEntry(), operator=(), removeLinks(), and serial().

Height of the quadgrid.

Definition at line 147 of file edge_quad.h.

Referenced by build(), clear(), getGridBounds(), operator=(), selectEdges(), and serial().

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

W*H pointers on array of CExteriorEdgeEntry indexes.

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

Definition at line 141 of file edge_quad.h.

Referenced by build(), clear(), operator=(), selectEdges(), and serial().

Single memory block of CExteriorEdgeEntry chains.

Definition at line 151 of file edge_quad.h.

Referenced by build(), CEdgeQuad(), clear(), operator=(), and serial().

size (in byte) of _QuadData.

Definition at line 153 of file edge_quad.h.

Referenced by build(), CEdgeQuad(), clear(), operator=(), and serial().

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

Definition at line 156 of file edge_quad.h.

Referenced by build(), getGridBounds(), and selectEdges().

Width of the quadgrid.

Definition at line 145 of file edge_quad.h.

Referenced by build(), clear(), getGridBounds(), operator=(), selectEdges(), and serial().

Postion of the chainquad.

Definition at line 149 of file edge_quad.h.

Referenced by build(), clear(), getGridBounds(), operator=(), selectEdges(), and serial().

Definition at line 149 of file edge_quad.h.

Referenced by build(), clear(), getGridBounds(), operator=(), selectEdges(), and serial().


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

Generated on Thu Jan 7 08:30:21 2010 for NeL by  doxygen 1.6.1