#include <CameraGroup.hxx>
Inherits osg::Referenced.
|
| CameraGroup (osgViewer::View *viewer) |
| Create a camera group associated with an osgViewer::Viewer.
|
|
virtual | ~CameraGroup () |
|
osgViewer::View * | getView () |
| Get the camera group's Viewer.
|
|
CameraInfo * | buildCamera (SGPropertyNode *cameraNode) |
| Create an osg::Camera from a property node and add it to the camera group.
|
|
void | removeCamera (CameraInfo *info) |
| Remove a camera from the camera group.
|
|
void | buildSplashCamera (SGPropertyNode *cameraNode, GraphicsWindow *window=0) |
| Create a camera from properties that will draw the splash screen and add it to the camera group.
|
|
void | buildGUICamera (SGPropertyNode *cameraNode, GraphicsWindow *window=0) |
| Create a camera from properties that will draw the GUI and add it to the camera group.
|
|
void | update (const osg::Vec3d &position, const osg::Quat &orientation) |
| Update the view for the camera group.
|
|
void | setCameraParameters (float vfov, float aspectRatio) |
| Set the parameters of the viewer's master camera.
|
|
void | setCameraCullMasks (osg::Node::NodeMask nm) |
| Set the cull mask on all non-GUI cameras.
|
|
void | setLODScale (float scale) |
| Set the LOD scale on all non-GUI cameras.
|
|
void | resized () |
| Update camera properties after a resize event.
|
|
double | getMasterAspectRatio () const |
| get aspect ratio of master camera's viewport
|
|
CameraInfo * | getGUICamera () const |
|
const CameraList & | getCameras () |
|
|
simgear::compositor::Compositor * | buildVRMirrorCompositor (osg::GraphicsContext *gc, osg::Viewport *viewport) |
| Create a compositor for a VR mirror.
|
|
|
bool | computeIntersections (const CameraGroup *cgroup, const osg::Vec2d &windowPos, osgUtil::LineSegmentIntersector::Intersections &intersections) |
| Choose a camera using an event and do intersection testing on its view of the scene.
|
|
void | reloadCompositors (CameraGroup *cgroup) |
| Force a reload of all Compositor instances in the CameraGroup, except the one used by the GUI camera.
|
|
Definition at line 136 of file CameraGroup.hxx.
◆ CameraList
◆ CameraGroup()
flightgear::CameraGroup::CameraGroup |
( |
osgViewer::View * | viewer | ) |
|
Create a camera group associated with an osgViewer::Viewer.
- Parameters
-
Definition at line 185 of file CameraGroup.cxx.
◆ ~CameraGroup()
flightgear::CameraGroup::~CameraGroup |
( |
| ) |
|
|
virtual |
◆ buildCamera()
CameraInfo * flightgear::CameraGroup::buildCamera |
( |
SGPropertyNode * | cameraNode | ) |
|
Create an osg::Camera from a property node and add it to the camera group.
- Parameters
-
cameraNode | the property node. |
- Returns
- a CameraInfo object for the camera.
Definition at line 287 of file CameraGroup.cxx.
◆ buildCameraGroup()
CameraGroup * flightgear::CameraGroup::buildCameraGroup |
( |
osgViewer::View * | viewer, |
|
|
SGPropertyNode * | node ) |
|
staticprotected |
Build a complete CameraGroup from a property node.
- Parameters
-
viewer | the viewer associated with this camera group. |
wbuilder | the window builder to be used for this camera group. |
the | camera group property node. |
Definition at line 778 of file CameraGroup.cxx.
◆ buildDefaultGroup()
void flightgear::CameraGroup::buildDefaultGroup |
( |
osgViewer::View * | view | ) |
|
|
static |
◆ buildGUICamera()
void flightgear::CameraGroup::buildGUICamera |
( |
SGPropertyNode * | cameraNode, |
|
|
GraphicsWindow * | window = 0 ) |
Create a camera from properties that will draw the GUI and add it to the camera group.
- Parameters
-
cameraNode | the property node. This can be 0, in which case a default GUI camera is created. |
window | the GraphicsWindow to use for the GUI camera. If this is 0, the window is determined from the property node. |
- Returns
- a CameraInfo object for the GUI camera.
Definition at line 641 of file CameraGroup.cxx.
◆ buildSplashCamera()
void flightgear::CameraGroup::buildSplashCamera |
( |
SGPropertyNode * | cameraNode, |
|
|
GraphicsWindow * | window = 0 ) |
Create a camera from properties that will draw the splash screen and add it to the camera group.
- Parameters
-
cameraNode | the property node. This can be 0, in which case a default GUI camera is created. |
window | the GraphicsWindow to use for the splash camera. If this is 0, the window is determined from the property node. |
- Returns
- a CameraInfo object for the GUI camera.
Definition at line 569 of file CameraGroup.cxx.
◆ buildVRMirrorCompositor()
Compositor * flightgear::CameraGroup::buildVRMirrorCompositor |
( |
osg::GraphicsContext * | gc, |
|
|
osg::Viewport * | viewport ) |
|
protected |
Create a compositor for a VR mirror.
- Parameters
-
gc | the graphics context to use. |
viewport | the viewport to render to. |
- Returns
- a new compositor or nullptr if no VR mirror is needed.
Definition at line 727 of file CameraGroup.cxx.
◆ getCameras()
◆ getDefault()
static CameraGroup * flightgear::CameraGroup::getDefault |
( |
| ) |
|
|
inlinestatic |
◆ getGUICamera()
CameraInfo * flightgear::CameraGroup::getGUICamera |
( |
| ) |
const |
◆ getMasterAspectRatio()
double flightgear::CameraGroup::getMasterAspectRatio |
( |
| ) |
const |
get aspect ratio of master camera's viewport
Definition at line 272 of file CameraGroup.cxx.
◆ getView()
osgViewer::View * flightgear::CameraGroup::getView |
( |
| ) |
|
|
inline |
Get the camera group's Viewer.
- Returns
- the viewer
Definition at line 158 of file CameraGroup.hxx.
◆ removeCamera()
void flightgear::CameraGroup::removeCamera |
( |
CameraInfo * | info | ) |
|
Remove a camera from the camera group.
- Parameters
-
info | the camera info to remove. |
Definition at line 559 of file CameraGroup.cxx.
◆ resized()
void flightgear::CameraGroup::resized |
( |
| ) |
|
Update camera properties after a resize event.
Definition at line 819 of file CameraGroup.cxx.
◆ setCameraCullMasks()
void flightgear::CameraGroup::setCameraCullMasks |
( |
osg::Node::NodeMask | nm | ) |
|
◆ setCameraParameters()
void flightgear::CameraGroup::setCameraParameters |
( |
float | vfov, |
|
|
float | aspectRatio ) |
Set the parameters of the viewer's master camera.
This won't affect cameras that have CameraFlags::PROJECTION_ABSOLUTE set. XXX Should znear and zfar be settable?
- Parameters
-
vfov | the vertical field of view angle |
aspectRatio | the master camera's aspect ratio. This doesn't actually change the viewport, but should reflect the current viewport. |
Definition at line 262 of file CameraGroup.cxx.
◆ setDefault()
static void flightgear::CameraGroup::setDefault |
( |
CameraGroup * | group | ) |
|
|
inlinestatic |
◆ setLODScale()
void flightgear::CameraGroup::setLODScale |
( |
float | scale | ) |
|
◆ update()
void flightgear::CameraGroup::update |
( |
const osg::Vec3d & | position, |
|
|
const osg::Quat & | orientation ) |
Update the view for the camera group.
- Parameters
-
position | the world position of the view |
orientation | the world orientation of the view. |
Definition at line 195 of file CameraGroup.cxx.
◆ computeIntersections
bool computeIntersections |
( |
const CameraGroup * | cgroup, |
|
|
const osg::Vec2d & | windowPos, |
|
|
osgUtil::LineSegmentIntersector::Intersections & | intersections ) |
|
friend |
Choose a camera using an event and do intersection testing on its view of the scene.
Only cameras with the DO_INTERSECTION_TEST flag set are considered.
- Parameters
-
cgroup | the CameraGroup |
ea | the event containing a window and mouse coordinates |
intersections | container for the result of intersection testing. |
- Returns
- true if any intersections are found
Definition at line 891 of file CameraGroup.cxx.
◆ reloadCompositors
Force a reload of all Compositor instances in the CameraGroup, except the one used by the GUI camera.
Definition at line 949 of file CameraGroup.cxx.
◆ _cameras
◆ _defaultGroup
osg::ref_ptr< CameraGroup > flightgear::CameraGroup::_defaultGroup |
|
staticprotected |
◆ _listener
◆ _nearField
float flightgear::CameraGroup::_nearField |
|
protected |
◆ _viewer
osg::ref_ptr<osgViewer::View> flightgear::CameraGroup::_viewer |
|
protected |
◆ _zFar
float flightgear::CameraGroup::_zFar |
|
protected |
◆ _zNear
float flightgear::CameraGroup::_zNear |
|
protected |
◆ CameraGroupListener
friend flightgear::CameraGroup::CameraGroupListener |
|
protected |
The documentation for this class was generated from the following files: