A camera for rendering Triton's planar reflection texture.
|
| virtual | ~DtPlanarReflectionCamera () |
| |
| virtual void | lodScaleChanged (float lodScale) |
| |
| virtual osg::Matrixd | modifyProjectionMatrix (const osg::Matrix &sceneProjection, const osg::Vec4d &clipPlane) const |
| |
| virtual void | setupColorBufferTexture (int format, int sourceFormat, int sourceType) |
| |
| virtual osg::Texture * | allocateRenderTexture (int width, int height) |
| |
| virtual void | updateReflectionTexture () |
| |
| virtual bool | computeReflectionCameraProjectionMatrix (osg::Matrix &projection) const |
| |
| virtual void | scaleFrustumAndSetProjection (double &left, double &right, double &bottom, double &top, double zNear, double zFar, bool useReverseZ, osg::Matrix &projection) const |
| |
| makVrv::DtPlanarReflectionCamera::DtPlanarReflectionCamera |
( |
osg::Camera * |
mainCamera, |
|
|
DtDe & |
de |
|
) |
| |
| virtual makVrv::DtPlanarReflectionCamera::~DtPlanarReflectionCamera |
( |
| ) |
|
|
protectedvirtual |
| virtual osg::Texture* makVrv::DtPlanarReflectionCamera::reflectionTexture |
( |
| ) |
|
|
virtual |
Retrieve the reflection map texture this camera renders to.
| virtual const osg::Texture* makVrv::DtPlanarReflectionCamera::reflectionTexture |
( |
| ) |
const |
|
virtual |
Retrieve the reflection map texture this camera renders to. (const)
| virtual osg::RefMatrix* makVrv::DtPlanarReflectionCamera::textureProjectionMatrix |
( |
| ) |
|
|
virtual |
Retrieve the matrix used to map this texture to the water surface.
| virtual const osg::RefMatrix* makVrv::DtPlanarReflectionCamera::textureProjectionMatrix |
( |
| ) |
const |
|
virtual |
Retrieve the matrix used to map this texture to the water surface. (const)
| virtual void makVrv::DtPlanarReflectionCamera::accept |
( |
osg::NodeVisitor & |
nv | ) |
|
|
virtual |
Override Node::accept to intercept cull visitor traversal.
| virtual void makVrv::DtPlanarReflectionCamera::enable |
( |
bool |
enabled | ) |
|
|
virtual |
Enable / disable this reflection camera at runtime.
| virtual void makVrv::DtPlanarReflectionCamera::releaseGLObjects |
( |
osg::State * |
state = 0 | ) |
const |
|
virtual |
Called when a graphic context is destroyed or when this object needs to cleanup its opengl objects.
| virtual void makVrv::DtPlanarReflectionCamera::setClipPlane |
( |
const osg::Vec4d & |
v | ) |
|
|
virtual |
Set the clip plane for this planar reflection camera.
| virtual bool makVrv::DtPlanarReflectionCamera::isRenderToTextureValid |
( |
| ) |
|
|
virtual |
check to see if the render to texture settings are valid
| virtual void makVrv::DtPlanarReflectionCamera::setMirrorMatrix |
( |
const osg::Matrix & |
mirror | ) |
|
|
virtual |
set the mirror matrix for this planar reflection, used to mirror the scene for the reflection pass rendering.
| virtual void makVrv::DtPlanarReflectionCamera::updateFogColor |
( |
bool |
skyEnabled, |
|
|
const osg::Vec4f & |
envFogColor |
|
) |
| |
|
virtual |
sets the clear color to match the fog color for this camera.
| virtual const osg::observer_ptr<osg::Camera>& makVrv::DtPlanarReflectionCamera::sceneCameraObserver |
( |
void |
| ) |
const |
|
virtual |
| virtual void makVrv::DtPlanarReflectionCamera::lodScaleChanged |
( |
float |
lodScale | ) |
|
|
protectedvirtual |
pass in a new lod scale to use for calculating the lod connected to the signal_oceanPlanarReflectionsLODScaleChanged
| virtual osg::Matrixd makVrv::DtPlanarReflectionCamera::modifyProjectionMatrix |
( |
const osg::Matrix & |
sceneProjection, |
|
|
const osg::Vec4d & |
clipPlane |
|
) |
| const |
|
protectedvirtual |
modify projection matrix based on clip plane
| virtual void makVrv::DtPlanarReflectionCamera::setupColorBufferTexture |
( |
int |
format, |
|
|
int |
sourceFormat, |
|
|
int |
sourceType |
|
) |
| |
|
protectedvirtual |
setup the color buffer format
| virtual osg::Texture* makVrv::DtPlanarReflectionCamera::allocateRenderTexture |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
protectedvirtual |
allocate a render texture and set it's size, the function will handle creating Texture2DArray if needed for multiview
| virtual void makVrv::DtPlanarReflectionCamera::updateReflectionTexture |
( |
| ) |
|
|
protectedvirtual |
update the reflection texture settings based on the current main camera settings.
| virtual bool makVrv::DtPlanarReflectionCamera::computeReflectionCameraProjectionMatrix |
( |
osg::Matrix & |
projection | ) |
const |
|
protectedvirtual |
Computes the reflection camera's projection matrix, supporting both reverse-Z and standard depth. Handles asymmetric frustums and FOV scaling.
- Parameters
-
| projection | Input/output projection matrix to be updated. |
- Returns
- True if the matrix was successfully computed and updated, false otherwise.
| virtual void makVrv::DtPlanarReflectionCamera::scaleFrustumAndSetProjection |
( |
double & |
left, |
|
|
double & |
right, |
|
|
double & |
bottom, |
|
|
double & |
top, |
|
|
double |
zNear, |
|
|
double |
zFar, |
|
|
bool |
useReverseZ, |
|
|
osg::Matrix & |
projection |
|
) |
| const |
|
protectedvirtual |
Scales the frustum extents and sets the projection matrix. Used for FOV scaling and asymmetric frustum support.
- Parameters
-
| left | Left frustum plane (input/output). |
| right | Right frustum plane (input/output). |
| bottom | Bottom frustum plane (input/output). |
| top | Top frustum plane (input/output). |
| zNear | Near plane distance. |
| zFar | Far plane distance. |
| useReverseZ | True for reverse-Z depth, false for standard. |
| projection | Output projection matrix to be set. |
| DtDe& makVrv::DtPlanarReflectionCamera::myDe |
|
protected |
| osg::ref_ptr< osg::Texture > makVrv::DtPlanarReflectionCamera::myTexture |
|
protected |
| osg::ref_ptr< osg::Texture > makVrv::DtPlanarReflectionCamera::myDepthTexture |
|
protected |
| osg::ref_ptr< osg::RefMatrix > makVrv::DtPlanarReflectionCamera::myTextureProjectionMatrix |
|
protected |
| osg::observer_ptr< osg::Camera > makVrv::DtPlanarReflectionCamera::mySceneCameraObserver |
|
protected |
| osg::Matrix makVrv::DtPlanarReflectionCamera::myMirrorMatrix |
|
protected |
| int makVrv::DtPlanarReflectionCamera::myTexFormat |
|
protected |
| int makVrv::DtPlanarReflectionCamera::mySourceFormat |
|
protected |
| int makVrv::DtPlanarReflectionCamera::mySourceType |
|
protected |
| int makVrv::DtPlanarReflectionCamera::myWidth |
|
protected |
| int makVrv::DtPlanarReflectionCamera::myHeight |
|
protected |
| osg::Vec4d makVrv::DtPlanarReflectionCamera::myClipPlane |
|
protected |
| const unsigned int makVrv::DtPlanarReflectionCamera::myNodeMask |
|
protected |
The documentation for this class was generated from the following file: