7 #ifndef CAFU_TREE_DESCRIPTION_HPP_INCLUDED
8 #define CAFU_TREE_DESCRIPTION_HPP_INCLUDED
10 #include "Templates/Array.hpp"
16 namespace MatSys {
class RenderMaterialT; }
32 enum ProfileTypeT { Linear, LinearDroop, InvLinear, InvLinearRamp, ConstantAvg, Round };
48 float Compute(
float p,
float Value0,
float Value1)
const;
float StartAngle1
Our start angle at the parent, when we are attached at the tip (100%) of our parent branch...
Definition: PlantDescription.hpp:61
float Distance0
Radial distance (in m) of leaf attachment point from parent branch, when attached at parents root ( 0...
Definition: PlantDescription.hpp:105
This class represents a surface render material.
Definition: RenderMaterial.hpp:25
ProfileT RadiusProfile_Segments
Radius profile across segments ("thickness" along the length)
Definition: PlantDescription.hpp:73
ProfileT AngleProfile_Segments
Angle profile across segments (together with Gravity, this rules the shape along the length) ...
Definition: PlantDescription.hpp:72
This struct describes a "profile".
Definition: PlantDescription.hpp:28
float StartAngleV
Variance of our start angle at the parent.
Definition: PlantDescription.hpp:62
float DistanceV
Variance of the radial distance (in meters).
Definition: PlantDescription.hpp:107
ProfileT DistanceProfile
Transition function from Distance0 to Distance1 across our "point of attachment" at the parent...
Definition: PlantDescription.hpp:108
float Length1
Our length (in % of global size), when we are attached at the tip (100%) of our parent branch...
Definition: PlantDescription.hpp:56
float Distance1
Radial distance (in m) of leaf attachment point from parent branch, when attached at parents tip (100...
Definition: PlantDescription.hpp:106
MatSys::RenderMaterialT * BarkRenderMat
Render material used for the bark of this tree.
Definition: PlantDescription.hpp:90
unsigned long RandomSeed
Seed for the random number generator.
Definition: PlantDescription.hpp:86
MaterialT * BarkMat
Material used for the bark of this tree.
Definition: PlantDescription.hpp:89
float StartAngle0
Our start angle at the parent, when we are attached at the root ( 0%) of our parent branch...
Definition: PlantDescription.hpp:60
ProfileT(ProfileTypeT ProfileType_=Linear, float Parameter_=0.0)
Constructor: Creates a new profile.
Definition: PlantDescription.cpp:17
ProfileTypeT ProfileType
The type of this profile.
Definition: PlantDescription.hpp:34
PlantDescriptionT(const std::string &FileName_)
Constructor.
Definition: PlantDescription.hpp:119
Contains a plant description that has all the information needed to create a plant.
Definition: PlantDescription.hpp:23
ArrayT< BranchLevelDescriptionT > BranchLevelDescriptions
The list of branch level descriptions.
Definition: PlantDescription.hpp:97
This class represents a surface material ("A datastructural representation of a scripts material def...
Definition: Material.hpp:22
ProfileTypeT
Contains different types of profiles that together with a parameter build up a ProfileT object...
Definition: PlantDescription.hpp:32
float LastChild
Max. distance (in %) of our children (sub-branches or leaves) from our root.
Definition: PlantDescription.hpp:76
float Length0
Our length (in % of global size), when we are attached at the root ( 0%) of our parent branch...
Definition: PlantDescription.hpp:55
float Radius1
Our radius (at our root, in % of global size), when we are attached at the tip (100%) of our parent b...
Definition: PlantDescription.hpp:66
float FirstChild
Min. distance (in %) of our children (sub-branches or leaves) from our root.
Definition: PlantDescription.hpp:75
const std::string FileName
Name of the file this plant description is stored in.
Definition: PlantDescription.hpp:85
float LeafSize
The size of the leaf polygons relative to (in % of) 'Size'.
Definition: PlantDescription.hpp:112
ProfileT LengthProfile
Transition function from Length0 to Length1 across our "point of attachment" at our parent...
Definition: PlantDescription.hpp:58
float RadiusV
Variance of our radius (at our root, in % of global size)
Definition: PlantDescription.hpp:67
unsigned long NrOfSegments
Number of segments of this parent.
Definition: PlantDescription.hpp:70
This struct contains a description for an individual branch level.
Definition: PlantDescription.hpp:53
float Parameter
The floating point parameter describing the profile.
Definition: PlantDescription.hpp:35
ProfileT RadiusProfile
Transition function from Radius0 to Radius1 across our "point of attachment" at our parent...
Definition: PlantDescription.hpp:68
float Compute(float p, float Value0, float Value1) const
According to this profile, this function computes the "transition value" between two values...
Definition: PlantDescription.cpp:22
float SizeV
Variance of the height in meters (or any other arbitrary unit).
Definition: PlantDescription.hpp:88
float Size
Height in meters (or any other arbitrary unit).
Definition: PlantDescription.hpp:87
float Radius0
Our radius (at our root, in % of global size), when we are attached at the root ( 0%) of our parent b...
Definition: PlantDescription.hpp:65
ProfileT StartAngleProfile
Transition function from StartAngle0 to StartAngle1 across our "point of attachment" at our parent...
Definition: PlantDescription.hpp:63
unsigned long CrossSectionsResolution
Number of vertices of the cross-sections of the branches of this level.
Definition: PlantDescription.hpp:71
float NrOfChildren
Number of our children per unit length (???)
Definition: PlantDescription.hpp:77
ArrayT< MatSys::RenderMaterialT * > LeafRenderMats
Render materials of all leaves.
Definition: PlantDescription.hpp:111
ArrayT< MaterialT * > LeafMats
Materials of all leaves.
Definition: PlantDescription.hpp:110
float LengthV
Variance of our length (in % of global size)
Definition: PlantDescription.hpp:57
~PlantDescriptionT()
Destructor.
Definition: PlantDescription.cpp:359
Definition: Renderer.hpp:16
This is a class for parsing text.
Definition: TextParser.hpp:21