OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
osg::View Class Reference

#include <View.h>

Inheritance diagram for osg::View:
Inheritance graph
[legend]
Collaboration diagram for osg::View:
Collaboration graph
[legend]

Classes

struct  Slave
 

Public Types

enum  LightingMode { NO_LIGHT, HEADLIGHT, SKY_LIGHT }
 
- Public Types inherited from osg::Object
enum  DataVariance { DYNAMIC, STATIC, UNSPECIFIED }
 

Public Member Functions

 View ()
 
 View (const osg::View &view, const osg::CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
 META_Object (osg, View)
 
virtual void take (View &rhs)
 
void setStats (osg::Stats *stats)
 
osg::StatsgetStats ()
 
const osg::StatsgetStats () const
 
void setLightingMode (LightingMode lightingMode)
 
LightingMode getLightingMode () const
 
void setLight (osg::Light *light)
 
osg::LightgetLight ()
 
const osg::LightgetLight () const
 
void setCamera (osg::Camera *camera)
 
osg::CameragetCamera ()
 
const osg::CameragetCamera () const
 
void setFrameStamp (osg::FrameStamp *fs)
 
osg::FrameStampgetFrameStamp ()
 
const osg::FrameStampgetFrameStamp () const
 
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
 
SlavegetSlave (unsigned int pos)
 
const SlavegetSlave (unsigned int pos) const
 
unsigned int findSlaveIndexForCamera (osg::Camera *camera) const
 
SlavefindSlaveForCamera (osg::Camera *camera)
 
void updateSlaves ()
 
- Public Member Functions inherited from osg::Object
 Object ()
 
 Object (bool threadSafeRefUnref)
 
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
virtual ObjectcloneType () const =0
 
virtual Objectclone (const CopyOp &) const =0
 
virtual bool isSameKindAs (const Object *) const
 
virtual const char * libraryName () const =0
 
virtual const char * className () const =0
 
std::string getCompoundClassName () const
 
virtual NodeasNode ()
 
virtual const NodeasNode () const
 
virtual NodeVisitorasNodeVisitor ()
 
virtual const NodeVisitorasNodeVisitor () const
 
virtual StateAttributeasStateAttribute ()
 
virtual const StateAttributeasStateAttribute () const
 
virtual UniformasUniform ()
 
virtual const UniformasUniform () const
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 
virtual void setName (const std::string &name)
 
void setName (const char *name)
 
const std::string & getName () const
 
void setDataVariance (DataVariance dv)
 
DataVariance getDataVariance () const
 
virtual void computeDataVariance ()
 
void setUserDataContainer (osg::UserDataContainer *udc)
 
osg::UserDataContainergetUserDataContainer ()
 
const osg::UserDataContainergetUserDataContainer () const
 
osg::UserDataContainergetOrCreateUserDataContainer ()
 
virtual void setUserData (Referenced *obj)
 
virtual ReferencedgetUserData ()
 
virtual const ReferencedgetUserData () const
 
template<typename T >
bool getUserValue (const std::string &name, T &value) const
 
template<typename T >
void setUserValue (const std::string &name, const T &value)
 
virtual void resizeGLObjectBuffers (unsigned int)
 
virtual void releaseGLObjects (osg::State *=0) const
 
template<typename T >
BoolValueObject
UCharValueObject
UShortValueObject
UIntValueObject
DoubleValueObject
Vec3fValueObject
Vec2dValueObject
Vec4dValueObject
PlaneValueObject
MatrixdValueObject
BoundingBoxdValueObject
BoundingSpheredValueObject
bool 
getUserValue (const std::string &name, T &value) const
 
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 
 Referenced (bool threadSafeRefUnref)
 
 Referenced (const Referenced &)
 
Referencedoperator= (const Referenced &)
 
bool getThreadSafeRefUnref () const
 
OpenThreads::MutexgetRefMutex () const
 
int ref () const
 
int unref () const
 
int unref_nodelete () const
 
int referenceCount () const
 
ObserverSetgetObserverSet () const
 
ObserverSetgetOrCreateObserverSet () const
 
void addObserver (Observer *observer) const
 
void removeObserver (Observer *observer) const
 

Protected Types

typedef std::vector< SlaveSlaves
 

Protected Member Functions

virtual ~View ()
 
virtual osg::GraphicsOperationcreateRenderer (osg::Camera *)
 
- Protected Member Functions inherited from osg::Object
virtual ~Object ()
 
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
 
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
 
void deleteUsingDeleteHandler () const
 

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
 
- Protected Attributes inherited from osg::Object
std::string _name
 
DataVariance _dataVariance
 
osg::UserDataContainer_userDataContainer
 
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
 
OpenThreads::Atomic _refCount
 

Additional Inherited Members

- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
 
static void setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
 
static bool getThreadSafeReferenceCounting ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 

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.

Definition at line 29 of file View.h.

Member Typedef Documentation

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

Definition at line 177 of file View.h.

Member Enumeration Documentation

Options for controlling the global lighting used for the view.

Enumerator
NO_LIGHT 
HEADLIGHT 
SKY_LIGHT 

Definition at line 54 of file View.h.

Constructor & Destructor Documentation

osg::View::View ( )
osg::View::View ( const osg::View view,
const osg::CopyOp copyop = CopyOp::SHALLOW_COPY 
)
virtual osg::View::~View ( )
protectedvirtual

Reimplemented in osgViewer::View.

Member Function Documentation

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

Definition at line 147 of file View.h.

Here is the call graph for this function:

Here is the caller graph for this function:

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 )
inlineprotectedvirtual

Reimplemented in osgViewer::View.

Definition at line 168 of file View.h.

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.

Definition at line 81 of file View.h.

const osg::Camera* osg::View::getCamera ( ) const
inline

Get the const master camera of the view.

Definition at line 84 of file View.h.

osg::FrameStamp* osg::View::getFrameStamp ( )
inline

Get the frame stamp of the view.

Definition at line 90 of file View.h.

const osg::FrameStamp* osg::View::getFrameStamp ( ) const
inline

Get the frame stamp of the view.

Definition at line 93 of file View.h.

osg::Light* osg::View::getLight ( )
inline

Get the global lighting if assigned.

Definition at line 72 of file View.h.

const osg::Light* osg::View::getLight ( ) const
inline

Get the const global lighting if assigned.

Definition at line 75 of file View.h.

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

Get the global lighting used for this view.

Definition at line 66 of file View.h.

unsigned int osg::View::getNumSlaves ( ) const
inline

Definition at line 153 of file View.h.

Slave& osg::View::getSlave ( unsigned int  pos)
inline

Definition at line 155 of file View.h.

const Slave& osg::View::getSlave ( unsigned int  pos) const
inline

Definition at line 156 of file View.h.

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

Get the Viewers Stats object.

Definition at line 47 of file View.h.

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

Get the Viewers Stats object.

Definition at line 50 of file View.h.

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.

Definition at line 87 of file View.h.

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

Get the global light.

Definition at line 69 of file View.h.

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 to collect various frame related timing and scene graph stats.

Definition at line 44 of file View.h.

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 ( )

Member Data Documentation

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

Definition at line 175 of file View.h.

osg::ref_ptr<osg::FrameStamp> osg::View::_frameStamp
protected

Definition at line 180 of file View.h.

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

Definition at line 173 of file View.h.

LightingMode osg::View::_lightingMode
protected

Definition at line 172 of file View.h.

Slaves osg::View::_slaves
protected

Definition at line 178 of file View.h.

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

Definition at line 170 of file View.h.


The documentation for this class was generated from the following file: