# Ogre::AutoParamDataSource Class Reference

This utility class is used to hold the information used to generate the matrices and other information required to automatically populate GpuProgramParameters. More...

`#include <OgreAutoParamDataSource.h>`

List of all members.

## Public Member Functions

| AutoParamDataSource ()
| ~AutoParamDataSource ()
void | setCurrentRenderable (const Renderable *rend)
| Updates the current renderable.
void | setCurrentCamera (const Camera *cam)
| Updates the current camera.
void | setCurrentLightList (const LightList *ll)
| Sets the light list that should be used.
void | setTextureProjector (const Frustum *frust)
| Sets the current texture projector.
void | setCurrentRenderTarget (const RenderTarget *target)
| Sets the current render target.
void | setCurrentViewport (const Viewport *viewport)
| Sets the current viewport.
void | setShadowDirLightExtrusionDistance (Real dist)
| Sets the shadow extrusion distance to be used for point lights.
const Matrix4 & | getWorldMatrix (void) const
const Matrix4 * | getWorldMatrixArray (void) const
size_t | getWorldMatrixCount (void) const
const Matrix4 & | getViewMatrix (void) const
const Matrix4 & | getViewProjectionMatrix (void) const
const Matrix4 & | getProjectionMatrix (void) const
const Matrix4 & | getWorldViewProjMatrix (void) const
const Matrix4 & | getWorldViewMatrix (void) const
const Matrix4 & | getInverseWorldMatrix (void) const
const Matrix4 & | getInverseWorldViewMatrix (void) const
const Matrix4 & | getInverseViewMatrix (void) const
const Matrix4 & | getInverseTransposeWorldMatrix (void) const
const Matrix4 & | getInverseTransposeWorldViewMatrix (void) const
const Vector4 & | getCameraPosition (void) const
const Vector4 & | getCameraPositionObjectSpace (void) const
const Light & | getLight (size_t index) const
| Get the light which is 'index'th closest to the current object.
void | setAmbientLightColour (const ColourValue &ambient)
const ColourValue & | getAmbientLightColour (void) const
const Matrix4 & | getTextureViewProjMatrix (void) const
const RenderTarget * | getCurrentRenderTarget (void) const
const Renderable * | getCurrentRenderable (void) const
Real | getShadowExtrusionDistance (void) const
Matrix4 | getInverseViewProjMatrix (void) const
Matrix4 | getInverseTransposeViewProjMatrix () const
Matrix4 | getTransposeViewProjMatrix () const
Matrix4 | getTransposeViewMatrix () const
Matrix4 | getTransposeProjectionMatrix () const
Matrix4 | getInverseProjectionMatrix () const
Matrix4 | getInverseTransposeProjectionMatrix () const
Matrix4 | getTransposeWorldViewProjMatrix () const
Matrix4 | getInverseWorldViewProjMatrix () const
Matrix4 | getInverseTransposeWorldViewProjMatrix () const
Matrix4 | getTransposeWorldViewMatrix () const
Matrix4 | getTransposeWorldMatrix () const
Real | getTime (void) const
Real | getTime_0_X (Real x) const
Real | getCosTime_0_X (Real x) const
Real | getSinTime_0_X (Real x) const
Real | getTanTime_0_X (Real x) const
Vector4 | getTime_0_X_packed (Real x) const
Real | getTime_0_1 (Real x) const
Real | getCosTime_0_1 (Real x) const
Real | getSinTime_0_1 (Real x) const
Real | getTanTime_0_1 (Real x) const
Vector4 | getTime_0_1_packed (Real x) const
Real | getTime_0_2Pi (Real x) const
Real | getCosTime_0_2Pi (Real x) const
Real | getSinTime_0_2Pi (Real x) const
Real | getTanTime_0_2Pi (Real x) const
Vector4 | getTime_0_2Pi_packed (Real x) const
Real | getFPS () const
Real | getViewportWidth () const
Real | getViewportHeight () const
Real | getInverseViewportWidth () const
Real | getInverseViewportHeight () const
Vector3 | getViewDirection () const
Vector3 | getViewSideVector () const
Vector3 | getViewUpVector () const
Real | getFOV () const
Real | getNearClipDistance () const
Real | getFarClipDistance () const

## Protected Attributes

Matrix4 | mWorldMatrix [256]
size_t | mWorldMatrixCount
Matrix4 | mWorldViewMatrix
Matrix4 | mViewProjMatrix
Matrix4 | mWorldViewProjMatrix
Matrix4 | mInverseWorldMatrix
Matrix4 | mInverseWorldViewMatrix
Matrix4 | mInverseViewMatrix
Matrix4 | mInverseTransposeWorldMatrix
Matrix4 | mInverseTransposeWorldViewMatrix
Vector4 | mCameraPositionObjectSpace
Matrix4 | mTextureViewProjMatrix
Matrix4 | mProjectionMatrix
Real | mDirLightExtrusionDistance
Vector4 | mCameraPosition
bool | mWorldMatrixDirty
bool | mWorldViewMatrixDirty
bool | mViewProjMatrixDirty
bool | mWorldViewProjMatrixDirty
bool | mInverseWorldMatrixDirty
bool | mInverseWorldViewMatrixDirty
bool | mInverseViewMatrixDirty
bool | mInverseTransposeWorldMatrixDirty
bool | mInverseTransposeWorldViewMatrixDirty
bool | mCameraPositionObjectSpaceDirty
bool | mCameraPositionDirty
bool | mTextureViewProjMatrixDirty
ColourValue | mAmbientLight
const Renderable * | mCurrentRenderable
const Camera * | mCurrentCamera
const LightList * | mCurrentLightList
const Frustum * | mCurrentTextureProjector
const RenderTarget * | mCurrentRenderTarget
const Viewport * | mCurrentViewport
Light | mBlankLight

## Detailed Description

This utility class is used to hold the information used to generate the matrices and other information required to automatically populate GpuProgramParameters.

Remarks:
  This class exercises a lazy-update scheme in order to avoid having to update all the information a GpuProgramParameters class could possibly want all the time. It relies on the SceneManager to update it when the base data has changed, and will calculate concatenated matrices etc only when required, passing back precalculated matrices when they are requested more than once when the underlying information has not altered.

Definition at line 48 of file OgreAutoParamDataSource.h.

## Constructor & Destructor Documentation

Ogre::AutoParamDataSource::AutoParamDataSource | ( |  | ) |

Ogre::AutoParamDataSource::~AutoParamDataSource | ( |  | ) |

## Member Function Documentation

const ColourValue& Ogre::AutoParamDataSource::getAmbientLightColour | ( | void |  | ) | const

const Vector4& Ogre::AutoParamDataSource::getCameraPosition | ( | void |  | ) | const

const Vector4& Ogre::AutoParamDataSource::getCameraPositionObjectSpace | ( | void |  | ) | const

Real Ogre::AutoParamDataSource::getCosTime_0_1 | ( | Real | x | ) | const

Real Ogre::AutoParamDataSource::getCosTime_0_2Pi | ( | Real | x | ) | const

Real Ogre::AutoParamDataSource::getCosTime_0_X | ( | Real | x | ) | const

const Renderable* Ogre::AutoParamDataSource::getCurrentRenderable | ( | void |  | ) | const

const RenderTarget* Ogre::AutoParamDataSource::getCurrentRenderTarget | ( | void |  | ) | const

Real Ogre::AutoParamDataSource::getFarClipDistance | ( |  | ) | const

Real Ogre::AutoParamDataSource::getFOV | ( |  | ) | const

Real Ogre::AutoParamDataSource::getFPS | ( |  | ) | const

Matrix4 Ogre::AutoParamDataSource::getInverseProjectionMatrix | ( |  | ) | const

Matrix4 Ogre::AutoParamDataSource::getInverseTransposeProjectionMatrix | ( |  | ) | const

Matrix4 Ogre::AutoParamDataSource::getInverseTransposeViewProjMatrix | ( |  | ) | const

const Matrix4& Ogre::AutoParamDataSource::getInverseTransposeWorldMatrix | ( | void |  | ) | const

const Matrix4& Ogre::AutoParamDataSource::getInverseTransposeWorldViewMatrix | ( | void |  | ) | const

Matrix4 Ogre::AutoParamDataSource::getInverseTransposeWorldViewProjMatrix | ( |  | ) | const

const Matrix4& Ogre::AutoParamDataSource::getInverseViewMatrix | ( | void |  | ) | const

Real Ogre::AutoParamDataSource::getInverseViewportHeight | ( |  | ) | const

Real Ogre::AutoParamDataSource::getInverseViewportWidth | ( |  | ) | const

Matrix4 Ogre::AutoParamDataSource::getInverseViewProjMatrix | ( | void |  | ) | const

const Matrix4& Ogre::AutoParamDataSource::getInverseWorldMatrix | ( | void |  | ) | const

const Matrix4& Ogre::AutoParamDataSource::getInverseWorldViewMatrix | ( | void |  | ) | const

Matrix4 Ogre::AutoParamDataSource::getInverseWorldViewProjMatrix | ( |  | ) | const

const Light& Ogre::AutoParamDataSource::getLight | ( | size_t | index | ) | const

| Get the light which is 'index'th closest to the current object.

Real Ogre::AutoParamDataSource::getNearClipDistance | ( |  | ) | const

const Matrix4& Ogre::AutoParamDataSource::getProjectionMatrix | ( | void |  | ) | const

Real Ogre::AutoParamDataSource::getShadowExtrusionDistance | ( | void |  | ) | const

Real Ogre::AutoParamDataSource::getSinTime_0_1 | ( | Real | x | ) | const

Real Ogre::AutoParamDataSource::getSinTime_0_2Pi | ( | Real | x | ) | const

Real Ogre::AutoParamDataSource::getSinTime_0_X | ( | Real | x | ) | const

Real Ogre::AutoParamDataSource::getTanTime_0_1 | ( | Real | x | ) | const

Real Ogre::AutoParamDataSource::getTanTime_0_2Pi | ( | Real | x | ) | const

Real Ogre::AutoParamDataSource::getTanTime_0_X | ( | Real | x | ) | const

const Matrix4& Ogre::AutoParamDataSource::getTextureViewProjMatrix | ( | void |  | ) | const

Real Ogre::AutoParamDataSource::getTime | ( | void |  | ) | const

Real Ogre::AutoParamDataSource::getTime_0_1 | ( | Real | x | ) | const

Vector4 Ogre::AutoParamDataSource::getTime_0_1_packed | ( | Real | x | ) | const

Real Ogre::AutoParamDataSource::getTime_0_2Pi | ( | Real | x | ) | const

Vector4 Ogre::AutoParamDataSource::getTime_0_2Pi_packed | ( | Real | x | ) | const

Real Ogre::AutoParamDataSource::getTime_0_X | ( | Real | x | ) | const

Vector4 Ogre::AutoParamDataSource::getTime_0_X_packed | ( | Real | x | ) | const

Matrix4 Ogre::AutoParamDataSource::getTransposeProjectionMatrix | ( |  | ) | const

Matrix4 Ogre::AutoParamDataSource::getTransposeViewMatrix | ( |  | ) | const

Matrix4 Ogre::AutoParamDataSource::getTransposeViewProjMatrix | ( |  | ) | const

Matrix4 Ogre::AutoParamDataSource::getTransposeWorldMatrix | ( |  | ) | const

Matrix4 Ogre::AutoParamDataSource::getTransposeWorldViewMatrix | ( |  | ) | const

Matrix4 Ogre::AutoParamDataSource::getTransposeWorldViewProjMatrix | ( |  | ) | const

Vector3 Ogre::AutoParamDataSource::getViewDirection | ( |  | ) | const

const Matrix4& Ogre::AutoParamDataSource::getViewMatrix | ( | void |  | ) | const

Real Ogre::AutoParamDataSource::getViewportHeight | ( |  | ) | const

Real Ogre::AutoParamDataSource::getViewportWidth | ( |  | ) | const

const Matrix4& Ogre::AutoParamDataSource::getViewProjectionMatrix | ( | void |  | ) | const

Vector3 Ogre::AutoParamDataSource::getViewSideVector | ( |  | ) | const

Vector3 Ogre::AutoParamDataSource::getViewUpVector | ( |  | ) | const

const Matrix4& Ogre::AutoParamDataSource::getWorldMatrix | ( | void |  | ) | const

const Matrix4* Ogre::AutoParamDataSource::getWorldMatrixArray | ( | void |  | ) | const

size_t Ogre::AutoParamDataSource::getWorldMatrixCount | ( | void |  | ) | const

const Matrix4& Ogre::AutoParamDataSource::getWorldViewMatrix | ( | void |  | ) | const

const Matrix4& Ogre::AutoParamDataSource::getWorldViewProjMatrix | ( | void |  | ) | const

void Ogre::AutoParamDataSource::setAmbientLightColour | ( | const ColourValue & | ambient | ) |

void Ogre::AutoParamDataSource::setCurrentCamera | ( | const Camera * | cam | ) |

| Updates the current camera.

void Ogre::AutoParamDataSource::setCurrentLightList | ( | const LightList * | ll | ) |

| Sets the light list that should be used.

void Ogre::AutoParamDataSource::setCurrentRenderable | ( | const Renderable * | rend | ) |

| Updates the current renderable.

void Ogre::AutoParamDataSource::setCurrentRenderTarget | ( | const RenderTarget * | target | ) |

| Sets the current render target.

void Ogre::AutoParamDataSource::setCurrentViewport | ( | const Viewport * | viewport | ) |

| Sets the current viewport.

void Ogre::AutoParamDataSource::setShadowDirLightExtrusionDistance | ( | Real | dist | ) |

| Sets the shadow extrusion distance to be used for point lights.

void Ogre::AutoParamDataSource::setTextureProjector | ( | const Frustum * | frust | ) |

| Sets the current texture projector.

## Member Data Documentation

ColourValue Ogre::AutoParamDataSource::mAmbientLight `[mutable, protected]`

| Definition at line 79 of file OgreAutoParamDataSource.h.

Light Ogre::AutoParamDataSource::mBlankLight `[protected]`

| Definition at line 88 of file OgreAutoParamDataSource.h.

Vector4 Ogre::AutoParamDataSource::mCameraPosition `[mutable, protected]`

| Definition at line 65 of file OgreAutoParamDataSource.h.

bool Ogre::AutoParamDataSource::mCameraPositionDirty `[mutable, protected]`

| Definition at line 77 of file OgreAutoParamDataSource.h.

Vector4 Ogre::AutoParamDataSource::mCameraPositionObjectSpace `[mutable, protected]`

| Definition at line 61 of file OgreAutoParamDataSource.h.

bool Ogre::AutoParamDataSource::mCameraPositionObjectSpaceDirty `[mutable, protected]`

| Definition at line 76 of file OgreAutoParamDataSource.h.

const Camera* Ogre::AutoParamDataSource::mCurrentCamera `[protected]`

| Definition at line 82 of file OgreAutoParamDataSource.h.

const LightList* Ogre::AutoParamDataSource::mCurrentLightList `[protected]`

| Definition at line 83 of file OgreAutoParamDataSource.h.

const Renderable* Ogre::AutoParamDataSource::mCurrentRenderable `[protected]`

| Definition at line 81 of file OgreAutoParamDataSource.h.

const RenderTarget* Ogre::AutoParamDataSource::mCurrentRenderTarget `[protected]`

| Definition at line 85 of file OgreAutoParamDataSource.h.

const Frustum* Ogre::AutoParamDataSource::mCurrentTextureProjector `[protected]`

| Definition at line 84 of file OgreAutoParamDataSource.h.

const Viewport* Ogre::AutoParamDataSource::mCurrentViewport `[protected]`

| Definition at line 86 of file OgreAutoParamDataSource.h.

Real Ogre::AutoParamDataSource::mDirLightExtrusionDistance `[mutable, protected]`

| Definition at line 64 of file OgreAutoParamDataSource.h.

Matrix4 Ogre::AutoParamDataSource::mInverseTransposeWorldMatrix `[mutable, protected]`

| Definition at line 59 of file OgreAutoParamDataSource.h.

bool Ogre::AutoParamDataSource::mInverseTransposeWorldMatrixDirty `[mutable, protected]`

| Definition at line 74 of file OgreAutoParamDataSource.h.

Matrix4 Ogre::AutoParamDataSource::mInverseTransposeWorldViewMatrix `[mutable, protected]`

| Definition at line 60 of file OgreAutoParamDataSource.h.

bool Ogre::AutoParamDataSource::mInverseTransposeWorldViewMatrixDirty `[mutable, protected]`

| Definition at line 75 of file OgreAutoParamDataSource.h.

Matrix4 Ogre::AutoParamDataSource::mInverseViewMatrix `[mutable, protected]`

| Definition at line 58 of file OgreAutoParamDataSource.h.

bool Ogre::AutoParamDataSource::mInverseViewMatrixDirty `[mutable, protected]`

| Definition at line 73 of file OgreAutoParamDataSource.h.

Matrix4 Ogre::AutoParamDataSource::mInverseWorldMatrix `[mutable, protected]`

| Definition at line 56 of file OgreAutoParamDataSource.h.

bool Ogre::AutoParamDataSource::mInverseWorldMatrixDirty `[mutable, protected]`

| Definition at line 71 of file OgreAutoParamDataSource.h.

Matrix4 Ogre::AutoParamDataSource::mInverseWorldViewMatrix `[mutable, protected]`

| Definition at line 57 of file OgreAutoParamDataSource.h.

bool Ogre::AutoParamDataSource::mInverseWorldViewMatrixDirty `[mutable, protected]`

| Definition at line 72 of file OgreAutoParamDataSource.h.

Matrix4 Ogre::AutoParamDataSource::mProjectionMatrix `[mutable, protected]`

| Definition at line 63 of file OgreAutoParamDataSource.h.

Matrix4 Ogre::AutoParamDataSource::mTextureViewProjMatrix `[mutable, protected]`

| Definition at line 62 of file OgreAutoParamDataSource.h.

bool Ogre::AutoParamDataSource::mTextureViewProjMatrixDirty `[mutable, protected]`

| Definition at line 78 of file OgreAutoParamDataSource.h.

Matrix4 Ogre::AutoParamDataSource::mViewProjMatrix `[mutable, protected]`

| Definition at line 54 of file OgreAutoParamDataSource.h.

bool Ogre::AutoParamDataSource::mViewProjMatrixDirty `[mutable, protected]`

| Definition at line 69 of file OgreAutoParamDataSource.h.

Matrix4 Ogre::AutoParamDataSource::mWorldMatrix[256]`[mutable, protected]`

| Definition at line 51 of file OgreAutoParamDataSource.h.

size_t Ogre::AutoParamDataSource::mWorldMatrixCount `[mutable, protected]`

| Definition at line 52 of file OgreAutoParamDataSource.h.

bool Ogre::AutoParamDataSource::mWorldMatrixDirty `[mutable, protected]`

| Definition at line 67 of file OgreAutoParamDataSource.h.

Matrix4 Ogre::AutoParamDataSource::mWorldViewMatrix `[mutable, protected]`

| Definition at line 53 of file OgreAutoParamDataSource.h.

bool Ogre::AutoParamDataSource::mWorldViewMatrixDirty `[mutable, protected]`

| Definition at line 68 of file OgreAutoParamDataSource.h.

Matrix4 Ogre::AutoParamDataSource::mWorldViewProjMatrix `[mutable, protected]`

| Definition at line 55 of file OgreAutoParamDataSource.h.

bool Ogre::AutoParamDataSource::mWorldViewProjMatrixDirty `[mutable, protected]`

| Definition at line 70 of file OgreAutoParamDataSource.h.

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

- OgreAutoParamDataSource.h

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 13:00:06 2006