col::DopNode Struct Reference

DOP node of the DOP hierarchy. More...

Collaboration diagram for col::DopNode:

Collaboration graph
[legend]
List of all members.

Debugging

void print (int depth, bool print_dops) const
 Print DOP tree.
unsigned int numFaces (void) const
 Return number of faces under a DOP node.
osg::NodePtr getGeom (int level) const
 Create geometry from DOP tree.
void getGeom (int level, osg::NodePtr &root) const

Public Member Functions

bool check (DopNode &other, Data *data)
Debugging
 DopNode ()
 Init DOP tree node.
bool check_down (const DopNodeList &other, Data *data, const DopTransform &dt) const
 Recursive work-horse for DopTree::check().
bool check_stay (const DopNodeList &other, Data *data, const Dop &e, const DopTransform &dt) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Like previous method, but with the additional condition that this is a leaf node, so we actually stay on the same node as of the previous recursion.

Public Attributes

Dop d
 DOP for this node.
DopNodechild [2]
 Child contains pointer to children, or, if node is a leaf, it contains an index to a polygon.
const osg::MFPnt3f * points
 The enclosed polygon; if leaf node = indices into vertex array.
unsigned int pgon [3]
unsigned int nvertices
osg::GeometryPtr geo
 OSG index of enclosed polygon.
unsigned int index

Static Protected Attributes

static const int MaxPrintRecursions = 80

Detailed Description

DOP node of the DOP hierarchy.

Author:
Gabriel Zachmann
Todo:
Kann nur Dreiecke handeln! (siehe nvertices im header file!)


Constructor & Destructor Documentation

col::DopNode::DopNode (  ) 

Init DOP tree node.

DOP components are set to

 -numeric_limits<float>::max() 
.


Member Function Documentation

bool col::DopNode::check_down ( const DopNodeList &  other,
Data data,
const DopTransform dt 
) const

Recursive work-horse for DopTree::check().

Parameters:
other the other DopTree (bvh2)
dt DOP transformation from this coords into other's coords
data recursion data (e.g., DopTransform), and callback data, e.g., intersecting polygon(s)
Returns:
True, if intersection, false otherwise.
This is the traversal scheme from "High-Performance Collision Detection Hardware" Technical Report, Aug 2003, University Bonn, see http://web.informatik.uni-bonn.de/II/ag-klein/people/zach/papers/collchip_techrep.html This method actually processes this->child[0] and this->child[1]!

If data->intersect_fun (PolyIntersectT) is set, this will be called for an intersection test of pairs of polygons.

Precondition:
  • the children of this (child[0] and child[1]) are tested
  • The two geometries are already stored in data.
  • The orientations in Ori must be pairwise anti-parallel!
  • A node is an inner node iff child[0] is NULL.
Todo:
  • const machen
  • Check, ob pairwise processing hier in SW etwas bringt
  • DopNode sollte 2 Dop's enthalten (wie der Algo es eben braucht)
  • mit Intel compiler nochmal checken, ob transform2 nicht doch etwas bringt. Dito mit overlap2.
  • Verbesserungen aus VRST-Paper einbauen
  • In den arrays child_other koennte man den 2ten Zeiger einsparen, da immer other[i] und other[i]+1 betrachtet werden muessen. Dann waeren die Listen nur halb so gross.
Implementation:
self = bvh1, other = bvh2, dt = comn->Bb/d/o, ee = e1, compared to Y:opyIntersectR.

bool col::DopNode::check_stay ( const DopNodeList &  other,
Data data,
const Dop e,
const DopTransform dt 
) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Like previous method, but with the additional condition that this is a leaf node, so we actually stay on the same node as of the previous recursion.

Todo:
: Per overload deklarieren.

osg::NodePtr col::DopNode::getGeom ( int  level  )  const

Create geometry from DOP tree.

Parameters:
level a polyhedron will be created for all nodes on this level
If a leaf has a level less than level, then a geometry will still be created for it. If level < 0, then only leaves will be considered.

See also:
Dop::getGeom


Member Data Documentation

DopNode* col::DopNode::child[2]

Child contains pointer to children, or, if node is a leaf, it contains an index to a polygon.


The documentation for this struct was generated from the following files:
Generated on Tue Oct 16 18:12:51 2007 for CollDet by  doxygen 1.5.2