phoenix::PhBackground Class Reference

Simple background implementation. More...

#include <PhBackground.h>

Inheritance diagram for phoenix::PhBackground:

phoenix::PhSceneNode

List of all members.

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.


Detailed Description

Simple background implementation.

This class gives a simple scene node interface to draw a background that consists of a texture that is repeated over the whole screen.

See also:
phoenix::PhSolidBackground, phoenix::PhSceneNode

Constructor & Destructor Documentation

phoenix::PhBackground::PhBackground ( PhSceneManager *  s,
PhTexture *  t,
PhColor  c = PhColor(255, 255, 255),
float  d = -100.0f 
)

Constructor.

Builds the simple background scene node.

Parameters:
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...


Member Function Documentation

void phoenix::PhBackground::setColor ( PhColor  c  ) 

Set color function.

Sets the color used to colorize the texture.

Parameters:
c The new color.

PhColor phoenix::PhBackground::getColor (  ) 

Get color function.

Get the current color used to colorize the texture.

Returns:
The current color.

void phoenix::PhBackground::setTexture ( PhTexture *  t  ) 

Set texture function.

Sets the texture used by this node.

Parameters:
t The new texture.

PhTexture* phoenix::PhBackground::getTexture (  ) 

Get texture function.

Gets the current texture used by this node.

Returns:
The current texture.

void phoenix::PhBackground::onPreRender (  )  [virtual]

Overloaded onPreRender.

Simply registers the node for rendering, as prescribed in PhSceneNode.

See also:
phoenix::PhSceneNode::onPreRender()

Reimplemented from phoenix::PhSceneNode.

void phoenix::PhBackground::onRender (  )  [virtual]

Overloaded onRender.

This draws the background using VBOs with the current texture and color.

See also:
phoenix::PhSceneNode::onRender()

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.

See also:
phoenix::PhSceneNode::onPostRender()

Reimplemented from phoenix::PhSceneNode.


Member Data Documentation

PhColor phoenix::PhBackground::color [protected]

Color.

Colorizes the texture, default is (255,255,255).

See also:
setColor(), getColor(), phoenix::PhColor

PhSceneManager* phoenix::PhBackground::smgr [protected]

Scenemager.

Pointer to the scenemanger, this is required by all scene nodes.

See also:
phoenix::PhSceneManager

PhTexture* phoenix::PhBackground::texture [protected]

Texture.

Pointer to the texture to fill the screen with.

See also:
phoenix::PhTexture


The documentation for this class was generated from the following file:
Generated on Tue Nov 20 21:59:24 2007 for Phoenix by  doxygen 1.5.4