osg::View Class Reference

View - maintains a master camera view and a list of slave cameras that are relative to this master camera. More...

Inheritance diagram for osg::View:

Inheritance graph
[legend]
List of all members.

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 &copyop=CopyOp::SHALLOW_COPY)
 META_Object (osg, View)
void setStats (osg::Stats *stats)
 Set the Stats object used for collect various frame related timing and scene graph stats.
osg::StatsgetStats ()
 Get the Stats object.
const osg::StatsgetStats () const
 Get the const 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::LightgetLight ()
 Get the global lighting if assigned.
const osg::LightgetLight () const
 Get the const global lighting if assigned.
void setCamera (osg::Camera *camera)
 Set the master camera of the view.
osg::CameragetCamera ()
 Get the master camera of the view.
const osg::CameragetCamera () const
 Get the const master camera of the view.
bool addSlave (osg::Camera *camera, bool useMastersSceneData=true)
bool addSlave (osg::Camera *camera, const osg::Matrix &projectionOffset, const osg::Matrix &viewOffse, bool useMastersSceneData=true)
bool removeSlave (unsigned int pos)
unsigned int getNumSlaves () const
SlavegetSlave (unsigned int pos)
const SlavegetSlave (unsigned int pos) const
SlavefindSlaveForCamera (osg::Camera *camera)
void updateSlaves ()
void updateSlave (unsigned int i)

Protected Types

typedef std::vector< SlaveSlaves

Protected Member Functions

virtual ~View ()

Protected Attributes

osg::ref_ptr< osg::Stats_stats
LightingMode _lightingMode
osg::ref_ptr< osg::Light_light
osg::ref_ptr< osg::Camera_camera
Slaves _slaves

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...

Detailed Description

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.


Member Typedef Documentation

typedef std::vector<Slave> osg::View::Slaves [protected]


Member Enumeration Documentation

enum osg::View::LightingMode

Options for controlling the global lighting used for the view.

Enumerator:
NO_LIGHT 
HEADLIGHT 
SKY_LIGHT 


Constructor & Destructor Documentation

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.


Member Function Documentation

osg::View::META_Object ( osg  ,
View   
)

void osg::View::setStats ( osg::Stats stats  )  [inline]

Set the Stats object used for collect various frame related timing and scene graph stats.

osg::Stats* osg::View::getStats (  )  [inline]

Get the Stats object.

const osg::Stats* osg::View::getStats (  )  const [inline]

Get the const Stats object.

void osg::View::setLightingMode ( LightingMode  lightingMode  ) 

Set the global lighting to use for this view.

Defaults to headlight.

LightingMode osg::View::getLightingMode (  )  const [inline]

Get the global lighting used for this view.

void osg::View::setLight ( osg::Light light  )  [inline]

Get the global light.

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.

void osg::View::setCamera ( osg::Camera camera  ) 

Set the master camera of the view.

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.

bool osg::View::addSlave ( osg::Camera camera,
bool  useMastersSceneData = true 
) [inline]

bool osg::View::addSlave ( osg::Camera camera,
const osg::Matrix projectionOffset,
const osg::Matrix viewOffse,
bool  useMastersSceneData = true 
)

bool osg::View::removeSlave ( unsigned int  pos  ) 

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]

Slave* osg::View::findSlaveForCamera ( osg::Camera camera  ) 

void osg::View::updateSlaves (  ) 

void osg::View::updateSlave ( unsigned int  i  ) 


Member Data Documentation

osg::ref_ptr<osg::Stats> osg::View::_stats [protected]

LightingMode osg::View::_lightingMode [protected]

osg::ref_ptr<osg::Light> osg::View::_light [protected]

osg::ref_ptr<osg::Camera> osg::View::_camera [protected]

Slaves osg::View::_slaves [protected]


The documentation for this class was generated from the following file:
Generated at Fri Nov 2 23:35:14 2007 for the OpenSceneGraph by doxygen 1.5.2.