OGRE-Next  3.0.0
Object-Oriented Graphics Rendering Engine
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>

+ Inheritance diagram for Ogre::AutoParamDataSource:

Public Member Functions

 AutoParamDataSource ()
 
virtual ~AutoParamDataSource ()
 
const Light_getBlankLight () const
 
const ColourValuegetAmbientLightColour () const
 
const Vector4getCameraPosition () const
 
const Vector4getCameraPositionObjectSpace () const
 
Real getCosTime_0_1 (Real x) const
 
Real getCosTime_0_2Pi (Real x) const
 
Real getCosTime_0_X (Real x) const
 
const CameragetCurrentCamera () const
 
const HlmsComputeJobgetCurrentJob () const
 
const PassgetCurrentPass () const
 
const RenderablegetCurrentRenderable () const
 
const RenderPassDescriptorgetCurrentRenderPassDesc () const
 
ColourValue getDerivedAmbientLightColour () const
 
ColourValue getDerivedSceneColour () const
 
Real getFarClipDistance () const
 
const ColourValuegetFogColour () const
 
const Vector4getFogParams () const
 
Real getFOV () const
 
Real getFPS () const
 
Real getFrameTime () const
 
Matrix4 getInverseProjectionMatrix () const
 
Vector4 getInverseTextureSize (size_t index) const
 
Matrix4 getInverseTransposeProjectionMatrix () const
 
Matrix4 getInverseTransposeViewMatrix () const
 
Matrix4 getInverseTransposeViewProjMatrix () const
 
const Matrix4getInverseTransposeWorldMatrix () const
 
const Matrix4getInverseTransposeWorldViewMatrix () const
 
Matrix4 getInverseTransposeWorldViewProjMatrix () const
 
Vector4 getInverseUavSize (size_t index) const
 
const Matrix4getInverseViewMatrix () const
 
Real getInverseViewportHeight () const
 
Real getInverseViewportWidth () const
 
Matrix4 getInverseViewProjMatrix () const
 
const Matrix4getInverseWorldMatrix () const
 
const Matrix4getInverseWorldViewMatrix () const
 
Matrix4 getInverseWorldViewProjMatrix () const
 
Vector4 getLightAs4DVector (size_t index) const
 
Vector4 getLightAttenuation (size_t index) const
 
float getLightCastsShadows (size_t index) const
 
float getLightCount () const
 
const ColourValuegetLightDiffuseColour (size_t index) const
 
const ColourValue getLightDiffuseColourWithPower (size_t index) const
 
Vector3 getLightDirection (size_t index) const
 
Vector3 getLightPosition (size_t index) const
 
Real getLightPowerScale (size_t index) const
 
const ColourValuegetLightSpecularColour (size_t index) const
 
const ColourValue getLightSpecularColourWithPower (size_t index) const
 
const Vector4getLodCameraPosition () const
 
const Vector4getLodCameraPositionObjectSpace () const
 
Real getNearClipDistance () const
 
Vector4 getPackedTextureSize (size_t index) const
 
Vector4 getPackedUavSize (size_t index) const
 
int getPassNumber () const
 
const Matrix4getProjectionMatrix () const
 
const vector< Real >::type & getPssmBlends (size_t shadowMapIdx) const
 
Real getPssmFade (size_t shadowMapIdx) const
 
const vector< Real >::type & getPssmSplits (size_t shadowMapIdx) const
 
const Vector2 getRSDepthRange () const
 
const Vector4getSceneDepthRange () const
 
const ColourValuegetShadowColour () const
 
Real getShadowExtrusionDistance () const
 
const Vector4getShadowSceneDepthRange (size_t index) const
 
Real getSinTime_0_1 (Real x) const
 
Real getSinTime_0_2Pi (Real x) const
 
Real getSinTime_0_X (Real x) const
 
Vector4 getSpotlightParams (size_t index) const
 
const Matrix4getSpotlightViewProjMatrix (size_t index) const
 
const Matrix4getSpotlightWorldViewProjMatrix (size_t index) const
 
Real getSurfaceAlphaRejectionValue () const
 
const ColourValuegetSurfaceAmbientColour () const
 
const ColourValuegetSurfaceDiffuseColour () const
 
const ColourValuegetSurfaceEmissiveColour () const
 
Real getSurfaceShininess () const
 
const ColourValuegetSurfaceSpecularColour () const
 
Real getTanTime_0_1 (Real x) const
 
Real getTanTime_0_2Pi (Real x) const
 
Real getTanTime_0_X (Real x) const
 
Vector4 getTextureSize (size_t index) const
 
const Matrix4getTextureTransformMatrix (size_t index) const
 
const Matrix4getTextureViewProjMatrix (size_t index) const
 
const Matrix4getTextureWorldViewProjMatrix (size_t index) const
 
Real getTime () const
 
Real getTime_0_1 (Real x) const
 
Vector4 getTime_0_1_packed (Real x) const
 
Real getTime_0_2Pi (Real x) const
 
Vector4 getTime_0_2Pi_packed (Real x) const
 
Real getTime_0_X (Real x) const
 
Vector4 getTime_0_X_packed (Real x) const
 
Matrix4 getTransposeProjectionMatrix () const
 
Matrix4 getTransposeViewMatrix () const
 
Matrix4 getTransposeViewProjMatrix () const
 
Matrix4 getTransposeWorldMatrix () const
 
Matrix4 getTransposeWorldViewMatrix () const
 
Matrix4 getTransposeWorldViewProjMatrix () const
 
Vector4 getUavSize (size_t index) const
 
Vector3 getViewDirection () const
 
const Matrix4getViewMatrix () const
 
Real getViewportHeight () const
 
Real getViewportWidth () const
 
const Matrix4getViewProjectionMatrix () const
 
Vector3 getViewSideVector () const
 
Vector3 getViewUpVector () const
 
const Matrix4getWorldMatrix () const
 
const Matrix4getWorldMatrixArray () const
 
size_t getWorldMatrixCount () const
 
const Matrix4getWorldViewMatrix () const
 
const Matrix4getWorldViewProjMatrix () const
 
bool hasLightList () const
 
void incPassNumber ()
 
void setAmbientLightColour (const ColourValue hemispheres[2], const Vector3 &hemisphereDir)
 
void setCurrentCamera (const Camera *cam)
 Updates the current camera. More...
 
void setCurrentJob (const HlmsComputeJob *job)
 
void setCurrentLightList (const LightList *ll)
 Sets the light list that should be used, and it's base index from the global list. More...
 
void setCurrentPass (const Pass *pass)
 Sets the current pass. More...
 
void setCurrentRenderable (const Renderable *rend)
 Updates the current renderable. More...
 
void setCurrentSceneManager (const SceneManager *sm)
 Set the current scene manager for enquiring on demand. More...
 
void setCurrentShadowNode (const CompositorShadowNode *sn)
 
void setCurrentViewport (const Viewport *viewport)
 Sets the current viewport. More...
 
void setFog (FogMode mode, const ColourValue &colour, Real expDensity, Real linearStart, Real linearEnd)
 
void setPassNumber (const int passNumber)
 
void setShadowDirLightExtrusionDistance (Real dist)
 Sets the shadow extrusion distance to be used for point lights. More...
 
void setTextureProjector (const Frustum *frust, size_t index)
 Sets the current texture projector for a index. More...
 
void setWorldMatrices (const Matrix4 *m, size_t count)
 Sets the world matrices, avoid query from renderable again. More...
 
void updateLightCustomGpuParameter (const GpuProgramParameters_AutoConstantEntry &constantEntry, GpuProgramParameters *params) const
 

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.

Constructor & Destructor Documentation

◆ AutoParamDataSource()

Ogre::AutoParamDataSource::AutoParamDataSource ( )

◆ ~AutoParamDataSource()

virtual Ogre::AutoParamDataSource::~AutoParamDataSource ( )
virtual

Member Function Documentation

◆ _getBlankLight()

const Light& Ogre::AutoParamDataSource::_getBlankLight ( ) const
inline

◆ getAmbientLightColour()

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

◆ getCameraPosition()

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

◆ getCameraPositionObjectSpace()

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

◆ getCosTime_0_1()

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

◆ getCosTime_0_2Pi()

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

◆ getCosTime_0_X()

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

◆ getCurrentCamera()

const Camera* Ogre::AutoParamDataSource::getCurrentCamera ( ) const

◆ getCurrentJob()

const HlmsComputeJob* Ogre::AutoParamDataSource::getCurrentJob ( ) const

◆ getCurrentPass()

const Pass* Ogre::AutoParamDataSource::getCurrentPass ( ) const

◆ getCurrentRenderable()

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

◆ getCurrentRenderPassDesc()

const RenderPassDescriptor* Ogre::AutoParamDataSource::getCurrentRenderPassDesc ( ) const

◆ getDerivedAmbientLightColour()

ColourValue Ogre::AutoParamDataSource::getDerivedAmbientLightColour ( ) const

◆ getDerivedSceneColour()

ColourValue Ogre::AutoParamDataSource::getDerivedSceneColour ( ) const

◆ getFarClipDistance()

Real Ogre::AutoParamDataSource::getFarClipDistance ( ) const

◆ getFogColour()

const ColourValue& Ogre::AutoParamDataSource::getFogColour ( ) const

◆ getFogParams()

const Vector4& Ogre::AutoParamDataSource::getFogParams ( ) const

◆ getFOV()

Real Ogre::AutoParamDataSource::getFOV ( ) const

◆ getFPS()

Real Ogre::AutoParamDataSource::getFPS ( ) const

◆ getFrameTime()

Real Ogre::AutoParamDataSource::getFrameTime ( ) const

◆ getInverseProjectionMatrix()

Matrix4 Ogre::AutoParamDataSource::getInverseProjectionMatrix ( ) const

◆ getInverseTextureSize()

Vector4 Ogre::AutoParamDataSource::getInverseTextureSize ( size_t  index) const

◆ getInverseTransposeProjectionMatrix()

Matrix4 Ogre::AutoParamDataSource::getInverseTransposeProjectionMatrix ( ) const

◆ getInverseTransposeViewMatrix()

Matrix4 Ogre::AutoParamDataSource::getInverseTransposeViewMatrix ( ) const

◆ getInverseTransposeViewProjMatrix()

Matrix4 Ogre::AutoParamDataSource::getInverseTransposeViewProjMatrix ( ) const

◆ getInverseTransposeWorldMatrix()

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

◆ getInverseTransposeWorldViewMatrix()

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

◆ getInverseTransposeWorldViewProjMatrix()

Matrix4 Ogre::AutoParamDataSource::getInverseTransposeWorldViewProjMatrix ( ) const

◆ getInverseUavSize()

Vector4 Ogre::AutoParamDataSource::getInverseUavSize ( size_t  index) const

◆ getInverseViewMatrix()

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

◆ getInverseViewportHeight()

Real Ogre::AutoParamDataSource::getInverseViewportHeight ( ) const

◆ getInverseViewportWidth()

Real Ogre::AutoParamDataSource::getInverseViewportWidth ( ) const

◆ getInverseViewProjMatrix()

Matrix4 Ogre::AutoParamDataSource::getInverseViewProjMatrix ( ) const

◆ getInverseWorldMatrix()

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

◆ getInverseWorldViewMatrix()

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

◆ getInverseWorldViewProjMatrix()

Matrix4 Ogre::AutoParamDataSource::getInverseWorldViewProjMatrix ( ) const

◆ getLightAs4DVector()

Vector4 Ogre::AutoParamDataSource::getLightAs4DVector ( size_t  index) const

◆ getLightAttenuation()

Vector4 Ogre::AutoParamDataSource::getLightAttenuation ( size_t  index) const

◆ getLightCastsShadows()

float Ogre::AutoParamDataSource::getLightCastsShadows ( size_t  index) const

◆ getLightCount()

float Ogre::AutoParamDataSource::getLightCount ( ) const

◆ getLightDiffuseColour()

const ColourValue& Ogre::AutoParamDataSource::getLightDiffuseColour ( size_t  index) const

◆ getLightDiffuseColourWithPower()

const ColourValue Ogre::AutoParamDataSource::getLightDiffuseColourWithPower ( size_t  index) const

◆ getLightDirection()

Vector3 Ogre::AutoParamDataSource::getLightDirection ( size_t  index) const

◆ getLightPosition()

Vector3 Ogre::AutoParamDataSource::getLightPosition ( size_t  index) const

◆ getLightPowerScale()

Real Ogre::AutoParamDataSource::getLightPowerScale ( size_t  index) const

◆ getLightSpecularColour()

const ColourValue& Ogre::AutoParamDataSource::getLightSpecularColour ( size_t  index) const

◆ getLightSpecularColourWithPower()

const ColourValue Ogre::AutoParamDataSource::getLightSpecularColourWithPower ( size_t  index) const

◆ getLodCameraPosition()

const Vector4& Ogre::AutoParamDataSource::getLodCameraPosition ( ) const

◆ getLodCameraPositionObjectSpace()

const Vector4& Ogre::AutoParamDataSource::getLodCameraPositionObjectSpace ( ) const

◆ getNearClipDistance()

Real Ogre::AutoParamDataSource::getNearClipDistance ( ) const

◆ getPackedTextureSize()

Vector4 Ogre::AutoParamDataSource::getPackedTextureSize ( size_t  index) const

◆ getPackedUavSize()

Vector4 Ogre::AutoParamDataSource::getPackedUavSize ( size_t  index) const

◆ getPassNumber()

int Ogre::AutoParamDataSource::getPassNumber ( ) const

◆ getProjectionMatrix()

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

◆ getPssmBlends()

const vector<Real>::type& Ogre::AutoParamDataSource::getPssmBlends ( size_t  shadowMapIdx) const

◆ getPssmFade()

Real Ogre::AutoParamDataSource::getPssmFade ( size_t  shadowMapIdx) const

◆ getPssmSplits()

const vector<Real>::type& Ogre::AutoParamDataSource::getPssmSplits ( size_t  shadowMapIdx) const

◆ getRSDepthRange()

const Vector2 Ogre::AutoParamDataSource::getRSDepthRange ( ) const

◆ getSceneDepthRange()

const Vector4& Ogre::AutoParamDataSource::getSceneDepthRange ( ) const

◆ getShadowColour()

const ColourValue& Ogre::AutoParamDataSource::getShadowColour ( ) const

◆ getShadowExtrusionDistance()

Real Ogre::AutoParamDataSource::getShadowExtrusionDistance ( ) const

◆ getShadowSceneDepthRange()

const Vector4& Ogre::AutoParamDataSource::getShadowSceneDepthRange ( size_t  index) const

◆ getSinTime_0_1()

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

◆ getSinTime_0_2Pi()

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

◆ getSinTime_0_X()

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

◆ getSpotlightParams()

Vector4 Ogre::AutoParamDataSource::getSpotlightParams ( size_t  index) const

◆ getSpotlightViewProjMatrix()

const Matrix4& Ogre::AutoParamDataSource::getSpotlightViewProjMatrix ( size_t  index) const

◆ getSpotlightWorldViewProjMatrix()

const Matrix4& Ogre::AutoParamDataSource::getSpotlightWorldViewProjMatrix ( size_t  index) const

◆ getSurfaceAlphaRejectionValue()

Real Ogre::AutoParamDataSource::getSurfaceAlphaRejectionValue ( ) const

◆ getSurfaceAmbientColour()

const ColourValue& Ogre::AutoParamDataSource::getSurfaceAmbientColour ( ) const

◆ getSurfaceDiffuseColour()

const ColourValue& Ogre::AutoParamDataSource::getSurfaceDiffuseColour ( ) const

◆ getSurfaceEmissiveColour()

const ColourValue& Ogre::AutoParamDataSource::getSurfaceEmissiveColour ( ) const

◆ getSurfaceShininess()

Real Ogre::AutoParamDataSource::getSurfaceShininess ( ) const

◆ getSurfaceSpecularColour()

const ColourValue& Ogre::AutoParamDataSource::getSurfaceSpecularColour ( ) const

◆ getTanTime_0_1()

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

◆ getTanTime_0_2Pi()

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

◆ getTanTime_0_X()

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

◆ getTextureSize()

Vector4 Ogre::AutoParamDataSource::getTextureSize ( size_t  index) const

◆ getTextureTransformMatrix()

const Matrix4& Ogre::AutoParamDataSource::getTextureTransformMatrix ( size_t  index) const

◆ getTextureViewProjMatrix()

const Matrix4& Ogre::AutoParamDataSource::getTextureViewProjMatrix ( size_t  index) const

◆ getTextureWorldViewProjMatrix()

const Matrix4& Ogre::AutoParamDataSource::getTextureWorldViewProjMatrix ( size_t  index) const

◆ getTime()

Real Ogre::AutoParamDataSource::getTime ( ) const

◆ getTime_0_1()

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

◆ getTime_0_1_packed()

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

◆ getTime_0_2Pi()

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

◆ getTime_0_2Pi_packed()

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

◆ getTime_0_X()

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

◆ getTime_0_X_packed()

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

◆ getTransposeProjectionMatrix()

Matrix4 Ogre::AutoParamDataSource::getTransposeProjectionMatrix ( ) const

◆ getTransposeViewMatrix()

Matrix4 Ogre::AutoParamDataSource::getTransposeViewMatrix ( ) const

◆ getTransposeViewProjMatrix()

Matrix4 Ogre::AutoParamDataSource::getTransposeViewProjMatrix ( ) const

◆ getTransposeWorldMatrix()

Matrix4 Ogre::AutoParamDataSource::getTransposeWorldMatrix ( ) const

◆ getTransposeWorldViewMatrix()

Matrix4 Ogre::AutoParamDataSource::getTransposeWorldViewMatrix ( ) const

◆ getTransposeWorldViewProjMatrix()

Matrix4 Ogre::AutoParamDataSource::getTransposeWorldViewProjMatrix ( ) const

◆ getUavSize()

Vector4 Ogre::AutoParamDataSource::getUavSize ( size_t  index) const

◆ getViewDirection()

Vector3 Ogre::AutoParamDataSource::getViewDirection ( ) const

◆ getViewMatrix()

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

◆ getViewportHeight()

Real Ogre::AutoParamDataSource::getViewportHeight ( ) const

◆ getViewportWidth()

Real Ogre::AutoParamDataSource::getViewportWidth ( ) const

◆ getViewProjectionMatrix()

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

◆ getViewSideVector()

Vector3 Ogre::AutoParamDataSource::getViewSideVector ( ) const

◆ getViewUpVector()

Vector3 Ogre::AutoParamDataSource::getViewUpVector ( ) const

◆ getWorldMatrix()

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

◆ getWorldMatrixArray()

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

◆ getWorldMatrixCount()

size_t Ogre::AutoParamDataSource::getWorldMatrixCount ( ) const

◆ getWorldViewMatrix()

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

◆ getWorldViewProjMatrix()

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

◆ hasLightList()

bool Ogre::AutoParamDataSource::hasLightList ( ) const
inline

◆ incPassNumber()

void Ogre::AutoParamDataSource::incPassNumber ( )

◆ setAmbientLightColour()

void Ogre::AutoParamDataSource::setAmbientLightColour ( const ColourValue  hemispheres[2],
const Vector3 hemisphereDir 
)

◆ setCurrentCamera()

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

Updates the current camera.

◆ setCurrentJob()

void Ogre::AutoParamDataSource::setCurrentJob ( const HlmsComputeJob job)

◆ setCurrentLightList()

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

Sets the light list that should be used, and it's base index from the global list.

◆ setCurrentPass()

void Ogre::AutoParamDataSource::setCurrentPass ( const Pass pass)

Sets the current pass.

◆ setCurrentRenderable()

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

Updates the current renderable.

◆ setCurrentSceneManager()

void Ogre::AutoParamDataSource::setCurrentSceneManager ( const SceneManager sm)

Set the current scene manager for enquiring on demand.

◆ setCurrentShadowNode()

void Ogre::AutoParamDataSource::setCurrentShadowNode ( const CompositorShadowNode sn)

◆ setCurrentViewport()

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

Sets the current viewport.

◆ setFog()

void Ogre::AutoParamDataSource::setFog ( FogMode  mode,
const ColourValue colour,
Real  expDensity,
Real  linearStart,
Real  linearEnd 
)

◆ setPassNumber()

void Ogre::AutoParamDataSource::setPassNumber ( const int  passNumber)

◆ setShadowDirLightExtrusionDistance()

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

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

◆ setTextureProjector()

void Ogre::AutoParamDataSource::setTextureProjector ( const Frustum frust,
size_t  index 
)

Sets the current texture projector for a index.

◆ setWorldMatrices()

void Ogre::AutoParamDataSource::setWorldMatrices ( const Matrix4 m,
size_t  count 
)

Sets the world matrices, avoid query from renderable again.

◆ updateLightCustomGpuParameter()

void Ogre::AutoParamDataSource::updateLightCustomGpuParameter ( const GpuProgramParameters_AutoConstantEntry constantEntry,
GpuProgramParameters params 
) const

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