osgViewer.View¶
-
class
osgViewer.View¶ Represents: c++ class Wraps: osgViewer::View Bases: osg.View,osgGA.GUIActionAdapterosgViewer.Viewholds 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 aosgViewer.ViewertheosgViewer.ViewerBasewill effectively point to this object asosgViewer.Viewersubclasses fromosgViewer.View. In the case of aosgViewer.CompsoiteViewertheosgViewer.ViewerBasewill point to theosgViewer.CompositeViewerthat owns thisosgViewer.View.Return type: osgViewer.ViewerBase
-
:
take(osg.View view)¶ Take all the settings,
osg.Cameraandosg.View.Slaves from the passed inosg.View, leaving it empty.Parameters: view ( osg.View) –
-
:
setStartTick(uint64 tick)¶ -
Parameters: tick ( uint64) –
-
:
getStartTick()¶ -
Return type: uint64
-
:
getScene()¶ -
Return type: osgViewer.Scene
-
:
setSceneData(osg.Node node)¶ Set the scene graph that the
osgViewer.Viewwill use.Parameters: node ( osg.Node) –
-
:
getSceneData()¶ Get the
osgViewer.View’s scene graph.Return type: osg.Node
-
:
setEventQueue(osgGA.EventQueue queue)¶ Set the
osgGA.EventQueuethatosgViewer.Viewuses to integrate external non window related events.Parameters: queue ( osgGA.EventQueue) –
-
:
getEventQueue()¶ Get
osgViewer.View’sosgGA.EventQueue.Return type: osgGA.EventQueue
-
:
setCameraManipulator(osgGA.CameraManipulator manipulator)¶ Short version.
setCameraManipulatorcall with resetPosition equal totrue.Parameters: manipulator ( osgGA.CameraManipulator) –
-
:
setCameraManipulator(osgGA.CameraManipulator manipulator, bool resetPosition) Set the
osgGA.CameraManipulatorthat movesosgViewer.View’s masterosg.Cameraposition in response to events. The parameter resetPosition determines whether manipulator is set to its home position.Parameters: - manipulator (
osgGA.CameraManipulator) – - resetPosition (
bool) –
- manipulator (
-
:
getCameraManipulator()¶ Get
osgViewer.View’sosgGA.CameraManipulator.Return type: osgGA.CameraManipulator
-
:
home()¶ Set
osgViewer.Viewto theosgGA.CameraManipulator’s home position, if none is attachedhome()it does nothing. Note, to set the home position usegetCamaraManipulator()->setHomePosition(...).
-
:
addEventHandler(osgGA.EventHandler eventHandler)¶ Add an
osgGA.EventHandlerthat adds handling of events toosgViewer.View.Parameters: eventHandler ( osgGA.EventHandler) –
-
:
removeEventHandler(osgGA.EventHandler eventHandler)¶ Remove an
osgGA.EventHandlerfromosgViewer.View.Parameters: eventHandler ( osgGA.EventHandler) –
-
:
setDisplaySettings(osg.DisplaySettings ds)¶ Set the
osg.DisplaySettingsobject associated with thisosgViewer.View.Parameters: ds ( osg.DisplaySettings) –
-
:
getDisplaySettings()¶ Get the
osg.DisplaySettingsobject associated with thisosgViewer.View.Return type: osg.DisplaySettings
-
:
apply(osgViewer.ViewConfig config)¶ Apply a viewer configuration to set up Cameras and Windowing.
Parameters: config ( osgViewer.ViewConfig) –
-
:
getLastAppliedViewConfig()¶ -
Return type: osgViewer.ViewConfig
-
:
setUpViewAcrossAllScreens()¶ Deprecated, use
osgViewer.View.apply()with objectosgViewer.AcrossAllScreensas argument.
-
:
setUpViewInWindow(int x, int y, int width, int height)¶ Short version.
setUpViewInWindowcall with screenNum equal to0.Parameters: - x (
int) – - y (
int) – - width (
int) – - height (
int) –
- x (
-
:
setUpViewInWindow(int x, int y, int width, int height, unsigned screenNum) Deprecated, use
osgViewer.View.apply()with object constructed asosgViewer.SingleWindow(x, y, width, screenNum))as argumentParameters: - x (
int) – - y (
int) – - width (
int) – - height (
int) – - screenNum (
unsigned) –
- x (
-
:
setUpViewOnSingleScreen()¶ Deprecated, use
osgViewer.View.apply()with object constructed asosgViewer.AcrossAllScreens(screenNum))as argument.
-
:
setUpViewOnSingleScreen(unsigned screenNum) -
Parameters: screenNum ( unsigned) –
-
:
containsCamera(osg.Camera camera)¶ Return
trueifosgViewer.Viewcontains a specified camera.Parameters: camera ( osg.Camera) –Return type: bool
-
:
init()¶
-
:
assignSceneDataToCameras()¶
-
:
assignSceneDataToCameras()
-
:
createDistortionTexture(int width, int height)¶ -
Parameters: - width (
int) – - height (
int) –
Return type: - width (
-
:
assignRenderToTextureCamera(osg.GraphicsContext gc, int width, int height, osg.Texture texture)¶ -
Parameters: - gc (
osg.GraphicsContext) – - width (
int) – - height (
int) – - texture (
osg.Texture) –
Return type: - gc (
-
:
assignKeystoneDistortionCamera(osg.DisplaySettings ds, osg.GraphicsContext gc, int x, int y, int width, int height, int buffer, osg.Texture texture, osgViewer.Keystone keystone)¶ -
Parameters: - ds (
osg.DisplaySettings) – - gc (
osg.GraphicsContext) – - x (
int) – - y (
int) – - width (
int) – - height (
int) – - buffer (
int) – - texture (
osg.Texture) – - keystone (
osgViewer.Keystone) –
Return type: - ds (
-
:
assignStereoCamera(osg.DisplaySettings ds, osg.GraphicsContext gc, int x, int y, int width, int height, int buffer, double eyeScale)¶ -
Parameters: - ds (
osg.DisplaySettings) – - gc (
osg.GraphicsContext) – - x (
int) – - y (
int) – - width (
int) – - height (
int) – - buffer (
int) – - eyeScale (
double) –
Return type: - ds (
-
:
assignStereoOrKeystoneToCamera(osg.Camera camera, osg.DisplaySettings ds)¶ -
Parameters: - camera (
osg.Camera) – - ds (
osg.DisplaySettings) –
- camera (
-