#include <PhBackground.h>
Public Member Functions | |
PhBackground (PhSceneManager *s, PhTexture *t, PhColor c=PhColor(255, 255, 255), float d=-100.0f) | |
Constructor. | |
~PhBackground () | |
Destructor. | |
void | setColor (PhColor c) |
Set color function. | |
PhColor | getColor () |
Get color function. | |
void | setTexture (PhTexture *t) |
Set texture function. | |
PhTexture * | getTexture () |
Get texture function. | |
void | onPreRender () |
Overloaded onPreRender. | |
void | onRender () |
Overloaded onRender. | |
void | onPostRender () |
Overloaded onPostRender. | |
Protected Attributes | |
PhColor | color |
Color. | |
PhSceneManager * | smgr |
Scenemager. | |
PhTexture * | texture |
Texture. |
This class gives a simple scene node interface to draw a background that consists of a texture that is repeated over the whole screen.
phoenix::PhBackground::PhBackground | ( | PhSceneManager * | s, | |
PhTexture * | t, | |||
PhColor | c = PhColor(255, 255, 255) , |
|||
float | d = -100.0f | |||
) |
Constructor.
Builds the simple background scene node.
s | A pointer to the scene manger, required. | |
t | A pointer to the texture, required. | |
c | The color to colorize the texture with, defualts to (255,255,255). | |
d | The depth to be drawn at, defualts at -100.0f, but as long as it's beind all objects you should be fine. |
phoenix::PhBackground::~PhBackground | ( | ) |
Destructor.
Destructs the node, nothing to see here...
void phoenix::PhBackground::setColor | ( | PhColor | c | ) |
Set color function.
Sets the color used to colorize the texture.
c | The new color. |
PhColor phoenix::PhBackground::getColor | ( | ) |
Get color function.
Get the current color used to colorize the texture.
void phoenix::PhBackground::setTexture | ( | PhTexture * | t | ) |
Set texture function.
Sets the texture used by this node.
t | The new texture. |
PhTexture* phoenix::PhBackground::getTexture | ( | ) |
Get texture function.
Gets the current texture used by this node.
void phoenix::PhBackground::onPreRender | ( | ) | [virtual] |
Overloaded onPreRender.
Simply registers the node for rendering, as prescribed in PhSceneNode.
Reimplemented from phoenix::PhSceneNode.
void phoenix::PhBackground::onRender | ( | ) | [virtual] |
Overloaded onRender.
This draws the background using VBOs with the current texture and color.
Reimplemented from phoenix::PhSceneNode.
void phoenix::PhBackground::onPostRender | ( | ) | [virtual] |
Overloaded onPostRender.
Blank overload of PhSceneNode::onPostRender(), this class does not need to do anything after it draws.
Reimplemented from phoenix::PhSceneNode.
PhColor phoenix::PhBackground::color [protected] |
Color.
Colorizes the texture, default is (255,255,255).
PhSceneManager* phoenix::PhBackground::smgr [protected] |
Scenemager.
Pointer to the scenemanger, this is required by all scene nodes.
PhTexture* phoenix::PhBackground::texture [protected] |