OGRE
1.7
Object-Oriented Graphics Rendering Engine
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
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-2011 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
38
namespace
Ogre {
66
class
_OgreExport
Billboard
:
public
FXAlloc
67
{
68
friend
class
BillboardSet
;
69
friend
class
BillboardParticleRenderer
;
70
protected
:
71
bool
mOwnDimensions
;
72
bool
mUseTexcoordRect
;
73
uint16
mTexcoordIndex
;
// index into the BillboardSet array of texture coordinates
74
FloatRect
mTexcoordRect
;
// individual texture coordinates
75
Real
mWidth
;
76
Real
mHeight
;
77
public
:
78
// Note the intentional public access to main internal variables used at runtime
79
// Forcing access via get/set would be too costly for 000's of billboards
80
Vector3
mPosition
;
81
// Normalised direction vector
82
Vector3
mDirection
;
83
BillboardSet
*
mParentSet
;
84
ColourValue
mColour
;
85
Radian
mRotation
;
86
89
Billboard
();
90
93
~
Billboard
();
94
97
Billboard
(
const
Vector3
& position,
BillboardSet
* owner,
const
ColourValue
& colour =
ColourValue::White
);
98
103
const
Radian
&
getRotation
(
void
)
const
{
return
mRotation; }
104
109
void
setRotation(
const
Radian
& rotation);
110
116
void
setPosition(
const
Vector3
& position);
117
123
void
setPosition(
Real
x,
Real
y,
Real
z);
124
130
const
Vector3
& getPosition(
void
)
const
;
131
139
void
setDimensions(
Real
width,
Real
height);
140
142
void
resetDimensions
(
void
) { mOwnDimensions =
false
; }
149
void
setColour(
const
ColourValue
& colour);
150
153
const
ColourValue
& getColour(
void
)
const
;
154
160
bool
hasOwnDimensions(
void
)
const
;
161
163
Real
getOwnWidth(
void
)
const
;
164
166
Real
getOwnHeight(
void
)
const
;
167
170
void
_notifyOwner(
BillboardSet
* owner);
171
181
bool
isUseTexcoordRect
(
void
)
const
{
return
mUseTexcoordRect; }
182
190
void
setTexcoordIndex(
uint16
texcoordIndex);
191
197
uint16
getTexcoordIndex
(
void
)
const
{
return
mTexcoordIndex; }
198
204
void
setTexcoordRect(
const
FloatRect
& texcoordRect);
205
211
void
setTexcoordRect(
Real
u0,
Real
v0,
Real
u1,
Real
v1);
212
217
const
FloatRect
&
getTexcoordRect
(
void
)
const
{
return
mTexcoordRect; }
218
};
219
223
}
224
225
#endif
Ogre::Billboard::mColour
ColourValue mColour
Definition:
OgreBillboard.h:84
OgreVector3.h
Ogre::Real
float Real
Software floating point type.
Definition:
OgrePrerequisites.h:75
_OgreExport
#define _OgreExport
Definition:
OgrePlatform.h:203
Ogre::Billboard::getRotation
const Radian & getRotation(void) const
Get the rotation of the billboard.
Definition:
OgreBillboard.h:103
Ogre::ColourValue
Class representing colour.
Definition:
OgreColourValue.h:57
Ogre::TRect< float >
Ogre::ColourValue::White
static const ColourValue White
Definition:
OgreColourValue.h:62
Ogre::Billboard::mOwnDimensions
bool mOwnDimensions
Definition:
OgreBillboard.h:71
Ogre::Billboard::mHeight
Real mHeight
Definition:
OgreBillboard.h:76
Ogre::Billboard::mPosition
Vector3 mPosition
Definition:
OgreBillboard.h:80
OgrePrerequisites.h
OgreCommon.h
Ogre::BillboardSet
A collection of billboards (faces which are always facing the given direction) with the same (default...
Definition:
OgreBillboardSet.h:109
Ogre::Billboard::isUseTexcoordRect
bool isUseTexcoordRect(void) const
Returns true if this billboard use individual texture coordinate rect (i.e.
Definition:
OgreBillboard.h:181
Ogre::Billboard::mUseTexcoordRect
bool mUseTexcoordRect
Definition:
OgreBillboard.h:72
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition:
OgreMemoryAllocatedObject.h:57
Ogre::Billboard::mTexcoordRect
FloatRect mTexcoordRect
Definition:
OgreBillboard.h:74
Ogre::Billboard::mRotation
Radian mRotation
Definition:
OgreBillboard.h:85
Ogre::BillboardParticleRenderer
Specialisation of ParticleSystemRenderer to render particles using a BillboardSet.
Definition:
OgreBillboardParticleRenderer.h:51
Ogre::Vector3
Standard 3-dimensional vector.
Definition:
OgreVector3.h:51
Ogre::Billboard::mTexcoordIndex
uint16 mTexcoordIndex
Definition:
OgreBillboard.h:73
Ogre::Radian
Wrapper class which indicates a given angle value is in Radians.
Definition:
OgreMath.h:46
Ogre::Billboard::getTexcoordIndex
uint16 getTexcoordIndex(void) const
getTexcoordIndex() returns the previous value set by setTexcoordIndex().
Definition:
OgreBillboard.h:197
Ogre::Billboard
A billboard is a primitive which always faces the camera in every frame.
Definition:
OgreBillboard.h:66
Ogre::Billboard::mDirection
Vector3 mDirection
Definition:
OgreBillboard.h:82
Ogre::Billboard::mParentSet
BillboardSet * mParentSet
Definition:
OgreBillboard.h:83
Ogre::uint16
unsigned short uint16
Definition:
OgrePlatform.h:247
Ogre::Billboard::getTexcoordRect
const FloatRect & getTexcoordRect(void) const
getTexcoordRect() returns the previous value set by setTexcoordRect().
Definition:
OgreBillboard.h:217
OgreColourValue.h
Ogre::Billboard::mWidth
Real mWidth
Definition:
OgreBillboard.h:75
Ogre::Billboard::resetDimensions
void resetDimensions(void)
Resets this Billboard to use the parent BillboardSet's dimensions instead of it's own...
Definition:
OgreBillboard.h:142
OgreMain
include
OgreBillboard.h
Generated on Fri Jun 20 2014 01:03:12 for OGRE by
1.8.7