|
Public Types |
typedef std::map< BufferComponent,
Attachment > | BufferAttachmentMap |
enum | TransformOrder { PRE_MULTIPLE,
POST_MULTIPLE
} |
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,
COLOR_BUFFER,
COLOR_BUFFER0 = COLOR_BUFFER,
COLOR_BUFFER1 = COLOR_BUFFER+1,
COLOR_BUFFER2 = COLOR_BUFFER+2,
COLOR_BUFFER3 = COLOR_BUFFER+3,
COLOR_BUFFER4 = COLOR_BUFFER+4,
COLOR_BUFFER5 = COLOR_BUFFER+5,
COLOR_BUFFER6 = COLOR_BUFFER+6,
COLOR_BUFFER7 = COLOR_BUFFER+7
} |
Public Member Functions |
| CameraNode () |
| CameraNode (const CameraNode &, const CopyOp ©op=CopyOp::SHALLOW_COPY) |
| Copy constructor using CopyOp to manage deep vs shallow copy.
|
| META_Node (osg, CameraNode) |
void | setClearColor (const Vec4 &color) |
| Sets the clear color.
|
const Vec4 & | getClearColor () const |
| Returns the clear color.
|
void | setClearMask (GLbitfield mask) |
| Set the clear mask used in glClear(..).
|
GLbitfield | getClearMask () const |
| Get the clear mask.
|
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) |
TransformOrder | getTransformOrder () const |
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) |
| Get the othographic settings of the orthographic projection matrix.
|
bool | getProjectionMatrixAsFrustum (double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) |
| Get the frustum setting of a perspective projection matrix.
|
bool | getProjectionMatrixAsPerspective (double &fovy, double &aspectRatio, double &zNear, double &zFar) |
| 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.
|
void | setViewMatrixAsLookAt (const osg::Vec3 &eye, const osg::Vec3 ¢er, const osg::Vec3 &up) |
| Set to the position and orientation of view matrix, using the same convention as gluLookAt.
|
osg::Matrixd & | getViewMatrix () |
| Get the view matrix.
|
const osg::Matrixd & | getViewMatrix () const |
| Get the const view matrix.
|
void | getViewMatrixAsLookAt (osg::Vec3 &eye, osg::Vec3 ¢er, osg::Vec3 &up, float lookDistance=1.0f) |
| 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) |
| 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.
|
void | setRenderTargetImplementation (RenderTargetImplementation impl) |
void | setRenderTargetImplementation (RenderTargetImplementation impl, RenderTargetImplementation fallback) |
RenderTargetImplementation | getRenderTargetImplementation () const |
RenderTargetImplementation | getRenderTargetFallback () const |
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) |
void | attach (BufferComponent buffer, osg::Texture *texture, unsigned int level=0, unsigned int face=0, bool mipMapGeneration=false) |
void | attach (BufferComponent buffer, osg::Image *image) |
void | detach (BufferComponent buffer) |
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 | 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 | setRenderingCache (unsigned int contextID, osg::Object *rc) |
| Set the Rendering object that is used to implement rendering of the subgraph.
|
osg::Object * | getRenderingCache (unsigned int contextID) |
| Get the Rendering object that is used to implement rendering of the subgraph.
|
const osg::Object * | getRenderingCache (unsigned int contextID) const |
| Get the const Rendering object that is used to implement rendering of the subgraph.
|
void | setPostDrawCallback (DrawCallback *cb) |
| Set the post draw callback for custom operations to do done after the drawing of the camera's subgraph has been completed.
|
DrawCallback * | getPostDrawCallback () |
| Get the post draw callback.
|
const DrawCallback * | getPostDrawCallback () const |
| Get the const post draw callback.
|
OpenThreads::Mutex * | getDataChangeMutex () const |
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.
|
Protected Member Functions |
virtual | ~CameraNode () |
Protected Attributes |
OpenThreads::Mutex | _dataChangeMutex |
Vec4 | _clearColor |
GLbitfield | _clearMask |
ref_ptr< ColorMask > | _colorMask |
ref_ptr< Viewport > | _viewport |
TransformOrder | _transformOrder |
Matrixd | _projectionMatrix |
Matrixd | _viewMatrix |
RenderOrder | _renderOrder |
GLenum | _drawBuffer |
GLenum | _readBuffer |
RenderTargetImplementation | _renderTargetImplementation |
RenderTargetImplementation | _renderTargetFallback |
BufferAttachmentMap | _bufferAttachmentMap |
ref_ptr< GraphicsContext > | _graphicsContext |
buffered_object< ref_ptr<
Object > > | _renderingCache |
ref_ptr< DrawCallback > | _postDrawCallback |