Cafu Engine
PlantDescriptionT::ProfileT Struct Reference

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

Detailed Description

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.

Member Enumeration Documentation

Contains different types of profiles that together with a parameter build up a ProfileT object.

Constructor & Destructor Documentation

PlantDescriptionT::ProfileT::ProfileT ( ProfileTypeT  ProfileType_ = Linear,
float  Parameter_ = 0.0 
)

Constructor: Creates a new profile.

Parameters
ProfileType_The type of this profile.
Parameter_The parameter used with this profile.

Member Function Documentation

float PlantDescriptionT::ProfileT::Compute ( float  p,
float  Value0,
float  Value1 
) const

According to this profile, this function computes the "transition value" between two values.

Parameters
pRelative 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).
Returns
Transition value at position p.

Member Data Documentation

float PlantDescriptionT::ProfileT::Parameter

The floating point parameter describing the profile.

ProfileTypeT PlantDescriptionT::ProfileT::ProfileType

The type of this profile.


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