OgreBillboard.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 
29 #ifndef __Billboard_H__
30 #define __Billboard_H__
31 
32 #include "OgrePrerequisites.h"
33 
34 #include "OgreVector3.h"
35 #include "OgreColourValue.h"
36 #include "OgreCommon.h"
37 #include "OgreHeaderPrefix.h"
38 
39 namespace Ogre {
67  class _OgreExport Billboard : public FXAlloc
68  {
69  friend class BillboardSet;
71  protected:
78  public:
79  // Note the intentional public access to main internal variables used at runtime
80  // Forcing access via get/set would be too costly for 000's of billboards
87 
90  Billboard();
91 
94  ~Billboard();
95 
98  Billboard(const Vector3& position, BillboardSet* owner, const ColourValue& colour = ColourValue::White);
99 
104  const Radian& getRotation(void) const { return mRotation; }
105 
110  void setRotation(const Radian& rotation);
111 
117  void setPosition(const Vector3& position);
118 
124  void setPosition(Real x, Real y, Real z);
125 
131  const Vector3& getPosition(void) const;
132 
140  void setDimensions(Real width, Real height);
141 
143  void resetDimensions(void) { mOwnDimensions = false; }
150  void setColour(const ColourValue& colour);
151 
154  const ColourValue& getColour(void) const;
155 
161  bool hasOwnDimensions(void) const;
162 
164  Real getOwnWidth(void) const;
165 
167  Real getOwnHeight(void) const;
168 
171  void _notifyOwner(BillboardSet* owner);
172 
182  bool isUseTexcoordRect(void) const { return mUseTexcoordRect; }
183 
191  void setTexcoordIndex(uint16 texcoordIndex);
192 
198  uint16 getTexcoordIndex(void) const { return mTexcoordIndex; }
199 
205  void setTexcoordRect(const FloatRect& texcoordRect);
206 
212  void setTexcoordRect(Real u0, Real v0, Real u1, Real v1);
213 
218  const FloatRect& getTexcoordRect(void) const { return mTexcoordRect; }
219  };
220 
224 }
225 
226 #include "OgreHeaderSuffix.h"
227 
228 #endif

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Wed Oct 23 2013 06:57:23