osgViewer.View¶
- class osgViewer.View¶
- Represents
c++ class
- Wraps
osgViewer::View
- Bases
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 aosgViewer.Viewer
theosgViewer.ViewerBase
will effectively point to this object asosgViewer.Viewer
subclasses fromosgViewer.View
. In the case of aosgViewer.CompsoiteViewer
theosgViewer.ViewerBase
will point to theosgViewer.CompositeViewer
that owns thisosgViewer.View
.- Тип результата
- :take(osg.View view)¶
Take all the settings,
osg.Camera
andosg.View.Slave
s 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.View
will use.- Параметры
node (
osg.Node
) –
- :getSceneData()¶
Get the
osgViewer.View
’s scene graph.- Тип результата
- :setEventQueue(osgGA.EventQueue queue)¶
Set the
osgGA.EventQueue
thatosgViewer.View
uses to integrate external non window related events.- Параметры
queue (
osgGA.EventQueue
) –
- :getEventQueue()¶
Get
osgViewer.View
’sosgGA.EventQueue
.- Тип результата
- :setCameraManipulator(osgGA.CameraManipulator manipulator)¶
Short version.
setCameraManipulator
call with resetPosition equal totrue
.- Параметры
manipulator (
osgGA.CameraManipulator
) –
- :setCameraManipulator(osgGA.CameraManipulator manipulator, bool resetPosition)
Set the
osgGA.CameraManipulator
that movesosgViewer.View
’s masterosg.Camera
position 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.View
to 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.EventHandler
that adds handling of events toosgViewer.View
.- Параметры
eventHandler (
osgGA.EventHandler
) –
- :removeEventHandler(osgGA.EventHandler eventHandler)¶
Remove an
osgGA.EventHandler
fromosgViewer.View
.- Параметры
eventHandler (
osgGA.EventHandler
) –
- :setDisplaySettings(osg.DisplaySettings ds)¶
Set the
osg.DisplaySettings
object associated with thisosgViewer.View
.- Параметры
ds (
osg.DisplaySettings
) –
- :getDisplaySettings()¶
Get the
osg.DisplaySettings
object 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.AcrossAllScreens
as argument.
- :setUpViewInWindow(int x, int y, int width, int height)¶
Short version.
setUpViewInWindow
call 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
true
ifosgViewer.View
contains 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
) –