OpenSceneGraph
3.0.1
|
View - maintains a master camera view and a list of slave cameras that are relative to this master camera. More...
Classes | |
struct | Slave |
Slave allows one to up a camera that follows the master with a local offset to the project and view matrices. More... | |
Public Types | |
enum | LightingMode { NO_LIGHT, HEADLIGHT, SKY_LIGHT } |
Options for controlling the global lighting used for the view. More... | |
Public Member Functions | |
View () | |
View (const osg::View &view, const osg::CopyOp ©op=CopyOp::SHALLOW_COPY) | |
META_Object (osg, View) | |
virtual void | take (View &rhs) |
Take all the settings, Camera and Slaves from the passed in view, leaving it empty. | |
void | setStats (osg::Stats *stats) |
Set the Stats object used for collect various frame related timing and scene graph stats. | |
osg::Stats * | getStats () |
Get the Viewers Stats object. | |
const osg::Stats * | getStats () const |
Get the Viewers Stats object. | |
void | setLightingMode (LightingMode lightingMode) |
Set the global lighting to use for this view. | |
LightingMode | getLightingMode () const |
Get the global lighting used for this view. | |
void | setLight (osg::Light *light) |
Get the global light. | |
osg::Light * | getLight () |
Get the global lighting if assigned. | |
const osg::Light * | getLight () const |
Get the const global lighting if assigned. | |
void | setCamera (osg::Camera *camera) |
Set the master camera of the view. | |
osg::Camera * | getCamera () |
Get the master camera of the view. | |
const osg::Camera * | getCamera () const |
Get the const master camera of the view. | |
void | setFrameStamp (osg::FrameStamp *fs) |
Set the frame stamp of the view. | |
osg::FrameStamp * | getFrameStamp () |
Get the frame stamp of the view. | |
const osg::FrameStamp * | getFrameStamp () const |
Get the frame stamp of the view. | |
bool | addSlave (osg::Camera *camera, bool useMastersSceneData=true) |
bool | addSlave (osg::Camera *camera, const osg::Matrix &projectionOffset, const osg::Matrix &viewOffset, bool useMastersSceneData=true) |
bool | removeSlave (unsigned int pos) |
unsigned int | getNumSlaves () const |
Slave & | getSlave (unsigned int pos) |
const Slave & | getSlave (unsigned int pos) const |
unsigned int | findSlaveIndexForCamera (osg::Camera *camera) const |
Slave * | findSlaveForCamera (osg::Camera *camera) |
void | updateSlaves () |
Protected Types | |
typedef std::vector< Slave > | Slaves |
Protected Member Functions | |
virtual | ~View () |
virtual osg::GraphicsOperation * | createRenderer (osg::Camera *) |
Protected Attributes | |
osg::ref_ptr< osg::Stats > | _stats |
LightingMode | _lightingMode |
osg::ref_ptr< osg::Light > | _light |
osg::ref_ptr< osg::Camera > | _camera |
Slaves | _slaves |
osg::ref_ptr< osg::FrameStamp > | _frameStamp |
View - maintains a master camera view and a list of slave cameras that are relative to this master camera.
Note, if no slave cameras are attached to the view then the master camera does both the control and implementation of the rendering of the scene, but if slave cameras are present then the master controls the view onto the scene, while the slaves implement the rendering of the scene.
typedef std::vector<Slave> osg::View::Slaves [protected] |
osg::View::View | ( | ) |
Reimplemented in osgViewer::View.
osg::View::View | ( | const osg::View & | view, |
const osg::CopyOp & | copyop = CopyOp::SHALLOW_COPY |
||
) |
virtual osg::View::~View | ( | ) | [protected, virtual] |
Reimplemented in osgViewer::View.
bool osg::View::addSlave | ( | osg::Camera * | camera, |
bool | useMastersSceneData = true |
||
) | [inline] |
References addSlave(), and osg::Matrixd::identity().
Referenced by addSlave().
bool osg::View::addSlave | ( | osg::Camera * | camera, |
const osg::Matrix & | projectionOffset, | ||
const osg::Matrix & | viewOffset, | ||
bool | useMastersSceneData = true |
||
) |
virtual osg::GraphicsOperation* osg::View::createRenderer | ( | osg::Camera * | ) | [inline, protected, virtual] |
Reimplemented in osgViewer::View.
Slave* osg::View::findSlaveForCamera | ( | osg::Camera * | camera | ) |
unsigned int osg::View::findSlaveIndexForCamera | ( | osg::Camera * | camera | ) | const |
osg::Camera* osg::View::getCamera | ( | ) | [inline] |
Get the master camera of the view.
const osg::Camera* osg::View::getCamera | ( | ) | const [inline] |
Get the const master camera of the view.
osg::FrameStamp* osg::View::getFrameStamp | ( | ) | [inline] |
Get the frame stamp of the view.
const osg::FrameStamp* osg::View::getFrameStamp | ( | ) | const [inline] |
Get the frame stamp of the view.
osg::Light* osg::View::getLight | ( | ) | [inline] |
Get the global lighting if assigned.
const osg::Light* osg::View::getLight | ( | ) | const [inline] |
Get the const global lighting if assigned.
LightingMode osg::View::getLightingMode | ( | ) | const [inline] |
Get the global lighting used for this view.
unsigned int osg::View::getNumSlaves | ( | ) | const [inline] |
Slave& osg::View::getSlave | ( | unsigned int | pos | ) | [inline] |
const Slave& osg::View::getSlave | ( | unsigned int | pos | ) | const [inline] |
osg::Stats* osg::View::getStats | ( | ) | [inline] |
Get the Viewers Stats object.
const osg::Stats* osg::View::getStats | ( | ) | const [inline] |
Get the Viewers Stats object.
osg::View::META_Object | ( | osg | , |
View | |||
) |
bool osg::View::removeSlave | ( | unsigned int | pos | ) |
void osg::View::setCamera | ( | osg::Camera * | camera | ) |
Set the master camera of the view.
void osg::View::setFrameStamp | ( | osg::FrameStamp * | fs | ) | [inline] |
Set the frame stamp of the view.
void osg::View::setLight | ( | osg::Light * | light | ) | [inline] |
Get the global light.
void osg::View::setLightingMode | ( | LightingMode | lightingMode | ) |
Set the global lighting to use for this view.
Defaults to headlight.
void osg::View::setStats | ( | osg::Stats * | stats | ) | [inline] |
Set the Stats object used for collect various frame related timing and scene graph stats.
virtual void osg::View::take | ( | View & | rhs | ) | [virtual] |
Take all the settings, Camera and Slaves from the passed in view, leaving it empty.
Reimplemented in osgViewer::View, and osgViewer::Viewer.
void osg::View::updateSlaves | ( | ) |
osg::ref_ptr<osg::Camera> osg::View::_camera [protected] |
osg::ref_ptr<osg::FrameStamp> osg::View::_frameStamp [protected] |
osg::ref_ptr<osg::Light> osg::View::_light [protected] |
LightingMode osg::View::_lightingMode [protected] |
Slaves osg::View::_slaves [protected] |
osg::ref_ptr<osg::Stats> osg::View::_stats [protected] |
![]() | Generated at Mon Oct 3 2011 12:39:45 for the OpenSceneGraph by doxygen 1.7.5. |