Added View::computeIntersections methods
This commit is contained in:
@@ -15,11 +15,14 @@
|
||||
#define OSGVIEWER_VIEW 1
|
||||
|
||||
#include <osg/View>
|
||||
|
||||
#include <osgUtil/PolytopeIntersector>
|
||||
#include <osgUtil/LineSegmentIntersector>
|
||||
#include <osgUtil/SceneView>
|
||||
|
||||
#include <osgGA/MatrixManipulator>
|
||||
#include <osgViewer/Scene>
|
||||
|
||||
#include <osgUtil/SceneView>
|
||||
|
||||
namespace osgViewer {
|
||||
|
||||
/** View holds a single view on a scene, this view may be composed of one or more slave cameras.*/
|
||||
@@ -53,6 +56,22 @@ class OSGVIEWER_EXPORT View : public osg::View, public osgGA::GUIActionAdapter
|
||||
/** Convinience method for a single Camara associated with a single full screen GraphicsWindow.*/
|
||||
void setUpViewOnSingleScreen(unsigned int screenNum=0);
|
||||
|
||||
|
||||
/** Compute intersections between a ray through the specified master cameras window/eye coords and a specified node.
|
||||
* Note, when a master cameras has slaves and no viewport itself its coordinate frame will be in clip space i.e. -1,-1 to 1,1,
|
||||
* while if its has a viewport the coordintates will be relative to its viewport dimensions.
|
||||
* Mouse events handled by the view will automatically be attached into the master camera window/clip coords so can be passed
|
||||
* directly on to the computeIntersections method. */
|
||||
bool computeIntersections(float x,float y, osgUtil::LineSegmentIntersector::Intersections& intersections,osg::Node::NodeMask traversalMask = 0xffffffff);
|
||||
|
||||
/** Compute intersections between a ray through the specified master cameras window/eye coords and a specified node.
|
||||
* Note, when a master cameras has slaves and no viewport itself its coordinate frame will be in clip space i.e. -1,-1 to 1,1,
|
||||
* while if its has a viewport the coordintates will be relative to its viewport dimensions.
|
||||
* Mouse events handled by the view will automatically be attached into the master camera window/clip coords so can be passed
|
||||
* directly on to the computeIntersections method. */
|
||||
bool computeIntersections(float x,float y, osg::Node* node, osgUtil::LineSegmentIntersector::Intersections& intersections,osg::Node::NodeMask traversalMask = 0xffffffff);
|
||||
|
||||
|
||||
virtual void requestRedraw();
|
||||
virtual void requestContinuousUpdate(bool needed=true);
|
||||
virtual void requestWarpPointer(float x,float y);
|
||||
|
||||
Reference in New Issue
Block a user