openscenegraph
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
osgViewer::View Class Reference

#include <View>

Inheritance diagram for osgViewer::View:
osg::View osgGA::GUIActionAdapter osg::Object osg::Referenced osgViewer::Viewer

Classes

struct  StereoSlaveCallback
 

Public Types

typedef std::vector< osg::ref_ptr< osgGA::Device > > Devices
 
typedef std::list< osg::ref_ptr< osgGA::EventHandler > > EventHandlers
 
- Public Types inherited from osg::View
enum  LightingMode { NO_LIGHT , HEADLIGHT , SKY_LIGHT }
 
- Public Types inherited from osg::Object
enum  DataVariance { DYNAMIC , STATIC , UNSPECIFIED }
 

Public Member Functions

 View ()
 
 View (const osgViewer::View &view, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 
 META_Object (osgViewer, View)
 
virtual osg::ViewasView ()
 
ViewerBasegetViewerBase ()
 
virtual void take (osg::View &rhs)
 
virtual void setStartTick (osg::Timer_t tick)
 
osg::Timer_t getStartTick () const
 
ScenegetScene ()
 
const ScenegetScene () const
 
virtual void setSceneData (osg::Node *node)
 
template<class T >
void setSceneData (const osg::ref_ptr< T > &node)
 
osg::NodegetSceneData ()
 
const osg::NodegetSceneData () const
 
void setDatabasePager (osgDB::DatabasePager *dp)
 
template<class T >
void setDatabasePager (const osg::ref_ptr< T > &dp)
 
osgDB::DatabasePagergetDatabasePager ()
 
const osgDB::DatabasePagergetDatabasePager () const
 
void setImagePager (osgDB::ImagePager *ip)
 
template<class T >
void setImagePager (const osg::ref_ptr< T > &ip)
 
osgDB::ImagePagergetImagePager ()
 
const osgDB::ImagePagergetImagePager () const
 
void addDevice (osgGA::Device *eventSource)
 
template<class T >
void addDevice (const osg::ref_ptr< T > &eventSource)
 
void removeDevice (osgGA::Device *eventSource)
 
template<class T >
void removeDevice (const osg::ref_ptr< T > &eventSource)
 
DevicesgetDevices ()
 
const DevicesgetDevices () const
 
void setEventQueue (osgGA::EventQueue *eventQueue)
 
template<class T >
void setEventQueue (const osg::ref_ptr< T > &eventQueue)
 
osgGA::EventQueuegetEventQueue ()
 
const osgGA::EventQueuegetEventQueue () const
 
void setCameraManipulator (osgGA::CameraManipulator *manipulator, bool resetPosition=true)
 
template<class T >
void setCameraManipulator (const osg::ref_ptr< T > &manipulator, bool resetPosition=true)
 
osgGA::CameraManipulatorgetCameraManipulator ()
 
const osgGA::CameraManipulatorgetCameraManipulator () const
 
void home ()
 
void addEventHandler (osgGA::EventHandler *eventHandler)
 
template<class T >
void addEventHandler (const osg::ref_ptr< T > &eventHandler)
 
void removeEventHandler (osgGA::EventHandler *eventHandler)
 
template<class T >
void removeEventHandler (const osg::ref_ptr< T > &eventHandler)
 
EventHandlersgetEventHandlers ()
 
const EventHandlersgetEventHandlers () const
 
void setCoordinateSystemNodePath (const osg::NodePath &nodePath)
 
osg::NodePath getCoordinateSystemNodePath () const
 
void computeActiveCoordinateSystemNodePath ()
 
void setDisplaySettings (osg::DisplaySettings *ds)
 
template<class T >
void setDisplaySettings (const osg::ref_ptr< T > &ds)
 
osg::DisplaySettingsgetDisplaySettings ()
 
const osg::DisplaySettingsgetDisplaySettings () const
 
void setFusionDistance (osgUtil::SceneView::FusionDistanceMode mode, float value=1.0f)
 
osgUtil::SceneView::FusionDistanceMode getFusionDistanceMode () const
 
float getFusionDistanceValue () const
 
void apply (ViewConfig *config)
 
template<class T >
void apply (const osg::ref_ptr< T > &config)
 
ViewConfiggetLastAppliedViewConfig ()
 
const ViewConfiggetLastAppliedViewConfig () const
 
void setUpViewAcrossAllScreens ()
 
void setUpViewInWindow (int x, int y, int width, int height, unsigned int screenNum=0)
 
void setUpViewOnSingleScreen (unsigned int screenNum=0)
 
void setUpViewFor3DSphericalDisplay (double radius=1.0, double collar=0.45, unsigned int screenNum=0, osg::Image *intensityMap=0, const osg::Matrixd &projectorMatrix=osg::Matrixd())
 
void setUpViewForPanoramicSphericalDisplay (double radius=1.0, double collar=0.45, unsigned int screenNum=0, osg::Image *intensityMap=0, const osg::Matrixd &projectorMatrix=osg::Matrixd())
 
void setUpViewForWoWVxDisplay (unsigned int screenNum, unsigned char wow_content, unsigned char wow_factor, unsigned char wow_offset, float wow_disparity_Zd, float wow_disparity_vz, float wow_disparity_M, float wow_disparity_C)
 
bool setUpDepthPartitionForCamera (osg::Camera *cameraToPartition, DepthPartitionSettings *dps=0)
 
bool setUpDepthPartition (DepthPartitionSettings *dsp=0)
 
bool containsCamera (const osg::Camera *camera) const
 
template<class T >
bool containsCamera (const osg::ref_ptr< T > &camera) const
 
const osg::CameragetCameraContainingPosition (float x, float y, float &local_x, float &local_y) const
 
bool computeIntersections (float x, float y, osgUtil::LineSegmentIntersector::Intersections &intersections, osg::Node::NodeMask traversalMask=0xffffffff)
 
bool computeIntersections (float x, float y, const osg::NodePath &nodePath, osgUtil::LineSegmentIntersector::Intersections &intersections, osg::Node::NodeMask traversalMask=0xffffffff)
 
bool computeIntersections (const osgGA::GUIEventAdapter &ea, osgUtil::LineSegmentIntersector::Intersections &intersections, osg::Node::NodeMask traversalMask=0xffffffff)
 
bool computeIntersections (const osgGA::GUIEventAdapter &ea, const osg::NodePath &nodePath, osgUtil::LineSegmentIntersector::Intersections &intersections, osg::Node::NodeMask traversalMask=0xffffffff)
 
bool computeIntersections (const osg::Camera *camera, osgUtil::Intersector::CoordinateFrame cf, float x, float y, osgUtil::LineSegmentIntersector::Intersections &intersections, osg::Node::NodeMask traversalMask=0xffffffff)
 
bool computeIntersections (const osg::Camera *camera, osgUtil::Intersector::CoordinateFrame cf, float x, float y, const osg::NodePath &nodePath, 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)
 
virtual bool requiresUpdateSceneGraph () const
 
virtual bool requiresRedraw () const
 
osg::TexturecreateDistortionTexture (int width, int height)
 
osg::CameraassignRenderToTextureCamera (osg::GraphicsContext *gc, int width, int height, osg::Texture *texture)
 
osg::CameraassignKeystoneDistortionCamera (osg::DisplaySettings *ds, osg::GraphicsContext *gc, int x, int y, int width, int height, GLenum buffer, osg::Texture *texture, Keystone *keystone)
 
osg::CameraassignStereoCamera (osg::DisplaySettings *ds, osg::GraphicsContext *gc, int x, int y, int width, int height, GLenum buffer, double eyeScale)
 
void assignStereoOrKeystoneToCamera (osg::Camera *camera, osg::DisplaySettings *ds)
 
void assignSceneDataToCameras ()
 
void init ()
 
- Public Member Functions inherited from osg::View
 View ()
 
 View (const osg::View &view, const osg::CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
 META_Object (osg, View)
 
void setStats (osg::Stats *stats)
 
osg::StatsgetStats ()
 
const osg::StatsgetStats () const
 
void setLightingMode (LightingMode lightingMode)
 
LightingMode getLightingMode () const
 
void setLight (osg::Light *light)
 
osg::LightgetLight ()
 
const osg::LightgetLight () const
 
void setCamera (osg::Camera *camera)
 
osg::CameragetCamera ()
 
const osg::CameragetCamera () const
 
void setFrameStamp (osg::FrameStamp *fs)
 
osg::FrameStampgetFrameStamp ()
 
const osg::FrameStampgetFrameStamp () const
 
bool addSlave (osg::Camera *camera, bool useMastersSceneData=true)
 
bool addSlave (osg::Camera *camera, const osg::Matrix &projectionOffset, const osg::Matrix &viewOffset, bool useMastersSceneData=true)
 
bool removeSlave (unsigned int pos)
 
unsigned int getNumSlaves () const
 
SlavegetSlave (unsigned int pos)
 
const SlavegetSlave (unsigned int pos) const
 
unsigned int findSlaveIndexForCamera (osg::Camera *camera) const
 
SlavefindSlaveForCamera (osg::Camera *camera)
 
void updateSlaves ()
 
virtual void resizeGLObjectBuffers (unsigned int maxSize)
 
virtual void releaseGLObjects (osg::State *=0) const
 
- Public Member Functions inherited from osg::Object
 Object ()
 
 Object (bool threadSafeRefUnref)
 
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
virtual ObjectcloneType () const =0
 
virtual Objectclone (const CopyOp &) const =0
 
virtual bool isSameKindAs (const Object *) const
 
virtual const char * libraryName () const =0
 
virtual const char * className () const =0
 
std::string getCompoundClassName () const
 
virtual NodeasNode ()
 
virtual const NodeasNode () const
 
virtual NodeVisitorasNodeVisitor ()
 
virtual const NodeVisitorasNodeVisitor () const
 
virtual StateSetasStateSet ()
 
virtual const StateSetasStateSet () const
 
virtual StateAttributeasStateAttribute ()
 
virtual const StateAttributeasStateAttribute () const
 
virtual UniformasUniform ()
 
virtual const UniformasUniform () const
 
virtual CameraasCamera ()
 
virtual const CameraasCamera () const
 
virtual DrawableasDrawable ()
 
virtual const DrawableasDrawable () const
 
virtual CallbackasCallback ()
 
virtual const CallbackasCallback () const
 
virtual CallbackObjectasCallbackObject ()
 
virtual const CallbackObjectasCallbackObject () const
 
virtual UserDataContainerasUserDataContainer ()
 
virtual const UserDataContainerasUserDataContainer () const
 
virtual ValueObjectasValueObject ()
 
virtual const ValueObjectasValueObject () const
 
virtual ImageasImage ()
 
virtual const ImageasImage () const
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 
virtual void setName (const std::string &name)
 
void setName (const char *name)
 
const std::string & getName () const
 
void setDataVariance (DataVariance dv)
 
DataVariance getDataVariance () const
 
virtual void computeDataVariance ()
 
void setUserDataContainer (osg::UserDataContainer *udc)
 
template<class T >
void setUserDataContainer (const ref_ptr< T > &udc)
 
osg::UserDataContainergetUserDataContainer ()
 
const osg::UserDataContainergetUserDataContainer () const
 
osg::UserDataContainergetOrCreateUserDataContainer ()
 
virtual void setUserData (Referenced *obj)
 
template<class T >
void setUserData (const ref_ptr< T > &ud)
 
virtual ReferencedgetUserData ()
 
virtual const ReferencedgetUserData () const
 
template<typename T >
bool getUserValue (const std::string &name, T &value) const
 
template<typename T >
void setUserValue (const std::string &name, const T &value)
 
template<typename T >
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool getUserValue (const std::string &name, T &value) const
 
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 
 Referenced (bool threadSafeRefUnref)
 
 Referenced (const Referenced &)
 
Referencedoperator= (const Referenced &)
 
bool getThreadSafeRefUnref () const
 
OpenThreads::MutexgetRefMutex () const
 
int ref () const
 
int unref () const
 
int unref_nodelete () const
 
int referenceCount () const
 
ObserverSetgetObserverSet () const
 
ObserverSetgetOrCreateObserverSet () const
 
void addObserver (Observer *observer) const
 
void removeObserver (Observer *observer) const
 
- Public Member Functions inherited from osgGA::GUIActionAdapter
virtual ~GUIActionAdapter ()
 

Protected Member Functions

virtual ~View ()
 
virtual osg::GraphicsOperationcreateRenderer (osg::Camera *camera)
 
- Protected Member Functions inherited from osg::Object
virtual ~Object ()
 
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
 
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
 
void deleteUsingDeleteHandler () const
 

Protected Attributes

osg::observer_ptr< ViewerBase_viewerBase
 
osg::Timer_t _startTick
 
Devices _eventSources
 
osg::ref_ptr< osgViewer::Scene_scene
 
osg::ref_ptr< osgGA::EventQueue_eventQueue
 
osg::ref_ptr< osgGA::CameraManipulator_cameraManipulator
 
EventHandlers _eventHandlers
 
osg::ObserverNodePath _coordinateSystemNodePath
 
osg::ref_ptr< osg::DisplaySettings_displaySettings
 
osgUtil::SceneView::FusionDistanceMode _fusionDistanceMode
 
float _fusionDistanceValue
 
osg::ref_ptr< ViewConfig_lastAppliedViewConfig
 
- Protected Attributes inherited from osg::View
osg::ref_ptr< osg::Stats_stats
 
LightingMode _lightingMode
 
osg::ref_ptr< osg::Light_light
 
osg::ref_ptr< osg::Camera_camera
 
Slaves _slaves
 
osg::ref_ptr< osg::FrameStamp_frameStamp
 
- Protected Attributes inherited from osg::Object
std::string _name
 
DataVariance _dataVariance
 
osg::UserDataContainer_userDataContainer
 
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
 
OpenThreads::Atomic _refCount
 

Friends

class CompositeViewer
 

Additional Inherited Members

- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 
- Protected Types inherited from osg::View
typedef std::vector< SlaveSlaves
 

Detailed Description

View holds a single view on a scene, this view may be composed of one or more slave cameras.

Member Typedef Documentation

◆ Devices

◆ EventHandlers

Constructor & Destructor Documentation

◆ View() [1/2]

osgViewer::View::View ( )

◆ View() [2/2]

osgViewer::View::View ( const osgViewer::View view,
const osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY 
)

◆ ~View()

virtual osgViewer::View::~View ( )
protectedvirtual

Reimplemented from osg::View.

Member Function Documentation

◆ addDevice() [1/2]

template<class T >
void osgViewer::View::addDevice ( const osg::ref_ptr< T > &  eventSource)
inline

◆ addDevice() [2/2]

void osgViewer::View::addDevice ( osgGA::Device eventSource)

Add a Device. The Device is polled on each new frame via it's Device::checkEvents() method and any events generated then collected via Device::getEventQueue()

◆ addEventHandler() [1/2]

template<class T >
void osgViewer::View::addEventHandler ( const osg::ref_ptr< T > &  eventHandler)
inline

◆ addEventHandler() [2/2]

void osgViewer::View::addEventHandler ( osgGA::EventHandler eventHandler)

Add an EventHandler that adds handling of events to the View.

◆ apply() [1/2]

template<class T >
void osgViewer::View::apply ( const osg::ref_ptr< T > &  config)
inline

◆ apply() [2/2]

void osgViewer::View::apply ( ViewConfig config)

Apply a viewer configuration to set up Cameras and Windowing.

◆ assignKeystoneDistortionCamera()

osg::Camera * osgViewer::View::assignKeystoneDistortionCamera ( osg::DisplaySettings ds,
osg::GraphicsContext gc,
int  x,
int  y,
int  width,
int  height,
GLenum  buffer,
osg::Texture texture,
Keystone keystone 
)

◆ assignRenderToTextureCamera()

osg::Camera * osgViewer::View::assignRenderToTextureCamera ( osg::GraphicsContext gc,
int  width,
int  height,
osg::Texture texture 
)

◆ assignSceneDataToCameras()

void osgViewer::View::assignSceneDataToCameras ( )

◆ assignStereoCamera()

osg::Camera * osgViewer::View::assignStereoCamera ( osg::DisplaySettings ds,
osg::GraphicsContext gc,
int  x,
int  y,
int  width,
int  height,
GLenum  buffer,
double  eyeScale 
)

◆ assignStereoOrKeystoneToCamera()

void osgViewer::View::assignStereoOrKeystoneToCamera ( osg::Camera camera,
osg::DisplaySettings ds 
)

◆ asView()

virtual osg::View * osgViewer::View::asView ( )
inlinevirtual

Provide a mechanism for getting the osg::View associated from the GUIActionAdapter. One would use this to case view to osgViewer::View(er) if supported by the subclass.

Reimplemented from osgGA::GUIActionAdapter.

◆ computeActiveCoordinateSystemNodePath()

void osgViewer::View::computeActiveCoordinateSystemNodePath ( )

Compute the NodePath to any active CoordinateSystemNode present in the Scene.

◆ computeIntersections() [1/6]

bool osgViewer::View::computeIntersections ( const osg::Camera camera,
osgUtil::Intersector::CoordinateFrame  cf,
float  x,
float  y,
const osg::NodePath nodePath,
osgUtil::LineSegmentIntersector::Intersections intersections,
osg::Node::NodeMask  traversalMask = 0xffffffff 
)

Compute intersections of a ray through the specified camera and a specified nodePath's subgraph.

◆ computeIntersections() [2/6]

bool osgViewer::View::computeIntersections ( const osg::Camera camera,
osgUtil::Intersector::CoordinateFrame  cf,
float  x,
float  y,
osgUtil::LineSegmentIntersector::Intersections intersections,
osg::Node::NodeMask  traversalMask = 0xffffffff 
)

Compute intersections of a ray through the specified camera.

◆ computeIntersections() [3/6]

bool osgViewer::View::computeIntersections ( const osgGA::GUIEventAdapter ea,
const osg::NodePath nodePath,
osgUtil::LineSegmentIntersector::Intersections intersections,
osg::Node::NodeMask  traversalMask = 0xffffffff 
)
virtual

Compute intersections of a ray, starting the current mouse position, through the specified master camera's window/eye coordinates and a specified nodePath's subgraph.

Reimplemented from osgGA::GUIActionAdapter.

◆ computeIntersections() [4/6]

bool osgViewer::View::computeIntersections ( const osgGA::GUIEventAdapter ea,
osgUtil::LineSegmentIntersector::Intersections intersections,
osg::Node::NodeMask  traversalMask = 0xffffffff 
)
virtual

Compute intersections of a ray, starting the current mouse position, through the specified camera.

Reimplemented from osgGA::GUIActionAdapter.

◆ computeIntersections() [5/6]

bool osgViewer::View::computeIntersections ( float  x,
float  y,
const osg::NodePath nodePath,
osgUtil::LineSegmentIntersector::Intersections intersections,
osg::Node::NodeMask  traversalMask = 0xffffffff 
)

deprecated.

◆ computeIntersections() [6/6]

bool osgViewer::View::computeIntersections ( float  x,
float  y,
osgUtil::LineSegmentIntersector::Intersections intersections,
osg::Node::NodeMask  traversalMask = 0xffffffff 
)

deprecated.

◆ containsCamera() [1/2]

bool osgViewer::View::containsCamera ( const osg::Camera camera) const

Return true if this view contains a specified camera.

◆ containsCamera() [2/2]

template<class T >
bool osgViewer::View::containsCamera ( const osg::ref_ptr< T > &  camera) const
inline

◆ createDistortionTexture()

osg::Texture * osgViewer::View::createDistortionTexture ( int  width,
int  height 
)

◆ createRenderer()

virtual osg::GraphicsOperation * osgViewer::View::createRenderer ( osg::Camera camera)
protectedvirtual

Reimplemented from osg::View.

◆ getCameraContainingPosition()

const osg::Camera * osgViewer::View::getCameraContainingPosition ( float  x,
float  y,
float &  local_x,
float &  local_y 
) const

deprecated.

◆ getCameraManipulator() [1/2]

osgGA::CameraManipulator * osgViewer::View::getCameraManipulator ( )
inline

Get the View's CameraManipulator.

◆ getCameraManipulator() [2/2]

const osgGA::CameraManipulator * osgViewer::View::getCameraManipulator ( ) const
inline

Get the const View's CameraManipulator.

◆ getCoordinateSystemNodePath()

osg::NodePath osgViewer::View::getCoordinateSystemNodePath ( ) const

Get the NodePath to any active CoordinateSystemNode present in the Scene.

◆ getDatabasePager() [1/2]

osgDB::DatabasePager * osgViewer::View::getDatabasePager ( )

Get the View's database pager.

◆ getDatabasePager() [2/2]

const osgDB::DatabasePager * osgViewer::View::getDatabasePager ( ) const

Get the const View's database pager.

◆ getDevices() [1/2]

Devices & osgViewer::View::getDevices ( )
inline

◆ getDevices() [2/2]

const Devices & osgViewer::View::getDevices ( ) const
inline

◆ getDisplaySettings() [1/2]

osg::DisplaySettings * osgViewer::View::getDisplaySettings ( )
inline

Set the DisplaySettings object associated with this view.

◆ getDisplaySettings() [2/2]

const osg::DisplaySettings * osgViewer::View::getDisplaySettings ( ) const
inline

Set the DisplaySettings object associated with this view.

◆ getEventHandlers() [1/2]

EventHandlers & osgViewer::View::getEventHandlers ( )
inline

Get the View's list of EventHandlers.

◆ getEventHandlers() [2/2]

const EventHandlers & osgViewer::View::getEventHandlers ( ) const
inline

Get the const View's list of EventHandlers.

◆ getEventQueue() [1/2]

osgGA::EventQueue * osgViewer::View::getEventQueue ( )
inline

◆ getEventQueue() [2/2]

const osgGA::EventQueue * osgViewer::View::getEventQueue ( ) const
inline

◆ getFusionDistanceMode()

osgUtil::SceneView::FusionDistanceMode osgViewer::View::getFusionDistanceMode ( ) const
inline

Get the FusionDistanceMode.

◆ getFusionDistanceValue()

float osgViewer::View::getFusionDistanceValue ( ) const
inline

Get the FusionDistanceValue. Note, only used for USE_FUSION_DISTANCE_VALUE & PROPORTIONAL_TO_SCREEN_DISTANCE modes.

◆ getImagePager() [1/2]

osgDB::ImagePager * osgViewer::View::getImagePager ( )

Get the View's image pager.

◆ getImagePager() [2/2]

const osgDB::ImagePager * osgViewer::View::getImagePager ( ) const

Get the const View's image pager.

◆ getLastAppliedViewConfig() [1/2]

ViewConfig * osgViewer::View::getLastAppliedViewConfig ( )
inline

◆ getLastAppliedViewConfig() [2/2]

const ViewConfig * osgViewer::View::getLastAppliedViewConfig ( ) const
inline

◆ getScene() [1/2]

Scene * osgViewer::View::getScene ( )
inline

◆ getScene() [2/2]

const Scene * osgViewer::View::getScene ( ) const
inline

◆ getSceneData() [1/2]

osg::Node * osgViewer::View::getSceneData ( )
inline

Get the View's scene graph.

◆ getSceneData() [2/2]

const osg::Node * osgViewer::View::getSceneData ( ) const
inline

Get the const View's scene graph.

◆ getStartTick()

osg::Timer_t osgViewer::View::getStartTick ( ) const
inline

◆ getViewerBase()

ViewerBase * osgViewer::View::getViewerBase ( )
inline

Provide a mechanism for getting the viewer object from this osgViewer::View. In the case of a osgViewer::Viewer the ViewerBase will effectively point to this object as Viewer subclasses from View. In the case of a osgViewer::CompsoiteViewer the ViewerBase will point to the CompositeViewer that owns this View.

◆ home()

void osgViewer::View::home ( )

Set the view to the CameraManipulator's home position, if none is attached home() it does nothing. Note, to set the home position use getCamaraManipulator()->setHomePosition(...).

◆ init()

void osgViewer::View::init ( )

◆ META_Object()

osgViewer::View::META_Object ( osgViewer  ,
View   
)

◆ removeDevice() [1/2]

template<class T >
void osgViewer::View::removeDevice ( const osg::ref_ptr< T > &  eventSource)
inline

◆ removeDevice() [2/2]

void osgViewer::View::removeDevice ( osgGA::Device eventSource)

Remove a Device.

◆ removeEventHandler() [1/2]

template<class T >
void osgViewer::View::removeEventHandler ( const osg::ref_ptr< T > &  eventHandler)
inline

◆ removeEventHandler() [2/2]

void osgViewer::View::removeEventHandler ( osgGA::EventHandler eventHandler)

Remove an EventHandler from View.

◆ requestContinuousUpdate()

virtual void osgViewer::View::requestContinuousUpdate ( bool  needed = true)
virtual

requestContinuousUpdate(bool) is for en/disabling a throw or idle callback to be requested by a GUIEventHandler (typically a CameraManipulator, though other GUIEventHandler's may also provide functionality). GUI toolkits can respond to this immediately by registering an idle/timed callback, or can delay setting the callback and update at their own leisure.

Implements osgGA::GUIActionAdapter.

◆ requestRedraw()

virtual void osgViewer::View::requestRedraw ( )
virtual

requestRedraw() requests a single redraw.

Implements osgGA::GUIActionAdapter.

◆ requestWarpPointer()

virtual void osgViewer::View::requestWarpPointer ( float  x,
float  y 
)
virtual

requestWarpPointer(int,int) is requesting a repositioning of the mouse pointer to a specified x,y location on the window. This is used by some camera manipulators to initialise the mouse pointer when mouse position relative to a controls neutral mouse position is required, i.e when mimicking an aircraft joystick.

Implements osgGA::GUIActionAdapter.

◆ requiresRedraw()

virtual bool osgViewer::View::requiresRedraw ( ) const
virtual

Return true if there are graphics operations that require a draw of the grpahics context.

◆ requiresUpdateSceneGraph()

virtual bool osgViewer::View::requiresUpdateSceneGraph ( ) const
virtual

Return true if there are pending updates to the scene graph that require an update.

◆ setCameraManipulator() [1/2]

template<class T >
void osgViewer::View::setCameraManipulator ( const osg::ref_ptr< T > &  manipulator,
bool  resetPosition = true 
)
inline

◆ setCameraManipulator() [2/2]

void osgViewer::View::setCameraManipulator ( osgGA::CameraManipulator manipulator,
bool  resetPosition = true 
)

Set the CameraManipulator that moves the View's master Camera position in response to events. The parameter resetPosition determines whether manipulator is set to its home position.

◆ setCoordinateSystemNodePath()

void osgViewer::View::setCoordinateSystemNodePath ( const osg::NodePath nodePath)

Set the NodePath to any active CoordinateSystemNode present in the Scene. The CoordinateSystemNode path is used to help applications and CamaraManipulators handle geocentric coordinates systems, so that the local up direction is known at any position on the whole earth.

◆ setDatabasePager() [1/2]

template<class T >
void osgViewer::View::setDatabasePager ( const osg::ref_ptr< T > &  dp)
inline

◆ setDatabasePager() [2/2]

void osgViewer::View::setDatabasePager ( osgDB::DatabasePager dp)

Set the View's database pager.

◆ setDisplaySettings() [1/2]

template<class T >
void osgViewer::View::setDisplaySettings ( const osg::ref_ptr< T > &  ds)
inline

◆ setDisplaySettings() [2/2]

void osgViewer::View::setDisplaySettings ( osg::DisplaySettings ds)
inline

Set the DisplaySettings object associated with this view.

◆ setEventQueue() [1/2]

template<class T >
void osgViewer::View::setEventQueue ( const osg::ref_ptr< T > &  eventQueue)
inline

◆ setEventQueue() [2/2]

void osgViewer::View::setEventQueue ( osgGA::EventQueue eventQueue)
inline

◆ setFusionDistance()

void osgViewer::View::setFusionDistance ( osgUtil::SceneView::FusionDistanceMode  mode,
float  value = 1.0f 
)
inline

Set the FusionDistanceMode and Value. Note, only used when working in stereo.

◆ setImagePager() [1/2]

template<class T >
void osgViewer::View::setImagePager ( const osg::ref_ptr< T > &  ip)
inline

◆ setImagePager() [2/2]

void osgViewer::View::setImagePager ( osgDB::ImagePager ip)

Set the View's image pager.

◆ setSceneData() [1/2]

template<class T >
void osgViewer::View::setSceneData ( const osg::ref_ptr< T > &  node)
inline

◆ setSceneData() [2/2]

virtual void osgViewer::View::setSceneData ( osg::Node node)
virtual

Set the scene graph that the View will use.

Reimplemented in osgViewer::Viewer.

◆ setStartTick()

virtual void osgViewer::View::setStartTick ( osg::Timer_t  tick)
virtual

Reimplemented in osgViewer::Viewer.

◆ setUpDepthPartition()

bool osgViewer::View::setUpDepthPartition ( DepthPartitionSettings dsp = 0)

Convenience method for setting up multiple slave cameras with depth partitioning on each of the view's active cameras.

◆ setUpDepthPartitionForCamera()

bool osgViewer::View::setUpDepthPartitionForCamera ( osg::Camera cameraToPartition,
DepthPartitionSettings dps = 0 
)

Convenience method for setting up depth partitioning on the specified camera.

◆ setUpViewAcrossAllScreens()

void osgViewer::View::setUpViewAcrossAllScreens ( )

deprecated, use view.apply(new osgViewer::AcrossAllScreens()).

◆ setUpViewFor3DSphericalDisplay()

void osgViewer::View::setUpViewFor3DSphericalDisplay ( double  radius = 1.0,
double  collar = 0.45,
unsigned int  screenNum = 0,
osg::Image intensityMap = 0,
const osg::Matrixd projectorMatrix = osg::Matrixd() 
)

deprecated, use view.apply(new osgViewer::SphericalDisplay(radius, collar, screenNum, intensityMap, projectorMatrix)).

◆ setUpViewForPanoramicSphericalDisplay()

void osgViewer::View::setUpViewForPanoramicSphericalDisplay ( double  radius = 1.0,
double  collar = 0.45,
unsigned int  screenNum = 0,
osg::Image intensityMap = 0,
const osg::Matrixd projectorMatrix = osg::Matrixd() 
)

deprecated, use view.apply(new osgViewer::PanoramicSphericalDisplay(radius, collar, screenNum, intensityMap, projectorMatrix)).

◆ setUpViewForWoWVxDisplay()

void osgViewer::View::setUpViewForWoWVxDisplay ( unsigned int  screenNum,
unsigned char  wow_content,
unsigned char  wow_factor,
unsigned char  wow_offset,
float  wow_disparity_Zd,
float  wow_disparity_vz,
float  wow_disparity_M,
float  wow_disparity_C 
)

deprecated. use view.apply(new osgViewer::WoWVxDisplay(type (20 to 42), screenNum).

◆ setUpViewInWindow()

void osgViewer::View::setUpViewInWindow ( int  x,
int  y,
int  width,
int  height,
unsigned int  screenNum = 0 
)

deprecated, use view.apply(new osgViewer::SingleWindow(x,y,width,screenNum)).

◆ setUpViewOnSingleScreen()

void osgViewer::View::setUpViewOnSingleScreen ( unsigned int  screenNum = 0)

deprecated, use view.apply(new osgViewer::SingleScreen(screenNum)).

◆ take()

virtual void osgViewer::View::take ( osg::View rhs)
virtual

Take all the settings, Camera and Slaves from the passed in view, leaving it empty.

Reimplemented from osg::View.

Reimplemented in osgViewer::Viewer.

Friends And Related Symbol Documentation

◆ CompositeViewer

friend class CompositeViewer
friend

Member Data Documentation

◆ _cameraManipulator

osg::ref_ptr<osgGA::CameraManipulator> osgViewer::View::_cameraManipulator
protected

◆ _coordinateSystemNodePath

osg::ObserverNodePath osgViewer::View::_coordinateSystemNodePath
protected

◆ _displaySettings

osg::ref_ptr<osg::DisplaySettings> osgViewer::View::_displaySettings
protected

◆ _eventHandlers

EventHandlers osgViewer::View::_eventHandlers
protected

◆ _eventQueue

osg::ref_ptr<osgGA::EventQueue> osgViewer::View::_eventQueue
protected

◆ _eventSources

Devices osgViewer::View::_eventSources
protected

◆ _fusionDistanceMode

osgUtil::SceneView::FusionDistanceMode osgViewer::View::_fusionDistanceMode
protected

◆ _fusionDistanceValue

float osgViewer::View::_fusionDistanceValue
protected

◆ _lastAppliedViewConfig

osg::ref_ptr<ViewConfig> osgViewer::View::_lastAppliedViewConfig
protected

◆ _scene

osg::ref_ptr<osgViewer::Scene> osgViewer::View::_scene
protected

◆ _startTick

osg::Timer_t osgViewer::View::_startTick
protected

◆ _viewerBase

osg::observer_ptr<ViewerBase> osgViewer::View::_viewerBase
protected

The documentation for this class was generated from the following file: