FDHTree Class Reference

#include <FDHTree.h>

Inheritance diagram for FDHTree:

BVH SDS FDH14Tree FDH6Tree List of all members.

Public Member Functions

 FDHTree (unsigned, unsigned, const float(*)[3], const unsigned, bool, BVList::SplitStrategy)
virtual SDSclone () const
virtual IteratorcreateIterator ()
virtual InspectorSDScreateInspector (unsigned)
virtual int append (SceneGraphObject *)
virtual SceneGraphObjectdetach (SceneGraphObject::OID)
virtual bool update (void)
virtual bool build (void)
unsigned leafLimit (void) const
unsigned depthLimit (void) const
virtual double distance (Matrix4 *, BVH &, Matrix4 *, Node **, Node **, Vector3 *pDir=NULL, unsigned d1=UINT_MAX, unsigned d2=UINT_MAX)
virtual bool separation (Matrix4 *, BVH &, Matrix4 *, Vector3 *pDir=NULL, unsigned d1=UINT_MAX, unsigned d2=UINT_MAX)
virtual Geometry ** collision (Matrix4 *, float, float, float, float, int *)
virtual void dump (const char *, const char *)
virtual void dump (const char *)
virtual void __debug (void)
virtual void __debug (Node *n, int d)
void __get_edges (Matrix4 *, Node *, unsigned, unsigned, int, float *, unsigned &)
float * __getEdges (Matrix4 *pMyTr, unsigned level, int rot, unsigned &size)
void __get_meshes (Matrix4 *, Node *, unsigned, unsigned, int, Mesh **, unsigned &)
Mesh ** __getMeshes (Matrix4 *pMyTr, unsigned level, int rot, unsigned &size)

Static Public Member Functions

static Matrix4multiTrans (const Matrix4 *, const Matrix4 *, Vector3 &)
static Matrix4multiTrans (const Matrix4 *, const Matrix4 *, double &)

Protected Member Functions

virtual bool _enlarge_bv (Geometry **, Geometry &)
virtual Geometry_create_bv (List< SceneGraphObject > &)
virtual Geometry_create_bv (Geometry &, Geometry &)
virtual Geometry_create_bv (SceneGraphObject &)
virtual Geometry_create_bv (const float *, unsigned)
virtual BVList_create_list ()
virtual void _duplicate_attributes (const SDS &)
 FDHTree (unsigned d, const float(*m)[3])
bool _append (SceneGraphObject *, Geometry *, Node *, unsigned)
void _remove_leaf (Node *)
void _build_tree (Node *, unsigned)
void _destroy_tree (Node *)
void _rebuild_tree (Node *)
Geometry_create_bv (BVList &)
void _collision (Node *, Geometry &, List< SceneGraphObject > *)
void _dump (const Node *, const char *, const char *)
virtual DistRot_create_dist_rot (BVH::Node *)
virtual void _dr_init (const Matrix4 *, const Matrix4 *, BVH *)
virtual void _dr_primitives (DRInfo &, Node *, Vector3 *)
virtual void _dr_leaf (DRInfo &, Node *, unsigned)
virtual void _dr_inner (DRInfo &, Node *, Node *, unsigned)

Protected Attributes

const unsigned _dirs
const float(* _fdhMat )[3]
esg::BVH::DRInfo _drInfo
Node * _root
Node * _leftLeaf
unsigned _leafLimit
unsigned _depthLimit
unsigned _treeDepth
Matrix4 _myTrMat
Matrix4 _coordMat
 matrix transforming my coords to the partner's
double _scaleRatio
 metric ratio scale from _pCoordMat
BVH_pPartner
 partner during collision detection
BVList::SplitStrategy _splitStrategy
bool _delayBuild
List< SceneGraphObject_intangibleChildren

Detailed Description

Definition at line 14 of file FDHTree.h.


Constructor & Destructor Documentation

FDHTree unsigned  d,
const float *  m[3]
[inline, protected]
 

Definition at line 31 of file FDHTree.h.

Referenced by FDHTree::clone().

FDHTree unsigned  ,
unsigned  ,
const   float(*)[3],
const   unsigned,
bool  ,
BVList::SplitStrategy 
 


Member Function Documentation

void __debug Node n,
int  d
[virtual, inherited]
 

Definition at line 769 of file BVH.cc.

References BVH::__debug(), BVList::__debug(), Geometry::__debug(), BVH::Node::bv, BVH::Node::leaf, BVH::Node::leftChild, BVH::Node::list, and BVH::Node::rightChild.

void __debug void   )  [virtual, inherited]
 

Reimplemented from SDS.

Definition at line 762 of file BVH.cc.

References BVH::_root.

Referenced by BVH::__debug().

void __get_edges Matrix4 ,
Node ,
unsigned  ,
unsigned  ,
int  ,
float *  ,
unsigned & 
[inherited]
 

Definition at line 782 of file BVH.cc.

References BVH::_coordMat, BVH::Node::bv, Geometry::clone(), Mesh::getActVert1(), Mesh::getActVert2(), Mesh::goToNextSolid(), BVH::Node::leaf, BVH::Node::leftChild, Geometry::mesh(), Mesh::resetActSolid(), Mesh::resetEdgeWalkInSolid(), BVH::Node::rightChild, and Mesh::stepInEdgeWalkInSolid().

Referenced by BVH::__getEdges().

void __get_meshes Matrix4 ,
Node ,
unsigned  ,
unsigned  ,
int  ,
Mesh **  ,
unsigned & 
[inherited]
 

Definition at line 846 of file BVH.cc.

References BVH::_coordMat, BVH::Node::bv, Geometry::clone(), BVH::Node::leaf, BVH::Node::leftChild, Geometry::mesh(), and BVH::Node::rightChild.

Referenced by BVH::__getMeshes().

float * __getEdges Matrix4 pMyTr,
unsigned  level,
int  rot,
unsigned &  size
[inherited]
 

Definition at line 832 of file BVH.cc.

References BVH::__get_edges(), and BVH::_root.

Mesh ** __getMeshes Matrix4 pMyTr,
unsigned  level,
int  rot,
unsigned &  size
[inherited]
 

Definition at line 871 of file BVH.cc.

References BVH::__get_meshes(), and BVH::_root.

bool _append SceneGraphObject ,
Geometry ,
Node ,
unsigned 
[protected, inherited]
 

Definition at line 9 of file BVH.cc.

References BVH::_create_bv(), BVH::_create_list(), BVH::_depthLimit, BVH::_enlarge_bv(), BVH::_leafLimit, BVH::_leftLeaf, BVH::_splitStrategy, BVList::append(), BVH::Node::bv, BVH::Node::leaf, BVH::Node::leftChild, BVList::length(), BVH::Node::list, BVH::Node::parent, BVH::Node::rightChild, BVH::Node::sibling, and BVList::split().

void _build_tree Node ,
unsigned 
[protected, inherited]
 

Definition at line 143 of file BVH.cc.

References BVH::_create_bv(), BVH::_depthLimit, BVH::_leafLimit, BVH::Node::bv, BVH::Node::leaf, BVList::length(), and BVH::Node::list.

Referenced by BVH::build().

void _collision Node ,
Geometry ,
List< SceneGraphObject > * 
[protected, inherited]
 

Definition at line 241 of file BVH.cc.

References List::append(), BVH::Node::bv, BVList::firstItem(), BVH::Node::leaf, BVH::Node::list, BVList::nextItem(), and Geometry::separation().

Referenced by BVH::collision().

Geometry * _create_bv BVList  )  [protected, inherited]
 

Definition at line 229 of file BVH.cc.

References List::append(), BVList::firstItem(), and BVList::nextItem().

Referenced by BVH::_append(), BVH::_build_tree(), BVH::_rebuild_tree(), BVH::_remove_leaf(), BVH::collision(), and BVH::detach().

Geometry * _create_bv const float *  ,
unsigned 
[protected, virtual]
 

Reimplemented in FDH14Tree, and FDH6Tree.

Definition at line 59 of file FDHTree.cc.

References FDHTree::_fdhMat.

Geometry * _create_bv SceneGraphObject  )  [protected, virtual]
 

Implements BVH.

Reimplemented in FDH14Tree, and FDH6Tree.

Definition at line 54 of file FDHTree.cc.

References FDHTree::_dirs, and FDHTree::_fdhMat.

Geometry * _create_bv Geometry ,
Geometry
[protected, virtual]
 

Implements BVH.

Reimplemented in FDH14Tree, and FDH6Tree.

Definition at line 49 of file FDHTree.cc.

References FDHTree::_dirs, and FDHTree::_fdhMat.

Geometry * _create_bv List< SceneGraphObject > &   )  [protected, virtual]
 

Implements BVH.

Reimplemented in FDH14Tree, and FDH6Tree.

Definition at line 44 of file FDHTree.cc.

References FDHTree::_dirs, and FDHTree::_fdhMat.

DistRot * _create_dist_rot BVH::Node  )  [protected, virtual, inherited]
 

Reimplemented in FDH14Tree.

Definition at line 284 of file BVH.cc.

References BVH::_coordMat, BVH::_scaleRatio, and BVH::Node::bv.

Referenced by BVH::_dr_inner(), BVH::distance(), and BVH::separation().

BVList * _create_list  )  [protected, virtual]
 

Implements BVH.

Definition at line 64 of file FDHTree.cc.

References FDHTree::_dirs, and FDHTree::_fdhMat.

void _destroy_tree Node  )  [protected, inherited]
 

Definition at line 195 of file BVH.cc.

References BVH::Node::bv, BVH::Node::leaf, BVH::Node::leftChild, BVH::Node::list, and BVH::Node::rightChild.

Referenced by BVH::~BVH().

void _dr_init const Matrix4 ,
const Matrix4 ,
BVH
[protected, virtual, inherited]
 

Reimplemented in FDH14Tree.

Definition at line 289 of file BVH.cc.

References BVH::_coordMat, BVH::_myTrMat, BVH::_pPartner, BVH::_scaleRatio, and SDS::multiTrans().

Referenced by FDH14Tree::_dr_init(), BVH::distance(), and BVH::separation().

void _dr_inner DRInfo ,
Node ,
Node ,
unsigned 
[protected, virtual, inherited]
 

Definition at line 414 of file BVH.cc.

References BVH::_create_dist_rot(), BVH::_dr_leaf(), BVH::_pPartner, BVH::Node::bv, DistRot::distance(), BVH::DRInfo::hisMaxDepth, BVH::Node::leaf, BVH::DRInfo::leafInMe, BVH::Node::leftChild, BVH::DRInfo::maxDepth, BVH::DRInfo::minD, BVH::DRInfo::myMaxDepth, BVH::DRInfo::pDistRot, BVH::DRInfo::pLeaf, and BVH::Node::rightChild.

Referenced by BVH::distance(), and BVH::separation().

void _dr_leaf DRInfo ,
Node ,
unsigned 
[protected, virtual, inherited]
 

Definition at line 347 of file BVH.cc.

References BVH::_coordMat, BVH::_dr_primitives(), BVH::_myTrMat, BVH::_pPartner, BVH::Node::bv, DistRot::distance(), ESG_INVERSE_TR_DIR, BVH::Node::leaf, BVH::DRInfo::leafInMe, BVH::Node::leftChild, BVH::DRInfo::maxDepth, BVH::DRInfo::minD, BVH::DRInfo::pDir, BVH::DRInfo::pDistRot, BVH::DRInfo::pLeaf, BVH::DRInfo::pLeafA, BVH::DRInfo::pLeafB, and BVH::Node::rightChild.

Referenced by BVH::_dr_inner().

void _dr_primitives DRInfo ,
Node ,
Vector3
[protected, virtual, inherited]
 

Definition at line 304 of file BVH.cc.

References BVH::DRInfo::DISTANCE, BVList::firstItem(), BVH::DRInfo::leafInMe, BVH::Node::list, MAXDOUBLE, BVH::DRInfo::minD, BVList::nextItem(), BVH::DRInfo::pLeaf, BVH::DRInfo::pLeafA, BVH::DRInfo::pLeafB, BVH::DRInfo::POINT_COLLISION, BVH::DRInfo::SEPARATION, and BVH::DRInfo::strategy.

Referenced by BVH::_dr_leaf().

void _dump const Node ,
const char *  ,
const char * 
[protected, inherited]
 

Definition at line 259 of file BVH.cc.

References BVH::Node::bv, Geometry::dump(), BVList::firstItem(), BVH::Node::leaf, BVH::Node::list, and BVList::nextItem().

Referenced by BVH::dump().

void _duplicate_attributes const SDS  )  [protected, virtual]
 

Reimplemented from BVH.

Reimplemented in FDH14Tree, and FDH6Tree.

Definition at line 69 of file FDHTree.cc.

References BVH::_duplicate_attributes().

Referenced by FDH6Tree::_duplicate_attributes(), FDH14Tree::_duplicate_attributes(), and FDHTree::clone().

bool _enlarge_bv Geometry **  ,
Geometry
[protected, virtual]
 

Implements BVH.

Definition at line 7 of file FDHTree.cc.

References FDHTree::_dirs, FDHTree::_fdhMat, Geometry::clone(), Geometry::extent(), Interval::max, and Interval::min.

void _rebuild_tree Node  )  [protected, inherited]
 

Definition at line 216 of file BVH.cc.

References BVH::_create_bv(), BVH::Node::bv, BVH::Node::leaf, BVH::Node::leftChild, BVH::Node::list, and BVH::Node::rightChild.

Referenced by BVH::update().

void _remove_leaf Node  )  [protected, inherited]
 

Definition at line 86 of file BVH.cc.

References BVH::_create_bv(), BVH::_leftLeaf, BVH::_root, BVH::Node::bv, BVH::Node::leftChild, BVH::Node::list, BVH::Node::parent, and BVH::Node::rightChild.

Referenced by BVH::detach().

int append SceneGraphObject  )  [virtual, inherited]
 

Implements SDS.

Definition at line 532 of file BVH.cc.

References SDS::_intangibleChildren, List::append(), and SceneGraphObject::tangible().

bool build void   )  [virtual, inherited]
 

Implements SDS.

Definition at line 594 of file BVH.cc.

References BVH::_build_tree(), SDS::_delayBuild, and BVH::_root.

SDS * clone  )  const [virtual]
 

Implements BVH.

Reimplemented in FDH14Tree, and FDH6Tree.

Definition at line 86 of file FDHTree.cc.

References FDHTree::_dirs, FDHTree::_duplicate_attributes(), FDHTree::_fdhMat, and FDHTree::FDHTree().

Geometry ** collision Matrix4 ,
float  ,
float  ,
float  ,
float  ,
int * 
[virtual, inherited]
 

Definition at line 687 of file BVH.cc.

References BVH::_collision(), BVH::_create_bv(), SDS::_delayBuild, BVH::_root, BVH::_scaleRatio, BVH::Node::bv, List::firstItem(), List::length(), SDS::multiTrans(), and List::nextItem().

Referenced by OSGAdapter::collision().

InspectorSDS * createInspector unsigned   )  [virtual, inherited]
 

Implements SDS.

Definition at line 527 of file BVH.cc.

References BVH::InspectorBVH.

Iterator * createIterator  )  [virtual, inherited]
 

Implements SDS.

Definition at line 522 of file BVH.cc.

References BVH::IteratorBVH.

Referenced by OSGAdapter::getVertices().

unsigned depthLimit void   )  const [inline, inherited]
 

Definition at line 159 of file BVH.h.

SceneGraphObject * detach SceneGraphObject::OID   )  [virtual, inherited]
 

Implements SDS.

Definition at line 567 of file BVH.cc.

References BVH::_create_bv(), BVH::_leftLeaf, BVH::_remove_leaf(), and BVH::Node::rightChild.

double distance Matrix4 ,
BVH ,
Matrix4 ,
Node **  ,
Node **  ,
Vector3 pDir = NULL,
unsigned  d1 = UINT_MAX,
unsigned  d2 = UINT_MAX
[virtual, inherited]
 

Definition at line 603 of file BVH.cc.

References BVH::_create_dist_rot(), SDS::_delayBuild, BVH::_dr_init(), BVH::_dr_inner(), BVH::_root, BVH::Node::bv, DistRot::distance(), BVH::DRInfo::DISTANCE, BVH::DRInfo::hisMaxDepth, MAXDOUBLE, BVH::DRInfo::minD, BVH::DRInfo::myMaxDepth, BVH::DRInfo::pDir, BVH::DRInfo::pDistRot, BVH::DRInfo::pLeafA, BVH::DRInfo::pLeafB, and BVH::DRInfo::strategy.

Referenced by OSGAdapter::distance().

virtual void dump const char *   )  [inline, virtual, inherited]
 

Reimplemented in OctTree.

Definition at line 80 of file SDS.h.

void dump const char *  ,
const char * 
[virtual, inherited]
 

Implements SDS.

Definition at line 739 of file BVH.cc.

References BVH::_depthLimit, BVH::_dump(), BVH::_leafLimit, BVH::_root, BVH::_splitStrategy, BVH::_treeDepth, BVList::SPLIT_BY_MAX_EXTENT, and BVList::SPLIT_BY_MAX_VARIATION.

unsigned leafLimit void   )  const [inline, inherited]
 

Definition at line 158 of file BVH.h.

Matrix4 * multiTrans const Matrix4 ,
const Matrix4 ,
double & 
[static, inherited]
 

Definition at line 116 of file SDS.cc.

Matrix4 * multiTrans const Matrix4 ,
const Matrix4 ,
Vector3
[static, inherited]
 

Definition at line 10 of file SDS.cc.

Referenced by FDH14Tree::_dr_init(), BVH::_dr_init(), and BVH::collision().

bool separation Matrix4 ,
BVH ,
Matrix4 ,
Vector3 pDir = NULL,
unsigned  d1 = UINT_MAX,
unsigned  d2 = UINT_MAX
[virtual, inherited]
 

Definition at line 651 of file BVH.cc.

References BVH::_create_dist_rot(), SDS::_delayBuild, BVH::_dr_init(), BVH::_dr_inner(), BVH::_root, BVH::Node::bv, BVH::DRInfo::hisMaxDepth, BVH::DRInfo::minD, BVH::DRInfo::myMaxDepth, BVH::DRInfo::pDir, BVH::DRInfo::pDistRot, BVH::DRInfo::pLeafA, BVH::DRInfo::pLeafB, DistRot::separation(), BVH::DRInfo::SEPARATION, and BVH::DRInfo::strategy.

Referenced by OSGAdapter::separation().

bool update void   )  [virtual, inherited]
 

Implements SDS.

Definition at line 587 of file BVH.cc.

References SDS::_delayBuild, BVH::_rebuild_tree(), and BVH::_root.


Member Data Documentation

Matrix4 _coordMat [protected, inherited]
 

matrix transforming my coords to the partner's

Definition at line 125 of file BVH.h.

Referenced by BVH::__get_edges(), BVH::__get_meshes(), BVH::_create_dist_rot(), BVH::_dr_init(), and BVH::_dr_leaf().

bool _delayBuild [protected, inherited]
 

Definition at line 31 of file SDS.h.

Referenced by SDS::_duplicate_attributes(), OctTree::build(), BVH::build(), BVH::collision(), BVH::distance(), BVH::separation(), OctTree::update(), and BVH::update().

unsigned _depthLimit [protected, inherited]
 

Definition at line 121 of file BVH.h.

Referenced by BVH::_append(), BVH::_build_tree(), BVH::_duplicate_attributes(), BVH::BVH(), and BVH::dump().

const unsigned _dirs [protected]
 

Definition at line 28 of file FDHTree.h.

Referenced by FDHTree::_create_bv(), FDH6Tree::_create_bv(), FDH14Tree::_create_bv(), FDHTree::_create_list(), FDHTree::_enlarge_bv(), and FDHTree::clone().

struct esg::BVH::DRInfo _drInfo [protected, inherited]
 

const float(* _fdhMat)[3] [protected]
 

Definition at line 29 of file FDHTree.h.

Referenced by FDHTree::_create_bv(), FDH6Tree::_create_bv(), FDH14Tree::_create_bv(), FDHTree::_create_list(), FDHTree::_enlarge_bv(), and FDHTree::clone().

List<SceneGraphObject> _intangibleChildren [protected, inherited]
 

Definition at line 32 of file SDS.h.

Referenced by OctTree::append(), Heap::append(), BVH::append(), IteratorSDS::firstChild(), and IteratorSDS::nextChild().

unsigned _leafLimit [protected, inherited]
 

Definition at line 120 of file BVH.h.

Referenced by BVH::_append(), BVH::_build_tree(), BVH::_duplicate_attributes(), BVH::BVH(), and BVH::dump().

Node* _leftLeaf [protected, inherited]
 

Definition at line 119 of file BVH.h.

Referenced by BVH::_append(), BVH::_duplicate_attributes(), BVH::_remove_leaf(), BVH::BVH(), and BVH::detach().

Matrix4 _myTrMat [protected, inherited]
 

Definition at line 124 of file BVH.h.

Referenced by BVH::_dr_init(), and BVH::_dr_leaf().

BVH* _pPartner [protected, inherited]
 

partner during collision detection

Definition at line 127 of file BVH.h.

Referenced by BVH::_dr_init(), BVH::_dr_inner(), BVH::_dr_leaf(), BVH::_duplicate_attributes(), and BVH::BVH().

Node* _root [protected, inherited]
 

Definition at line 118 of file BVH.h.

Referenced by BVH::__debug(), BVH::__getEdges(), BVH::__getMeshes(), BVH::_duplicate_attributes(), BVH::_remove_leaf(), BVH::build(), BVH::BVH(), BVH::collision(), BVH::distance(), BVH::dump(), BVH::separation(), BVH::update(), and BVH::~BVH().

double _scaleRatio [protected, inherited]
 

metric ratio scale from _pCoordMat

Definition at line 126 of file BVH.h.

Referenced by FDH14Tree::_create_dist_rot(), BVH::_create_dist_rot(), FDH14Tree::_dr_init(), BVH::_dr_init(), BVH::_duplicate_attributes(), BVH::BVH(), and BVH::collision().

BVList::SplitStrategy _splitStrategy [protected, inherited]
 

Definition at line 129 of file BVH.h.

Referenced by BVH::_append(), BVH::_duplicate_attributes(), BVH::BVH(), and BVH::dump().

unsigned _treeDepth [protected, inherited]
 

Definition at line 122 of file BVH.h.

Referenced by BVH::dump().


The documentation for this class was generated from the following files:
Generated on Wed Jun 28 12:24:35 2006 for esg by  doxygen 1.4.6