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 00026 #ifndef __Billboard_H__ 00027 #define __Billboard_H__ 00028 00029 #include "OgrePrerequisites.h" 00030 00031 #include "OgreVector3.h" 00032 #include "OgreColourValue.h" 00033 00034 00035 namespace Ogre { 00036 00057 class _OgreExport Billboard 00058 { 00059 friend class BillboardSet; 00060 protected: 00061 bool mOwnDimensions; 00062 Real mWidth; 00063 Real mHeight; 00064 public: 00065 // Note the intentional public access to main internal variables used at runtime 00066 // Forcing access via get/set would be too costly for 000's of billboards 00067 Vector3 mPosition; 00068 // NB direction only relevant for rendering when billboard type = BBT_ORIENTED_SELF 00069 Vector3 mDirection; 00070 BillboardSet* mParentSet; 00071 ColourValue mColour; 00072 Radian mRotation; 00073 00076 Billboard(); 00077 00080 ~Billboard(); 00081 00084 Billboard(const Vector3& position, BillboardSet* owner, const ColourValue& colour = ColourValue::White); 00085 00090 const Radian& getRotation(void) const { return mRotation; } 00091 00096 void setRotation(const Radian& rotation); 00097 00103 void setPosition(const Vector3& position); 00104 00110 void setPosition(Real x, Real y, Real z); 00111 00117 const Vector3& getPosition(void) const; 00118 00126 void setDimensions(Real width, Real height); 00127 00129 void resetDimensions(void) { mOwnDimensions = false; } 00136 void setColour(const ColourValue& colour); 00137 00140 const ColourValue& getColour(void) const; 00141 00147 bool hasOwnDimensions(void) const; 00148 00150 Real getOwnWidth(void) const; 00151 00153 Real getOwnHeight(void) const; 00154 00157 void _notifyOwner(BillboardSet* owner); 00158 00159 }; 00160 00161 } 00162 00163 #endif
Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:48:15 2004