Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

OgreAutoParamDataSource.h

Go to the documentation of this file.
00001 /*
00002 -----------------------------------------------------------------------------
00003 This source file is part of OGRE
00004     (Object-oriented Graphics Rendering Engine)
00005 For the latest info, see http://ogre.sourceforge.net/
00006 
00007 Copyright (c) 2000-2005 The OGRE Team
00008 Also see acknowledgements in Readme.html
00009 
00010 This program is free software; you can redistribute it and/or modify it under
00011 the terms of the GNU Lesser General Public License as published by the Free Software
00012 Foundation; either version 2 of the License, or (at your option) any later
00013 version.
00014 
00015 This program is distributed in the hope that it will be useful, but WITHOUT
00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
00018 
00019 You should have received a copy of the GNU Lesser General Public License along with
00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
00022 http://www.gnu.org/copyleft/lesser.txt.
00023 -----------------------------------------------------------------------------
00024 */
00025 #ifndef __AutoParamDataSource_H_
00026 #define __AutoParamDataSource_H_
00027 
00028 #include "OgrePrerequisites.h"
00029 #include "OgreCommon.h"
00030 #include "OgreMatrix4.h"
00031 #include "OgreVector4.h"
00032 #include "OgreLight.h"
00033 #include "OgreColourValue.h"
00034 
00035 namespace Ogre {
00036 
00037 
00048     class _OgreExport AutoParamDataSource
00049     {
00050     protected:
00051         mutable Matrix4 mWorldMatrix[256];
00052         mutable size_t mWorldMatrixCount;
00053         mutable Matrix4 mWorldViewMatrix;
00054         mutable Matrix4 mViewProjMatrix;
00055         mutable Matrix4 mWorldViewProjMatrix;
00056         mutable Matrix4 mInverseWorldMatrix;
00057         mutable Matrix4 mInverseWorldViewMatrix;
00058         mutable Matrix4 mInverseViewMatrix;
00059         mutable Matrix4 mInverseTransposeWorldMatrix;
00060         mutable Matrix4 mInverseTransposeWorldViewMatrix;
00061         mutable Vector4 mCameraPositionObjectSpace;
00062         mutable Matrix4 mTextureViewProjMatrix;
00063         mutable Matrix4 mViewMatrix;
00064         mutable Matrix4 mProjectionMatrix;
00065         mutable Real mDirLightExtrusionDistance;
00066         mutable Vector4 mCameraPosition;
00067 
00068         mutable bool mWorldMatrixDirty;
00069         mutable bool mViewMatrixDirty;
00070         mutable bool mProjMatrixDirty;
00071         mutable bool mWorldViewMatrixDirty;
00072         mutable bool mViewProjMatrixDirty;
00073         mutable bool mWorldViewProjMatrixDirty;
00074         mutable bool mInverseWorldMatrixDirty;
00075         mutable bool mInverseWorldViewMatrixDirty;
00076         mutable bool mInverseViewMatrixDirty;
00077         mutable bool mInverseTransposeWorldMatrixDirty;
00078         mutable bool mInverseTransposeWorldViewMatrixDirty;
00079         mutable bool mCameraPositionObjectSpaceDirty;
00080         mutable bool mCameraPositionDirty;
00081         mutable bool mTextureViewProjMatrixDirty;
00082         mutable ColourValue mAmbientLight;
00083         mutable ColourValue mFogColour;
00084         mutable Vector4 mFogParams;
00085         mutable int mPassNumber;
00086 
00087         const Renderable* mCurrentRenderable;
00088         const Camera* mCurrentCamera;
00089         const LightList* mCurrentLightList;
00090         const Frustum* mCurrentTextureProjector;
00091         const RenderTarget* mCurrentRenderTarget;
00092         const Viewport* mCurrentViewport;
00093 
00094         Light mBlankLight;
00095     public:
00096         AutoParamDataSource();
00097         ~AutoParamDataSource();
00099         void setCurrentRenderable(const Renderable* rend);
00101         void setCurrentCamera(const Camera* cam);
00103         void setCurrentLightList(const LightList* ll);
00105         void setTextureProjector(const Frustum* frust);
00107         void setCurrentRenderTarget(const RenderTarget* target);
00109         void setCurrentViewport(const Viewport* viewport);
00111         void setShadowDirLightExtrusionDistance(Real dist);
00112 
00113         const Matrix4& getWorldMatrix(void) const;
00114         const Matrix4* getWorldMatrixArray(void) const;
00115         size_t getWorldMatrixCount(void) const;
00116         const Matrix4& getViewMatrix(void) const;
00117         const Matrix4& getViewProjectionMatrix(void) const;
00118         const Matrix4& getProjectionMatrix(void) const;
00119         const Matrix4& getWorldViewProjMatrix(void) const;
00120         const Matrix4& getWorldViewMatrix(void) const;
00121         const Matrix4& getInverseWorldMatrix(void) const;
00122         const Matrix4& getInverseWorldViewMatrix(void) const;
00123         const Matrix4& getInverseViewMatrix(void) const;
00124         const Matrix4& getInverseTransposeWorldMatrix(void) const;
00125         const Matrix4& getInverseTransposeWorldViewMatrix(void) const;
00126         const Vector4& getCameraPosition(void) const;
00127         const Vector4& getCameraPositionObjectSpace(void) const;
00129         const Light& getLight(size_t index) const;
00130         void setAmbientLightColour(const ColourValue& ambient);
00131         const ColourValue& getAmbientLightColour(void) const;
00132         void setFog(FogMode mode, const ColourValue& colour, Real expDensity, Real linearStart, Real linearEnd);
00133         const ColourValue& getFogColour(void) const;
00134         const Vector4& getFogParams(void) const;
00135         const Matrix4& getTextureViewProjMatrix(void) const;
00136         const RenderTarget* getCurrentRenderTarget(void) const;
00137         const Renderable* getCurrentRenderable(void) const;
00138         Real getShadowExtrusionDistance(void) const;
00139         Matrix4 getInverseViewProjMatrix(void) const;
00140         Matrix4 getInverseTransposeViewProjMatrix() const;
00141         Matrix4 getTransposeViewProjMatrix() const;
00142         Matrix4 getTransposeViewMatrix() const;
00143         Matrix4 getTransposeProjectionMatrix() const;
00144         Matrix4 getInverseProjectionMatrix() const;
00145         Matrix4 getInverseTransposeProjectionMatrix() const;
00146         Matrix4 getTransposeWorldViewProjMatrix() const;
00147         Matrix4 getInverseWorldViewProjMatrix() const;
00148         Matrix4 getInverseTransposeWorldViewProjMatrix() const;
00149         Matrix4 getTransposeWorldViewMatrix() const;
00150         Matrix4 getTransposeWorldMatrix() const;
00151         Real getTime(void) const;
00152         Real getTime_0_X(Real x) const;
00153         Real getCosTime_0_X(Real x) const;
00154         Real getSinTime_0_X(Real x) const;
00155         Real getTanTime_0_X(Real x) const;
00156         Vector4 getTime_0_X_packed(Real x) const;
00157         Real getTime_0_1(Real x) const;
00158         Real getCosTime_0_1(Real x) const;
00159         Real getSinTime_0_1(Real x) const;
00160         Real getTanTime_0_1(Real x) const;
00161         Vector4 getTime_0_1_packed(Real x) const;
00162         Real getTime_0_2Pi(Real x) const;
00163         Real getCosTime_0_2Pi(Real x) const;
00164         Real getSinTime_0_2Pi(Real x) const;
00165         Real getTanTime_0_2Pi(Real x) const;
00166         Vector4 getTime_0_2Pi_packed(Real x) const;
00167         Real getFrameTime(void) const;
00168         Real getFPS() const;
00169         Real getViewportWidth() const;
00170         Real getViewportHeight() const;
00171         Real getInverseViewportWidth() const;
00172         Real getInverseViewportHeight() const;
00173         Vector3 getViewDirection() const;
00174         Vector3 getViewSideVector() const;
00175         Vector3 getViewUpVector() const;
00176         Real getFOV() const;
00177         Real getNearClipDistance() const;
00178         Real getFarClipDistance() const;
00179         int getPassNumber(void) const;
00180         void setPassNumber(const int passNumber);
00181         void incPassNumber(void);
00182     };
00183 }
00184 
00185 #endif

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