This struct describes a "profile". More...
#include "PlantDescription.hpp"
Public Types | |
enum | ProfileTypeT { Linear, LinearDroop, InvLinear, InvLinearRamp, ConstantAvg, Round } |
Contains different types of profiles that together with a parameter build up a ProfileT object. More... | |
Public Member Functions | |
ProfileT (ProfileTypeT ProfileType_=Linear, float Parameter_=0.0) | |
Constructor: Creates a new profile. More... | |
float | Compute (float p, float Value0, float Value1) const |
According to this profile, this function computes the "transition value" between two values. More... | |
Public Attributes | |
ProfileTypeT | ProfileType |
The type of this profile. More... | |
float | Parameter |
The floating point parameter describing the profile. More... | |
This struct describes a "profile".
Examples include how the radius of a branch changes from its root to its tip, or how child branches are angled from the own root to the tip.
Contains different types of profiles that together with a parameter build up a ProfileT object.
PlantDescriptionT::ProfileT::ProfileT | ( | ProfileTypeT | ProfileType_ = Linear , |
float | Parameter_ = 0.0 |
||
) |
Constructor: Creates a new profile.
ProfileType_ | The type of this profile. |
Parameter_ | The parameter used with this profile. |
float PlantDescriptionT::ProfileT::Compute | ( | float | p, |
float | Value0, | ||
float | Value1 | ||
) | const |
According to this profile, this function computes the "transition value" between two values.
p | Relative position at which the transition value is computed (must be 0.0<=p<=1.0). |
Value0 | "left" Value (p=0.0). |
Value1 | "right" Value (p=1.0). |
float PlantDescriptionT::ProfileT::Parameter |
The floating point parameter describing the profile.
ProfileTypeT PlantDescriptionT::ProfileT::ProfileType |
The type of this profile.