OpenSceneGraph
3.0.1
|
Implementation of a kdtree for Geometry leaves, to enable fast intersection tests. More...
Classes | |
struct | KdNode |
struct | LineSegmentIntersection |
struct | Triangle |
Public Types | |
typedef std::vector < LineSegmentIntersection > | LineSegmentIntersections |
typedef int | value_type |
typedef std::vector< KdNode > | KdNodeList |
typedef std::vector< Triangle > | TriangleList |
Public Member Functions | |
KdTree () | |
KdTree (const KdTree &rhs, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
META_Shape (osg, KdTree) struct OSG_EXPORT BuildOptions | |
virtual bool | build (BuildOptions &buildOptions, osg::Geometry *geometry) |
Build the kdtree from the specified source geometry object. | |
virtual bool | intersect (const osg::Vec3d &start, const osg::Vec3d &end, LineSegmentIntersections &intersections) const |
compute the intersection of a line segment and the kdtree, return true if an intersection has been found. | |
int | addNode (const KdNode &node) |
KdNode & | getNode (int nodeNum) |
const KdNode & | getNode (int nodeNum) const |
KdNodeList & | getNodes () |
const KdNodeList & | getNodes () const |
void | setVertices (osg::Vec3Array *vertices) |
const osg::Vec3Array * | getVertices () const |
unsigned int | addTriangle (const Triangle &tri) |
Triangle & | getTriangle (unsigned int i) |
const Triangle & | getTriangle (unsigned int i) const |
TriangleList & | getTriangles () |
const TriangleList & | getTriangles () const |
Protected Attributes | |
osg::ref_ptr< osg::Vec3Array > | _vertices |
KdNodeList | _kdNodes |
TriangleList | _triangles |
Implementation of a kdtree for Geometry leaves, to enable fast intersection tests.
typedef std::vector< KdNode > osg::KdTree::KdNodeList |
typedef std::vector<LineSegmentIntersection> osg::KdTree::LineSegmentIntersections |
typedef std::vector< Triangle > osg::KdTree::TriangleList |
typedef int osg::KdTree::value_type |
osg::KdTree::KdTree | ( | ) |
osg::KdTree::KdTree | ( | const KdTree & | rhs, |
const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
) |
int osg::KdTree::addNode | ( | const KdNode & | node | ) | [inline] |
unsigned int osg::KdTree::addTriangle | ( | const Triangle & | tri | ) | [inline] |
References osg::MixinVector::push_back().
virtual bool osg::KdTree::build | ( | BuildOptions & | buildOptions, |
osg::Geometry * | geometry | ||
) | [virtual] |
Build the kdtree from the specified source geometry object.
retun true on success.
KdNode& osg::KdTree::getNode | ( | int | nodeNum | ) | [inline] |
const KdNode& osg::KdTree::getNode | ( | int | nodeNum | ) | const [inline] |
KdNodeList& osg::KdTree::getNodes | ( | ) | [inline] |
const KdNodeList& osg::KdTree::getNodes | ( | ) | const [inline] |
Triangle& osg::KdTree::getTriangle | ( | unsigned int | i | ) | [inline] |
const Triangle& osg::KdTree::getTriangle | ( | unsigned int | i | ) | const [inline] |
TriangleList& osg::KdTree::getTriangles | ( | ) | [inline] |
const TriangleList& osg::KdTree::getTriangles | ( | ) | const [inline] |
const osg::Vec3Array* osg::KdTree::getVertices | ( | ) | const [inline] |
virtual bool osg::KdTree::intersect | ( | const osg::Vec3d & | start, |
const osg::Vec3d & | end, | ||
LineSegmentIntersections & | intersections | ||
) | const [virtual] |
compute the intersection of a line segment and the kdtree, return true if an intersection has been found.
osg::KdTree::META_Shape | ( | osg | , |
KdTree | |||
) | [inline] |
void osg::KdTree::setVertices | ( | osg::Vec3Array * | vertices | ) | [inline] |
KdNodeList osg::KdTree::_kdNodes [protected] |
TriangleList osg::KdTree::_triangles [protected] |
osg::ref_ptr<osg::Vec3Array> osg::KdTree::_vertices [protected] |
![]() | Generated at Mon Oct 3 2011 12:39:42 for the OpenSceneGraph by doxygen 1.7.5. |