Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound 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 © 2000-2003 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 Vector4 mCameraPositionObjectSpace;
00060         mutable Matrix4 mTextureViewProjMatrix;
00061         mutable Matrix4 mProjectionMatrix;
00062         mutable Real mDirLightExtrusionDistance;
00063         
00064         mutable bool mWorldMatrixDirty;
00065         mutable bool mWorldViewMatrixDirty;
00066         mutable bool mViewProjMatrixDirty;
00067         mutable bool mWorldViewProjMatrixDirty;
00068         mutable bool mInverseWorldMatrixDirty;
00069         mutable bool mInverseWorldViewMatrixDirty;
00070         mutable bool mInverseViewMatrixDirty;
00071         mutable bool mCameraPositionObjectSpaceDirty;
00072         mutable bool mTextureViewProjMatrixDirty;
00073         mutable ColourValue mAmbientLight;
00074 
00075         const Renderable* mCurrentRenderable;
00076         const Camera* mCurrentCamera;
00077         const LightList* mCurrentLightList;
00078         const Frustum* mCurrentTextureProjector;
00079         const RenderTarget* mCurrentRenderTarget;
00080 
00081         Light mBlankLight;
00082     public:
00083         AutoParamDataSource();
00084         ~AutoParamDataSource();
00086         void setCurrentRenderable(const Renderable* rend);
00088         void setCurrentCamera(const Camera* cam);
00090         void setCurrentLightList(const LightList* ll);
00092         void setTextureProjector(const Frustum* frust);
00094         void setCurrentRenderTarget(const RenderTarget* target);
00096         void setShadowDirLightExtrusionDistance(Real dist);
00097 
00098         const Matrix4& getWorldMatrix(void) const;
00099         const Matrix4* getWorldMatrixArray(void) const;
00100         size_t getWorldMatrixCount(void) const;
00101         const Matrix4& getViewMatrix(void) const;
00102         const Matrix4& getViewProjectionMatrix(void) const;
00103         const Matrix4& getProjectionMatrix(void) const;
00104         const Matrix4& getWorldViewProjMatrix(void) const;
00105         const Matrix4& getWorldViewMatrix(void) const;
00106         const Matrix4& getInverseWorldMatrix(void) const;
00107         const Matrix4& getInverseWorldViewMatrix(void) const;
00108         const Matrix4& getInverseViewMatrix(void) const;
00109         const Vector4& getCameraPositionObjectSpace(void) const;
00111         const Light& getLight(size_t index) const;
00112         void setAmbientLightColour(const ColourValue& ambient);
00113         const ColourValue& getAmbientLightColour(void) const;
00114         const Matrix4& getTextureViewProjMatrix(void) const;
00115         const RenderTarget* getCurrentRenderTarget(void) const;
00116         const Renderable* getCurrentRenderable(void) const;
00117         Real getShadowExtrusionDistance(void) const;
00118 
00119     };
00120 }
00121 
00122 #endif

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:48:14 2004