14#ifndef OSGGA_CameraManipulator
15#define OSGGA_CameraManipulator 1
30#define NEW_HOME_POSITION
47 virtual const char*
className()
const {
return "CameraManipulator"; }
Matrixd CoordinateFrame
CoordinateFrame encapsulates the orientation of east, north and up.
Definition CoordinateSystemNode:91
The 'GA' in osgGA stands for 'GUI Abstraction'; the osgGA namespace provides facilities to help devel...
Definition Callback:21
Camera - is a subclass of Transform which represents encapsulates the settings of a Camera.
Definition Camera:45
void setViewMatrix(const osg::Matrixf &matrix)
Set the view matrix.
Definition Camera:244
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Base class for all internal nodes in the scene graph.
Definition Node:72
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
Base class/standard interface for objects which require IO support, cloning and reference counting.
Definition Object:61
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
Base class for providing reference counted objects.
Definition Referenced:44
General purpose double triple for use as vertices, vectors and normals.
Definition Vec3d:30
void setIntersectTraversalMask(unsigned int mask)
Set the mask to use when set up intersection traversal such as used in manipulators that follow terra...
Definition CameraManipulator:102
osg::ref_ptr< CoordinateFrameCallback > _coordinateFrameCallback
Definition CameraManipulator:191
osg::Vec3d getUpVector(const osg::CoordinateFrame &cf) const
Definition CameraManipulator:76
virtual void setByInverseMatrix(const osg::Matrixd &matrix)=0
set the position of the matrix manipulator using a 4x4 Matrix.
virtual void finishAnimation()
finish any active manipulator animations.
Definition CameraManipulator:147
CameraManipulator(const CameraManipulator &mm, const osg::CopyOp ©Op=osg::CopyOp::SHALLOW_COPY)
virtual void getHomePosition(osg::Vec3d &eye, osg::Vec3d ¢er, osg::Vec3d &up) const
Get the manually set home position.
Definition CameraManipulator:130
virtual void setAutoComputeHomePosition(bool flag)
Set whether the automatic compute of the home position is enabled.
Definition CameraManipulator:138
virtual void computeHomePosition(const osg::Camera *camera=NULL, bool useBoundingBox=false)
Compute the home position.
virtual void init(const GUIEventAdapter &, GUIActionAdapter &)
Start/restart the manipulator.
Definition CameraManipulator:166
virtual void updateCamera(osg::Camera &camera)
update the camera for the current frame, typically called by the viewer classes.
Definition CameraManipulator:92
virtual void setHomePosition(const osg::Vec3d &eye, const osg::Vec3d ¢er, const osg::Vec3d &up, bool autoComputeHomePosition=false)
Manually set the home position, and set the automatic compute of home position.
Definition CameraManipulator:121
unsigned int _intersectTraversalMask
Definition CameraManipulator:183
virtual ~CameraManipulator()
const CoordinateFrameCallback * getCoordinateFrameCallback() const
get the coordinate frame callback which tells the manipulator which way is up, east and north.
Definition CameraManipulator:65
virtual osg::Node * getNode()
Return node if attached.
Definition CameraManipulator:118
virtual void setNode(osg::Node *)
Attach a node to the manipulator, automatically detaching any previously attached node.
Definition CameraManipulator:112
virtual bool handle(osgGA::Event *event, osg::Object *object, osg::NodeVisitor *nv)
Handle event.
Definition CameraManipulator:169
bool _autoComputeHomePosition
Definition CameraManipulator:185
CoordinateFrameCallback * getCoordinateFrameCallback()
get the coordinate frame callback which tells the manipulator which way is up, east and north.
Definition CameraManipulator:62
osg::Vec3d getFrontVector(const osg::CoordinateFrame &cf) const
Definition CameraManipulator:75
std::string getManipulatorName() const
virtual float getFusionDistanceValue() const
Get the FusionDistanceValue.
Definition CameraManipulator:98
virtual void home(double)
Move the camera to the default position.
Definition CameraManipulator:161
virtual const char * className() const
return the name of the object's class type.
Definition CameraManipulator:47
virtual const osg::Node * getNode() const
Return const node if attached.
Definition CameraManipulator:115
osg::Vec3d _homeCenter
Definition CameraManipulator:188
virtual bool handle(const GUIEventAdapter &ea, GUIActionAdapter &us)
Handle events, return true if handled, false otherwise.
virtual osg::Matrixd getMatrix() const =0
get the position of the manipulator as 4x4 Matrix.
osg::CoordinateFrame getCoordinateFrame(const osg::Vec3d &position) const
get the coordinate frame.
Definition CameraManipulator:68
virtual void setCoordinateFrameCallback(CoordinateFrameCallback *cb)
set the coordinate frame which callback tells the manipulator which way is up, east and north.
Definition CameraManipulator:59
osg::Vec3d _homeEye
Definition CameraManipulator:187
virtual osg::Matrixd getInverseMatrix() const =0
get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model...
virtual void home(const GUIEventAdapter &, GUIActionAdapter &)
Move the camera to the default position.
Definition CameraManipulator:153
osg::Vec3d getSideVector(const osg::CoordinateFrame &cf) const
Definition CameraManipulator:74
osg::Vec3d _homeUp
Definition CameraManipulator:189
virtual void setByMatrix(const osg::Matrixd &matrix)=0
set the position of the matrix manipulator using a 4x4 Matrix.
virtual osgUtil::SceneView::FusionDistanceMode getFusionDistanceMode() const
Get the FusionDistanceMode.
Definition CameraManipulator:95
unsigned int getIntersectTraversalMask() const
Get the mask to use when set up intersection traversal such as used in manipulators that follow terra...
Definition CameraManipulator:105
bool getAutoComputeHomePosition() const
Get whether the automatic compute of the home position is enabled.
Definition CameraManipulator:141
callback class to use to allow matrix manipulators to query the application for the local coordinate ...
Definition CameraManipulator:51
virtual osg::CoordinateFrame getCoordinateFrame(const osg::Vec3d &position) const =0
virtual ~CoordinateFrameCallback()
Definition CameraManipulator:55
Base Event class.
Definition Event:27
virtual void event(osg::NodeVisitor *nv, osg::Drawable *drawable)
Event traversal drawable callback method.
Definition GUIActionAdapter:62
Event class for storing Keyboard, mouse and window events.
Definition GUIEventAdapter:82
virtual bool handle(osgGA::Event *event, osg::Object *object, osg::NodeVisitor *nv)
Handle event.
GUIEventHandler()
Definition GUIEventHandler:53
FusionDistanceMode
FusionDistanceMode is used only when working in stereo.
Definition SceneView:339
@ PROPORTIONAL_TO_SCREEN_DISTANCE
Compute the fusion distance by multiplying the screen distance by the fusion distance value.
Definition SceneView:343
#define NULL
Definition Export:55
#define OSGGA_EXPORT
Definition Export:40