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

OgreBillboard.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-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 
00075         Billboard();
00076 
00079         ~Billboard();
00080 
00083         Billboard(const Vector3& position, BillboardSet* owner, const ColourValue& colour = ColourValue::White);
00084 
00090         void setPosition(const Vector3& position);
00091 
00097         void setPosition(Real x, Real y, Real z);
00098 
00104         const Vector3& getPosition(void) const;
00105 
00113         void setDimensions(Real width, Real height);
00114 
00121         void setColour(const ColourValue& colour);
00122 
00125         const ColourValue& getColour(void) const;
00126 
00132         bool hasOwnDimensions(void) const;
00133 
00135         Real getOwnWidth(void);
00136 
00138         Real getOwnHeight(void);
00139 
00142         void _notifyOwner(BillboardSet* owner);
00143 
00144     };
00145 
00146 }
00147 
00148 #endif

Copyright © 2002 by The OGRE Team