openscenegraph
|
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) |
virtual bool | intersect (const osg::Vec3d &start, const osg::Vec3d &end, LineSegmentIntersections &intersections) const |
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 |
![]() | |
Shape () | |
Shape (const Shape &sa, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
virtual Object * | cloneType () const =0 |
virtual Object * | clone (const CopyOp &) const =0 |
virtual bool | isSameKindAs (const Object *obj) const |
virtual const char * | libraryName () const |
virtual const char * | className () const |
virtual void | accept (ShapeVisitor &)=0 |
virtual void | accept (ConstShapeVisitor &) const =0 |
![]() | |
Object () | |
Object (bool threadSafeRefUnref) | |
Object (const Object &, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
virtual void | setThreadSafeRefUnref (bool threadSafe) |
virtual void | setName (const std::string &name) |
void | setName (const char *name) |
const std::string & | getName () const |
void | setDataVariance (DataVariance dv) |
DataVariance | getDataVariance () const |
virtual void | computeDataVariance () |
void | setUserDataContainer (osg::UserDataContainer *udc) |
osg::UserDataContainer * | getUserDataContainer () |
const osg::UserDataContainer * | getUserDataContainer () const |
osg::UserDataContainer * | getOrCreateUserDataContainer () |
virtual void | setUserData (Referenced *obj) |
virtual Referenced * | getUserData () |
virtual const Referenced * | getUserData () const |
template<typename T > | |
bool | getUserValue (const std::string &name, T &value) const |
template<typename T > | |
void | setUserValue (const std::string &name, const T &value) |
virtual void | resizeGLObjectBuffers (unsigned int) |
virtual void | releaseGLObjects (osg::State *=0) const |
![]() | |
Referenced () | |
Referenced (bool threadSafeRefUnref) | |
Referenced (const Referenced &) | |
Referenced & | operator= (const Referenced &) |
bool | getThreadSafeRefUnref () const |
OpenThreads::Mutex * | getRefMutex () const |
int | ref () const |
int | unref () const |
int | unref_nodelete () const |
int | referenceCount () const |
ObserverSet * | getObserverSet () const |
ObserverSet * | getOrCreateObserverSet () const |
void | addObserver (Observer *observer) const |
void | removeObserver (Observer *observer) const |
Protected Attributes | |
osg::ref_ptr< osg::Vec3Array > | _vertices |
KdNodeList | _kdNodes |
TriangleList | _triangles |
Additional Inherited Members | |
![]() | |
static OpenThreads::Mutex * | getGlobalReferencedMutex () |
static void | setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting) |
static bool | getThreadSafeReferenceCounting () |
static void | setDeleteHandler (DeleteHandler *handler) |
static DeleteHandler * | getDeleteHandler () |
![]() | |
virtual | ~Shape () |
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 |
||
) |
|
inline |
|
inline |
References osg::MixinVector< ValueT >::push_back().
|
virtual |
Build the kdtree from the specified source geometry object. retun true on success.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
compute the intersection of a line segment and the kdtree, return true if an intersection has been found.
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |