OSG
3.4.0
|
#include <PolytopeIntersector.h>
Classes | |
struct | Intersection |
Public Types | |
enum | { DimZero = (1<<0), DimOne = (1<<1), DimTwo = (1<<2), AllDims = (DimZero | DimOne | DimTwo) } |
dimension enum to specify primitive types to check. More... | |
typedef osg::Plane::Vec3_type | Vec3_type |
typedef std::set< Intersection > | Intersections |
![]() | |
enum | CoordinateFrame { WINDOW, PROJECTION, VIEW, MODEL } |
enum | IntersectionLimit { NO_LIMIT, LIMIT_ONE_PER_DRAWABLE, LIMIT_ONE, LIMIT_NEAREST } |
enum | PrecisionHint { USE_DOUBLE_CALCULATIONS, USE_FLOAT_CALCULATIONS } |
Protected Attributes | |
PolytopeIntersector * | _parent |
osg::Polytope | _polytope |
unsigned int | _dimensionMask |
mask which dimensions should be checked More... | |
osg::Plane | _referencePlane |
plane to use for sorting intersections More... | |
Intersections | _intersections |
![]() | |
CoordinateFrame | _coordinateFrame |
IntersectionLimit | _intersectionLimit |
unsigned int | _disabledCount |
PrecisionHint | _precisionHint |
![]() | |
OpenThreads::AtomicPtr | _observerSet |
OpenThreads::Atomic | _refCount |
Additional Inherited Members | |
![]() | |
static OpenThreads::Mutex * | getGlobalReferencedMutex () |
static void | setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting) |
static bool | getThreadSafeReferenceCounting () |
static void | setDeleteHandler (DeleteHandler *handler) |
static DeleteHandler * | getDeleteHandler () |
![]() | |
virtual | ~Referenced () |
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const |
void | deleteUsingDeleteHandler () const |
Concrete class for implementing polytope intersections with the scene graph. To be used in conjunction with IntersectionVisitor.
Definition at line 24 of file PolytopeIntersector.h.
typedef std::set<Intersection> osgUtil::PolytopeIntersector::Intersections |
Definition at line 81 of file PolytopeIntersector.h.
Definition at line 47 of file PolytopeIntersector.h.
anonymous enum |
dimension enum to specify primitive types to check.
Enumerator | |
---|---|
DimZero |
check for points |
DimOne |
check for lines |
DimTwo |
check for triangles, quad |
AllDims |
Definition at line 28 of file PolytopeIntersector.h.
osgUtil::PolytopeIntersector::PolytopeIntersector | ( | const osg::Polytope & | polytope | ) |
Construct a PolytopeIntersector using specified polytope in MODEL coordinates.
osgUtil::PolytopeIntersector::PolytopeIntersector | ( | CoordinateFrame | cf, |
const osg::Polytope & | polytope | ||
) |
Construct a PolytopeIntersector using specified polytope in specified coordinate frame.
osgUtil::PolytopeIntersector::PolytopeIntersector | ( | CoordinateFrame | cf, |
double | xMin, | ||
double | yMin, | ||
double | xMax, | ||
double | yMax | ||
) |
Convenience constructor for supporting picking in WINDOW, or PROJECTION coordinates In WINDOW coordinates (clip space cube) creates a five sided polytope box that has a front face at 0.0 and sides around box xMin, yMin, xMax, yMax. In PROJECTION coordinates (clip space cube) creates a five sided polytope box that has a front face at -1 and sides around box xMin, yMin, xMax, yMax. In VIEW and MODEL coordinates (clip space cube) creates a five sided polytope box that has a front face at 0.0 and sides around box xMin, yMin, xMax, yMax.
|
virtual |
Implements osgUtil::Intersector.
|
inlinevirtual |
Implements osgUtil::Intersector.
Definition at line 118 of file PolytopeIntersector.h.
|
virtual |
Implements osgUtil::Intersector.
|
inline |
Definition at line 89 of file PolytopeIntersector.h.
|
inline |
Definition at line 87 of file PolytopeIntersector.h.
|
inline |
Definition at line 85 of file PolytopeIntersector.h.
|
inline |
Definition at line 97 of file PolytopeIntersector.h.
|
inline |
Definition at line 83 of file PolytopeIntersector.h.
|
virtual |
Implements osgUtil::Intersector.
|
virtual |
Implements osgUtil::Intersector.
|
virtual |
Reimplemented from osgUtil::Intersector.
|
inline |
set the dimension mask. As polytope-triangle and polytope-quad intersections are expensive to compute it is possible to turn them off by calling setDimensionMask( DimZero | DimOne )
Definition at line 95 of file PolytopeIntersector.h.
|
inline |
set the plane used to sort the intersections. The intersections are sorted by the distance of the localIntersectionPoint and the reference plane. The default for the reference plane is the last plane of the polytope.
Definition at line 104 of file PolytopeIntersector.h.
|
protected |
mask which dimensions should be checked
Definition at line 126 of file PolytopeIntersector.h.
|
protected |
Definition at line 129 of file PolytopeIntersector.h.
|
protected |
Definition at line 122 of file PolytopeIntersector.h.
|
protected |
Definition at line 124 of file PolytopeIntersector.h.
|
protected |
plane to use for sorting intersections
Definition at line 127 of file PolytopeIntersector.h.