OGRE 14.3
Object-Oriented Graphics Rendering Engine
|
A billboard is a primitive which always faces the camera in every frame. More...
#include <OgreBillboard.h>
Public Member Functions | |
Billboard () | |
Default constructor. | |
Billboard (const Vector3 &position, BillboardSet *owner, const ColourValue &colour=ColourValue::White) | |
Normal constructor as called by BillboardSet. | |
~Billboard () | |
Default destructor. | |
ColourValue | getColour (void) const |
Gets the colour of this billboard. | |
float | getOwnHeight (void) const |
Retrieves the billboard's personal height, if hasOwnDimensions is true. | |
float | getOwnWidth (void) const |
Retrieves the billboard's personal width, if hasOwnDimensions is true. | |
const Vector3 & | getPosition (void) const |
Get the position of the billboard. | |
const Radian & | getRotation (void) const |
Get the rotation of the billboard. | |
uint16 | getTexcoordIndex (void) const |
getTexcoordIndex() returns the previous value set by setTexcoordIndex(). | |
const FloatRect & | getTexcoordRect (void) const |
getTexcoordRect() returns the previous value set by setTexcoordRect(). | |
bool | hasOwnDimensions (void) const |
Returns true if this billboard deviates from the BillboardSet's default dimensions (i.e. | |
bool | isUseTexcoordRect (void) const |
Returns true if this billboard use individual texture coordinate rect (i.e. | |
void | resetDimensions (void) |
Resets this Billboard to use the parent BillboardSet's dimensions instead of it's own. | |
void | setColour (const ColourValue &colour) |
Sets the colour of this billboard. | |
void | setDimensions (float width, float height) |
Sets the width and height for this billboard. | |
void | setPosition (const Vector3 &position) |
Set the position of the billboard. | |
void | setPosition (Real x, Real y, Real z) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | setRotation (const Radian &rotation) |
Set the rotation of the billboard. | |
void | setTexcoordIndex (uint16 texcoordIndex) |
setTexcoordIndex() sets which texture coordinate rect this billboard will use when rendering. | |
void | setTexcoordRect (const FloatRect &texcoordRect) |
sets the individual texture coordinate rect of this billboard will use when rendering. | |
void | setTexcoordRect (float u0, float v0, float u1, float v1) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Public Attributes | |
RGBA | mColour |
Vector3 | mDirection |
Normalised direction vector. | |
Vector3 | mPosition |
Radian | mRotation |
A billboard is a primitive which always faces the camera in every frame.
Billboards can be used for special effects or some other trickery which requires the triangles to always facing the camera no matter where it is. Ogre groups billboards into sets for efficiency, so you should never create a billboard on it's own (it's ok to have a set of one if you need it).
Ogre::Billboard::Billboard | ( | ) |
Default constructor.
Ogre::Billboard::~Billboard | ( | ) |
Default destructor.
Ogre::Billboard::Billboard | ( | const Vector3 & | position, |
BillboardSet * | owner, | ||
const ColourValue & | colour = ColourValue::White |
||
) |
Normal constructor as called by BillboardSet.
Get the rotation of the billboard.
This rotation is relative to the center of the billboard.
Set the rotation of the billboard.
This rotation is relative to the center of the billboard.
Set the position of the billboard.
This position is relative to a point on the quad which is the billboard. Depending on the BillboardSet, this may be the center of the quad, the top-left etc. See BillboardSet::setBillboardOrigin for more info.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References setPosition().
Referenced by setPosition().
Get the position of the billboard.
This position is relative to a point on the quad which is the billboard. Depending on the BillboardSet, this may be the center of the quad, the top-left etc. See BillboardSet::setBillboardOrigin for more info.
Sets the width and height for this billboard.
Note that it is most efficient for every billboard in a BillboardSet to have the same dimensions. If you choose to alter the dimensions of an individual billboard the set will be less efficient. Do not call this method unless you really need to have different billboard dimensions within the same set. Otherwise just call the BillboardSet::setDefaultDimensions method instead.
Resets this Billboard to use the parent BillboardSet's dimensions instead of it's own.
|
inline |
Sets the colour of this billboard.
Billboards can be tinted based on a base colour. This allows variations in colour irrespective of the base colour of the material allowing more varied billboards. The default colour is white. The tinting is effected using vertex colours.
References Ogre::ColourValue::getAsBYTE().
|
inline |
Gets the colour of this billboard.
Returns true if this billboard deviates from the BillboardSet's default dimensions (i.e.
if the Billboard::setDimensions method has been called for this instance).
Retrieves the billboard's personal width, if hasOwnDimensions is true.
Retrieves the billboard's personal height, if hasOwnDimensions is true.
Returns true if this billboard use individual texture coordinate rect (i.e.
if the Billboard::setTexcoordRect() method has been called for this instance), or returns false if use texture coordinates defined in the parent BillboardSet's texture coordinates array (i.e. if the Billboard::setTexcoordIndex() method has been called for this instance).
setTexcoordIndex() sets which texture coordinate rect this billboard will use when rendering.
The parent billboard set may contain more than one, in which case a billboard can be textured with different pieces of a larger texture sheet very efficiently.
getTexcoordIndex() returns the previous value set by setTexcoordIndex().
The default value is 0, which is always a valid texture coordinate set.
This value is useful only when isUseTexcoordRect return false.
sets the individual texture coordinate rect of this billboard will use when rendering.
The parent billboard set may contain more than one, in which case a billboard can be textured with different pieces of a larger texture sheet very efficiently.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References setTexcoordRect().
Referenced by setTexcoordRect().
getTexcoordRect() returns the previous value set by setTexcoordRect().
This value is useful only when isUseTexcoordRect returns true.
Vector3 Ogre::Billboard::mPosition |
Vector3 Ogre::Billboard::mDirection |
Normalised direction vector.
RGBA Ogre::Billboard::mColour |
Radian Ogre::Billboard::mRotation |