osgViewer.View

class osgViewer.View
Represents

c++ class

Wraps

osgViewer::View

Bases

osg.View, osgGA.GUIActionAdapter

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

Constructors:

osgViewer.View()

Methods:

:getViewerBase()

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

Тип результата

osgViewer.ViewerBase

:take(osg.View view)

Take all the settings, osg.Camera and osg.View.Slave s from the passed in osg.View, leaving it empty.

Параметры

view (osg.View) –

:setStartTick(osg.Timer.Type tick)

Параметры

tick (osg.Timer.Type) –

:getStartTick()

Тип результата

osg.Timer.Type

:getScene()

Тип результата

osgViewer.Scene

:setSceneData(osg.Node node)

Set the scene graph that the osgViewer.View will use.

Параметры

node (osg.Node) –

:getSceneData()

Get the osgViewer.View’s scene graph.

Тип результата

osg.Node

:setEventQueue(osgGA.EventQueue queue)

Set the osgGA.EventQueue that osgViewer.View uses to integrate external non window related events.

Параметры

queue (osgGA.EventQueue) –

:getEventQueue()

Get osgViewer.View’s osgGA.EventQueue.

Тип результата

osgGA.EventQueue

:setCameraManipulator(osgGA.CameraManipulator manipulator)

Short version. setCameraManipulator call with resetPosition equal to true.

Параметры

manipulator (osgGA.CameraManipulator) –

:setCameraManipulator(osgGA.CameraManipulator manipulator, bool resetPosition)

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

Параметры
:getCameraManipulator()

Get osgViewer.View’s osgGA.CameraManipulator.

Тип результата

osgGA.CameraManipulator

:home()

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

:addEventHandler(osgGA.EventHandler eventHandler)

Add an osgGA.EventHandler that adds handling of events to osgViewer.View.

Параметры

eventHandler (osgGA.EventHandler) –

:removeEventHandler(osgGA.EventHandler eventHandler)

Remove an osgGA.EventHandler from osgViewer.View.

Параметры

eventHandler (osgGA.EventHandler) –

:setDisplaySettings(osg.DisplaySettings ds)

Set the osg.DisplaySettings object associated with this osgViewer.View.

Параметры

ds (osg.DisplaySettings) –

:getDisplaySettings()

Get the osg.DisplaySettings object associated with this osgViewer.View.

Тип результата

osg.DisplaySettings

:apply(osgViewer.ViewConfig config)

Apply a viewer configuration to set up Cameras and Windowing.

Параметры

config (osgViewer.ViewConfig) –

:getLastAppliedViewConfig()

Тип результата

osgViewer.ViewConfig

:setUpViewAcrossAllScreens()

Deprecated, use osgViewer.View.apply() with object osgViewer.AcrossAllScreens as argument.

:setUpViewInWindow(int x, int y, int width, int height)

Short version. setUpViewInWindow call with screenNum equal to 0.

Параметры
  • x (int) –

  • y (int) –

  • width (int) –

  • height (int) –

:setUpViewInWindow(int x, int y, int width, int height, unsigned screenNum)

Deprecated, use osgViewer.View.apply() with object constructed as osgViewer.SingleWindow(x, y, width, screenNum)) as argument

Параметры
  • x (int) –

  • y (int) –

  • width (int) –

  • height (int) –

  • screenNum (unsigned) –

:setUpViewOnSingleScreen()

Deprecated, use osgViewer.View.apply() with object constructed as osgViewer.AcrossAllScreens(screenNum)) as argument.

:setUpViewOnSingleScreen(unsigned screenNum)

Параметры

screenNum (unsigned) –

:containsCamera(osg.Camera camera)

Return true if osgViewer.View contains a specified camera.

Параметры

camera (osg.Camera) –

Тип результата

bool

:init()

:assignSceneDataToCameras()

:assignSceneDataToCameras()

:createDistortionTexture(int width, int height)

Параметры
  • width (int) –

  • height (int) –

Тип результата

osg.Texture

:assignRenderToTextureCamera(osg.GraphicsContext gc, int width, int height, osg.Texture texture)

Параметры
Тип результата

osg.Camera

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

Параметры
Тип результата

osg.Camera

:assignStereoCamera(osg.DisplaySettings ds, osg.GraphicsContext gc, int x, int y, int width, int height, int buffer, double eyeScale)

Параметры
Тип результата

osg.Camera

:assignStereoOrKeystoneToCamera(osg.Camera camera, osg.DisplaySettings ds)

Параметры