1.3.49
 
Loading...
Searching...
No Matches
LeafPrototype Struct Reference

Public Member Functions

 LeafPrototype (std::minstd_rand0 *generator)
 Constructor - sets random number generator.
 
 LeafPrototype ()=default
 Constructor - does not set random number generator.
 
void duplicate (const LeafPrototype &a)
 
LeafPrototypeoperator= (const LeafPrototype &a)
 Assignment operator.
 
void sampleIdentifier ()
 

Data Fields

uint(* prototype_function )(helios::Context *, LeafPrototype *prototype_parameters, int compound_leaf_index) = nullptr
 Custom prototype function for creating leaf prototypes.
 
std::string OBJ_model_file
 OBJ model file to load for the leaf.
 
std::map< int, std::string > leaf_texture_file
 Image texture file for the leaf.
 
RandomParameter_float leaf_aspect_ratio
 
RandomParameter_float midrib_fold_fraction
 Fraction of folding along the leaf midrib. =0 means leaf is flat, =1 means leaf is completely folded in half along midrib.
 
RandomParameter_float longitudinal_curvature
 Leaf curvature factor along the longitudinal/length (x-direction). (+curves upward, -curved downward)
 
RandomParameter_float lateral_curvature
 Leaf curvature factor along the lateral/width (y-direction). (+curves upward, -curved downward)
 
RandomParameter_float petiole_roll
 Creates a rolling at the leaf where the petiole attaches to the leaf blade.
 
RandomParameter_float wave_period
 Period factor of leaf waves (sets how many waves there are along the leaf length)
 
RandomParameter_float wave_amplitude
 Amplitude of leaf waves (sets the height of leaf waves)
 
RandomParameter_float leaf_buckle_length
 Fraction of the leaf length where the leaf buckles under its weight.
 
RandomParameter_float leaf_buckle_angle
 Angle of the leaf buckle (degrees)
 
helios::vec3 leaf_offset
 Amount to shift the leaf.
 
uint subdivisions = 1
 Leaf subdivision count in each direction.
 
uint unique_prototypes = 1
 Number of unique prototypes to generate.
 
bool build_petiolule = false
 Add a petiolule to the base of the leaflet.
 
uint unique_prototype_identifier = 0
 

Detailed Description

Definition at line 379 of file PlantArchitecture.h.

Constructor & Destructor Documentation

◆ LeafPrototype()

LeafPrototype::LeafPrototype ( std::minstd_rand0 *  generator)
explicit

Constructor - sets random number generator.

Definition at line 118 of file PlantArchitecture.cpp.

Member Function Documentation

◆ duplicate()

void LeafPrototype::duplicate ( const LeafPrototype a)
inline

Definition at line 443 of file PlantArchitecture.h.

◆ operator=()

LeafPrototype & LeafPrototype::operator= ( const LeafPrototype a)
inline

Assignment operator.

Definition at line 465 of file PlantArchitecture.h.

◆ sampleIdentifier()

void LeafPrototype::sampleIdentifier ( )
inline

Definition at line 501 of file PlantArchitecture.h.

Field Documentation

◆ build_petiolule

bool LeafPrototype::build_petiolule = false

Add a petiolule to the base of the leaflet.

Definition at line 439 of file PlantArchitecture.h.

◆ lateral_curvature

RandomParameter_float LeafPrototype::lateral_curvature

Leaf curvature factor along the lateral/width (y-direction). (+curves upward, -curved downward)

Definition at line 412 of file PlantArchitecture.h.

◆ leaf_aspect_ratio

RandomParameter_float LeafPrototype::leaf_aspect_ratio

Definition at line 403 of file PlantArchitecture.h.

◆ leaf_buckle_angle

RandomParameter_float LeafPrototype::leaf_buckle_angle

Angle of the leaf buckle (degrees)

Definition at line 427 of file PlantArchitecture.h.

◆ leaf_buckle_length

RandomParameter_float LeafPrototype::leaf_buckle_length

Fraction of the leaf length where the leaf buckles under its weight.

Definition at line 425 of file PlantArchitecture.h.

◆ leaf_offset

helios::vec3 LeafPrototype::leaf_offset

Amount to shift the leaf.

Definition at line 430 of file PlantArchitecture.h.

◆ leaf_texture_file

std::map<int, std::string> LeafPrototype::leaf_texture_file

Image texture file for the leaf.

Note
Key is the index of the compound leaf (=0 is the tip leaf, <0 increases down left side of the leaflet, >0 increases down the right side of the leaflet), value is the texture file.

Definition at line 400 of file PlantArchitecture.h.

◆ longitudinal_curvature

RandomParameter_float LeafPrototype::longitudinal_curvature

Leaf curvature factor along the longitudinal/length (x-direction). (+curves upward, -curved downward)

Definition at line 410 of file PlantArchitecture.h.

◆ midrib_fold_fraction

RandomParameter_float LeafPrototype::midrib_fold_fraction

Fraction of folding along the leaf midrib. =0 means leaf is flat, =1 means leaf is completely folded in half along midrib.

Definition at line 406 of file PlantArchitecture.h.

◆ OBJ_model_file

std::string LeafPrototype::OBJ_model_file

OBJ model file to load for the leaf.

Note
If this is set, the leaf will be loaded from the OBJ file and the other leaf parameters will be ignored.

Definition at line 394 of file PlantArchitecture.h.

◆ petiole_roll

RandomParameter_float LeafPrototype::petiole_roll

Creates a rolling at the leaf where the petiole attaches to the leaf blade.

Definition at line 415 of file PlantArchitecture.h.

◆ prototype_function

uint(* LeafPrototype::prototype_function) (helios::Context *, LeafPrototype *prototype_parameters, int compound_leaf_index) = nullptr

Custom prototype function for creating leaf prototypes.

Definition at line 388 of file PlantArchitecture.h.

◆ subdivisions

uint LeafPrototype::subdivisions = 1

Leaf subdivision count in each direction.

Definition at line 433 of file PlantArchitecture.h.

◆ unique_prototype_identifier

uint LeafPrototype::unique_prototype_identifier = 0

Definition at line 441 of file PlantArchitecture.h.

◆ unique_prototypes

uint LeafPrototype::unique_prototypes = 1

Number of unique prototypes to generate.

Definition at line 436 of file PlantArchitecture.h.

◆ wave_amplitude

RandomParameter_float LeafPrototype::wave_amplitude

Amplitude of leaf waves (sets the height of leaf waves)

Definition at line 421 of file PlantArchitecture.h.

◆ wave_period

RandomParameter_float LeafPrototype::wave_period

Period factor of leaf waves (sets how many waves there are along the leaf length)

Definition at line 419 of file PlantArchitecture.h.


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