openscenegraph
osg::Camera Class Reference

#include <Camera>

Inheritance diagram for osg::Camera:
osg::Transform osg::CullSettings osg::Group osg::Node osg::Object osg::Referenced

Classes

struct  Attachment
struct  DrawCallback

Public Types

enum  TransformOrder { PRE_MULTIPLY , POST_MULTIPLY }
enum  ProjectionResizePolicy { FIXED , HORIZONTAL , VERTICAL }
enum  RenderOrder { PRE_RENDER , NESTED_RENDER , POST_RENDER }
enum  RenderTargetImplementation {
  FRAME_BUFFER_OBJECT , PIXEL_BUFFER_RTT , PIXEL_BUFFER , FRAME_BUFFER ,
  SEPARATE_WINDOW
}
enum  BufferComponent {
  DEPTH_BUFFER , STENCIL_BUFFER , PACKED_DEPTH_STENCIL_BUFFER , COLOR_BUFFER ,
  COLOR_BUFFER0 , COLOR_BUFFER1 = COLOR_BUFFER0+1 , COLOR_BUFFER2 = COLOR_BUFFER0+2 , COLOR_BUFFER3 = COLOR_BUFFER0+3 ,
  COLOR_BUFFER4 = COLOR_BUFFER0+4 , COLOR_BUFFER5 = COLOR_BUFFER0+5 , COLOR_BUFFER6 = COLOR_BUFFER0+6 , COLOR_BUFFER7 = COLOR_BUFFER0+7 ,
  COLOR_BUFFER8 = COLOR_BUFFER0+8 , COLOR_BUFFER9 = COLOR_BUFFER0+9 , COLOR_BUFFER10 = COLOR_BUFFER0+10 , COLOR_BUFFER11 = COLOR_BUFFER0+11 ,
  COLOR_BUFFER12 = COLOR_BUFFER0+12 , COLOR_BUFFER13 = COLOR_BUFFER0+13 , COLOR_BUFFER14 = COLOR_BUFFER0+14 , COLOR_BUFFER15 = COLOR_BUFFER0+15
}
enum  ResizeMask { RESIZE_VIEWPORT =1 , RESIZE_ATTACHMENTS =2 , RESIZE_PROJECTIONMATRIX =4 , RESIZE_DEFAULT =RESIZE_VIEWPORT|RESIZE_ATTACHMENTS }
enum  ImplicitBufferAttachment { IMPLICIT_DEPTH_BUFFER_ATTACHMENT = DisplaySettings::IMPLICIT_DEPTH_BUFFER_ATTACHMENT , IMPLICIT_STENCIL_BUFFER_ATTACHMENT = DisplaySettings::IMPLICIT_STENCIL_BUFFER_ATTACHMENT , IMPLICIT_COLOR_BUFFER_ATTACHMENT = DisplaySettings::IMPLICIT_COLOR_BUFFER_ATTACHMENT , USE_DISPLAY_SETTINGS_MASK = (~0) }
typedef std::map< BufferComponent, AttachmentBufferAttachmentMap
typedef int ImplicitBufferAttachmentMask
Public Types inherited from osg::Transform
enum  ReferenceFrame { RELATIVE_RF , ABSOLUTE_RF , ABSOLUTE_RF_INHERIT_VIEWPOINT }
Public Types inherited from osg::Node
typedef std::vector< Group * > ParentList
typedef unsigned int NodeMask
typedef std::vector< std::string > DescriptionList
Public Types inherited from osg::Object
enum  DataVariance { DYNAMIC , STATIC , UNSPECIFIED }
Public Types inherited from osg::CullSettings
enum  VariablesMask {
  COMPUTE_NEAR_FAR_MODE = (0x1 << 0) , CULLING_MODE = (0x1 << 1) , LOD_SCALE = (0x1 << 2) , SMALL_FEATURE_CULLING_PIXEL_SIZE = (0x1 << 3) ,
  CLAMP_PROJECTION_MATRIX_CALLBACK = (0x1 << 4) , NEAR_FAR_RATIO = (0x1 << 5) , IMPOSTOR_ACTIVE = (0x1 << 6) , DEPTH_SORT_IMPOSTOR_SPRITES = (0x1 << 7) ,
  IMPOSTOR_PIXEL_ERROR_THRESHOLD = (0x1 << 8) , NUM_FRAMES_TO_KEEP_IMPOSTORS_SPRITES = (0x1 << 9) , CULL_MASK = (0x1 << 10) , CULL_MASK_LEFT = (0x1 << 11) ,
  CULL_MASK_RIGHT = (0x1 << 12) , CLEAR_COLOR = (0x1 << 13) , CLEAR_MASK = (0x1 << 14) , LIGHTING_MODE = (0x1 << 15) ,
  LIGHT = (0x1 << 16) , DRAW_BUFFER = (0x1 << 17) , READ_BUFFER = (0x1 << 18) , NO_VARIABLES = 0x00000000 ,
  ALL_VARIABLES = 0x7FFFFFFF
}
enum  InheritanceMaskActionOnAttributeSetting { DISABLE_ASSOCIATED_INHERITANCE_MASK_BIT , DO_NOT_MODIFY_INHERITANCE_MASK }
enum  ComputeNearFarMode { DO_NOT_COMPUTE_NEAR_FAR = 0 , COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES , COMPUTE_NEAR_FAR_USING_PRIMITIVES , COMPUTE_NEAR_USING_PRIMITIVES }
enum  CullingModeValues {
  NO_CULLING = 0x0 , VIEW_FRUSTUM_SIDES_CULLING = 0x1 , NEAR_PLANE_CULLING = 0x2 , FAR_PLANE_CULLING = 0x4 ,
  VIEW_FRUSTUM_CULLING , SMALL_FEATURE_CULLING = 0x8 , SHADOW_OCCLUSION_CULLING = 0x10 , CLUSTER_CULLING = 0x20 ,
  DEFAULT_CULLING , ENABLE_ALL_CULLING
}
typedef int InheritanceMask
typedef int CullingMode

Public Member Functions

 Camera ()
 Camera (const Camera &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 META_Node (osg, Camera)
virtual CameraasCamera ()
virtual const CameraasCamera () const
void setView (View *view)
ViewgetView ()
const ViewgetView () const
void setStats (osg::Stats *stats)
osg::StatsgetStats ()
const osg::StatsgetStats () const
void setAllowEventFocus (bool focus)
bool getAllowEventFocus () const
void setDisplaySettings (osg::DisplaySettings *ds)
osg::DisplaySettingsgetDisplaySettings ()
const osg::DisplaySettingsgetDisplaySettings () const
void setClearMask (GLbitfield mask)
GLbitfield getClearMask () const
void setClearColor (const osg::Vec4 &color)
const osg::Vec4getClearColor () const
void setClearAccum (const osg::Vec4 &color)
const osg::Vec4getClearAccum () const
void setClearDepth (double depth)
double getClearDepth () const
void setClearStencil (int stencil)
int getClearStencil () const
void setColorMask (osg::ColorMask *colorMask)
void setColorMask (bool red, bool green, bool blue, bool alpha)
const ColorMaskgetColorMask () const
ColorMaskgetColorMask ()
void setViewport (osg::Viewport *viewport)
void setViewport (int x, int y, int width, int height)
const ViewportgetViewport () const
ViewportgetViewport ()
void setTransformOrder (TransformOrder order)
TransformOrder getTransformOrder () const
void setProjectionResizePolicy (ProjectionResizePolicy policy)
ProjectionResizePolicy getProjectionResizePolicy () const
void setProjectionMatrix (const osg::Matrixf &matrix)
void setProjectionMatrix (const osg::Matrixd &matrix)
void setProjectionMatrixAsOrtho (double left, double right, double bottom, double top, double zNear, double zFar)
void setProjectionMatrixAsOrtho2D (double left, double right, double bottom, double top)
void setProjectionMatrixAsFrustum (double left, double right, double bottom, double top, double zNear, double zFar)
void setProjectionMatrixAsPerspective (double fovy, double aspectRatio, double zNear, double zFar)
osg::MatrixdgetProjectionMatrix ()
const osg::MatrixdgetProjectionMatrix () const
bool getProjectionMatrixAsOrtho (double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const
bool getProjectionMatrixAsFrustum (double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const
bool getProjectionMatrixAsPerspective (double &fovy, double &aspectRatio, double &zNear, double &zFar) const
void setViewMatrix (const osg::Matrixf &matrix)
void setViewMatrix (const osg::Matrixd &matrix)
osg::MatrixdgetViewMatrix ()
const osg::MatrixdgetViewMatrix () const
void setViewMatrixAsLookAt (const osg::Vec3d &eye, const osg::Vec3d &center, const osg::Vec3d &up)
void getViewMatrixAsLookAt (osg::Vec3d &eye, osg::Vec3d &center, osg::Vec3d &up, double lookDistance=1.0) const
void getViewMatrixAsLookAt (osg::Vec3f &eye, osg::Vec3f &center, osg::Vec3f &up, float lookDistance=1.0f) const
Matrixd getInverseViewMatrix () const
void setRenderOrder (RenderOrder order, int orderNum=0)
RenderOrder getRenderOrder () const
int getRenderOrderNum () const
bool isRenderToTextureCamera () const
void setRenderTargetImplementation (RenderTargetImplementation impl)
void setRenderTargetImplementation (RenderTargetImplementation impl, RenderTargetImplementation fallback)
RenderTargetImplementation getRenderTargetImplementation () const
RenderTargetImplementation getRenderTargetFallback () const
void setDrawBuffer (GLenum buffer)
GLenum getDrawBuffer () const
void setReadBuffer (GLenum buffer)
GLenum getReadBuffer () const
void attach (BufferComponent buffer, GLenum internalFormat)
void attach (BufferComponent buffer, osg::Texture *texture, unsigned int level=0, unsigned int face=0, bool mipMapGeneration=false, unsigned int multisampleSamples=0, unsigned int multisampleColorSamples=0)
void attach (BufferComponent buffer, osg::Image *image, unsigned int multisampleSamples=0, unsigned int multisampleColorSamples=0)
void detach (BufferComponent buffer)
BufferAttachmentMapgetBufferAttachmentMap ()
const BufferAttachmentMapgetBufferAttachmentMap () const
void dirtyAttachmentMap ()
void setAttachmentMapModifiedCount (unsigned int v)
unsigned int getAttachmentMapModifiedCount () const
void resizeAttachments (int width, int height)
void resize (int width, int height, int resizeMask=RESIZE_DEFAULT)
void setImplicitBufferAttachmentMask (ImplicitBufferAttachmentMask renderMask=DisplaySettings::DEFAULT_IMPLICIT_BUFFER_ATTACHMENT, ImplicitBufferAttachmentMask resolveMask=DisplaySettings::DEFAULT_IMPLICIT_BUFFER_ATTACHMENT)
void setImplicitBufferAttachmentRenderMask (ImplicitBufferAttachmentMask implicitBufferAttachmentRenderMask)
void setImplicitBufferAttachmentResolveMask (ImplicitBufferAttachmentMask implicitBufferAttachmentResolveMask)
ImplicitBufferAttachmentMask getImplicitBufferAttachmentRenderMask () const
ImplicitBufferAttachmentMask getImplicitBufferAttachmentRenderMask (bool effectiveMask) const
ImplicitBufferAttachmentMask getImplicitBufferAttachmentResolveMask () const
ImplicitBufferAttachmentMask getImplicitBufferAttachmentResolveMask (bool effectiveMask) const
void setProcessorAffinity (const OpenThreads::Affinity &affinity)
OpenThreads::AffinitygetProcessorAffinity ()
const OpenThreads::AffinitygetProcessorAffinity () const
void createCameraThread ()
void setCameraThread (OperationThread *gt)
OperationThreadgetCameraThread ()
const OperationThreadgetCameraThread () const
void setGraphicsContext (GraphicsContext *context)
GraphicsContextgetGraphicsContext ()
const GraphicsContextgetGraphicsContext () const
void setRenderer (osg::GraphicsOperation *rc)
osg::GraphicsOperationgetRenderer ()
const osg::GraphicsOperationgetRenderer () const
void setRenderingCache (osg::Object *rc)
osg::ObjectgetRenderingCache ()
const osg::ObjectgetRenderingCache () const
void setInitialDrawCallback (DrawCallback *cb)
DrawCallbackgetInitialDrawCallback ()
const DrawCallbackgetInitialDrawCallback () const
void addInitialDrawCallback (DrawCallback *nc)
template<class T>
void addInitialDrawCallback (const ref_ptr< T > &nc)
void removeInitialDrawCallback (DrawCallback *nc)
template<class T>
void removeInitialDrawCallback (const ref_ptr< T > &nc)
void setPreDrawCallback (DrawCallback *cb)
DrawCallbackgetPreDrawCallback ()
const DrawCallbackgetPreDrawCallback () const
void addPreDrawCallback (DrawCallback *nc)
template<class T>
void addPreDrawCallback (const ref_ptr< T > &nc)
void removePreDrawCallback (DrawCallback *nc)
template<class T>
void removePreDrawCallback (const ref_ptr< T > &nc)
void setPostDrawCallback (DrawCallback *cb)
DrawCallbackgetPostDrawCallback ()
const DrawCallbackgetPostDrawCallback () const
void addPostDrawCallback (DrawCallback *nc)
template<class T>
void addPostDrawCallback (const ref_ptr< T > &nc)
void removePostDrawCallback (DrawCallback *nc)
template<class T>
void removePostDrawCallback (const ref_ptr< T > &nc)
void setFinalDrawCallback (DrawCallback *cb)
DrawCallbackgetFinalDrawCallback ()
const DrawCallbackgetFinalDrawCallback () const
void addFinalDrawCallback (DrawCallback *nc)
template<class T>
void addFinalDrawCallback (const ref_ptr< T > &nc)
void removeFinalDrawCallback (DrawCallback *nc)
template<class T>
void removeFinalDrawCallback (const ref_ptr< T > &nc)
OpenThreads::MutexgetDataChangeMutex () const
virtual void resizeGLObjectBuffers (unsigned int maxSize)
virtual void releaseGLObjects (osg::State *=0) const
virtual bool computeLocalToWorldMatrix (Matrix &matrix, NodeVisitor *) const
virtual bool computeWorldToLocalMatrix (Matrix &matrix, NodeVisitor *) const
virtual void inheritCullSettings (const CullSettings &settings, unsigned int inheritanceMask)
Public Member Functions inherited from osg::Transform
 Transform ()
 Transform (const Transform &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 META_Node (osg, Transform)
virtual TransformasTransform ()
virtual const TransformasTransform () const
virtual MatrixTransformasMatrixTransform ()
virtual const MatrixTransformasMatrixTransform () const
virtual PositionAttitudeTransformasPositionAttitudeTransform ()
virtual const PositionAttitudeTransformasPositionAttitudeTransform () const
virtual AutoTransformasAutoTransform ()
virtual const AutoTransformasAutoTransform () const
void setReferenceFrame (ReferenceFrame rf)
ReferenceFrame getReferenceFrame () const
virtual BoundingSphere computeBound () const
Public Member Functions inherited from osg::Group
 Group ()
 Group (const Group &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 META_Node (osg, Group)
virtual GroupasGroup ()
virtual const GroupasGroup () const
virtual void traverse (NodeVisitor &nv)
virtual bool addChild (Node *child)
template<class T>
bool addChild (const ref_ptr< T > &child)
virtual bool insertChild (unsigned int index, Node *child)
template<class T>
bool insertChild (unsigned int index, const ref_ptr< T > &child)
virtual bool removeChild (Node *child)
template<class T>
bool removeChild (const ref_ptr< T > &child)
bool removeChild (unsigned int pos, unsigned int numChildrenToRemove=1)
virtual bool removeChildren (unsigned int pos, unsigned int numChildrenToRemove)
virtual bool replaceChild (Node *origChild, Node *newChild)
template<class T, class R>
bool replaceChild (const ref_ptr< T > &origChild, const ref_ptr< R > &newChild)
virtual unsigned int getNumChildren () const
virtual bool setChild (unsigned int i, Node *node)
NodegetChild (unsigned int i)
const NodegetChild (unsigned int i) const
bool containsNode (const Node *node) const
template<class T>
bool containsNode (const ref_ptr< T > &node) const
unsigned int getChildIndex (const Node *node) const
virtual void setThreadSafeRefUnref (bool threadSafe)
Public Member Functions inherited from osg::Node
 Node ()
 Node (const Node &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual ObjectcloneType () const
virtual Objectclone (const CopyOp &copyop) const
virtual bool isSameKindAs (const Object *obj) const
virtual const char * libraryName () const
virtual const char * className () const
virtual NodeasNode ()
virtual const NodeasNode () const
virtual DrawableasDrawable ()
virtual const DrawableasDrawable () const
virtual GeometryasGeometry ()
virtual const GeometryasGeometry () const
virtual SwitchasSwitch ()
virtual const SwitchasSwitch () const
virtual GeodeasGeode ()
virtual const GeodeasGeode () const
virtual osgTerrain::TerrainasTerrain ()
virtual const osgTerrain::TerrainasTerrain () const
virtual void accept (NodeVisitor &nv)
virtual void ascend (NodeVisitor &nv)
const ParentListgetParents () const
ParentList getParents ()
GroupgetParent (unsigned int i)
const GroupgetParent (unsigned int i) const
unsigned int getNumParents () const
NodePathList getParentalNodePaths (osg::Node *haltTraversalAtNode=0) const
MatrixList getWorldMatrices (const osg::Node *haltTraversalAtNode=0) const
void setUpdateCallback (Callback *nc)
template<class T>
void setUpdateCallback (const ref_ptr< T > &nc)
CallbackgetUpdateCallback ()
const CallbackgetUpdateCallback () const
void addUpdateCallback (Callback *nc)
template<class T>
void addUpdateCallback (const ref_ptr< T > &nc)
void removeUpdateCallback (Callback *nc)
template<class T>
void removeUpdateCallback (const ref_ptr< T > &nc)
unsigned int getNumChildrenRequiringUpdateTraversal () const
void setEventCallback (Callback *nc)
template<class T>
void setEventCallback (const ref_ptr< T > &nc)
CallbackgetEventCallback ()
const CallbackgetEventCallback () const
void addEventCallback (Callback *nc)
template<class T>
void addEventCallback (const ref_ptr< T > &nc)
void removeEventCallback (Callback *nc)
template<class T>
void removeEventCallback (const ref_ptr< T > &nc)
unsigned int getNumChildrenRequiringEventTraversal () const
void setCullCallback (Callback *nc)
template<class T>
void setCullCallback (const ref_ptr< T > &nc)
CallbackgetCullCallback ()
const CallbackgetCullCallback () const
void addCullCallback (Callback *nc)
template<class T>
void addCullCallback (const ref_ptr< T > &nc)
void removeCullCallback (Callback *nc)
template<class T>
void removeCullCallback (const ref_ptr< T > &nc)
void setCullingActive (bool active)
bool getCullingActive () const
unsigned int getNumChildrenWithCullingDisabled () const
bool isCullingActive () const
unsigned int getNumChildrenWithOccluderNodes () const
bool containsOccluderNodes () const
void setNodeMask (NodeMask nm)
NodeMask getNodeMask () const
void setStateSet (osg::StateSet *stateset)
template<class T>
void setStateSet (const osg::ref_ptr< T > &stateset)
osg::StateSetgetOrCreateStateSet ()
osg::StateSetgetStateSet ()
const osg::StateSetgetStateSet () const
void setDescriptions (const DescriptionList &descriptions)
DescriptionListgetDescriptions ()
const DescriptionListgetDescriptions () const
const std::string & getDescription (unsigned int i) const
std::string & getDescription (unsigned int i)
unsigned int getNumDescriptions () const
void addDescription (const std::string &desc)
void setInitialBound (const osg::BoundingSphere &bsphere)
const BoundingSpheregetInitialBound () const
void dirtyBound ()
const BoundingSpheregetBound () const
void setComputeBoundingSphereCallback (ComputeBoundingSphereCallback *callback)
template<class T>
void setComputeBoundingSphereCallback (const ref_ptr< T > &callback)
ComputeBoundingSphereCallbackgetComputeBoundingSphereCallback ()
const ComputeBoundingSphereCallbackgetComputeBoundingSphereCallback () const
Public Member Functions inherited from osg::Object
 Object ()
 Object (bool threadSafeRefUnref)
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
std::string getCompoundClassName () const
virtual NodeVisitorasNodeVisitor ()
virtual const NodeVisitorasNodeVisitor () const
virtual StateSetasStateSet ()
virtual const StateSetasStateSet () const
virtual StateAttributeasStateAttribute ()
virtual const StateAttributeasStateAttribute () const
virtual UniformasUniform ()
virtual const UniformasUniform () const
virtual CallbackasCallback ()
virtual const CallbackasCallback () const
virtual CallbackObjectasCallbackObject ()
virtual const CallbackObjectasCallbackObject () const
virtual UserDataContainerasUserDataContainer ()
virtual const UserDataContainerasUserDataContainer () const
virtual ValueObjectasValueObject ()
virtual const ValueObjectasValueObject () const
virtual ImageasImage ()
virtual const ImageasImage () const
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)
template<class T>
void setUserDataContainer (const ref_ptr< T > &udc)
osg::UserDataContainergetUserDataContainer ()
const osg::UserDataContainergetUserDataContainer () const
osg::UserDataContainergetOrCreateUserDataContainer ()
virtual void setUserData (Referenced *obj)
template<class T>
void setUserData (const ref_ptr< T > &ud)
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)
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
Public Member Functions inherited from osg::CullSettings
 CullSettings ()
 CullSettings (ArgumentParser &arguments)
 CullSettings (const CullSettings &cs)
virtual ~CullSettings ()
CullSettingsoperator= (const CullSettings &settings)
virtual void setDefaults ()
void setInheritanceMask (InheritanceMask mask)
InheritanceMask getInheritanceMask () const
void setCullSettings (const CullSettings &settings)
virtual void inheritCullSettings (const CullSettings &settings)
void readEnvironmentalVariables ()
void readCommandLine (ArgumentParser &arguments)
void setInheritanceMaskActionOnAttributeSetting (InheritanceMaskActionOnAttributeSetting action)
InheritanceMaskActionOnAttributeSetting getInheritanceMaskActionOnAttributeSetting () const
void applyMaskAction (unsigned int maskBit)
void setImpostorsActive (bool active)
bool getImpostorsActive () const
void setImpostorPixelErrorThreshold (float numPixels)
float getImpostorPixelErrorThreshold () const
void setDepthSortImpostorSprites (bool doDepthSort)
bool getDepthSortImpostorSprites () const
void setNumberOfFrameToKeepImpostorSprites (int numFrames)
int getNumberOfFrameToKeepImpostorSprites () const
void setComputeNearFarMode (ComputeNearFarMode cnfm)
ComputeNearFarMode getComputeNearFarMode () const
void setNearFarRatio (double ratio)
double getNearFarRatio () const
void setCullingMode (CullingMode mode)
CullingMode getCullingMode () const
void setCullMask (osg::Node::NodeMask nm)
osg::Node::NodeMask getCullMask () const
void setCullMaskLeft (osg::Node::NodeMask nm)
osg::Node::NodeMask getCullMaskLeft () const
void setCullMaskRight (osg::Node::NodeMask nm)
osg::Node::NodeMask getCullMaskRight () const
void setLODScale (float scale)
float getLODScale () const
void setSmallFeatureCullingPixelSize (float value)
float getSmallFeatureCullingPixelSize () const
void setClampProjectionMatrixCallback (ClampProjectionMatrixCallback *cpmc)
ClampProjectionMatrixCallbackgetClampProjectionMatrixCallback ()
const ClampProjectionMatrixCallbackgetClampProjectionMatrixCallback () const
void write (std::ostream &out)

Static Public Attributes

static const unsigned int FACE_CONTROLLED_BY_GEOMETRY_SHADER

Protected Member Functions

virtual ~Camera ()
Protected Member Functions inherited from osg::Transform
virtual ~Transform ()
Protected Member Functions inherited from osg::Group
virtual ~Group ()
virtual void childRemoved (unsigned int, unsigned int)
virtual void childInserted (unsigned int)
Protected Member Functions inherited from osg::Node
virtual ~Node ()
void addParent (osg::Group *parent)
void removeParent (osg::Group *parent)
void setNumChildrenRequiringUpdateTraversal (unsigned int num)
void setNumChildrenRequiringEventTraversal (unsigned int num)
void setNumChildrenWithCullingDisabled (unsigned int num)
void setNumChildrenWithOccluderNodes (unsigned int num)
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

OpenThreads::Mutex _dataChangeMutex
View_view
osg::ref_ptr< osg::Stats_stats
bool _allowEventFocus
osg::ref_ptr< osg::DisplaySettings_displaySettings
GLbitfield _clearMask
osg::Vec4 _clearColor
osg::Vec4 _clearAccum
double _clearDepth
int _clearStencil
ref_ptr< ColorMask_colorMask
ref_ptr< Viewport_viewport
TransformOrder _transformOrder
ProjectionResizePolicy _projectionResizePolicy
Matrixd _projectionMatrix
Matrixd _viewMatrix
RenderOrder _renderOrder
int _renderOrderNum
GLenum _drawBuffer
GLenum _readBuffer
RenderTargetImplementation _renderTargetImplementation
RenderTargetImplementation _renderTargetFallback
BufferAttachmentMap _bufferAttachmentMap
ImplicitBufferAttachmentMask _implicitBufferAttachmentRenderMask
ImplicitBufferAttachmentMask _implicitBufferAttachmentResolveMask
unsigned int _attachmentMapModifiedCount
OpenThreads::Affinity _affinity
ref_ptr< OperationThread_cameraThread
ref_ptr< GraphicsContext_graphicsContext
ref_ptr< GraphicsOperation_renderer
ref_ptr< Object_renderingCache
ref_ptr< DrawCallback_initialDrawCallback
ref_ptr< DrawCallback_preDrawCallback
ref_ptr< DrawCallback_postDrawCallback
ref_ptr< DrawCallback_finalDrawCallback
Protected Attributes inherited from osg::Transform
ReferenceFrame _referenceFrame
Protected Attributes inherited from osg::Group
NodeList _children
Protected Attributes inherited from osg::Node
BoundingSphere _initialBound
ref_ptr< ComputeBoundingSphereCallback_computeBoundCallback
BoundingSphere _boundingSphere
bool _boundingSphereComputed
ParentList _parents
ref_ptr< Callback_updateCallback
unsigned int _numChildrenRequiringUpdateTraversal
ref_ptr< Callback_eventCallback
unsigned int _numChildrenRequiringEventTraversal
ref_ptr< Callback_cullCallback
bool _cullingActive
unsigned int _numChildrenWithCullingDisabled
unsigned int _numChildrenWithOccluderNodes
NodeMask _nodeMask
ref_ptr< StateSet_stateset
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
Protected Attributes inherited from osg::CullSettings
InheritanceMask _inheritanceMask
InheritanceMaskActionOnAttributeSetting _inheritanceMaskActionOnAttributeSetting
ComputeNearFarMode _computeNearFar
CullingMode _cullingMode
float _LODScale
float _smallFeatureCullingPixelSize
ref_ptr< ClampProjectionMatrixCallback_clampProjectionMatrixCallback
double _nearFarRatio
bool _impostorActive
bool _depthSortImpostorSprites
float _impostorPixelErrorThreshold
int _numFramesToKeepImpostorSprites
Node::NodeMask _cullMask
Node::NodeMask _cullMaskLeft
Node::NodeMask _cullMaskRight

Additional Inherited Members

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

Detailed Description

Camera - is a subclass of Transform which represents encapsulates the settings of a Camera.

Member Typedef Documentation

◆ BufferAttachmentMap

◆ ImplicitBufferAttachmentMask

Member Enumeration Documentation

◆ BufferComponent

Enumerator
DEPTH_BUFFER 
STENCIL_BUFFER 
PACKED_DEPTH_STENCIL_BUFFER 
COLOR_BUFFER 
COLOR_BUFFER0 
COLOR_BUFFER1 
COLOR_BUFFER2 
COLOR_BUFFER3 
COLOR_BUFFER4 
COLOR_BUFFER5 
COLOR_BUFFER6 
COLOR_BUFFER7 
COLOR_BUFFER8 
COLOR_BUFFER9 
COLOR_BUFFER10 
COLOR_BUFFER11 
COLOR_BUFFER12 
COLOR_BUFFER13 
COLOR_BUFFER14 
COLOR_BUFFER15 

◆ ImplicitBufferAttachment

Explicit control over implicit allocation of buffers when using FBO. Implicit buffers are automatically substituted when user have not attached such buffer.

Camera may set up two FBOs: primary Render FBO and secondary Resolve FBO for multisample usage. So in practice we have two masks defined for the Camera: implicitBufferAttachmentRenderMask implicitBufferAttachmentResolveMask They can be set together by setImplicitBufferAttachmentMask method, or separately by setImplicitBufferAttachmentRenderMask and setImplicitBufferAttachmentResolveMask.

Camera defaults are USE_DISPLAY_SETTINGS_MASK which means that by default Camera chooses to substitute buffer attachments as defined by DisplaySettings.

Usually DisplaySettings implicit buffer attachment selection defaults to: DEPTH and COLOR for both primary (Render) FBO and seconday Multisample (Resolve) FBO ie: IMPLICIT_DEPTH_BUFFER_ATTACHMENT | IMPLICIT_COLOR_BUFFER_ATTACHMENT

If these masks are not changed and user did not attach depth buffer and/or color buffer to Camera, then OSG implicitly substitutes these buffers. By default it does not implicitly allocate a stencil buffer. Use implicit buffer attachment masks to override default behavior: to turn off DEPTH or COLOR buffer substitution or to enforce STENCIL buffer substitution.

Note that both values are ignored if not using FBO. Note that the second mask value is ignored if not using MSFBO.

Enumerator
IMPLICIT_DEPTH_BUFFER_ATTACHMENT 
IMPLICIT_STENCIL_BUFFER_ATTACHMENT 
IMPLICIT_COLOR_BUFFER_ATTACHMENT 
USE_DISPLAY_SETTINGS_MASK 

◆ ProjectionResizePolicy

Enumerator
FIXED 

Keep the projection matrix fixed, despite window resizes.

HORIZONTAL 

Adjust the HORIZONTAL field of view on window resizes.

VERTICAL 

Adjust the VERTICAL field of view on window resizes.

◆ RenderOrder

Enumerator
PRE_RENDER 
NESTED_RENDER 
POST_RENDER 

◆ RenderTargetImplementation

Enumerator
FRAME_BUFFER_OBJECT 
PIXEL_BUFFER_RTT 
PIXEL_BUFFER 
FRAME_BUFFER 
SEPARATE_WINDOW 

◆ ResizeMask

Enumerator
RESIZE_VIEWPORT 
RESIZE_ATTACHMENTS 
RESIZE_PROJECTIONMATRIX 
RESIZE_DEFAULT 

◆ TransformOrder

Enumerator
PRE_MULTIPLY 
POST_MULTIPLY 

Constructor & Destructor Documentation

◆ Camera() [1/2]

osg::Camera::Camera ( )

Referenced by asCamera(), asCamera(), Camera(), and META_Node().

◆ Camera() [2/2]

osg::Camera::Camera ( const Camera & ,
const CopyOp & copyop = CopyOp::SHALLOW_COPY )

Copy constructor using CopyOp to manage deep vs shallow copy.

References Camera(), and osg::CopyOp::SHALLOW_COPY.

◆ ~Camera()

virtual osg::Camera::~Camera ( )
protectedvirtual

Member Function Documentation

◆ addFinalDrawCallback() [1/2]

template<class T>
void osg::Camera::addFinalDrawCallback ( const ref_ptr< T > & nc)
inline

◆ addFinalDrawCallback() [2/2]

void osg::Camera::addFinalDrawCallback ( DrawCallback * nc)
inline

Convenience method that sets DrawCallback Initial callback of the node if it doesn't exist, or nest it into the existing one.

References _finalDrawCallback, NULL, and setFinalDrawCallback().

◆ addInitialDrawCallback() [1/2]

template<class T>
void osg::Camera::addInitialDrawCallback ( const ref_ptr< T > & nc)
inline

◆ addInitialDrawCallback() [2/2]

void osg::Camera::addInitialDrawCallback ( DrawCallback * nc)
inline

Convenience method that sets DrawCallback Initial callback of the node if it doesn't exist, or nest it into the existing one.

References _initialDrawCallback, NULL, and setInitialDrawCallback().

◆ addPostDrawCallback() [1/2]

template<class T>
void osg::Camera::addPostDrawCallback ( const ref_ptr< T > & nc)
inline

◆ addPostDrawCallback() [2/2]

void osg::Camera::addPostDrawCallback ( DrawCallback * nc)
inline

Convenience method that sets DrawCallback Initial callback of the node if it doesn't exist, or nest it into the existing one.

References _postDrawCallback, NULL, and setPostDrawCallback().

◆ addPreDrawCallback() [1/2]

template<class T>
void osg::Camera::addPreDrawCallback ( const ref_ptr< T > & nc)
inline

◆ addPreDrawCallback() [2/2]

void osg::Camera::addPreDrawCallback ( DrawCallback * nc)
inline

Convenience method that sets DrawCallback Initial callback of the node if it doesn't exist, or nest it into the existing one.

References _preDrawCallback, NULL, and setPreDrawCallback().

◆ asCamera() [1/2]

virtual Camera * osg::Camera::asCamera ( )
inlinevirtual

Convert 'this' into a Camera pointer if Node is a Camera, otherwise return 0. Equivalent to dynamic_cast<Camera*>(this).

Reimplemented from osg::Object.

References Camera().

◆ asCamera() [2/2]

virtual const Camera * osg::Camera::asCamera ( ) const
inlinevirtual

convert 'const this' into a const Camera pointer if Node is a Camera, otherwise return 0. Equivalent to dynamic_cast<const Camera*>(this).

Reimplemented from osg::Object.

References Camera().

◆ attach() [1/3]

void osg::Camera::attach ( BufferComponent buffer,
GLenum internalFormat )

Attach a buffer with specified OpenGL internal format.

◆ attach() [2/3]

void osg::Camera::attach ( BufferComponent buffer,
osg::Image * image,
unsigned int multisampleSamples = 0,
unsigned int multisampleColorSamples = 0 )

Attach a Image to specified buffer component.

◆ attach() [3/3]

void osg::Camera::attach ( BufferComponent buffer,
osg::Texture * texture,
unsigned int level = 0,
unsigned int face = 0,
bool mipMapGeneration = false,
unsigned int multisampleSamples = 0,
unsigned int multisampleColorSamples = 0 )

Attach a Texture to specified buffer component. The level parameter controls the mip map level of the texture that is attached. The face parameter controls the face of texture cube map or z level of 3d texture. The mipMapGeneration flag controls whether mipmap generation should be done for texture.

◆ computeLocalToWorldMatrix()

virtual bool osg::Camera::computeLocalToWorldMatrix ( Matrix & matrix,
NodeVisitor *  ) const
virtual

Transform method that must be defined to provide generic interface for scene graph traversals.

Reimplemented from osg::Transform.

◆ computeWorldToLocalMatrix()

virtual bool osg::Camera::computeWorldToLocalMatrix ( Matrix & matrix,
NodeVisitor *  ) const
virtual

Transform method that must be defined to provide generic interface for scene graph traversals.

Reimplemented from osg::Transform.

◆ createCameraThread()

void osg::Camera::createCameraThread ( )

Create a operation thread for this camera.

◆ detach()

void osg::Camera::detach ( BufferComponent buffer)

Detach specified buffer component.

◆ dirtyAttachmentMap()

void osg::Camera::dirtyAttachmentMap ( )
inline

Increment the _attachementMapModifiedCount so that the rendering backend will know that it needs to be updated to handle any new settings (such as format change/resizes.).

References _attachmentMapModifiedCount.

◆ getAllowEventFocus()

bool osg::Camera::getAllowEventFocus ( ) const
inline

Get whether this camera allows events to be generated by the associated graphics window to be associated with this camera.

References _allowEventFocus.

◆ getAttachmentMapModifiedCount()

unsigned int osg::Camera::getAttachmentMapModifiedCount ( ) const
inline

Get the AttachmentMapModifiedCount.

References _attachmentMapModifiedCount.

◆ getBufferAttachmentMap() [1/2]

BufferAttachmentMap & osg::Camera::getBufferAttachmentMap ( )
inline

Get the BufferAttachmentMap, used to configure frame buffer objects, pbuffers and texture reads.

References _bufferAttachmentMap.

◆ getBufferAttachmentMap() [2/2]

const BufferAttachmentMap & osg::Camera::getBufferAttachmentMap ( ) const
inline

Get the const BufferAttachmentMap, used to configure frame buffer objects, pbuffers and texture reads.

References _bufferAttachmentMap.

◆ getCameraThread() [1/2]

OperationThread * osg::Camera::getCameraThread ( )
inline

Get the operation thread assigned to this camera.

References _cameraThread.

◆ getCameraThread() [2/2]

const OperationThread * osg::Camera::getCameraThread ( ) const
inline

Get the const operation thread assigned to this camera.

References _cameraThread.

◆ getClearAccum()

const osg::Vec4 & osg::Camera::getClearAccum ( ) const
inline

Get the clear accum value.

References _clearAccum.

◆ getClearColor()

const osg::Vec4 & osg::Camera::getClearColor ( ) const
inline

Get the clear color.

References _clearColor.

◆ getClearDepth()

double osg::Camera::getClearDepth ( ) const
inline

Get the clear depth value.

References _clearDepth.

◆ getClearMask()

GLbitfield osg::Camera::getClearMask ( ) const
inline

Get the clear mask.

References _clearMask.

◆ getClearStencil()

int osg::Camera::getClearStencil ( ) const
inline

Get the clear stencil value.

References _clearStencil.

◆ getColorMask() [1/2]

ColorMask * osg::Camera::getColorMask ( )
inline

Get the ColorMask.

References _colorMask.

◆ getColorMask() [2/2]

const ColorMask * osg::Camera::getColorMask ( ) const
inline

Get the const ColorMask.

References _colorMask.

◆ getDataChangeMutex()

OpenThreads::Mutex * osg::Camera::getDataChangeMutex ( ) const
inline

References _dataChangeMutex.

◆ getDisplaySettings() [1/2]

osg::DisplaySettings * osg::Camera::getDisplaySettings ( )
inline

Get the DisplaySettings object associated with this view.

References _displaySettings.

◆ getDisplaySettings() [2/2]

const osg::DisplaySettings * osg::Camera::getDisplaySettings ( ) const
inline

Get the const DisplaySettings object associated with this view.

References _displaySettings.

◆ getDrawBuffer()

GLenum osg::Camera::getDrawBuffer ( ) const
inline

Get the draw buffer used at the start of each frame draw.

References _drawBuffer.

◆ getFinalDrawCallback() [1/2]

DrawCallback * osg::Camera::getFinalDrawCallback ( )
inline

Get the final draw callback.

References _finalDrawCallback.

◆ getFinalDrawCallback() [2/2]

const DrawCallback * osg::Camera::getFinalDrawCallback ( ) const
inline

Get the const final draw callback.

References _finalDrawCallback.

◆ getGraphicsContext() [1/2]

GraphicsContext * osg::Camera::getGraphicsContext ( )
inline

Get the GraphicsContext.

References _graphicsContext.

◆ getGraphicsContext() [2/2]

const GraphicsContext * osg::Camera::getGraphicsContext ( ) const
inline

Get the const GraphicsContext.

References _graphicsContext.

◆ getImplicitBufferAttachmentRenderMask() [1/2]

ImplicitBufferAttachmentMask osg::Camera::getImplicitBufferAttachmentRenderMask ( ) const
inline

◆ getImplicitBufferAttachmentRenderMask() [2/2]

ImplicitBufferAttachmentMask osg::Camera::getImplicitBufferAttachmentRenderMask ( bool effectiveMask) const
inline

Get mask selecting implicit buffer attachments for Camera primary FBO if effectiveMask parameter is set, method follows USE_DISPLAY_SETTINGS_MASK dependence and returns effective mask if effectiveMask parameter is reset, method returns nominal mask set by the Camera

References _displaySettings, _implicitBufferAttachmentRenderMask, osg::DisplaySettings::getImplicitBufferAttachmentRenderMask(), osg::DisplaySettings::instance(), and USE_DISPLAY_SETTINGS_MASK.

◆ getImplicitBufferAttachmentResolveMask() [1/2]

ImplicitBufferAttachmentMask osg::Camera::getImplicitBufferAttachmentResolveMask ( ) const
inline

◆ getImplicitBufferAttachmentResolveMask() [2/2]

ImplicitBufferAttachmentMask osg::Camera::getImplicitBufferAttachmentResolveMask ( bool effectiveMask) const
inline

Get mask selecting implicit buffer attachments for Camera secondary MULTISAMPLE FBO if effectiveMask parameter is set, method follows USE_DISPLAY_SETTINGS_MASK dependence and returns effective mask if effectiveMask parameter is reset, method returns nominal mask set by the Camera

References _displaySettings, _implicitBufferAttachmentResolveMask, osg::DisplaySettings::getImplicitBufferAttachmentResolveMask(), osg::DisplaySettings::instance(), and USE_DISPLAY_SETTINGS_MASK.

◆ getInitialDrawCallback() [1/2]

DrawCallback * osg::Camera::getInitialDrawCallback ( )
inline

Get the initial draw callback.

References _initialDrawCallback.

◆ getInitialDrawCallback() [2/2]

const DrawCallback * osg::Camera::getInitialDrawCallback ( ) const
inline

Get the const initial draw callback.

References _initialDrawCallback.

◆ getInverseViewMatrix()

Matrixd osg::Camera::getInverseViewMatrix ( ) const

Get the inverse view matrix.

◆ getPostDrawCallback() [1/2]

DrawCallback * osg::Camera::getPostDrawCallback ( )
inline

Get the post draw callback.

References _postDrawCallback.

◆ getPostDrawCallback() [2/2]

const DrawCallback * osg::Camera::getPostDrawCallback ( ) const
inline

Get the const post draw callback.

References _postDrawCallback.

◆ getPreDrawCallback() [1/2]

DrawCallback * osg::Camera::getPreDrawCallback ( )
inline

Get the pre draw callback.

References _preDrawCallback.

◆ getPreDrawCallback() [2/2]

const DrawCallback * osg::Camera::getPreDrawCallback ( ) const
inline

Get the const pre draw callback.

References _preDrawCallback.

◆ getProcessorAffinity() [1/2]

OpenThreads::Affinity & osg::Camera::getProcessorAffinity ( )
inline

References _affinity.

◆ getProcessorAffinity() [2/2]

const OpenThreads::Affinity & osg::Camera::getProcessorAffinity ( ) const
inline

References _affinity.

◆ getProjectionMatrix() [1/2]

osg::Matrixd & osg::Camera::getProjectionMatrix ( )
inline

Get the projection matrix.

References _projectionMatrix.

Referenced by osgManipulator::PointerInfo::setCamera().

◆ getProjectionMatrix() [2/2]

const osg::Matrixd & osg::Camera::getProjectionMatrix ( ) const
inline

Get the const projection matrix.

References _projectionMatrix.

◆ getProjectionMatrixAsFrustum()

bool osg::Camera::getProjectionMatrixAsFrustum ( double & left,
double & right,
double & bottom,
double & top,
double & zNear,
double & zFar ) const

Get the frustum setting of a perspective projection matrix. Returns false if matrix is not a perspective matrix, where parameter values are undefined.

◆ getProjectionMatrixAsOrtho()

bool osg::Camera::getProjectionMatrixAsOrtho ( double & left,
double & right,
double & bottom,
double & top,
double & zNear,
double & zFar ) const

Get the orthographic settings of the orthographic projection matrix. Returns false if matrix is not an orthographic matrix, where parameter values are undefined.

◆ getProjectionMatrixAsPerspective()

bool osg::Camera::getProjectionMatrixAsPerspective ( double & fovy,
double & aspectRatio,
double & zNear,
double & zFar ) const

Get the frustum setting of a symmetric perspective projection matrix. Returns false if matrix is not a perspective matrix, where parameter values are undefined. Note, if matrix is not a symmetric perspective matrix then the shear will be lost. Asymmetric matrices occur when stereo, power walls, caves and reality center display are used. In these configurations one should use the 'getProjectionMatrixAsFrustum' method instead.

◆ getProjectionResizePolicy()

ProjectionResizePolicy osg::Camera::getProjectionResizePolicy ( ) const
inline

Get the policy used to determine if and how the projection matrix should be adjusted on window resizes.

References _projectionResizePolicy.

◆ getReadBuffer()

GLenum osg::Camera::getReadBuffer ( ) const
inline

Get the read buffer for any required copy operations to use.

References _readBuffer.

◆ getRenderer() [1/2]

osg::GraphicsOperation * osg::Camera::getRenderer ( )
inline

Get the Rendering object that is used to implement rendering of the subgraph.

References _renderer.

◆ getRenderer() [2/2]

const osg::GraphicsOperation * osg::Camera::getRenderer ( ) const
inline

Get the const Rendering object that is used to implement rendering of the subgraph.

References _renderer.

◆ getRenderingCache() [1/2]

osg::Object * osg::Camera::getRenderingCache ( )
inline

Get the Rendering cache that is used for cached objects associated with rendering of subgraphs.

References _renderingCache.

◆ getRenderingCache() [2/2]

const osg::Object * osg::Camera::getRenderingCache ( ) const
inline

Get the const Rendering cache that is used for cached objects associated with rendering of subgraphs.

References _renderingCache.

◆ getRenderOrder()

RenderOrder osg::Camera::getRenderOrder ( ) const
inline

Get the rendering order of this camera's subgraph relative to any camera that this subgraph is nested within.

References _renderOrder.

Referenced by osg::CameraRenderOrderSortOp::operator()().

◆ getRenderOrderNum()

int osg::Camera::getRenderOrderNum ( ) const
inline

Get the rendering order number of this camera relative to any sibling cameras in this subgraph.

References _renderOrderNum.

Referenced by osg::CameraRenderOrderSortOp::operator()().

◆ getRenderTargetFallback()

RenderTargetImplementation osg::Camera::getRenderTargetFallback ( ) const
inline

Get the render target fallback.

References _renderTargetFallback.

◆ getRenderTargetImplementation()

RenderTargetImplementation osg::Camera::getRenderTargetImplementation ( ) const
inline

Get the render target.

References _renderTargetImplementation.

◆ getStats() [1/2]

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

Get the Stats object.

References _stats.

◆ getStats() [2/2]

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

Get the const Stats object.

References _stats.

◆ getTransformOrder()

TransformOrder osg::Camera::getTransformOrder ( ) const
inline

Get the transformation order.

References _transformOrder.

◆ getView() [1/2]

View * osg::Camera::getView ( )
inline

Get the View that this Camera is part of.

References _view.

◆ getView() [2/2]

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

Get the const View that this Camera is part of.

References _view.

◆ getViewMatrix() [1/2]

osg::Matrixd & osg::Camera::getViewMatrix ( )
inline

Get the view matrix.

References _viewMatrix.

Referenced by osgManipulator::PointerInfo::setCamera().

◆ getViewMatrix() [2/2]

const osg::Matrixd & osg::Camera::getViewMatrix ( ) const
inline

Get the const view matrix.

References _viewMatrix.

◆ getViewMatrixAsLookAt() [1/2]

void osg::Camera::getViewMatrixAsLookAt ( osg::Vec3d & eye,
osg::Vec3d & center,
osg::Vec3d & up,
double lookDistance = 1.0 ) const

Get to the position and orientation of a modelview matrix, using the same convention as gluLookAt.

◆ getViewMatrixAsLookAt() [2/2]

void osg::Camera::getViewMatrixAsLookAt ( osg::Vec3f & eye,
osg::Vec3f & center,
osg::Vec3f & up,
float lookDistance = 1.0f ) const

Get to the position and orientation of a modelview matrix, using the same convention as gluLookAt.

◆ getViewport() [1/2]

Viewport * osg::Camera::getViewport ( )
inline

Get the viewport.

References _viewport.

◆ getViewport() [2/2]

const Viewport * osg::Camera::getViewport ( ) const
inline

Get the const viewport.

References _viewport.

Referenced by osgManipulator::PointerInfo::setCamera().

◆ inheritCullSettings()

virtual void osg::Camera::inheritCullSettings ( const CullSettings & settings,
unsigned int inheritanceMask )
virtual

Inherit the local cull settings variable from specified CullSettings object, according to the inheritance mask.

Reimplemented from osg::CullSettings.

References osg::CullSettings::CullSettings().

◆ isRenderToTextureCamera()

bool osg::Camera::isRenderToTextureCamera ( ) const

Return true if this Camera is set up as a render to texture camera, i.e. it has textures assigned to it.

◆ META_Node()

osg::Camera::META_Node ( osg ,
Camera  )

References Camera().

◆ releaseGLObjects()

virtual void osg::Camera::releaseGLObjects ( osg::State * = 0) const
virtual

If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context. Otherwise, releases OpenGL objexts for all graphics contexts.

Reimplemented from osg::Group.

◆ removeFinalDrawCallback() [1/2]

template<class T>
void osg::Camera::removeFinalDrawCallback ( const ref_ptr< T > & nc)
inline

◆ removeFinalDrawCallback() [2/2]

void osg::Camera::removeFinalDrawCallback ( DrawCallback * nc)
inline

Convenience method that removes a given callback from a node, even if that callback is nested. There is no error return in case the given callback is not found.

References _finalDrawCallback, osg::ref_ptr< T >::get(), osg::Callback::getNestedCallback(), NULL, setFinalDrawCallback(), and osg::Callback::setNestedCallback().

◆ removeInitialDrawCallback() [1/2]

template<class T>
void osg::Camera::removeInitialDrawCallback ( const ref_ptr< T > & nc)
inline

◆ removeInitialDrawCallback() [2/2]

void osg::Camera::removeInitialDrawCallback ( DrawCallback * nc)
inline

Convenience method that removes a given callback from a node, even if that callback is nested. There is no error return in case the given callback is not found.

References _initialDrawCallback, osg::ref_ptr< T >::get(), osg::Callback::getNestedCallback(), NULL, setInitialDrawCallback(), and osg::Callback::setNestedCallback().

◆ removePostDrawCallback() [1/2]

template<class T>
void osg::Camera::removePostDrawCallback ( const ref_ptr< T > & nc)
inline

◆ removePostDrawCallback() [2/2]

void osg::Camera::removePostDrawCallback ( DrawCallback * nc)
inline

Convenience method that removes a given callback from a node, even if that callback is nested. There is no error return in case the given callback is not found.

References _postDrawCallback, osg::ref_ptr< T >::get(), osg::Callback::getNestedCallback(), NULL, osg::Callback::setNestedCallback(), and setPostDrawCallback().

◆ removePreDrawCallback() [1/2]

template<class T>
void osg::Camera::removePreDrawCallback ( const ref_ptr< T > & nc)
inline

◆ removePreDrawCallback() [2/2]

void osg::Camera::removePreDrawCallback ( DrawCallback * nc)
inline

Convenience method that removes a given callback from a node, even if that callback is nested. There is no error return in case the given callback is not found.

References _preDrawCallback, osg::ref_ptr< T >::get(), osg::Callback::getNestedCallback(), NULL, osg::Callback::setNestedCallback(), and setPreDrawCallback().

◆ resize()

void osg::Camera::resize ( int width,
int height,
int resizeMask = RESIZE_DEFAULT )

Resize, to the specified width and height, the viewport, attachments and projection matrix according to the resizeMask provided. Note, the adjustment of the projection matrix is done if the RESIZE_PROJECTIONMATRIX mask to set and according to the rules specified in the ProjectionResizePolicy.

References RESIZE_DEFAULT.

◆ resizeAttachments()

void osg::Camera::resizeAttachments ( int width,
int height )

Resize the image and textures in the AttachementMap.

◆ resizeGLObjectBuffers()

virtual void osg::Camera::resizeGLObjectBuffers ( unsigned int maxSize)
virtual

Resize any per context GLObject buffers to specified size.

Reimplemented from osg::Group.

◆ setAllowEventFocus()

void osg::Camera::setAllowEventFocus ( bool focus)
inline

Set whether this camera allows events to be generated by the associated graphics window to be associated with this camera.

References _allowEventFocus.

◆ setAttachmentMapModifiedCount()

void osg::Camera::setAttachmentMapModifiedCount ( unsigned int v)
inline

Set the AttachmentMapModifiedCount to a specific value. Note, normal usage you would simply call dirtyAttachmentMap().

References _attachmentMapModifiedCount.

◆ setCameraThread()

void osg::Camera::setCameraThread ( OperationThread * gt)

Assign a operation thread to the camera.

◆ setClearAccum()

void osg::Camera::setClearAccum ( const osg::Vec4 & color)
inline

Set the clear accum used in glClearAccum(). glClearAcumm is only called if mask & GL_ACCUM_BUFFER_BIT is true.

References _clearAccum.

◆ setClearColor()

void osg::Camera::setClearColor ( const osg::Vec4 & color)
inline

Set the clear color used in glClearColor(). glClearColor is only called if mask & GL_COLOR_BUFFER_BIT is true

References _clearColor, osg::CullSettings::applyMaskAction(), and osg::CullSettings::CLEAR_COLOR.

◆ setClearDepth()

void osg::Camera::setClearDepth ( double depth)
inline

Set the clear depth used in glClearDepth(). Defaults to 1.0 glClearDepth is only called if mask & GL_DEPTH_BUFFER_BIT is true.

References _clearDepth.

◆ setClearMask()

void osg::Camera::setClearMask ( GLbitfield mask)
inline

Set the clear mask used in glClear(). Defaults to GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT.

References _clearMask, osg::CullSettings::applyMaskAction(), and osg::CullSettings::CLEAR_MASK.

◆ setClearStencil()

void osg::Camera::setClearStencil ( int stencil)
inline

Set the clear stencil value used in glClearStencil(). Defaults to 0; glClearStencil is only called if mask & GL_STENCIL_BUFFER_BIT is true

References _clearStencil.

◆ setColorMask() [1/2]

void osg::Camera::setColorMask ( bool red,
bool green,
bool blue,
bool alpha )

Set the color mask of the camera to specified values.

◆ setColorMask() [2/2]

void osg::Camera::setColorMask ( osg::ColorMask * colorMask)

Set the color mask of the camera to use specified osg::ColorMask.

◆ setDisplaySettings()

void osg::Camera::setDisplaySettings ( osg::DisplaySettings * ds)
inline

Set the DisplaySettings object associated with this view.

References _displaySettings.

◆ setDrawBuffer()

void osg::Camera::setDrawBuffer ( GLenum buffer)
inline

Set the draw buffer used at the start of each frame draw. Note, a buffer value of GL_NONE is used to specify that the rendering back-end should choose the most appropriate buffer.

References _drawBuffer, osg::CullSettings::applyMaskAction(), and osg::CullSettings::DRAW_BUFFER.

◆ setFinalDrawCallback()

void osg::Camera::setFinalDrawCallback ( DrawCallback * cb)
inline

Set the final draw callback for custom operations to be done after the drawing of the camera's subgraph and all of the post render stages has been completed.

References _finalDrawCallback.

Referenced by addFinalDrawCallback(), and removeFinalDrawCallback().

◆ setGraphicsContext()

void osg::Camera::setGraphicsContext ( GraphicsContext * context)

Set the GraphicsContext that provides the mechansim for managing the OpenGL graphics context associated with this camera.

◆ setImplicitBufferAttachmentMask()

◆ setImplicitBufferAttachmentRenderMask()

void osg::Camera::setImplicitBufferAttachmentRenderMask ( ImplicitBufferAttachmentMask implicitBufferAttachmentRenderMask)
inline

◆ setImplicitBufferAttachmentResolveMask()

void osg::Camera::setImplicitBufferAttachmentResolveMask ( ImplicitBufferAttachmentMask implicitBufferAttachmentResolveMask)
inline

◆ setInitialDrawCallback()

void osg::Camera::setInitialDrawCallback ( DrawCallback * cb)
inline

Set the initial draw callback for custom operations to be done before the drawing of the camera's subgraph and pre render stages.

References _initialDrawCallback.

Referenced by addInitialDrawCallback(), and removeInitialDrawCallback().

◆ setPostDrawCallback()

void osg::Camera::setPostDrawCallback ( DrawCallback * cb)
inline

Set the post draw callback for custom operations to be done after the drawing of the camera's subgraph but before the any post render stages have been completed.

References _postDrawCallback.

Referenced by addPostDrawCallback(), and removePostDrawCallback().

◆ setPreDrawCallback()

void osg::Camera::setPreDrawCallback ( DrawCallback * cb)
inline

Set the pre draw callback for custom operations to be done before the drawing of the camera's subgraph but after any pre render stages have been completed.

References _preDrawCallback.

Referenced by addPreDrawCallback(), and removePreDrawCallback().

◆ setProcessorAffinity()

void osg::Camera::setProcessorAffinity ( const OpenThreads::Affinity & affinity)

Set the process affinity hint for any Camera Threads that are/will be assigned to this Camera.

◆ setProjectionMatrix() [1/2]

void osg::Camera::setProjectionMatrix ( const osg::Matrixd & matrix)
inline

Set the projection matrix. Can be thought of as setting the lens of a camera.

References _projectionMatrix.

◆ setProjectionMatrix() [2/2]

void osg::Camera::setProjectionMatrix ( const osg::Matrixf & matrix)
inline

Set the projection matrix. Can be thought of as setting the lens of a camera.

References _projectionMatrix.

◆ setProjectionMatrixAsFrustum()

void osg::Camera::setProjectionMatrixAsFrustum ( double left,
double right,
double bottom,
double top,
double zNear,
double zFar )

Set to a perspective projection. See OpenGL glFrustum documentation for further details.

◆ setProjectionMatrixAsOrtho()

void osg::Camera::setProjectionMatrixAsOrtho ( double left,
double right,
double bottom,
double top,
double zNear,
double zFar )

Set to an orthographic projection. See OpenGL glOrtho for documentation further details.

◆ setProjectionMatrixAsOrtho2D()

void osg::Camera::setProjectionMatrixAsOrtho2D ( double left,
double right,
double bottom,
double top )

Set to a 2D orthographic projection. See OpenGL glOrtho2D documentation for further details.

◆ setProjectionMatrixAsPerspective()

void osg::Camera::setProjectionMatrixAsPerspective ( double fovy,
double aspectRatio,
double zNear,
double zFar )

Create a symmetrical perspective projection, See OpenGL gluPerspective documentation for further details. Aspect ratio is defined as width/height.

◆ setProjectionResizePolicy()

void osg::Camera::setProjectionResizePolicy ( ProjectionResizePolicy policy)
inline

Set the policy used to determine if and how the projection matrix should be adjusted on window resizes.

References _projectionResizePolicy.

◆ setReadBuffer()

void osg::Camera::setReadBuffer ( GLenum buffer)
inline

Set the read buffer for any required copy operations to use. Note, a buffer value of GL_NONE is used to specify that the rendering back-end should choose the most appropriate buffer.

References _readBuffer, osg::CullSettings::applyMaskAction(), and osg::CullSettings::READ_BUFFER.

◆ setRenderer()

void osg::Camera::setRenderer ( osg::GraphicsOperation * rc)
inline

Set the Rendering object that is used to implement rendering of the subgraph.

References _renderer.

◆ setRenderingCache()

void osg::Camera::setRenderingCache ( osg::Object * rc)
inline

Set the Rendering cache that is used for cached objects associated with rendering of subgraphs.

References _renderingCache.

◆ setRenderOrder()

void osg::Camera::setRenderOrder ( RenderOrder order,
int orderNum = 0 )
inline

Set the rendering order of this camera's subgraph relative to any camera that this subgraph is nested within. For rendering to a texture, one typically uses PRE_RENDER. For Head Up Displays, one would typically use POST_RENDER.

References _renderOrder, and _renderOrderNum.

◆ setRenderTargetImplementation() [1/2]

void osg::Camera::setRenderTargetImplementation ( RenderTargetImplementation impl)

Set the render target.

◆ setRenderTargetImplementation() [2/2]

void osg::Camera::setRenderTargetImplementation ( RenderTargetImplementation impl,
RenderTargetImplementation fallback )

Set the render target and fall-back that's used if the former isn't available.

◆ setStats()

void osg::Camera::setStats ( osg::Stats * stats)
inline

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

References _stats.

◆ setTransformOrder()

void osg::Camera::setTransformOrder ( TransformOrder order)
inline

Set the transformation order for world-to-local and local-to-world transformation.

References _transformOrder.

◆ setView()

void osg::Camera::setView ( View * view)
inline

Set the View that this Camera is part of.

References _view.

◆ setViewMatrix() [1/2]

void osg::Camera::setViewMatrix ( const osg::Matrixd & matrix)
inline

Set the view matrix. Can be thought of as setting the position of the world relative to the camera in camera coordinates.

References _viewMatrix, and osg::Node::dirtyBound().

◆ setViewMatrix() [2/2]

void osg::Camera::setViewMatrix ( const osg::Matrixf & matrix)
inline

Set the view matrix. Can be thought of as setting the position of the world relative to the camera in camera coordinates.

References _viewMatrix, and osg::Node::dirtyBound().

Referenced by osgGA::CameraManipulator::updateCamera().

◆ setViewMatrixAsLookAt()

void osg::Camera::setViewMatrixAsLookAt ( const osg::Vec3d & eye,
const osg::Vec3d & center,
const osg::Vec3d & up )

Set to the position and orientation of view matrix, using the same convention as gluLookAt.

◆ setViewport() [1/2]

void osg::Camera::setViewport ( int x,
int y,
int width,
int height )

Set the viewport of the camera to specified dimensions.

◆ setViewport() [2/2]

void osg::Camera::setViewport ( osg::Viewport * viewport)

Set the viewport of the camera to use specified osg::Viewport.

Member Data Documentation

◆ _affinity

OpenThreads::Affinity osg::Camera::_affinity
protected

◆ _allowEventFocus

bool osg::Camera::_allowEventFocus
protected

◆ _attachmentMapModifiedCount

unsigned int osg::Camera::_attachmentMapModifiedCount
protected

◆ _bufferAttachmentMap

BufferAttachmentMap osg::Camera::_bufferAttachmentMap
protected

◆ _cameraThread

ref_ptr<OperationThread> osg::Camera::_cameraThread
protected

Referenced by getCameraThread(), and getCameraThread().

◆ _clearAccum

osg::Vec4 osg::Camera::_clearAccum
protected

Referenced by getClearAccum(), and setClearAccum().

◆ _clearColor

osg::Vec4 osg::Camera::_clearColor
protected

Referenced by getClearColor(), and setClearColor().

◆ _clearDepth

double osg::Camera::_clearDepth
protected

Referenced by getClearDepth(), and setClearDepth().

◆ _clearMask

GLbitfield osg::Camera::_clearMask
protected

Referenced by getClearMask(), and setClearMask().

◆ _clearStencil

int osg::Camera::_clearStencil
protected

Referenced by getClearStencil(), and setClearStencil().

◆ _colorMask

ref_ptr<ColorMask> osg::Camera::_colorMask
protected

Referenced by getColorMask(), and getColorMask().

◆ _dataChangeMutex

OpenThreads::Mutex osg::Camera::_dataChangeMutex
mutableprotected

Referenced by getDataChangeMutex().

◆ _displaySettings

◆ _drawBuffer

GLenum osg::Camera::_drawBuffer
protected

Referenced by getDrawBuffer(), and setDrawBuffer().

◆ _finalDrawCallback

◆ _graphicsContext

ref_ptr<GraphicsContext> osg::Camera::_graphicsContext
protected

◆ _implicitBufferAttachmentRenderMask

◆ _implicitBufferAttachmentResolveMask

◆ _initialDrawCallback

◆ _postDrawCallback

◆ _preDrawCallback

◆ _projectionMatrix

Matrixd osg::Camera::_projectionMatrix
protected

◆ _projectionResizePolicy

ProjectionResizePolicy osg::Camera::_projectionResizePolicy
protected

◆ _readBuffer

GLenum osg::Camera::_readBuffer
protected

Referenced by getReadBuffer(), and setReadBuffer().

◆ _renderer

ref_ptr<GraphicsOperation> osg::Camera::_renderer
protected

◆ _renderingCache

ref_ptr<Object> osg::Camera::_renderingCache
protected

◆ _renderOrder

RenderOrder osg::Camera::_renderOrder
protected

Referenced by getRenderOrder(), and setRenderOrder().

◆ _renderOrderNum

int osg::Camera::_renderOrderNum
protected

◆ _renderTargetFallback

RenderTargetImplementation osg::Camera::_renderTargetFallback
protected

Referenced by getRenderTargetFallback().

◆ _renderTargetImplementation

RenderTargetImplementation osg::Camera::_renderTargetImplementation
protected

◆ _stats

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

Referenced by getStats(), getStats(), and setStats().

◆ _transformOrder

TransformOrder osg::Camera::_transformOrder
protected

◆ _view

View* osg::Camera::_view
protected

Referenced by getView(), getView(), and setView().

◆ _viewMatrix

Matrixd osg::Camera::_viewMatrix
protected

◆ _viewport

ref_ptr<Viewport> osg::Camera::_viewport
protected

Referenced by getViewport(), and getViewport().

◆ FACE_CONTROLLED_BY_GEOMETRY_SHADER

const unsigned int osg::Camera::FACE_CONTROLLED_BY_GEOMETRY_SHADER
static

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