Cafu Engine
TreeT Class Reference

Describes a renderable tree. More...

#include "Tree.hpp"

Public Member Functions

 TreeT ()
 Default-Constructor. More...
 
 TreeT (const PlantDescriptionT *TD, unsigned long RandomSeed)
 Creates a tree. More...
 
void Draw () const
 Draws the tree. More...
 
const BoundingBox3fTGetTreeBounds () const
 Returns the trees bounding box. More...
 

Public Attributes

bool DrawLeaves
 When 'true', also the leaves are drawn. When 'false', the leaves are omitted from drawing. More...
 
bool UseRealBlendingForLeaves
 Determines if the leaves are drawn using real alpha blending, or only a simple alpha test. More...
 

Detailed Description

Describes a renderable tree.

The tree is created from a PlantDescriptionT using a random seed so it will be randomly created based on this plant description.

Constructor & Destructor Documentation

TreeT::TreeT ( )
inline

Default-Constructor.

Not really useful, but we need it in order to be able to store 'TreeT' objects in an 'ArrayT'.

TreeT::TreeT ( const PlantDescriptionT TD,
unsigned long  RandomSeed 
)

Creates a tree.

Parameters
TDThe plant description used as a template for this tree.
RandomSeedThe random seed used to create this tree. Using a different random seed for every tree object will result in different trees even if the same plant description is used.

Member Function Documentation

void TreeT::Draw ( ) const

Draws the tree.

Note that the tree is drawn at (0, 0, 0) in modelspace so you have to translate the matrix to the right position before drawing the tree.

const BoundingBox3fT& TreeT::GetTreeBounds ( ) const
inline

Returns the trees bounding box.

Member Data Documentation

bool TreeT::DrawLeaves

When 'true', also the leaves are drawn. When 'false', the leaves are omitted from drawing.

bool TreeT::UseRealBlendingForLeaves

Determines if the leaves are drawn using real alpha blending, or only a simple alpha test.


The documentation for this class was generated from the following files: