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

#include <Camera.h>

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

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, Attachment
BufferAttachmentMap
 
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 (bool effectiveMask=false) const
 
ImplicitBufferAttachmentMask getImplicitBufferAttachmentResolveMask (bool effectiveMask=false) 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 setPreDrawCallback (DrawCallback *cb)
 
DrawCallbackgetPreDrawCallback ()
 
const DrawCallbackgetPreDrawCallback () const
 
void setPostDrawCallback (DrawCallback *cb)
 
DrawCallbackgetPostDrawCallback ()
 
const DrawCallbackgetPostDrawCallback () const
 
void setFinalDrawCallback (DrawCallback *cb)
 
DrawCallbackgetFinalDrawCallback ()
 
const DrawCallbackgetFinalDrawCallback () const
 
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
PositionAttitudeTransform
asPositionAttitudeTransform () 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)
 
virtual bool insertChild (unsigned int index, Node *child)
 
virtual bool removeChild (Node *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)
 
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
 
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)
 
CallbackgetUpdateCallback ()
 
const CallbackgetUpdateCallback () const
 
void addUpdateCallback (Callback *nc)
 
void removeUpdateCallback (Callback *nc)
 
unsigned int getNumChildrenRequiringUpdateTraversal () const
 
void setEventCallback (Callback *nc)
 
CallbackgetEventCallback ()
 
const CallbackgetEventCallback () const
 
void addEventCallback (Callback *nc)
 
void removeEventCallback (Callback *nc)
 
unsigned int getNumChildrenRequiringEventTraversal () const
 
void setCullCallback (Callback *nc)
 
CallbackgetCullCallback ()
 
const CallbackgetCullCallback () const
 
void addCullCallback (Callback *nc)
 
void removeCullCallback (Callback *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)
 
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)
 
ComputeBoundingSphereCallbackgetComputeBoundingSphereCallback ()
 
const
ComputeBoundingSphereCallback
getComputeBoundingSphereCallback () 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 StateAttributeasStateAttribute ()
 
virtual const StateAttributeasStateAttribute () const
 
virtual UniformasUniform ()
 
virtual const UniformasUniform () 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)
 
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)
 
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
ClampProjectionMatrixCallback
getClampProjectionMatrixCallback () 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
 
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 setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
 
static bool getThreadSafeReferenceCounting ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 

Detailed Description

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

Definition at line 44 of file Camera.h.

Member Typedef Documentation

Definition at line 411 of file Camera.h.

Definition at line 480 of file Camera.h.

Member Enumeration Documentation

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 

Definition at line 325 of file Camera.h.

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 

Definition at line 472 of file Camera.h.

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.

Definition at line 175 of file Camera.h.

Enumerator
PRE_RENDER 
NESTED_RENDER 
POST_RENDER 

Definition at line 268 of file Camera.h.

Enumerator
FRAME_BUFFER_OBJECT 
PIXEL_BUFFER_RTT 
PIXEL_BUFFER 
FRAME_BUFFER 
SEPARATE_WINDOW 

Definition at line 289 of file Camera.h.

Enumerator
RESIZE_VIEWPORT 
RESIZE_ATTACHMENTS 
RESIZE_PROJECTIONMATRIX 
RESIZE_DEFAULT 

Definition at line 433 of file Camera.h.

Enumerator
PRE_MULTIPLY 
POST_MULTIPLY 

Definition at line 163 of file Camera.h.

Constructor & Destructor Documentation

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

Copy constructor using CopyOp to manage deep vs shallow copy.

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

Member Function Documentation

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

Definition at line 56 of file Camera.h.

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

Definition at line 57 of file Camera.h.

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

Attach a buffer with specified OpenGL internal format.

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.

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

Attach a Image to specified buffer component.

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.

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.

void osg::Camera::createCameraThread ( )

Create a operation thread for this camera.

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

Detach specified buffer component.

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

Definition at line 421 of file Camera.h.

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.

Definition at line 86 of file Camera.h.

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

Get the AttachmentMapModifiedCount.

Definition at line 427 of file Camera.h.

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

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

Definition at line 414 of file Camera.h.

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

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

Definition at line 417 of file Camera.h.

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

Get the operation thread assigned to this camera.

Definition at line 541 of file Camera.h.

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

Get the const operation thread assigned to this camera.

Definition at line 544 of file Camera.h.

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

Get the clear accum value.

Definition at line 118 of file Camera.h.

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

Get the clear color.

Definition at line 111 of file Camera.h.

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

Get the clear depth value.

Definition at line 125 of file Camera.h.

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

Get the clear mask.

Definition at line 104 of file Camera.h.

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

Get the clear stencil value.

Definition at line 132 of file Camera.h.

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

Get the const ColorMask.

Definition at line 143 of file Camera.h.

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

Get the ColorMask.

Definition at line 146 of file Camera.h.

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

Definition at line 634 of file Camera.h.

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

Get the DisplaySettings object associated with this view.

Definition at line 93 of file Camera.h.

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

Get the const DisplaySettings object associated with this view.

Definition at line 96 of file Camera.h.

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

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

Definition at line 316 of file Camera.h.

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

Get the final draw callback.

Definition at line 628 of file Camera.h.

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

Get the const final draw callback.

Definition at line 631 of file Camera.h.

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

Get the GraphicsContext.

Definition at line 552 of file Camera.h.

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

Get the const GraphicsContext.

Definition at line 555 of file Camera.h.

ImplicitBufferAttachmentMask osg::Camera::getImplicitBufferAttachmentRenderMask ( bool  effectiveMask = false) 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

Definition at line 503 of file Camera.h.

Here is the call graph for this function:

ImplicitBufferAttachmentMask osg::Camera::getImplicitBufferAttachmentResolveMask ( bool  effectiveMask = false) 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

Definition at line 521 of file Camera.h.

Here is the call graph for this function:

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

Get the initial draw callback.

Definition at line 598 of file Camera.h.

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

Get the const initial draw callback.

Definition at line 601 of file Camera.h.

Matrixd osg::Camera::getInverseViewMatrix ( ) const

Get the inverse view matrix.

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

Get the post draw callback.

Definition at line 618 of file Camera.h.

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

Get the const post draw callback.

Definition at line 621 of file Camera.h.

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

Get the pre draw callback.

Definition at line 608 of file Camera.h.

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

Get the const pre draw callback.

Definition at line 611 of file Camera.h.

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

Get the projection matrix.

Definition at line 216 of file Camera.h.

Here is the caller graph for this function:

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

Get the const projection matrix.

Definition at line 219 of file Camera.h.

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.

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.

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.

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

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

Definition at line 187 of file Camera.h.

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

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

Definition at line 323 of file Camera.h.

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

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

Definition at line 562 of file Camera.h.

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

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

Definition at line 565 of file Camera.h.

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

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

Definition at line 572 of file Camera.h.

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

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

Definition at line 575 of file Camera.h.

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.

Definition at line 281 of file Camera.h.

Here is the caller graph for this function:

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

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

Definition at line 284 of file Camera.h.

Here is the caller graph for this function:

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

Get the render target fallback.

Definition at line 308 of file Camera.h.

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

Get the render target.

Definition at line 305 of file Camera.h.

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

Get the Stats object.

Definition at line 74 of file Camera.h.

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

Get the const Stats object.

Definition at line 77 of file Camera.h.

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

Get the transformation order.

Definition at line 173 of file Camera.h.

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

Get the View that this Camera is part of.

Definition at line 63 of file Camera.h.

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

Get the const View that this Camera is part of.

Definition at line 66 of file Camera.h.

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

Get the view matrix.

Definition at line 250 of file Camera.h.

Here is the caller graph for this function:

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

Get the const view matrix.

Definition at line 253 of file Camera.h.

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.

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.

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

Get the const viewport.

Definition at line 156 of file Camera.h.

Here is the caller graph for this function:

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

Get the viewport.

Definition at line 159 of file Camera.h.

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.

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.

osg::Camera::META_Node ( osg  ,
Camera   
)
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.

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.

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

Resize the image and textures in the AttachementMap.

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

Resize any per context GLObject buffers to specified size.

Reimplemented from osg::Group.

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.

Definition at line 82 of file Camera.h.

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

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

Definition at line 424 of file Camera.h.

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

Assign a operation thread to the camera.

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.

Definition at line 115 of file Camera.h.

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

Definition at line 108 of file Camera.h.

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.

Definition at line 122 of file Camera.h.

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

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

Definition at line 101 of file Camera.h.

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

Definition at line 129 of file Camera.h.

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

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

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

Set the color mask of the camera to specified values.

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

Set the DisplaySettings object associated with this view.

Definition at line 90 of file Camera.h.

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.

Definition at line 313 of file Camera.h.

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.

Definition at line 625 of file Camera.h.

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

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

Definition at line 482 of file Camera.h.

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

Definition at line 488 of file Camera.h.

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

Definition at line 493 of file Camera.h.

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.

Definition at line 595 of file Camera.h.

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.

Definition at line 615 of file Camera.h.

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.

Definition at line 605 of file Camera.h.

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

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

Definition at line 191 of file Camera.h.

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

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

Definition at line 194 of file Camera.h.

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.

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.

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.

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.

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.

Definition at line 184 of file Camera.h.

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.

Definition at line 320 of file Camera.h.

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

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

Definition at line 559 of file Camera.h.

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

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

Definition at line 569 of file Camera.h.

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.

Definition at line 278 of file Camera.h.

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

Set the render target.

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

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

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

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

Definition at line 71 of file Camera.h.

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

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

Definition at line 170 of file Camera.h.

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

Set the View that this Camera is part of.

Definition at line 60 of file Camera.h.

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.

Definition at line 244 of file Camera.h.

Here is the caller graph for this function:

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.

Definition at line 247 of file Camera.h.

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.

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

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

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

Set the viewport of the camera to specified dimensions.

Member Data Documentation

bool osg::Camera::_allowEventFocus
protected

Definition at line 666 of file Camera.h.

unsigned int osg::Camera::_attachmentMapModifiedCount
protected

Definition at line 697 of file Camera.h.

BufferAttachmentMap osg::Camera::_bufferAttachmentMap
protected

Definition at line 693 of file Camera.h.

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

Definition at line 699 of file Camera.h.

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

Definition at line 672 of file Camera.h.

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

Definition at line 671 of file Camera.h.

double osg::Camera::_clearDepth
protected

Definition at line 673 of file Camera.h.

GLbitfield osg::Camera::_clearMask
protected

Definition at line 670 of file Camera.h.

int osg::Camera::_clearStencil
protected

Definition at line 674 of file Camera.h.

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

Definition at line 676 of file Camera.h.

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

Definition at line 659 of file Camera.h.

osg::ref_ptr<osg::DisplaySettings> osg::Camera::_displaySettings
protected

Definition at line 668 of file Camera.h.

GLenum osg::Camera::_drawBuffer
protected

Definition at line 688 of file Camera.h.

ref_ptr<DrawCallback> osg::Camera::_finalDrawCallback
protected

Definition at line 709 of file Camera.h.

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

Definition at line 701 of file Camera.h.

ImplicitBufferAttachmentMask osg::Camera::_implicitBufferAttachmentRenderMask
protected

Definition at line 694 of file Camera.h.

ImplicitBufferAttachmentMask osg::Camera::_implicitBufferAttachmentResolveMask
protected

Definition at line 695 of file Camera.h.

ref_ptr<DrawCallback> osg::Camera::_initialDrawCallback
protected

Definition at line 706 of file Camera.h.

ref_ptr<DrawCallback> osg::Camera::_postDrawCallback
protected

Definition at line 708 of file Camera.h.

ref_ptr<DrawCallback> osg::Camera::_preDrawCallback
protected

Definition at line 707 of file Camera.h.

Matrixd osg::Camera::_projectionMatrix
protected

Definition at line 682 of file Camera.h.

ProjectionResizePolicy osg::Camera::_projectionResizePolicy
protected

Definition at line 680 of file Camera.h.

GLenum osg::Camera::_readBuffer
protected

Definition at line 689 of file Camera.h.

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

Definition at line 703 of file Camera.h.

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

Definition at line 704 of file Camera.h.

RenderOrder osg::Camera::_renderOrder
protected

Definition at line 685 of file Camera.h.

int osg::Camera::_renderOrderNum
protected

Definition at line 686 of file Camera.h.

RenderTargetImplementation osg::Camera::_renderTargetFallback
protected

Definition at line 692 of file Camera.h.

RenderTargetImplementation osg::Camera::_renderTargetImplementation
protected

Definition at line 691 of file Camera.h.

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

Definition at line 664 of file Camera.h.

TransformOrder osg::Camera::_transformOrder
protected

Definition at line 679 of file Camera.h.

View* osg::Camera::_view
protected

Definition at line 662 of file Camera.h.

Matrixd osg::Camera::_viewMatrix
protected

Definition at line 683 of file Camera.h.

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

Definition at line 677 of file Camera.h.

const unsigned int osg::Camera::FACE_CONTROLLED_BY_GEOMETRY_SHADER
static

Definition at line 349 of file Camera.h.


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