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

Public Member Functions

 Shoot (uint plant_ID, int shoot_ID, int parent_shoot_ID, uint parent_node, uint parent_petiole_index, uint rank, const helios::vec3 &shoot_base_position, const AxisRotation &shoot_base_rotation, uint current_node_number, float internode_length_shoot_initial, ShootParameters &shoot_params, std::string shoot_type_label, PlantArchitecture *plant_architecture_ptr)
 Constructor.
 
void buildShootPhytomers (float internode_radius, float internode_length, float internode_length_scale_factor_fraction, float leaf_scale_factor_fraction, float radius_taper)
 Constructs and appends shoot phytomers to the shoot structure.
 
int appendPhytomer (float internode_radius, float internode_length_max, float internode_length_scale_factor_fraction, float leaf_scale_factor_fraction, const PhytomerParameters &phytomer_parameters)
 Append a phytomer at the shoot apex.
 
std::string sampleChildShootType () const
 Randomly sample the type of a child shoot based on the probabilities defined in the shoot parameters.
 
bool sampleVegetativeBudBreak (uint node_index) const
 Randomly sample whether a vegetative bud should break into a new shoot.
 
bool sampleVegetativeBudBreak_carb (uint node_index) const
 
uint sampleEpicormicShoot (float dt, std::vector< float > &epicormic_positions_fraction) const
 Randomly sample whether the shoot should produce an epicormic shoot (water sprout) over timestep.
 
void terminateApicalBud ()
 Terminates the apical bud of the shoot. This function marks the apical meristem of the shoot as no longer alive.
 
void terminateAxillaryVegetativeBuds ()
 Terminates all axillary vegetative buds within the shoot. This function iterates through all phytomers of the current shoot and marks the axillary vegetative buds as no longer alive.
 
void addTerminalFloralBud ()
 Adds terminal floral buds to the shoot. This function creates and initializes a specified number of terminal floral buds at the apex of the shoot. Each bud is assigned its position, rotation, and bending axis, based on the shoot's parameters.
 
float calculateShootInternodeVolume () const
 Calculates the total volume of the shoot's internode tubes. This function iterates through all phytomers of the shoot and sums the volume of the internode tube objects if they exist.
 
float calculateShootLength () const
 Calculates the total length of the shoot. This function iterates through all phytomers in the shoot and sums their internode lengths.
 
helios::vec3 getShootAxisVector (float shoot_fraction) const
 Determines the shoot axis vector based on a specified fraction along the shoot's length.
 
float sumShootLeafArea (uint start_node_index=0) const
 Calculates the total leaf area of a shoot starting from a given node index.
 
float sumChildVolume (uint start_node_index=0) const
 Calculates the total volume of all child shoots starting from a specified node index.
 
void propagateDownstreamLeafArea (const Shoot *shoot, uint node_index, float leaf_area)
 Propagates the given leaf area downstream through the specified shoot.
 
void updateShootNodes (bool update_context_geometry=true)
 Updates the shoot node positions and their associated geometries.
 
void breakDormancy ()
 
void makeDormant ()
 

Data Fields

uint current_node_number = 0
 
uint nodes_this_season = 0
 
helios::vec3 base_position
 
AxisRotation base_rotation
 
helios::vec3 radial_outward_axis
 
const int ID
 
const int parent_shoot_ID
 
const uint plantID
 
const uint parent_node_index
 
const uint rank
 
const uint parent_petiole_index
 
float carbohydrate_pool_molC = 0
 
float old_shoot_volume = 0
 
float phyllochron_increase = 5
 
float phyllochron_recovery = phyllochron_increase
 
float days_with_negative_carbon_balance = 0
 
bool isdormant
 
uint dormancy_cycles = 0
 
bool meristem_is_alive = true
 
float phyllochron_counter = 0
 
float phyllochron_min = 6.f
 
float elongation_max = 0.25
 
float curvature_perturbation = 0
 
float yaw_perturbation = 0
 
float gravitropic_curvature = 0
 
const float internode_length_max_shoot_initial
 
uint internode_tube_objID = 4294967294
 
std::vector< std::vector< helios::vec3 > > shoot_internode_vertices
 
std::vector< std::vector< float > > shoot_internode_radii
 
bool build_context_geometry_internode = true
 
std::map< int, std::vector< int > > childIDs
 
ShootParameters shoot_parameters
 
std::string shoot_type_label
 
float phyllochron_instantaneous
 
float elongation_rate_instantaneous
 
std::vector< std::shared_ptr< Phytomer > > phytomers
 
PlantArchitectureplantarchitecture_ptr
 
helios::Contextcontext_ptr
 

Detailed Description

Definition at line 1380 of file PlantArchitecture.h.

Constructor & Destructor Documentation

◆ Shoot()

Shoot::Shoot ( uint  plant_ID,
int  shoot_ID,
int  parent_shoot_ID,
uint  parent_node,
uint  parent_petiole_index,
uint  rank,
const helios::vec3 shoot_base_position,
const AxisRotation shoot_base_rotation,
uint  current_node_number,
float  internode_length_shoot_initial,
ShootParameters shoot_params,
std::string  shoot_type_label,
PlantArchitecture plant_architecture_ptr 
)

Constructor.

Definition at line 2636 of file PlantArchitecture.cpp.

Member Function Documentation

◆ addTerminalFloralBud()

void Shoot::addTerminalFloralBud ( )

Adds terminal floral buds to the shoot. This function creates and initializes a specified number of terminal floral buds at the apex of the shoot. Each bud is assigned its position, rotation, and bending axis, based on the shoot's parameters.

Note
The number of floral buds is determined by the "max_terminal_floral_buds" parameter in the shoot's configuration, and the parameter is resampled after creating the buds.

Definition at line 1189 of file PlantArchitecture.cpp.

◆ appendPhytomer()

int Shoot::appendPhytomer ( float  internode_radius,
float  internode_length_max,
float  internode_length_scale_factor_fraction,
float  leaf_scale_factor_fraction,
const PhytomerParameters phytomer_parameters 
)

Append a phytomer at the shoot apex.

Parameters
[in]internode_radiusInitial radius of the internode
[in]internode_length_maxMaximum length of the internode
[in]internode_length_scale_factor_fractionFraction of the total fully-elongated internode length
[in]leaf_scale_factor_fractionFraction of the total fully-elongated leaf scale factor (i.e., =1 for fully-elongated leaf)
Returns
Number of phytomers in the shoot after the new phytomer is appended

Definition at line 959 of file PlantArchitecture.cpp.

◆ breakDormancy()

void Shoot::breakDormancy ( )

Definition at line 1099 of file PlantArchitecture.cpp.

◆ buildShootPhytomers()

void Shoot::buildShootPhytomers ( float  internode_radius,
float  internode_length,
float  internode_length_scale_factor_fraction,
float  leaf_scale_factor_fraction,
float  radius_taper 
)

Constructs and appends shoot phytomers to the shoot structure.

Parameters
[in]internode_radiusInitial radius of the phytomer internode.
[in]internode_lengthLength of the internode for each phytomer.
[in]internode_length_scale_factor_fractionFraction to scale the internode length.
[in]leaf_scale_factor_fractionFraction to scale the leaf size.
[in]radius_taperDegree of tapering applied to reduce the internode radius along the shoot.

Definition at line 2653 of file PlantArchitecture.cpp.

◆ calculateShootInternodeVolume()

float Shoot::calculateShootInternodeVolume ( ) const

Calculates the total volume of the shoot's internode tubes. This function iterates through all phytomers of the shoot and sums the volume of the internode tube objects if they exist.

Returns
The total volume of the shoot's internode tubes.

Definition at line 1212 of file PlantArchitecture.cpp.

◆ calculateShootLength()

float Shoot::calculateShootLength ( ) const

Calculates the total length of the shoot. This function iterates through all phytomers in the shoot and sums their internode lengths.

Returns
Total length of the shoot.

Definition at line 1222 of file PlantArchitecture.cpp.

◆ getShootAxisVector()

helios::vec3 Shoot::getShootAxisVector ( float  shoot_fraction) const

Determines the shoot axis vector based on a specified fraction along the shoot's length.

Parameters
[in]shoot_fractionA float value representing the fraction along the shoot's length (0 to 1).
Returns
A vec3 representing the direction vector of the shoot axis for the computed position.
Note
The shoot_fraction parameter is clamped within the range of 0 to 1, with 0 corresponding to the base and 1 to the tip of the shoot. The function uses the closest phytomer's internode axis vector for calculation.

Definition at line 1277 of file PlantArchitecture.cpp.

◆ makeDormant()

void Shoot::makeDormant ( )

Definition at line 1142 of file PlantArchitecture.cpp.

◆ propagateDownstreamLeafArea()

void Shoot::propagateDownstreamLeafArea ( const Shoot shoot,
uint  node_index,
float  leaf_area 
)

Propagates the given leaf area downstream through the specified shoot.

Parameters
[in]shootPointer to the shoot through which leaf area is propagated
[in]node_indexIndex of the node to start propagation from
[in]leaf_areaLeaf area to add downstream

Definition at line 1290 of file PlantArchitecture.cpp.

◆ sampleChildShootType()

std::string Shoot::sampleChildShootType ( ) const

Randomly sample the type of a child shoot based on the probabilities defined in the shoot parameters.

Returns
Label of the randomly selected child shoot type.

Definition at line 2667 of file PlantArchitecture.cpp.

◆ sampleEpicormicShoot()

uint Shoot::sampleEpicormicShoot ( float  dt,
std::vector< float > &  epicormic_positions_fraction 
) const

Randomly sample whether the shoot should produce an epicormic shoot (water sprout) over timestep.

Parameters
[in]dtTime step in days
[out]epicormic_positions_fractionVector of fractions of the shoot's length where epicormic shoots will be produced
Returns
Number of epicormic shoots to be produced; position of the epicormic shoot as a fraction of the shoot's length

Definition at line 2736 of file PlantArchitecture.cpp.

◆ sampleVegetativeBudBreak()

bool Shoot::sampleVegetativeBudBreak ( uint  node_index) const

Randomly sample whether a vegetative bud should break into a new shoot.

Parameters
[in]node_indexIndex of the node along the shoot
Returns
True if the vegetative bud should break into a new shoot

Definition at line 2703 of file PlantArchitecture.cpp.

◆ sampleVegetativeBudBreak_carb()

bool Shoot::sampleVegetativeBudBreak_carb ( uint  node_index) const

Definition at line 528 of file CarbohydrateModel.cpp.

◆ sumChildVolume()

float Shoot::sumChildVolume ( uint  start_node_index = 0) const

Calculates the total volume of all child shoots starting from a specified node index.

Parameters
[in]start_node_indexThe starting index of the node from which to sum child volumes.
Returns
The total volume of all child shoots starting from the given node index.
Note
Throws an error if start_node_index is out of range.

Definition at line 1332 of file PlantArchitecture.cpp.

◆ sumShootLeafArea()

float Shoot::sumShootLeafArea ( uint  start_node_index = 0) const

Calculates the total leaf area of a shoot starting from a given node index.

Parameters
[in]start_node_index[optional] The index of the starting node in the shoot.
Returns
Total leaf area of the shoot and its child shoots starting from the given node.
Note
Throws an error if the start_node_index is out of range.

Definition at line 1302 of file PlantArchitecture.cpp.

◆ terminateApicalBud()

void Shoot::terminateApicalBud ( )

Terminates the apical bud of the shoot. This function marks the apical meristem of the shoot as no longer alive.

Definition at line 1174 of file PlantArchitecture.cpp.

◆ terminateAxillaryVegetativeBuds()

void Shoot::terminateAxillaryVegetativeBuds ( )

Terminates all axillary vegetative buds within the shoot. This function iterates through all phytomers of the current shoot and marks the axillary vegetative buds as no longer alive.

Definition at line 1179 of file PlantArchitecture.cpp.

◆ updateShootNodes()

void Shoot::updateShootNodes ( bool  update_context_geometry = true)

Updates the shoot node positions and their associated geometries.

Parameters
[in]update_context_geometryIndicates whether the geometry context should be updated for the shoot nodes.

Definition at line 1230 of file PlantArchitecture.cpp.

Field Documentation

◆ base_position

helios::vec3 Shoot::base_position

Definition at line 1508 of file PlantArchitecture.h.

◆ base_rotation

AxisRotation Shoot::base_rotation

Definition at line 1509 of file PlantArchitecture.h.

◆ build_context_geometry_internode

bool Shoot::build_context_geometry_internode = true

Definition at line 1551 of file PlantArchitecture.h.

◆ carbohydrate_pool_molC

float Shoot::carbohydrate_pool_molC = 0

Definition at line 1519 of file PlantArchitecture.h.

◆ childIDs

std::map<int, std::vector<int> > Shoot::childIDs

Definition at line 1554 of file PlantArchitecture.h.

◆ context_ptr

helios::Context* Shoot::context_ptr

Definition at line 1567 of file PlantArchitecture.h.

◆ current_node_number

uint Shoot::current_node_number = 0

Definition at line 1505 of file PlantArchitecture.h.

◆ curvature_perturbation

float Shoot::curvature_perturbation = 0

Definition at line 1539 of file PlantArchitecture.h.

◆ days_with_negative_carbon_balance

float Shoot::days_with_negative_carbon_balance = 0

Definition at line 1525 of file PlantArchitecture.h.

◆ dormancy_cycles

uint Shoot::dormancy_cycles = 0

Definition at line 1531 of file PlantArchitecture.h.

◆ elongation_max

float Shoot::elongation_max = 0.25

Definition at line 1537 of file PlantArchitecture.h.

◆ elongation_rate_instantaneous

float Shoot::elongation_rate_instantaneous

Definition at line 1561 of file PlantArchitecture.h.

◆ gravitropic_curvature

float Shoot::gravitropic_curvature = 0

Definition at line 1542 of file PlantArchitecture.h.

◆ ID

const int Shoot::ID

Definition at line 1512 of file PlantArchitecture.h.

◆ internode_length_max_shoot_initial

const float Shoot::internode_length_max_shoot_initial

Definition at line 1544 of file PlantArchitecture.h.

◆ internode_tube_objID

uint Shoot::internode_tube_objID = 4294967294

Definition at line 1546 of file PlantArchitecture.h.

◆ isdormant

bool Shoot::isdormant

Definition at line 1530 of file PlantArchitecture.h.

◆ meristem_is_alive

bool Shoot::meristem_is_alive = true

Definition at line 1533 of file PlantArchitecture.h.

◆ nodes_this_season

uint Shoot::nodes_this_season = 0

Definition at line 1506 of file PlantArchitecture.h.

◆ old_shoot_volume

float Shoot::old_shoot_volume = 0

Definition at line 1520 of file PlantArchitecture.h.

◆ parent_node_index

const uint Shoot::parent_node_index

Definition at line 1515 of file PlantArchitecture.h.

◆ parent_petiole_index

const uint Shoot::parent_petiole_index

Definition at line 1517 of file PlantArchitecture.h.

◆ parent_shoot_ID

const int Shoot::parent_shoot_ID

Definition at line 1513 of file PlantArchitecture.h.

◆ phyllochron_counter

float Shoot::phyllochron_counter = 0

Definition at line 1535 of file PlantArchitecture.h.

◆ phyllochron_increase

float Shoot::phyllochron_increase = 5

Definition at line 1522 of file PlantArchitecture.h.

◆ phyllochron_instantaneous

float Shoot::phyllochron_instantaneous

Definition at line 1560 of file PlantArchitecture.h.

◆ phyllochron_min

float Shoot::phyllochron_min = 6.f

Definition at line 1536 of file PlantArchitecture.h.

◆ phyllochron_recovery

float Shoot::phyllochron_recovery = phyllochron_increase

Definition at line 1523 of file PlantArchitecture.h.

◆ phytomers

std::vector<std::shared_ptr<Phytomer> > Shoot::phytomers

Definition at line 1563 of file PlantArchitecture.h.

◆ plantarchitecture_ptr

PlantArchitecture* Shoot::plantarchitecture_ptr

Definition at line 1565 of file PlantArchitecture.h.

◆ plantID

const uint Shoot::plantID

Definition at line 1514 of file PlantArchitecture.h.

◆ radial_outward_axis

helios::vec3 Shoot::radial_outward_axis

Definition at line 1510 of file PlantArchitecture.h.

◆ rank

const uint Shoot::rank

Definition at line 1516 of file PlantArchitecture.h.

◆ shoot_internode_radii

std::vector<std::vector<float> > Shoot::shoot_internode_radii

Definition at line 1549 of file PlantArchitecture.h.

◆ shoot_internode_vertices

std::vector<std::vector<helios::vec3> > Shoot::shoot_internode_vertices

Definition at line 1548 of file PlantArchitecture.h.

◆ shoot_parameters

ShootParameters Shoot::shoot_parameters

Definition at line 1556 of file PlantArchitecture.h.

◆ shoot_type_label

std::string Shoot::shoot_type_label

Definition at line 1558 of file PlantArchitecture.h.

◆ yaw_perturbation

float Shoot::yaw_perturbation = 0

Definition at line 1540 of file PlantArchitecture.h.


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