osgViewer.View¶
- class osgViewer.View¶
- Represents
c++ class
- Wraps
osgViewer::View
- Bases
osgViewer.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.- Тип результата
- :take(osg.View view)¶
Take all the settings,
osg.Cameraandosg.View.Slaves from the passed inosg.View, leaving it empty.- Параметры
view (
osg.View) –
- :setStartTick(osg.Timer.Type tick)¶
-
- Параметры
tick (
osg.Timer.Type) –
- :getStartTick()¶
-
- Тип результата
- :getScene()¶
-
- Тип результата
- :setSceneData(osg.Node node)¶
Set the scene graph that the
osgViewer.Viewwill use.- Параметры
node (
osg.Node) –
- :getSceneData()¶
Get the
osgViewer.View’s scene graph.- Тип результата
- :setEventQueue(osgGA.EventQueue queue)¶
Set the
osgGA.EventQueuethatosgViewer.Viewuses to integrate external non window related events.- Параметры
queue (
osgGA.EventQueue) –
- :getEventQueue()¶
Get
osgViewer.View’sosgGA.EventQueue.- Тип результата
- :setCameraManipulator(osgGA.CameraManipulator manipulator)¶
Short version.
setCameraManipulatorcall with resetPosition equal totrue.- Параметры
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.- Параметры
manipulator (
osgGA.CameraManipulator) –resetPosition (
bool) –
- :getCameraManipulator()¶
Get
osgViewer.View’sosgGA.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.- Параметры
eventHandler (
osgGA.EventHandler) –
- :removeEventHandler(osgGA.EventHandler eventHandler)¶
Remove an
osgGA.EventHandlerfromosgViewer.View.- Параметры
eventHandler (
osgGA.EventHandler) –
- :setDisplaySettings(osg.DisplaySettings ds)¶
Set the
osg.DisplaySettingsobject associated with thisosgViewer.View.- Параметры
ds (
osg.DisplaySettings) –
- :getDisplaySettings()¶
Get the
osg.DisplaySettingsobject associated with thisosgViewer.View.- Тип результата
- :apply(osgViewer.ViewConfig config)¶
Apply a viewer configuration to set up Cameras and Windowing.
- Параметры
config (
osgViewer.ViewConfig) –
- :getLastAppliedViewConfig()¶
-
- Тип результата
- :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.- Параметры
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 asosgViewer.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 asosgViewer.AcrossAllScreens(screenNum))as argument.
- :setUpViewOnSingleScreen(unsigned screenNum)
-
- Параметры
screenNum (
unsigned) –
- :containsCamera(osg.Camera camera)¶
Return
trueifosgViewer.Viewcontains a specified camera.- Параметры
camera (
osg.Camera) –- Тип результата
bool
- :init()¶
- :assignSceneDataToCameras()¶
- :assignSceneDataToCameras()
- :createDistortionTexture(int width, int height)¶
-
- Параметры
width (
int) –height (
int) –
- Тип результата
- :assignRenderToTextureCamera(osg.GraphicsContext gc, int width, int height, osg.Texture texture)¶
-
- Параметры
gc (
osg.GraphicsContext) –width (
int) –height (
int) –texture (
osg.Texture) –
- Тип результата
- :assignKeystoneDistortionCamera(osg.DisplaySettings ds, osg.GraphicsContext gc, int x, int y, int width, int height, int buffer, osg.Texture texture, osgViewer.Keystone keystone)¶
-
- Параметры
ds (
osg.DisplaySettings) –gc (
osg.GraphicsContext) –x (
int) –y (
int) –width (
int) –height (
int) –buffer (
int) –texture (
osg.Texture) –keystone (
osgViewer.Keystone) –
- Тип результата
- :assignStereoCamera(osg.DisplaySettings ds, osg.GraphicsContext gc, int x, int y, int width, int height, int buffer, double eyeScale)¶
-
- Параметры
ds (
osg.DisplaySettings) –gc (
osg.GraphicsContext) –x (
int) –y (
int) –width (
int) –height (
int) –buffer (
int) –eyeScale (
double) –
- Тип результата
- :assignStereoOrKeystoneToCamera(osg.Camera camera, osg.DisplaySettings ds)¶
-
- Параметры
camera (
osg.Camera) –ds (
osg.DisplaySettings) –