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

OgreSubEntity.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://www.ogre3d.org/
00006 
00007 Copyright © 2000-2002 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 __SubEntity_H__
00026 #define __SubEntity_H__
00027 
00028 #include "OgrePrerequisites.h"
00029 
00030 #include "OgreString.h"
00031 #include "OgreRenderable.h"
00032 
00033 namespace Ogre {
00034 
00051     class _OgreExport SubEntity: public Renderable
00052     {
00053         // Note no virtual functions for efficiency
00054         friend class Entity;
00055         friend class SceneManager;
00056     private:
00059         SubEntity();
00060 
00063         virtual ~SubEntity() { }
00064 
00066         Entity* mParentEntity;
00067 
00069         String mMaterialName;
00070 
00072         Material* mpMaterial;
00073 
00074         // Pointer to the SubMesh defining geometry.
00075         SubMesh* mSubMesh;
00076 
00077         SceneDetailLevel mRenderDetail;
00079         unsigned short mMaterialLodIndex;
00080     public:
00083         const String& getMaterialName() const;
00084 
00091         void setMaterialName( const String& name );
00092 
00095         SubMesh* getSubMesh(void);
00096 
00099         Material* getMaterial(void) const;
00100 
00103         Technique* getTechnique(void) const;
00104 
00107         void getRenderOperation(RenderOperation& op);
00108 
00111         void getWorldTransforms(Matrix4* xform) const;
00113         const Quaternion& getWorldOrientation(void) const;
00115         const Vector3& getWorldPosition(void) const;
00118         bool getNormaliseNormals(void) const;      
00121         unsigned short getNumWorldTransforms(void) const;
00123         Real getSquaredViewDepth(const Camera* cam) const;
00125         void setRenderDetail(SceneDetailLevel renderDetail) { mRenderDetail = renderDetail; } 
00127         SceneDetailLevel getRenderDetail() const {return mRenderDetail;}
00129         const LightList& getLights(void) const;
00130     };
00131 
00132 }
00133 
00134 
00135 #endif

Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:10:29 2004