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-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; 00078 00079 public: 00082 const String& getMaterialName() const; 00083 00090 void setMaterialName( const String& name ); 00091 00094 SubMesh* getSubMesh(void); 00095 00098 Material* getMaterial(void) const; 00099 00102 void getRenderOperation(RenderOperation& rend); 00103 00106 void getWorldTransforms(Matrix4* xform); 00107 00110 unsigned short getNumWorldTransforms(void); 00112 Real getSquaredViewDepth(const Camera* cam) const; 00114 void setRenderDetail(SceneDetailLevel renderDetail) { mRenderDetail = renderDetail; } 00116 SceneDetailLevel getRenderDetail(){return mRenderDetail;} 00117 }; 00118 00119 } 00120 00121 00122 #endif
Copyright © 2002 by The OGRE Team