Skip to content

Commit

Permalink
[1.3.18] 2024-08-28
Browse files Browse the repository at this point in the history
*Context*
- Added parse_vec2 and parse_vec3 functions in global.h/global.cpp to parse vec2 and vec3 from a string.
- Added parse_xml_node_[*] functions in global.h/global.cpp to parse XML nodes of different types.
- Added the capability to calculate the volume of closed compound objects.
- Added the capability to hide primitives and objects within the Context such that they won't be visualized or used in plug-in calculations.
- Many performance improvements in the Context.

*Radiation*
- Added warning if users add more than one sun source.

*Plant Architecture*
- Changed name and behavior of shoot parameters: "insertion_angle_tip", "insertion_angle_decay_rate", "internode_length_max", "internode_length_min", "internode_length_decay_rate" (previously "child_insertion_angle_tip", "child_insertion_angle_decay_rate", "child_internode_length_max", "child_internode_length_min", "child_internode_length_decay_rate"). All of these parameters now apply to the shoot type corresponding to the ShootParameters structure and not the child.
- Added new phytomer parameter 'leaf.unique_prototypes', which controls copying of leaf prototypes to improve efficiency. By default, leaf.unique_prototypes = 1, which means that all leaves will look identical. Increase this value to increase random variation.
- Added Eastern redbud and asparagus models to the library.
- Base framework for carbohydrate model added. These methods were moved to src/CarbohydrateModel.cpp.

*Visualizer*
- There was an error in the case 'samples/visualizer' related to the sun position. Thanks to Jan Graefe for pointing this out.

*Energy Balance*
- Removed use of "evaporating_faces" input primitive data to specify whether the leaf is hypostomatous or amphistomatous. Instead, a more general version using 'stomatal_sidedness' was implemented which allows continuous variation in stomatal sidedness.

*Photosynthesis*
- Treatment of twosided_flag and stomatal sidedness in the moisture/CO2 conductance is now consistent with the energy balance model.
  • Loading branch information
bnbailey-psl committed Aug 29, 2024
1 parent 62c83b9 commit 7870796
Show file tree
Hide file tree
Showing 653 changed files with 38,926 additions and 33,357 deletions.
241 changes: 165 additions & 76 deletions core/include/Context.h

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions core/include/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,67 @@ namespace helios{
*/
bool parse_uint( const std::string &input_string, uint &converted_uint );

//! Convert a string into a vec2 with error checking
/**
* \param[in] input_string String to be converted to numerical value
* \param[out] converted_vec2 Output numerical value converted from input string
* \return True if conversion was successful, false if unsuccessful
*/
bool parse_vec2( const std::string &input_string, vec2 &converted_vec2 );

//! Convert a string into a vec3 with error checking
/**
* \param[in] input_string String to be converted to numerical value
* \param[out] converted_vec3 Output numerical value converted from input string
* \return True if conversion was successful, false if unsuccessful
*/
bool parse_vec3( const std::string &input_string, vec3 &converted_vec3 );

//! Parse an XML tag containing an integer value
/**
* \param[in] node XML node containing the tag
* \param[in] tag Name of the tag to be parsed
* \param[in] calling_function Name of the function calling this function (for error reporting). e.g., Context::loadXML
* \return Integer value of the tag
*/
int parse_xml_tag_int(const pugi::xml_node &node, const std::string &tag, const std::string &calling_function );

//! Parse an XML tag containing a float value
/**
* \param[in] node XML node containing the tag
* \param[in] tag Name of the tag to be parsed
* \param[in] calling_function Name of the function calling this function (for error reporting). e.g., Context::loadXML
* \return Float value of the tag
*/
float parse_xml_tag_float( const pugi::xml_node &node, const std::string &tag, const std::string &calling_function );

//! Parse an XML tag containing a vec2 value (i.e., two space delimited floats)
/**
* \param[in] node XML node containing the tag
* \param[in] tag Name of the tag to be parsed
* \param[in] calling_function Name of the function calling this function (for error reporting). e.g., Context::loadXML
* \return vec2 value of the tag
*/
vec2 parse_xml_tag_vec2( const pugi::xml_node &node, const std::string &tag, const std::string &calling_function );

//! Parse an XML tag containing a vec3 value (i.e., three space delimited floats)
/**
* \param[in] node XML node containing the tag
* \param[in] tag Name of the tag to be parsed
* \param[in] calling_function Name of the function calling this function (for error reporting). e.g., Context::loadXML
* \return vec3 value of the tag
*/
vec3 parse_xml_tag_vec3( const pugi::xml_node &node, const std::string &tag, const std::string &calling_function );

//! Parse an XML tag containing a string
/**
* \param[in] node XML node containing the tag
* \param[in] tag Name of the tag to be parsed
* \param[in] calling_function Name of the function calling this function (for error reporting). e.g., Context::loadXML
* \return String value of the tag
*/
std::string parse_xml_tag_string( const pugi::xml_node &node, const std::string &tag, const std::string &calling_function );

//! Convert a space-delimited string into an RGBcolor vector
/**
* \ingroup functions
Expand Down
Loading

0 comments on commit 7870796

Please sign in to comment.