|
|
|
|
|
|
|
|
|
|
|
#ifndef OSGUTIL_XJSimplePolytopeIntersector
|
|
|
|
|
|
#define OSGUTIL_XJSimplePolytopeIntersector
|
|
|
|
|
|
|
|
|
|
|
|
#include <osgUtil/IntersectionVisitor>
|
|
|
|
|
|
#include <osgUtil/PolytopeIntersector>
|
|
|
|
|
|
|
|
|
|
|
|
namespace osgUtil
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD>ѡ<EFBFBD>еĶ<D0B5><C4B6><EFBFBD><F3A3ACB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
class XJSimplePolytopeIntersector : public PolytopeIntersector
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
/** Construct a XJPolytopeIntersector using specified polytope in MODEL coordinates.*/
|
|
|
|
|
|
XJSimplePolytopeIntersector(const osg::Polytope& polytope);
|
|
|
|
|
|
|
|
|
|
|
|
/** Construct a XJPolytopeIntersector using specified polytope in specified coordinate frame.*/
|
|
|
|
|
|
XJSimplePolytopeIntersector(CoordinateFrame cf, const osg::Polytope& polytope);
|
|
|
|
|
|
|
|
|
|
|
|
/** 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.*/
|
|
|
|
|
|
XJSimplePolytopeIntersector(CoordinateFrame cf, double xMin, double yMin, double xMax, double yMax);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void intersect(osgUtil::IntersectionVisitor& iv, osg::Drawable* drawable);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
|
|
int m_num;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // end namespace
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|