Collaboration diagram for col::DopNode:
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. | |
DopNode * | child [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 |
col::DopNode::DopNode | ( | ) |
Init DOP tree node.
DOP components are set to
-numeric_limits<float>::max()
bool col::DopNode::check_down | ( | const DopNodeList & | other, | |
Data * | data, | |||
const DopTransform & | dt | |||
) | const |
Recursive work-horse for DopTree::check().
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) |
If data->intersect_fun (PolyIntersectT) is set, this will be called for an intersection test of pairs of polygons.
data
.Ori
must be pairwise anti-parallel!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.
osg::NodePtr col::DopNode::getGeom | ( | int | level | ) | const |
Create geometry from DOP tree.
level | a polyhedron will be created for all nodes on this level |
level
< 0, then only leaves will be considered.
Child contains pointer to children, or, if node is a leaf, it contains an index to a polygon.