class OSGPRODUCER_EXPORT osgProducer::Viewer


Inheritance:


Public Classes

[more]enum ViewerOptions

Public Methods

[more] Viewer()
[more] Viewer(Producer::CameraConfig* cfg)
[more] Viewer(const std::string& configFile)
[more] Viewer(osg::ArgumentParser& arguments)
[more]virtual ~Viewer()
[more]void setUpViewer(unsigned int options=STANDARD_SETTINGS)
[more]void setDone(bool done)
[more]bool getDone() const
[more]virtual bool done() const
return true if the application is done and should exit
[more]virtual void setViewByMatrix( const Producer::Matrix & pm)
Override the Producer::CameraGroup::setViewByMatrix to catch all changes to view
[more]virtual bool realize(ThreadingModel thread_model)
Set the threading model and then call realize()
[more]virtual bool realize()
[more]virtual void update()
Updated the scene.
[more]void setUpdateVisitor(osg::NodeVisitor* nv)
set the update visitor which does the update traversal of the scene graph.
[more]osg::NodeVisitor* getUpdateVisitor()
get the update visitor
[more]const osg::NodeVisitor* getUpdateVisitor() const
get the const update visitor
[more]void computeActiveCoordindateSystemNodePath()
[more]void setCoordindateSystemNodePath(const RefNodePath& nodePath)
[more]void setCoordindateSystemNodePath(const osg::NodePath& nodePath)
[more]const RefNodePath& getCoordindateSystemNodePath() const
[more]virtual void frame()
Dispatch the cull and draw for each of the Camera's for this frame
[more]virtual void requestRedraw()
[more]virtual void requestContinuousUpdate(bool)
[more]virtual void requestWarpPointer(float x, float y)
[more]bool computePixelCoords(float x, float y, unsigned int cameraNum, float& pixel_x, float& pixel_y)
compute, from normalized mouse coords, for sepecified Camera, the pixel coords relative to that Camera's RenderSurface
[more]bool computeNearFarPoints(float x, float y, unsigned int cameraNum, osg::Vec3& near, osg::Vec3& far)
compute, from normalized mouse coords, for sepecified Camera, the near and far points in worlds coords
[more]bool computeIntersections(float x, float y, unsigned int cameraNum, osg::Node* node, osgUtil::IntersectVisitor::HitList& hits, osg::Node::NodeMask traversalMask = 0xffffffff)
compute, from normalized mouse coords, for all Cameras, intersections with the specified subgraph
[more]bool computeIntersections(float x, float y, unsigned int cameraNum, osgUtil::IntersectVisitor::HitList& hits, osg::Node::NodeMask traversalMask = 0xffffffff)
compute, from normalized mouse coords, for sepecified Camera, intersections with the scene
[more]bool computeIntersections(float x, float y, osg::Node* node, osgUtil::IntersectVisitor::HitList& hits, osg::Node::NodeMask traversalMask = 0xffffffff)
compute, from normalized mouse coords, for all Cameras, intersections with specified subgraph
[more]bool computeIntersections(float x, float y, osgUtil::IntersectVisitor::HitList& hits, osg::Node::NodeMask traversalMask = 0xffffffff)
compute, from normalized mouse coords, for all Cameras, intersections with the scene
[more]void setKeyboardMouse(Producer::KeyboardMouse* kbm)
[more]Producer::KeyboardMouse* getKeyboardMouse()
[more]const Producer::KeyboardMouse* getKeyboardMouse() const
[more]void setKeyboardMouseCallback(osgProducer::KeyboardMouseCallback* kbmcb)
[more]osgProducer::KeyboardMouseCallback* getKeyboardMouseCallback()
[more]const osgProducer::KeyboardMouseCallback* getKeyboardMouseCallback() const
[more]EventHandlerList& getEventHandlerList()
[more]const EventHandlerList& getEventHandlerList() const
[more]osgGA::KeySwitchMatrixManipulator* getKeySwitchMatrixManipulator()
[more]const osgGA::KeySwitchMatrixManipulator* getKeySwitchMatrixManipulator() const
[more]unsigned int addCameraManipulator(osgGA::MatrixManipulator* cm)
[more]void selectCameraManipulator(unsigned int no)
[more]void setRecordingAnimationPath(bool on)
[more]bool getRecordingAnimationPath() const
[more]void setAnimationPath(osg::AnimationPath* path)
[more]osg::AnimationPath* getAnimationPath()
[more]const osg::AnimationPath* getAnimationPath() const
[more]const double* getPosition() const
[more]double getSpeed() const
[more]osg::Quat getOrientation() const
[more]virtual void getUsage(osg::ApplicationUsage& usage) const
Get the keyboard and mouse usage of this viewer
[more]virtual void updatedSceneData()
update internal structures wrt updated scene data

Public

[more]typedef std::vector< osg::ref_ptr<osg::Node> > RefNodePath
[more]typedef std::list< osg::ref_ptr<osgGA::GUIEventHandler> > EventHandlerList

Protected Fields

[more]bool _done
[more]osg::ref_ptr<Producer::KeyboardMouse> _kbm
[more]osg::ref_ptr<osgProducer::KeyboardMouseCallback> _kbmcb
[more]EventHandlerList _eventHandlerList
[more]osg::ref_ptr<osgGA::KeySwitchMatrixManipulator> _keyswitchManipulator
[more]osg::ref_ptr<osg::NodeVisitor> _updateVisitor
[more]RefNodePath _coordinateSystemNodePath
[more]bool _recordingAnimationPath
[more]double _recordingStartTime
[more]osg::ref_ptr<osg::AnimationPath> _animationPath
[more]double _position[3]
[more]osg::Quat _orientation
[more]double _speed


Inherited from OsgCameraGroup:

Public Classes

class OSGPRODUCER_EXPORT RealizeCallback: public osg::Referenced
RealizeCallback class one should override to provide an the implemention of realize callbacks.RealizeCallback class one should override to provide an the implemention of realize callbacks.

Public Methods

oosg::Vec4& getBackgroundColor()
ovoid setApplicationUsage(osg::ApplicationUsage* au)
oosg::ApplicationUsage* getApplicationUsage()
oconst osg::ApplicationUsage* getApplicationUsage() const
oSceneHandlerList& getSceneHandlerList()
oconst SceneHandlerList& getSceneHandlerList() const
ovoid setSceneData( osg::Node* scene )
oosg::Node* getSceneData()
oconst osg::Node* getSceneData() const
ovoid setSceneDecorator( osg::Group* decorator)
oosg::Group* getSceneDecorator()
oconst osg::Group* getSceneDecorator() const
oosg::Node* getTopMostSceneData()
oconst osg::Node* getTopMostSceneData() const
ovoid setDisplaySettings( osg::DisplaySettings* ds )
oosg::DisplaySettings* getDisplaySettings()
oconst osg::DisplaySettings* getDisplaySettings() const
ovoid setFrameStamp( osg::FrameStamp* fs )
oosg::FrameStamp* getFrameStamp()
oconst osg::FrameStamp* getFrameStamp() const
ovoid setGlobalStateSet( osg::StateSet* sset )
oosg::StateSet* getGlobalStateSet()
oconst osg::StateSet* getGlobalStateSet() const
ovoid setBackgroundColor( const osg::Vec4& backgroundColor)
oconst osg::Vec4& getBackgroundColor() const
ovoid setClearColor( const osg::Vec4& clearColor )
oconst osg::Vec4& getClearColor() const
ovoid setLODScale( float scale )
ofloat getLODScale() const
ovoid setFusionDistance( osgUtil::SceneView::FusionDistanceMode mode, float value=1.0f)
ovoid setRealizeSceneViewOptions(unsigned int options)
ounsigned int getRealizeSceneViewOptions()
ovoid setRealizeCallback( RealizeCallback* cb)
oRealizeCallback* getRealizeCallback()
oconst RealizeCallback* getRealizeCallback() const
ovoid advance()
ovirtual void setView(const osg::Matrixd& matrix)
oosg::Matrixd getViewMatrix() const
ovirtual void sync()

Public

otypedef std::vector< Producer::ref_ptr<osgProducer::OsgSceneHandler> > SceneHandlerList

Protected Fields

oosg::Vec4 _background_color
oosg::ApplicationUsage* _applicationUsage
oosg::ref_ptr<osg::Node> _scene_data
oosg::ref_ptr<osg::Group> _scene_decorator
oosg::ref_ptr<osg::StateSet> _global_stateset
oosg::Vec4 _clear_color
ofloat _LODScale
oosgUtil::SceneView::FusionDistanceMode _fusionDistanceMode
ofloat _fusionDistanceValue
ounsigned int _realizeSceneViewOptions
oSceneHandlerList _shvec
oosg::ref_ptr<RealizeCallback> _realizeCallback
oosg::ref_ptr<osg::DisplaySettings> _ds
obool _initialized
ounsigned int _frameNumber
oosg::Timer _timer
oosg::Timer_t _start_tick
oosg::ref_ptr<osg::FrameStamp> _frameStamp

Protected Methods

ovirtual void setUpSceneViewsWithData()
ovoid _init()


Documentation

o Viewer()

o Viewer(Producer::CameraConfig* cfg)

o Viewer(const std::string& configFile)

o Viewer(osg::ArgumentParser& arguments)

ovirtual ~Viewer()

oenum ViewerOptions

o NO_EVENT_HANDLERS

o TRACKBALL_MANIPULATOR

o DRIVE_MANIPULATOR

o FLIGHT_MANIPULATOR

o TERRAIN_MANIPULATOR

o STATE_MANIPULATOR

o HEAD_LIGHT_SOURCE

o SKY_LIGHT_SOURCE

o STATS_MANIPULATOR

o VIEWER_MANIPULATOR

o ESCAPE_SETS_DONE

o STANDARD_SETTINGS

ovoid setUpViewer(unsigned int options=STANDARD_SETTINGS)

ovoid setDone(bool done)

obool getDone() const

ovirtual bool done() const
return true if the application is done and should exit

ovirtual void setViewByMatrix( const Producer::Matrix & pm)
Override the Producer::CameraGroup::setViewByMatrix to catch all changes to view

ovirtual bool realize(ThreadingModel thread_model)
Set the threading model and then call realize()

ovirtual bool realize()

ovirtual void update()
Updated the scene. Handle any queued up events, do an update traversal and set the CameraGroup's setViewByMatrix if any camera manipulators are active.

ovoid setUpdateVisitor(osg::NodeVisitor* nv)
set the update visitor which does the update traversal of the scene graph. Automatically called by the update() method.

oosg::NodeVisitor* getUpdateVisitor()
get the update visitor

oconst osg::NodeVisitor* getUpdateVisitor() const
get the const update visitor

otypedef std::vector< osg::ref_ptr<osg::Node> > RefNodePath

ovoid computeActiveCoordindateSystemNodePath()

ovoid setCoordindateSystemNodePath(const RefNodePath& nodePath)

ovoid setCoordindateSystemNodePath(const osg::NodePath& nodePath)

oconst RefNodePath& getCoordindateSystemNodePath() const

ovirtual void frame()
Dispatch the cull and draw for each of the Camera's for this frame

ovirtual void requestRedraw()

ovirtual void requestContinuousUpdate(bool)

ovirtual void requestWarpPointer(float x, float y)

obool computePixelCoords(float x, float y, unsigned int cameraNum, float& pixel_x, float& pixel_y)
compute, from normalized mouse coords, for sepecified Camera, the pixel coords relative to that Camera's RenderSurface

obool computeNearFarPoints(float x, float y, unsigned int cameraNum, osg::Vec3& near, osg::Vec3& far)
compute, from normalized mouse coords, for sepecified Camera, the near and far points in worlds coords

obool computeIntersections(float x, float y, unsigned int cameraNum, osg::Node* node, osgUtil::IntersectVisitor::HitList& hits, osg::Node::NodeMask traversalMask = 0xffffffff)
compute, from normalized mouse coords, for all Cameras, intersections with the specified subgraph

obool computeIntersections(float x, float y, unsigned int cameraNum, osgUtil::IntersectVisitor::HitList& hits, osg::Node::NodeMask traversalMask = 0xffffffff)
compute, from normalized mouse coords, for sepecified Camera, intersections with the scene

obool computeIntersections(float x, float y, osg::Node* node, osgUtil::IntersectVisitor::HitList& hits, osg::Node::NodeMask traversalMask = 0xffffffff)
compute, from normalized mouse coords, for all Cameras, intersections with specified subgraph

obool computeIntersections(float x, float y, osgUtil::IntersectVisitor::HitList& hits, osg::Node::NodeMask traversalMask = 0xffffffff)
compute, from normalized mouse coords, for all Cameras, intersections with the scene

ovoid setKeyboardMouse(Producer::KeyboardMouse* kbm)

oProducer::KeyboardMouse* getKeyboardMouse()

oconst Producer::KeyboardMouse* getKeyboardMouse() const

ovoid setKeyboardMouseCallback(osgProducer::KeyboardMouseCallback* kbmcb)

oosgProducer::KeyboardMouseCallback* getKeyboardMouseCallback()

oconst osgProducer::KeyboardMouseCallback* getKeyboardMouseCallback() const

otypedef std::list< osg::ref_ptr<osgGA::GUIEventHandler> > EventHandlerList

oEventHandlerList& getEventHandlerList()

oconst EventHandlerList& getEventHandlerList() const

oosgGA::KeySwitchMatrixManipulator* getKeySwitchMatrixManipulator()

oconst osgGA::KeySwitchMatrixManipulator* getKeySwitchMatrixManipulator() const

ounsigned int addCameraManipulator(osgGA::MatrixManipulator* cm)

ovoid selectCameraManipulator(unsigned int no)

ovoid setRecordingAnimationPath(bool on)

obool getRecordingAnimationPath() const

ovoid setAnimationPath(osg::AnimationPath* path)

oosg::AnimationPath* getAnimationPath()

oconst osg::AnimationPath* getAnimationPath() const

oconst double* getPosition() const

odouble getSpeed() const

oosg::Quat getOrientation() const

ovirtual void getUsage(osg::ApplicationUsage& usage) const
Get the keyboard and mouse usage of this viewer

ovirtual void updatedSceneData()
update internal structures wrt updated scene data

obool _done

oosg::ref_ptr<Producer::KeyboardMouse> _kbm

oosg::ref_ptr<osgProducer::KeyboardMouseCallback> _kbmcb

oEventHandlerList _eventHandlerList

oosg::ref_ptr<osgGA::KeySwitchMatrixManipulator> _keyswitchManipulator

oosg::ref_ptr<osg::NodeVisitor> _updateVisitor

oRefNodePath _coordinateSystemNodePath

obool _recordingAnimationPath

odouble _recordingStartTime

oosg::ref_ptr<osg::AnimationPath> _animationPath

odouble _position[3]

oosg::Quat _orientation

odouble _speed


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.