Cafu Engine
PlantDescriptionT Struct Reference

Contains a plant description that has all the information needed to create a plant. More...

#include "PlantDescription.hpp"

Classes

struct  BranchLevelDescriptionT
 This struct contains a description for an individual branch level. More...
 
struct  ProfileT
 This struct describes a "profile". More...
 

Public Member Functions

 PlantDescriptionT (const std::string &FileName_)
 Constructor. More...
 
 ~PlantDescriptionT ()
 Destructor. More...
 
 PlantDescriptionT (TextParserT &TP, const std::string &FileName_)
 Constructor: Creates a tree description from a text parser. More...
 

Public Attributes

const std::string FileName
 Name of the file this plant description is stored in. More...
 
unsigned long RandomSeed
 Seed for the random number generator. More...
 
float Size
 Height in meters (or any other arbitrary unit). More...
 
float SizeV
 Variance of the height in meters (or any other arbitrary unit). More...
 
MaterialTBarkMat
 Material used for the bark of this tree. More...
 
MatSys::RenderMaterialTBarkRenderMat
 Render material used for the bark of this tree. More...
 
ArrayT< BranchLevelDescriptionTBranchLevelDescriptions
 The list of branch level descriptions. More...
 
float Distance0
 Radial distance (in m) of leaf attachment point from parent branch, when attached at parents root ( 0%). More...
 
float Distance1
 Radial distance (in m) of leaf attachment point from parent branch, when attached at parents tip (100%). More...
 
float DistanceV
 Variance of the radial distance (in meters). More...
 
ProfileT DistanceProfile
 Transition function from Distance0 to Distance1 across our "point of attachment" at the parent. More...
 
ArrayT< MaterialT * > LeafMats
 Materials of all leaves. More...
 
ArrayT< MatSys::RenderMaterialT * > LeafRenderMats
 Render materials of all leaves. More...
 
float LeafSize
 The size of the leaf polygons relative to (in % of) 'Size'. More...
 

Detailed Description

Contains a plant description that has all the information needed to create a plant.

Using a random seed for plant creation this description is used as a template that is randomly modified to create multiple different plants from the same plant description. The plant description is loaded from a file and always associated with this file.

Constructor & Destructor Documentation

PlantDescriptionT::PlantDescriptionT ( const std::string &  FileName_)
inline

Constructor.

Creates an "empty" tree description. Those who really want to can use this constructor to fill-in the PlantDescriptionT fields programmatically (instead of using any of the other constructors, which is preferred).

Parameters
FileName_The dummy file name of this plant description.
PlantDescriptionT::~PlantDescriptionT ( )

Destructor.

PlantDescriptionT::PlantDescriptionT ( TextParserT TP,
const std::string &  FileName_ 
)

Constructor: Creates a tree description from a text parser.

Parameters
TPThe text parser containing the data to create this tree description from.
FileName_The name of the file this plant description is created from.

Member Data Documentation

MaterialT* PlantDescriptionT::BarkMat

Material used for the bark of this tree.

MatSys::RenderMaterialT* PlantDescriptionT::BarkRenderMat

Render material used for the bark of this tree.

ArrayT<BranchLevelDescriptionT> PlantDescriptionT::BranchLevelDescriptions

The list of branch level descriptions.

float PlantDescriptionT::Distance0

Radial distance (in m) of leaf attachment point from parent branch, when attached at parents root ( 0%).

float PlantDescriptionT::Distance1

Radial distance (in m) of leaf attachment point from parent branch, when attached at parents tip (100%).

ProfileT PlantDescriptionT::DistanceProfile

Transition function from Distance0 to Distance1 across our "point of attachment" at the parent.

float PlantDescriptionT::DistanceV

Variance of the radial distance (in meters).

const std::string PlantDescriptionT::FileName

Name of the file this plant description is stored in.

ArrayT<MaterialT*> PlantDescriptionT::LeafMats

Materials of all leaves.

ArrayT<MatSys::RenderMaterialT*> PlantDescriptionT::LeafRenderMats

Render materials of all leaves.

float PlantDescriptionT::LeafSize

The size of the leaf polygons relative to (in % of) 'Size'.

unsigned long PlantDescriptionT::RandomSeed

Seed for the random number generator.

float PlantDescriptionT::Size

Height in meters (or any other arbitrary unit).

float PlantDescriptionT::SizeV

Variance of the height in meters (or any other arbitrary unit).


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