UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
U3dGrid Class Reference

#include <u3d_grid.hpp>

Public Member Functions

 U3dGrid (const U3dBox *modelBox)
 
virtual ~U3dGrid ()
 
const U3dGridCellfindCell (U3dPoint point)
 
const U3dGridCellfindCell (U3dBox box)
 
U3dGridCellfindCell (int ID)
 
void divideCell (U3dGridCell *cell)
 
void mergeSubCells (U3dGridCell *cell)
 
U3dGridCellgetRoot ()
 
void updateMaxCellId (int cellId)
 
void printCell ()
 
void recursivePrintCell (const U3dGridCell *initCell)
 
bool getCommonCells (U3dGridCellsArray *common_cells, U3dBox *surfBox, U3dGridCell *root)
 
U3dGridCellsArray getEmptyCellsList ()
 
U3dGridCellsArray getBodyCellsList (int bodyId)
 
U3dGridCellsArray getBoundCellsList (int boundId)
 
U3dGridCellsArray getColumnBoundCellsList (U3dPoint p, int boundId) const
 
bool getReady ()
 
void setReady (bool ready)
 
 U3dGrid (const U3dBox *modelBox)
 
virtual ~U3dGrid ()
 
const U3dGridCellfindCell (U3dPoint point)
 
const U3dGridCellfindCell (U3dBox box)
 
U3dGridCellfindCell (int ID)
 
void divideCell (U3dGridCell *cell)
 
void mergeSubCells (U3dGridCell *cell)
 
U3dGridCellgetRoot ()
 
void updateMaxCellId (int cellId)
 
void printCell ()
 
void recursivePrintCell (const U3dGridCell *initCell)
 
U3dGridCellsArray getEmptyCellsList ()
 
U3dGridCellsArray getBodyCellsList (int bodyId)
 
U3dGridCellsArray getBoundCellsList (int boundId)
 
U3dGridCellsArray getColumnBoundCellsList (U3dPoint p, int boundId) const
 
bool getReady ()
 
void setReady (bool ready)
 

Protected Attributes

U3dGridCellm_Root
 

Static Protected Attributes

static unsigned m_maxCellID
 

Detailed Description

Model grid class

Constructor & Destructor Documentation

U3dGrid::U3dGrid ( const U3dBox modelBox)

Create grid for given model volume (given minimal cell size is set by U3D_MIN_CELL_SIZE - see u3d_model_defines.hpp). Initial grid will have the only cell without any parameters.

virtual U3dGrid::~U3dGrid ( )
virtual

Destroy grid

U3dGrid::U3dGrid ( const U3dBox modelBox)

Create grid for given model volume (given minimal cell size is set by U3D_MIN_CELL_SIZE - see u3d_model_defines.hpp). Initial grid will have the only cell without any parameters.

virtual U3dGrid::~U3dGrid ( )
virtual

Destroy grid

Member Function Documentation

void U3dGrid::divideCell ( U3dGridCell cell)

Divide given cell into 8 parts.

void U3dGrid::divideCell ( U3dGridCell cell)

Divide given cell into 8 parts.

const U3dGridCell* U3dGrid::findCell ( U3dPoint  point)

Returns pointer to the cell in which lies given 3d point

const U3dGridCell* U3dGrid::findCell ( U3dPoint  point)

Returns pointer to the cell in which lies given 3d point

const U3dGridCell* U3dGrid::findCell ( U3dBox  box)

Returns pointer to the cell if its bounding box equal to giben box, otherwise returns NULL

const U3dGridCell* U3dGrid::findCell ( U3dBox  box)

Returns pointer to the cell if its bounding box equal to giben box, otherwise returns NULL

U3dGridCellsArray U3dGrid::getBodyCellsList ( int  bodyId)

Returns list of cells, containing body #bodyId

U3dGridCellsArray U3dGrid::getBodyCellsList ( int  bodyId)

Returns list of cells, containing body #bodyId

U3dGridCellsArray U3dGrid::getBoundCellsList ( int  boundId)

Returns list of cells, containing bound #boundId

U3dGridCellsArray U3dGrid::getBoundCellsList ( int  boundId)

Returns list of cells, containing bound #boundId

U3dGridCellsArray U3dGrid::getColumnBoundCellsList ( U3dPoint  p,
int  boundId 
) const

Returns list of cells, which contain bound #boundId and are intersected by the vertical line, which goes through the point p ("column of bound cells")

U3dGridCellsArray U3dGrid::getColumnBoundCellsList ( U3dPoint  p,
int  boundId 
) const

Returns list of cells, which contain bound #boundId and are intersected by the vertical line, which goes through the point p ("column of bound cells")

bool U3dGrid::getCommonCells ( U3dGridCellsArray *  common_cells,
U3dBox surfBox,
U3dGridCell root 
)

Returns list of cells, overlapping with given box

U3dGridCellsArray U3dGrid::getEmptyCellsList ( )

Returns list of cells, containing no bounds

U3dGridCellsArray U3dGrid::getEmptyCellsList ( )

Returns list of cells, containing no bounds

bool U3dGrid::getReady ( )
inline

Returns ready flag

bool U3dGrid::getReady ( )
inline

Returns ready flag

U3dGridCell* U3dGrid::getRoot ( )
inline

Return pointer to the root cell of the model grid.

U3dGridCell* U3dGrid::getRoot ( )
inline

Return pointer to the root cell of the model grid.

void U3dGrid::mergeSubCells ( U3dGridCell cell)

Delete all subcells of given cell. This can cause recursive deleting of all inherited cells of given cell.

void U3dGrid::mergeSubCells ( U3dGridCell cell)

Delete all subcells of given cell. This can cause recursive deleting of all inherited cells of given cell.

void U3dGrid::setReady ( bool  ready)
inline

Sets true ready flag (cells tree is filled with information)

void U3dGrid::setReady ( bool  ready)
inline

Sets true ready flag (cells tree is filled with information)

void U3dGrid::updateMaxCellId ( int  cellId)
inline

Set variable maxCellId to further operation with new cells

void U3dGrid::updateMaxCellId ( int  cellId)
inline

Set variable maxCellId to further operation with new cells

Member Data Documentation

U3dGridCell * U3dGrid::m_Root
protected

Root of the tree


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