OpenSceneGraph
3.0.1
|
Camera - is a subclass of Transform which represents encapsulates the settings of a Camera. More...
Classes | |
struct | Attachment |
struct | DrawCallback |
Draw callback for custom operations. More... | |
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, SEPERATE_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 | 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) } |
Explicit control over implicit allocation of buffers when using FBO. More... | |
typedef std::map < BufferComponent, Attachment > | BufferAttachmentMap |
typedef int | ImplicitBufferAttachmentMask |
Public Member Functions | |
Camera () | |
Camera (const Camera &, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
Copy constructor using CopyOp to manage deep vs shallow copy. | |
META_Node (osg, Camera) | |
void | setView (View *view) |
Set the View that this Camera is part of. | |
View * | getView () |
Get the View that this Camera is part of. | |
const View * | getView () const |
Get the const View that this Camera is part of. | |
void | setStats (osg::Stats *stats) |
Set the Stats object used for collect various frame related timing and scene graph stats. | |
osg::Stats * | getStats () |
Get the Stats object. | |
const osg::Stats * | getStats () const |
Get the const Stats object. | |
void | setAllowEventFocus (bool focus) |
Set whether this camera allows events to be generated by the associated graphics window to be associated with this camera. | |
bool | getAllowEventFocus () const |
Get whether this camera allows events to be generated by the associated graphics window to be associated with this camera. | |
void | setDisplaySettings (osg::DisplaySettings *ds) |
Set the DisplaySettings object associated with this view. | |
osg::DisplaySettings * | getDisplaySettings () |
Get the DisplaySettings object associated with this view. | |
const osg::DisplaySettings * | getDisplaySettings () const |
Get the const DisplaySettings object associated with this view. | |
void | setClearMask (GLbitfield mask) |
Set the clear mask used in glClear(). | |
GLbitfield | getClearMask () const |
Get the clear mask. | |
void | setClearColor (const osg::Vec4 &color) |
Set the clear color used in glClearColor(). | |
const osg::Vec4 & | getClearColor () const |
Get the clear color. | |
void | setClearAccum (const osg::Vec4 &color) |
Set the clear accum used in glClearAccum(). | |
const osg::Vec4 & | getClearAccum () const |
Get the clear accum value. | |
void | setClearDepth (double depth) |
Set the clear depth used in glClearDepth(). | |
double | getClearDepth () const |
Get the clear depth value. | |
void | setClearStencil (int stencil) |
Set the clear stencil value used in glClearStencil(). | |
int | getClearStencil () const |
Get the clear stencil value. | |
void | setColorMask (osg::ColorMask *colorMask) |
Set the color mask of the camera to use specified osg::ColorMask. | |
void | setColorMask (bool red, bool green, bool blue, bool alpha) |
Set the color mask of the camera to specified values. | |
const ColorMask * | getColorMask () const |
Get the const ColorMask. | |
ColorMask * | getColorMask () |
Get the ColorMask. | |
void | setViewport (osg::Viewport *viewport) |
Set the viewport of the camera to use specified osg::Viewport. | |
void | setViewport (int x, int y, int width, int height) |
Set the viewport of the camera to specified dimensions. | |
const Viewport * | getViewport () const |
Get the const viewport. | |
Viewport * | getViewport () |
Get the viewport. | |
void | setTransformOrder (TransformOrder order) |
Set the transformation order for world-to-local and local-to-world transformation. | |
TransformOrder | getTransformOrder () const |
Get the transformation order. | |
void | setProjectionResizePolicy (ProjectionResizePolicy policy) |
Set the policy used to determine if and how the projection matrix should be adjusted on window resizes. | |
ProjectionResizePolicy | getProjectionResizePolicy () const |
Get the policy used to determine if and how the projection matrix should be adjusted on window resizes. | |
void | setProjectionMatrix (const osg::Matrixf &matrix) |
Set the projection matrix. | |
void | setProjectionMatrix (const osg::Matrixd &matrix) |
Set the projection matrix. | |
void | setProjectionMatrixAsOrtho (double left, double right, double bottom, double top, double zNear, double zFar) |
Set to an orthographic projection. | |
void | setProjectionMatrixAsOrtho2D (double left, double right, double bottom, double top) |
Set to a 2D orthographic projection. | |
void | setProjectionMatrixAsFrustum (double left, double right, double bottom, double top, double zNear, double zFar) |
Set to a perspective projection. | |
void | setProjectionMatrixAsPerspective (double fovy, double aspectRatio, double zNear, double zFar) |
Create a symmetrical perspective projection, See OpenGL gluPerspective documentation for further details. | |
osg::Matrixd & | getProjectionMatrix () |
Get the projection matrix. | |
const osg::Matrixd & | getProjectionMatrix () const |
Get the const projection matrix. | |
bool | getProjectionMatrixAsOrtho (double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const |
Get the orthographic settings of the orthographic projection matrix. | |
bool | getProjectionMatrixAsFrustum (double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const |
Get the frustum setting of a perspective projection matrix. | |
bool | getProjectionMatrixAsPerspective (double &fovy, double &aspectRatio, double &zNear, double &zFar) const |
Get the frustum setting of a symmetric perspective projection matrix. | |
void | setViewMatrix (const osg::Matrixf &matrix) |
Set the view matrix. | |
void | setViewMatrix (const osg::Matrixd &matrix) |
Set the view matrix. | |
osg::Matrixd & | getViewMatrix () |
Get the view matrix. | |
const osg::Matrixd & | getViewMatrix () const |
Get the const view matrix. | |
void | setViewMatrixAsLookAt (const osg::Vec3d &eye, const osg::Vec3d ¢er, const osg::Vec3d &up) |
Set to the position and orientation of view matrix, using the same convention as gluLookAt. | |
void | getViewMatrixAsLookAt (osg::Vec3d &eye, osg::Vec3d ¢er, 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 | getViewMatrixAsLookAt (osg::Vec3f &eye, osg::Vec3f ¢er, osg::Vec3f &up, float lookDistance=1.0f) const |
Get to the position and orientation of a modelview matrix, using the same convention as gluLookAt. | |
Matrixd | getInverseViewMatrix () const |
Get the inverse view matrix. | |
void | setRenderOrder (RenderOrder order, int orderNum=0) |
Set the rendering order of this camera's subgraph relative to any camera that this subgraph is nested within. | |
RenderOrder | getRenderOrder () const |
Get the rendering order of this camera's subgraph relative to any camera that this subgraph is nested within. | |
int | getRenderOrderNum () const |
Get the rendering order number of this camera relative to any sibling cameras in this subgraph. | |
bool | isRenderToTextureCamera () const |
Return true if this Camera is set up as a render to texture camera, i.e. | |
void | setRenderTargetImplementation (RenderTargetImplementation impl) |
Set the render target. | |
void | setRenderTargetImplementation (RenderTargetImplementation impl, RenderTargetImplementation fallback) |
Set the render target and fall-back that's used if the former isn't available. | |
RenderTargetImplementation | getRenderTargetImplementation () const |
Get the render target. | |
RenderTargetImplementation | getRenderTargetFallback () const |
Get the render target fallback. | |
void | setDrawBuffer (GLenum buffer) |
Set the draw buffer used at the start of each frame draw. | |
GLenum | getDrawBuffer () const |
Get the draw buffer used at the start of each frame draw. | |
void | setReadBuffer (GLenum buffer) |
Set the read buffer for any required copy operations to use. | |
GLenum | getReadBuffer () const |
Get the read buffer for any required copy operations to use. | |
void | attach (BufferComponent buffer, GLenum internalFormat) |
Attach a buffer with specified OpenGL internal format. | |
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) |
Attach a Texture to specified buffer component. | |
void | attach (BufferComponent buffer, osg::Image *image, unsigned int multisampleSamples=0, unsigned int multisampleColorSamples=0) |
Attach a Image to specified buffer component. | |
void | detach (BufferComponent buffer) |
Detach specified buffer component. | |
BufferAttachmentMap & | getBufferAttachmentMap () |
Get the BufferAttachmentMap, used to configure frame buffer objects, pbuffers and texture reads. | |
const BufferAttachmentMap & | getBufferAttachmentMap () const |
Get the const BufferAttachmentMap, used to configure frame buffer objects, pbuffers and texture reads. | |
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 |
Get mask selecting implict 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. | |
ImplicitBufferAttachmentMask | getImplicitBufferAttachmentResolveMask (bool effectiveMask=false) const |
Get mask selecting implict 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. | |
void | createCameraThread () |
Create a operation thread for this camera. | |
void | setCameraThread (OperationThread *gt) |
Assign a operation thread to the camera. | |
OperationThread * | getCameraThread () |
Get the operation thread assigned to this camera. | |
const OperationThread * | getCameraThread () const |
Get the const operation thread assigned to this camera. | |
void | setGraphicsContext (GraphicsContext *context) |
Set the GraphicsContext that provides the mechansim for managing the OpenGL graphics context associated with this camera. | |
GraphicsContext * | getGraphicsContext () |
Get the GraphicsContext. | |
const GraphicsContext * | getGraphicsContext () const |
Get the const GraphicsContext. | |
void | setRenderer (osg::GraphicsOperation *rc) |
Set the Rendering object that is used to implement rendering of the subgraph. | |
osg::GraphicsOperation * | getRenderer () |
Get the Rendering object that is used to implement rendering of the subgraph. | |
const osg::GraphicsOperation * | getRenderer () const |
Get the const Rendering object that is used to implement rendering of the subgraph. | |
void | setRenderingCache (osg::Object *rc) |
Set the Rendering cache that is used for cached objects associated with rendering of subgraphs. | |
osg::Object * | getRenderingCache () |
Get the Rendering cache that is used for cached objects associated with rendering of subgraphs. | |
const osg::Object * | getRenderingCache () const |
Get the const Rendering cache that is used for cached objects associated with rendering of subgraphs. | |
void | setInitialDrawCallback (DrawCallback *cb) |
Set the initial draw callback for custom operations to be done before the drawing of the camera's subgraph and pre render stages. | |
DrawCallback * | getInitialDrawCallback () |
Get the initial draw callback. | |
const DrawCallback * | getInitialDrawCallback () const |
Get the const initial draw callback. | |
void | setPreDrawCallback (DrawCallback *cb) |
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. | |
DrawCallback * | getPreDrawCallback () |
Get the pre draw callback. | |
const DrawCallback * | getPreDrawCallback () const |
Get the const pre draw callback. | |
void | setPostDrawCallback (DrawCallback *cb) |
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. | |
DrawCallback * | getPostDrawCallback () |
Get the post draw callback. | |
const DrawCallback * | getPostDrawCallback () const |
Get the const post draw callback. | |
void | setFinalDrawCallback (DrawCallback *cb) |
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. | |
DrawCallback * | getFinalDrawCallback () |
Get the final draw callback. | |
const DrawCallback * | getFinalDrawCallback () const |
Get the const final draw callback. | |
OpenThreads::Mutex * | getDataChangeMutex () const |
virtual void | resizeGLObjectBuffers (unsigned int maxSize) |
Resize any per context GLObject buffers to specified size. | |
virtual void | releaseGLObjects (osg::State *=0) const |
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context. | |
virtual bool | computeLocalToWorldMatrix (Matrix &matrix, NodeVisitor *) const |
Transform method that must be defined to provide generic interface for scene graph traversals. | |
virtual bool | computeWorldToLocalMatrix (Matrix &matrix, NodeVisitor *) const |
Transform method that must be defined to provide generic interface for scene graph traversals. | |
virtual void | inheritCullSettings (const CullSettings &settings, unsigned int inheritanceMask) |
Inherit the local cull settings variable from specified CullSettings object, according to the inheritance mask. | |
Static Public Attributes | |
static const unsigned int | FACE_CONTROLLED_BY_GEOMETRY_SHADER |
Protected Member Functions | |
virtual | ~Camera () |
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 |
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 |
typedef std::map< BufferComponent, Attachment> osg::Camera::BufferAttachmentMap |
typedef int osg::Camera::ImplicitBufferAttachmentMask |
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 practive 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 substitue 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: IMPLICT_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 substitues these buffers. By default it does not implicitly allocate a stencil buffer. Use implicti 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.
osg::Camera::Camera | ( | ) |
Copy constructor using CopyOp to manage deep vs shallow copy.
virtual osg::Camera::~Camera | ( | ) | [protected, virtual] |
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.
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.
BufferAttachmentMap& osg::Camera::getBufferAttachmentMap | ( | ) | [inline] |
Get the BufferAttachmentMap, used to configure frame buffer objects, pbuffers and texture reads.
const BufferAttachmentMap& osg::Camera::getBufferAttachmentMap | ( | ) | const [inline] |
Get the const BufferAttachmentMap, used to configure frame buffer objects, pbuffers and texture reads.
OperationThread* osg::Camera::getCameraThread | ( | ) | [inline] |
Get the operation thread assigned to this camera.
const OperationThread* osg::Camera::getCameraThread | ( | ) | const [inline] |
Get the const operation thread assigned to this camera.
const osg::Vec4& osg::Camera::getClearAccum | ( | ) | const [inline] |
Get the clear accum value.
const osg::Vec4& osg::Camera::getClearColor | ( | ) | const [inline] |
Get the clear color.
double osg::Camera::getClearDepth | ( | ) | const [inline] |
Get the clear depth value.
GLbitfield osg::Camera::getClearMask | ( | ) | const [inline] |
Get the clear mask.
int osg::Camera::getClearStencil | ( | ) | const [inline] |
Get the clear stencil value.
OpenThreads::Mutex* osg::Camera::getDataChangeMutex | ( | ) | const [inline] |
osg::DisplaySettings* osg::Camera::getDisplaySettings | ( | ) | [inline] |
Get the DisplaySettings object associated with this view.
const osg::DisplaySettings* osg::Camera::getDisplaySettings | ( | ) | const [inline] |
Get the const DisplaySettings object associated with this view.
GLenum osg::Camera::getDrawBuffer | ( | ) | const [inline] |
Get the draw buffer used at the start of each frame draw.
DrawCallback* osg::Camera::getFinalDrawCallback | ( | ) | [inline] |
Get the final draw callback.
const DrawCallback* osg::Camera::getFinalDrawCallback | ( | ) | const [inline] |
Get the const final draw callback.
GraphicsContext* osg::Camera::getGraphicsContext | ( | ) | [inline] |
Get the GraphicsContext.
const GraphicsContext* osg::Camera::getGraphicsContext | ( | ) | const [inline] |
Get the const GraphicsContext.
ImplicitBufferAttachmentMask osg::Camera::getImplicitBufferAttachmentRenderMask | ( | bool | effectiveMask = false | ) | const [inline] |
Get mask selecting implict 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 osg::DisplaySettings::instance(), osg::ref_ptr::get(), and osg::DisplaySettings::getImplicitBufferAttachmentRenderMask().
ImplicitBufferAttachmentMask osg::Camera::getImplicitBufferAttachmentResolveMask | ( | bool | effectiveMask = false | ) | const [inline] |
Get mask selecting implict 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 osg::DisplaySettings::instance(), osg::ref_ptr::get(), and osg::DisplaySettings::getImplicitBufferAttachmentResolveMask().
DrawCallback* osg::Camera::getInitialDrawCallback | ( | ) | [inline] |
Get the initial draw callback.
const DrawCallback* osg::Camera::getInitialDrawCallback | ( | ) | const [inline] |
Get the const initial draw callback.
Matrixd osg::Camera::getInverseViewMatrix | ( | ) | const |
Get the inverse view matrix.
DrawCallback* osg::Camera::getPostDrawCallback | ( | ) | [inline] |
Get the post draw callback.
const DrawCallback* osg::Camera::getPostDrawCallback | ( | ) | const [inline] |
Get the const post draw callback.
DrawCallback* osg::Camera::getPreDrawCallback | ( | ) | [inline] |
Get the pre draw callback.
const DrawCallback* osg::Camera::getPreDrawCallback | ( | ) | const [inline] |
Get the const pre draw callback.
osg::Matrixd& osg::Camera::getProjectionMatrix | ( | ) | [inline] |
Get the projection matrix.
Referenced by osgManipulator::PointerInfo::setCamera().
const osg::Matrixd& osg::Camera::getProjectionMatrix | ( | ) | const [inline] |
Get the const projection matrix.
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.
GLenum osg::Camera::getReadBuffer | ( | ) | const [inline] |
Get the read buffer for any required copy operations to use.
osg::GraphicsOperation* osg::Camera::getRenderer | ( | ) | [inline] |
Get the Rendering object that is used to implement rendering of the subgraph.
const osg::GraphicsOperation* osg::Camera::getRenderer | ( | ) | const [inline] |
Get the const Rendering object that is used to implement rendering of the subgraph.
osg::Object* osg::Camera::getRenderingCache | ( | ) | [inline] |
Get the Rendering cache that is used for cached objects associated with rendering of subgraphs.
const osg::Object* osg::Camera::getRenderingCache | ( | ) | const [inline] |
Get the const Rendering cache that is used for cached objects associated with rendering of subgraphs.
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.
int osg::Camera::getRenderOrderNum | ( | ) | const [inline] |
Get the rendering order number of this camera relative to any sibling cameras in this subgraph.
RenderTargetImplementation osg::Camera::getRenderTargetFallback | ( | ) | const [inline] |
Get the render target fallback.
RenderTargetImplementation osg::Camera::getRenderTargetImplementation | ( | ) | const [inline] |
Get the render target.
osg::Stats* osg::Camera::getStats | ( | ) | [inline] |
Get the Stats object.
const osg::Stats* osg::Camera::getStats | ( | ) | const [inline] |
Get the const Stats object.
TransformOrder osg::Camera::getTransformOrder | ( | ) | const [inline] |
Get the transformation order.
osg::Matrixd& osg::Camera::getViewMatrix | ( | ) | [inline] |
Get the view matrix.
Referenced by osgManipulator::PointerInfo::setCamera().
const osg::Matrixd& osg::Camera::getViewMatrix | ( | ) | const [inline] |
Get the const view matrix.
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.
Referenced by osgManipulator::PointerInfo::setCamera().
Viewport* osg::Camera::getViewport | ( | ) | [inline] |
Get the viewport.
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.
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.
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.
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
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.
void osg::Camera::setClearMask | ( | GLbitfield | mask | ) | [inline] |
Set the clear mask used in glClear().
Defaults to GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT.
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
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.
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 sepecify that the rendering back-end should choose the most appropriate buffer.
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.
void osg::Camera::setGraphicsContext | ( | GraphicsContext * | context | ) |
Set the GraphicsContext that provides the mechansim for managing the OpenGL graphics context associated with this camera.
void osg::Camera::setImplicitBufferAttachmentMask | ( | ImplicitBufferAttachmentMask | renderMask = DisplaySettings::DEFAULT_IMPLICIT_BUFFER_ATTACHMENT , |
ImplicitBufferAttachmentMask | resolveMask = DisplaySettings::DEFAULT_IMPLICIT_BUFFER_ATTACHMENT |
||
) | [inline] |
void osg::Camera::setImplicitBufferAttachmentRenderMask | ( | ImplicitBufferAttachmentMask | implicitBufferAttachmentRenderMask | ) | [inline] |
void osg::Camera::setImplicitBufferAttachmentResolveMask | ( | ImplicitBufferAttachmentMask | implicitBufferAttachmentResolveMask | ) | [inline] |
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.
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.
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.
void osg::Camera::setProjectionMatrix | ( | const osg::Matrixf & | matrix | ) | [inline] |
Set the projection matrix.
Can be thought of as setting the lens of a camera.
void osg::Camera::setProjectionMatrix | ( | const osg::Matrixd & | matrix | ) | [inline] |
Set the projection matrix.
Can be thought of as setting the lens of a camera.
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.
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 sepecify that the rendering back-end should choose the most appropriate buffer.
void osg::Camera::setRenderer | ( | osg::GraphicsOperation * | rc | ) | [inline] |
Set the Rendering object that is used to implement rendering of the subgraph.
void osg::Camera::setRenderingCache | ( | osg::Object * | rc | ) | [inline] |
Set the Rendering cache that is used for cached objects associated with rendering of subgraphs.
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.
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 for collect various frame related timing and scene graph stats.
void osg::Camera::setTransformOrder | ( | TransformOrder | order | ) | [inline] |
Set the transformation order for world-to-local and local-to-world transformation.
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.
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.
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.
bool osg::Camera::_allowEventFocus [protected] |
BufferAttachmentMap osg::Camera::_bufferAttachmentMap [protected] |
ref_ptr<OperationThread> osg::Camera::_cameraThread [protected] |
osg::Vec4 osg::Camera::_clearAccum [protected] |
osg::Vec4 osg::Camera::_clearColor [protected] |
double osg::Camera::_clearDepth [protected] |
GLbitfield osg::Camera::_clearMask [protected] |
int osg::Camera::_clearStencil [protected] |
ref_ptr<ColorMask> osg::Camera::_colorMask [protected] |
OpenThreads::Mutex osg::Camera::_dataChangeMutex [mutable, protected] |
GLenum osg::Camera::_drawBuffer [protected] |
ref_ptr<DrawCallback> osg::Camera::_finalDrawCallback [protected] |
ref_ptr<GraphicsContext> osg::Camera::_graphicsContext [protected] |
ref_ptr<DrawCallback> osg::Camera::_initialDrawCallback [protected] |
ref_ptr<DrawCallback> osg::Camera::_postDrawCallback [protected] |
ref_ptr<DrawCallback> osg::Camera::_preDrawCallback [protected] |
Matrixd osg::Camera::_projectionMatrix [protected] |
GLenum osg::Camera::_readBuffer [protected] |
ref_ptr<GraphicsOperation> osg::Camera::_renderer [protected] |
ref_ptr<Object> osg::Camera::_renderingCache [protected] |
RenderOrder osg::Camera::_renderOrder [protected] |
int osg::Camera::_renderOrderNum [protected] |
osg::ref_ptr<osg::Stats> osg::Camera::_stats [protected] |
TransformOrder osg::Camera::_transformOrder [protected] |
View* osg::Camera::_view [protected] |
Matrixd osg::Camera::_viewMatrix [protected] |
ref_ptr<Viewport> osg::Camera::_viewport [protected] |
const unsigned int osg::Camera::FACE_CONTROLLED_BY_GEOMETRY_SHADER [static] |
![]() | Generated at Mon Oct 3 2011 12:39:41 for the OpenSceneGraph by doxygen 1.7.5. |