COVISE Core
|
#include <coDoBasisTree.h>
Classes | |
class | functionObject |
Public Types | |
enum | { SHM_OBJ = 8, MAX_NO_LEVELS = 10, MIN_SMALL_ENOUGH = 32, CRIT_LEVEL = 3, NORMAL_SIZE = 800 } |
Public Member Functions | |
coDoBasisTree (const coObjInfo &info, const char *label1, const char *label2, int nelem_l, int nconn_l, int ncoord_l, int *el, int *conn, float *x_c, float *y_c, float *z_c, int normal_size, int max_no_levels, int min_small_enough, int crit_level, int limit_fX, int limit_fY, int limit_fZ) | |
coDoBasisTree (const coObjInfo &info) | |
Another constructor. More... | |
coDoBasisTree (const coObjInfo &info, const char *label) | |
Still another constructor. More... | |
coDoBasisTree (const coObjInfo &info, const char *label1, const char *label2, int cellListSize, int macroCellListSize, int cellBBoxesSize, int gridBBoxSize) | |
virtual | ~coDoBasisTree () |
Destructor. More... | |
void | Visualise (std::vector< int > &ll, std::vector< int > &cl, std::vector< float > &xi, std::vector< float > &yi, std::vector< float > &zi) |
const int * | search (const float *point) const |
const int * | extended_search (const coVector &point1, const coVector &point2, std::vector< int > &OctreePolygonList) const |
Dump of information of the macrocells and cells defining the octtree. More... | |
bool | cutLineCuboid (const coVector &point1, const coVector &point2, const float *cuboidBbox, std::vector< coVector > &CutVec) const |
extends normal search function, by searching for all cells between two points More... | |
bool | cutThroughOct (int baum, const float bbox[6], std::vector< int > &ll, std::vector< int > &cl, std::vector< float > &xi, std::vector< float > &yi, std::vector< float > &zi, const coVector &point1, const coVector &point2, std::vector< int > &OctreePolygonList) const |
cuts a line with a cuboid and gives back a vector with the coordinates More... | |
const int * | getBbox (std::vector< float > &boundingBox) const |
recursive cut through a octree macro cell More... | |
const int * | area_search (std::vector< float > &Bbox, std::vector< int > &GridElemList) const |
get the BBox of a given Octtree More... | |
void | getMacroCellElements (int baum, float bbox[6], std::vector< int > &ElementList, const float *reference_Bbox) const |
search for all cells within a 3D area More... | |
bool | lineInBbox (const coVector &point1, const coVector &point2, const float bbox[6]) const |
get all Elements which are in a specific macro cell More... | |
void | getChunks (vector< const int * > &chunks, const functionObject *test) |
/////////////////////////////////////////////// More... | |
int | getNumCellLists () |
int | getNumMacroCellLists () |
int | getNumCellBBoxes () |
int | getNumGridBBoxes () |
void | getAddresses (int **cellList, int **macroCellList, float **cellBBox, float **gridBBox, int **fX, int **fY, int **fZ, int **max_no_levels) |
Public Member Functions inherited from covise::coDistributedObject | |
void | getShmLocation (int &shmSegNo, shmSizeType &offset) const |
Get my location in shared memory. More... | |
void | addAttribute (const char *, const char *) |
Attach an attribute to an object. More... | |
void | addAttributes (int, const char *const *, const char *const *) |
Attach multiple attributes to an object. More... | |
const char * | getAttribute (const char *) const |
get one attribute More... | |
int | getNumAttributes () const |
get number of attributes More... | |
int | getAllAttributes (const char ***name, const char ***content) const |
get all attributes More... | |
void | copyAllAttributes (const coDistributedObject *src) |
copy all attributes from src to this object More... | |
char * | getName () const |
get the object's name More... | |
const char * | getType () const |
get the object's type More... | |
int | isType (const char *reqType) const |
check whether this is a certain type More... | |
bool | objectOk () const |
check whether object was created or received ok More... | |
coDistributedObject () | |
coDistributedObject (const coObjInfo &info) | |
coDistributedObject (const coObjInfo &info, const char *t) | |
coDistributedObject (const coObjInfo &info, int shmSeg, shmSizeType offs, char *t) | |
virtual | ~coDistributedObject () |
coDistributedObject * | clone (const coObjInfo &newinfo) const |
void | copyObjInfo (coObjInfo *info) const |
const coDistributedObject * | createUnknown () const |
int * | store_header (int, int, int, int *, data_type *, long *, int **) |
int | restore_header (int **, int, int *, int *, shmSizeType *) |
void | init_header (int *, int *, int, data_type **, long **) |
int | update_shared_dl (int count, covise_data_list *dl) |
int | store_shared_dl (int count, covise_data_list *dl) |
int | restore_shared_dl (int count, covise_data_list *dl) |
void | setType (const char *, const char *) |
int | getObjectInfo (coDoInfo **) const |
int | get_type_no () const |
int | access (access_type) |
int | destroy () |
char * | object_on_hosts () const |
int | incRefCount () const |
int | decRefCount () const |
int | getRefCount () const |
void | print () const |
void | getObjectFromShm () |
Common function for all read-Constructors: More... | |
bool | checkObject () const |
Check object: return true if valid, false if not. More... | |
Protected Member Functions | |
int | getObjInfo (int, coDoInfo **) const |
int | rebuildFromShm () |
void | BBoxForElement (int i) |
void | ShareCellsBetweenLeaves () |
void | IniBBox (float *, const int *) const |
void | fillBBoxSon (float *bbox_son, const float *bbox, int son) const |
void | SplitOctTree (const float *bbox, std::vector< int > &population_, int level, int offset) |
int | CellsAreTooBig (const float *bbox, std::vector< int > &population) |
void | RecreateShm (const char *label1, const char *label2) |
void | DivideUpToLevel () |
const int * | lookUp (int position, int *okey, int mask) const |
void | MakeOctTree (int *el, int *conn, float *x_c, float *y_c, float *z_c) |
int | Position (int *key) const |
Protected Member Functions inherited from covise::coDistributedObject | |
int | getShmArray () const |
int | createFromShm (coShmArray *arr) |
bool | checkObj (int shmSegNo, shmSizeType shmOffs, bool &printed) const |
Check object in shared memory. More... | |
virtual coDistributedObject * | cloneObject (const coObjInfo &newinfo) const =0 |
Static Protected Member Functions | |
static int | IsInMacroCell (const int *okey, const int *macro_keys) |
Protected Attributes | |
coIntShmArray | cellList |
coIntShmArray | macroCellList |
coFloatShmArray | cellBBoxes |
coFloatShmArray | gridBBox |
coIntShm | fXShm |
coIntShm | fYShm |
coIntShm | fZShm |
coIntShm | max_no_levels_Shm |
std::vector< int > | macCellList_ |
std::vector< int > | cellList_ |
std::vector< int > * | populations_ |
std::vector< float > | cellBBoxes_ |
int | nelem |
int | nconn |
int | ncoord |
int * | el_ |
int * | conn_ |
float * | x_c_ |
float * | y_c_ |
float * | z_c_ |
float * | cell_bbox_ |
float | grid_bbox_ [6] |
int | fX_ |
int | fY_ |
int | fZ_ |
const int | normal_size_ |
int | max_no_levels_ |
const int | min_small_enough_ |
const int | crit_level_ |
const int | limit_fX_ |
const int | limit_fY_ |
const int | limit_fZ_ |
Protected Attributes inherited from covise::coDistributedObject | |
coIntShm | version |
coIntShm | refcount |
coShmArray * | shmarr |
coStringShmArray * | attributes |
coDoHeader * | header |
char | type_name [7] |
int | type_no |
char * | name |
int | loc_version |
bool | new_ok |
int | size |
char * | attribs |
Private Member Functions | |
void | addChunk (vector< const int * > &chunks, int position, const float bbox[6], const functionObject *) |
void | treePrint (ostream &outfile, int level, int *key, int offset) |
void | VisualiseOneOctTree (int baum, const float bbox[6], std::vector< int > &ll, std::vector< int > &cl, std::vector< float > &xi, std::vector< float > &yi, std::vector< float > &zi) |
void | RecreateShmDL (covise_data_list *) |
Private Attributes | |
float | cellFactor_ |
int | small_enough_ |
Friends | |
ostream & | operator<< (ostream &outfile, coDoBasisTree &tree) |
check if line is in a bbox More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from covise::coDistributedObject | |
static const coDistributedObject * | createFromShm (const coObjInfo &newinfo) |
static const coDistributedObject * | createUnknown (coShmArray *) |
static const coDistributedObject * | createUnknown (int seg, shmSizeType offs) |
static int | calcType (const char *) |
static char * | calcTypeString (int) |
static int | set_vconstr (const char *, coDistributedObject *(*)(coShmArray *)) |
coDoBasisTree::coDoBasisTree | ( | const coObjInfo & | info, |
const char * | label1, | ||
const char * | label2, | ||
int | nelem_l, | ||
int | nconn_l, | ||
int | ncoord_l, | ||
int * | el, | ||
int * | conn, | ||
float * | x_c, | ||
float * | y_c, | ||
float * | z_c, | ||
int | normal_size, | ||
int | max_no_levels, | ||
int | min_small_enough, | ||
int | crit_level, | ||
int | limit_fX, | ||
int | limit_fY, | ||
int | limit_fZ | ||
) |
Constructor
n | objedct name |
label1 | either OCTRE or OCTREP |
label2 | another label |
nelem_l | number of cells |
nconn_l | number of vertices |
ncoord_l | number of points |
el | cell array |
conn | vertices array |
x_c | X-coordinate array |
y_c | Y-coordinate array |
z_c | Z-coordinate array |
normal_size | determines how many octrees are created |
max_no_levels | determines the maximum number of octree levels |
min_small_enough | criteria for stopping octree division |
limit_fX | limits number of octrees |
limit_fY | limits number of octrees |
limit_fZ | limits number of octrees |
coDoBasisTree::coDoBasisTree | ( | const coObjInfo & | info | ) |
Another constructor.
coDoBasisTree::coDoBasisTree | ( | const coObjInfo & | info, |
const char * | label | ||
) |
Still another constructor.
coDoBasisTree::coDoBasisTree | ( | const coObjInfo & | info, |
const char * | label1, | ||
const char * | label2, | ||
int | cellListSize, | ||
int | macroCellListSize, | ||
int | cellBBoxesSize, | ||
int | gridBBoxSize | ||
) |
Constructor for deserialization
info | object name |
label1 | either OCTREE or OCTREP |
label2 | another label |
cellListSize | number of cellList items |
macroCellListSize | number of macroCellList items |
cellBBoxesSize | number of cellBBoxes items |
gridBBoxSize | number of gridBBox items |
|
virtual |
Destructor.
|
private |
const int * coDoBasisTree::area_search | ( | std::vector< float > & | Bbox, |
std::vector< int > & | GridElemList | ||
) | const |
get the BBox of a given Octtree
Bereich fuer Gitterelemente Octtree.
|
protected |
|
protected |
bool coDoBasisTree::cutLineCuboid | ( | const coVector & | point1, |
const coVector & | point2, | ||
const float * | cuboidBbox, | ||
std::vector< coVector > & | CutVec | ||
) | const |
extends normal search function, by searching for all cells between two points
DEKLARATION GAUSS ELIMINATION
BERECHNUNG DURCH GAUSS ELIMINATIONSVERFAHREN
ENDE GAUSS ELIMINATION
bool coDoBasisTree::cutThroughOct | ( | int | baum, |
const float | bbox[6], | ||
std::vector< int > & | ll, | ||
std::vector< int > & | cl, | ||
std::vector< float > & | xi, | ||
std::vector< float > & | yi, | ||
std::vector< float > & | zi, | ||
const coVector & | point1, | ||
const coVector & | point2, | ||
std::vector< int > & | OctreePolygonList | ||
) | const |
cuts a line with a cuboid and gives back a vector with the coordinates
|
protected |
const int * coDoBasisTree::extended_search | ( | const coVector & | point1, |
const coVector & | point2, | ||
std::vector< int > & | OctreePolygonList | ||
) | const |
Dump of information of the macrocells and cells defining the octtree.
|
protected |
void coDoBasisTree::getAddresses | ( | int ** | cellList, |
int ** | macroCellList, | ||
float ** | cellBBox, | ||
float ** | gridBBox, | ||
int ** | fX, | ||
int ** | fY, | ||
int ** | fZ, | ||
int ** | max_no_levels | ||
) |
const int * coDoBasisTree::getBbox | ( | std::vector< float > & | boundingBox | ) | const |
recursive cut through a octree macro cell
void coDoBasisTree::getChunks | ( | vector< const int * > & | chunks, |
const functionObject * | test | ||
) |
///////////////////////////////////////////////
void coDoBasisTree::getMacroCellElements | ( | int | baum, |
float | bbox[6], | ||
std::vector< int > & | ElementList, | ||
const float * | reference_Bbox | ||
) | const |
search for all cells within a 3D area
int coDoBasisTree::getNumCellBBoxes | ( | ) |
int coDoBasisTree::getNumCellLists | ( | ) |
int coDoBasisTree::getNumGridBBoxes | ( | ) |
int coDoBasisTree::getNumMacroCellLists | ( | ) |
|
protectedvirtual |
Reimplemented from covise::coDistributedObject.
|
protected |
|
staticprotected |
bool coDoBasisTree::lineInBbox | ( | const coVector & | point1, |
const coVector & | point2, | ||
const float | bbox[6] | ||
) | const |
get all Elements which are in a specific macro cell
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
Implements covise::coDistributedObject.
|
protected |
|
private |
const int * coDoBasisTree::search | ( | const float * | point | ) | const |
search: Finding the cell (cells) in which a point lies
point | array with the 3 coordinates of the point |
|
protected |
|
protected |
|
private |
void coDoBasisTree::Visualise | ( | std::vector< int > & | ll, |
std::vector< int > & | cl, | ||
std::vector< float > & | xi, | ||
std::vector< float > & | yi, | ||
std::vector< float > & | zi | ||
) |
|
private |
|
friend |
check if line is in a bbox
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
mutableprotected |
|
protected |
|
mutableprotected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
|
protected |