# 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  

NL3D::CLandscapeCollisionGrid Class Reference

A grid of Tiles Id. More...

#include <landscape_collision_grid.h>

List of all members.

Public Methods

 CLandscapeCollisionGrid (CVisualCollisionManager *owner)
 Constructor. More...

 ~CLandscapeCollisionGrid ()
void clear ()
 clear the chainlist in the quadgrid. More...

void build (const std::vector< CPatchQuadBlock * > &quadBlocks, const CVector &delta)
 Build the quadgrid with a array of patchblock. More...

CVisualTileDescNodeselect (const NLMISC::CVector &pos)
 select one entry in the chainQuad. pos is a position in World. More...


Private Methods

void addQuadToGrid (uint16 paBlockId, uint16 quadId, sint minx, sint maxx, sint miny, sint maxy)

Private Attributes

CVisualCollisionManager_Owner
bool _Cleared
 Array of list of CVisualTileDescNode. More...

CVisualTileDescNode_Grid [NL_COLGRID_SIZE *NL_COLGRID_SIZE]
uint _SizePower
CVector _Delta


Detailed Description

A grid of Tiles Id.

Each CVisualCollisionEntity has such a grid. This looks like CQuadGrid, but with special features.

Author:
Lionel Berenguier , Nevrax France
Date:
2001

Definition at line 55 of file landscape_collision_grid.h.


Constructor & Destructor Documentation

NL3D::CLandscapeCollisionGrid::CLandscapeCollisionGrid CVisualCollisionManager   owner
 

Constructor.

Definition at line 40 of file landscape_collision_grid.cpp.

References _Cleared, _Grid, _Owner, _SizePower, NLMISC::getPowerOf2, NLMISC::isPowerOf2, NL_COLGRID_SIZE, and nlassert.

NL3D::CLandscapeCollisionGrid::~CLandscapeCollisionGrid  
 

Definition at line 53 of file landscape_collision_grid.cpp.

References clear.


Member Function Documentation

void NL3D::CLandscapeCollisionGrid::addQuadToGrid uint16    paBlockId,
uint16    quadId,
sint    minx,
sint    maxx,
sint    miny,
sint    maxy
[private]
 

Definition at line 213 of file landscape_collision_grid.cpp.

References _Grid, _Owner, _SizePower, NL_COLGRID_SIZE, nlassert, x, and y.

Referenced by build.

void NL3D::CLandscapeCollisionGrid::build const std::vector< CPatchQuadBlock * > &    quadBlocks,
const CVector &    delta
 

Build the quadgrid with a array of patchblock.

delta is the vector to apply to tiles coordinate, before insertion in the quadgrid (for precision consideration).

Definition at line 147 of file landscape_collision_grid.cpp.

References _Cleared, _Delta, addQuadToGrid, clear, NL3D::fastFloor, NL3D::fastFloorBegin, NL3D::fastFloorEnd, id, min, NL_PATCH_BLOCK_MAX_QUAD, NL_PATCH_BLOCK_MAX_VERTEX, x, and y.

void NL3D::CLandscapeCollisionGrid::clear  
 

clear the chainlist in the quadgrid.

Definition at line 59 of file landscape_collision_grid.cpp.

References _Cleared, _Grid, _Owner, and NL_COLGRID_SIZE.

Referenced by build, and ~CLandscapeCollisionGrid.

CVisualTileDescNode * NL3D::CLandscapeCollisionGrid::select const NLMISC::CVector   pos
 

select one entry in the chainQuad. pos is a position in World.

Definition at line 273 of file landscape_collision_grid.cpp.

References _Delta, _Grid, NL_COLGRID_SIZE, x, and y.


Member Data Documentation

bool NL3D::CLandscapeCollisionGrid::_Cleared [private]
 

Array of list of CVisualTileDescNode.

Definition at line 82 of file landscape_collision_grid.h.

Referenced by build, CLandscapeCollisionGrid, and clear.

CVector NL3D::CLandscapeCollisionGrid::_Delta [private]
 

Definition at line 85 of file landscape_collision_grid.h.

Referenced by build, and select.

CVisualTileDescNode* NL3D::CLandscapeCollisionGrid::_Grid[NL_COLGRID_SIZE*NL_COLGRID_SIZE] [private]
 

Definition at line 83 of file landscape_collision_grid.h.

Referenced by addQuadToGrid, CLandscapeCollisionGrid, clear, and select.

CVisualCollisionManager* NL3D::CLandscapeCollisionGrid::_Owner [private]
 

Definition at line 78 of file landscape_collision_grid.h.

Referenced by addQuadToGrid, CLandscapeCollisionGrid, and clear.

uint NL3D::CLandscapeCollisionGrid::_SizePower [private]
 

Definition at line 84 of file landscape_collision_grid.h.

Referenced by addQuadToGrid, and CLandscapeCollisionGrid.


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