1.3.49
 
Loading...
Searching...
No Matches
ProjectBuilder.h File Reference
#include <set>
#include "Context.h"

Go to the source code of this file.

Data Structures

union  digitPtr
 Digit pointer object; union of int* and float*. More...
 
struct  obj
 Struct to represent an object or canopy. More...
 
struct  taggedPtr
 Struct to combine int* and float* objects. Also contains a bool* which is used to indicate that the associated object needs to be updated. More...
 
union  distUnion
 Distribution union object; union of normal_distribution, uniform_real_distribution, and weibull_distribution. More...
 
struct  distribution
 Struct to combine distribution objects (flag: -1 = N/A, 0 = normal, 1 = uniform, 2 = weibull) (repeat: false = randomize once per recording, true = randomize for every image) More...
 
struct  bandGroup
 Band group struct. More...
 
struct  canopy
 Canopy struct. More...
 
struct  object
 Object struct. More...
 
struct  rig
 Rig struct. More...
 
class  ProjectBuilder
 

Functions

void BuildGeometry (const std::string &xml_input_file, PlantArchitecture *plant_architecture_ptr, helios::Context *context_ptr)
 
void InitializeRadiation (const std::string &xml_input_file, SolarPosition *solarposition_ptr, RadiationModel *radiation_ptr, helios::Context *context_ptr)
 
void InitializeEnergyBalance (const std::string &xml_input_file, BLConductanceModel *boundarylayerconductancemodel, EnergyBalanceModel *energybalancemodel, helios::Context *context_ptr)
 
void InitializeSimulation (const std::string &xml_input_file, helios::Context *context_ptr)
 
std::string vec_to_string (const helios::vec2 &v)
 Function to convert vector to string.
 
std::string vec_to_string (const helios::vec3 &v)
 Function to convert vector to string.
 
std::string vec_to_string (const helios::int2 &v)
 Function to convert vector to string.
 
std::vector< helios::vec3interpolate (const std::vector< int > &keypoints, const std::vector< helios::vec3 > &positions, int num_points)
 Function to return interpolated vector based on keypoints.
 
void toggle_button (const char *str_id, bool *v)
 ImGUI toggle button function.
 
std::string file_dialog ()
 Function to open file dialog.
 
std::string save_as_file_dialog (std::vector< std::string > extensions)
 Function to open save as file dialog.
 
std::vector< std::string > get_xml_node_values (const std::string &xml_file, const std::string &label_name, const std::string &node_name)
 Function to get node labels for a given set of nodes.
 
taggedPtr createTaggedPtr (int *ptr, bool *dirty)
 Function to create a tagged pointer object from an int pointer.
 
taggedPtr createTaggedPtr (float *ptr, bool *dirty)
 Function to create a tagged pointer object from a float pointer.
 
taggedPtr createTaggedPtr (int *ptr)
 Function to create a tagged pointer object from an int pointer.
 
taggedPtr createTaggedPtr (float *ptr)
 Function to create a tagged pointer object from a float pointer.
 
bool parse_distribution (const std::string &input_string, distribution &converted_distribution)
 
distribution createDistribution (const std::normal_distribution< float > &dist, bool randomize_repeat)
 Function to create a distribution struct from a normal distribution.
 
distribution createDistribution (const std::uniform_real_distribution< float > &dist, bool randomize_repeat)
 Function to create a distribution struct from a uniform real distribution.
 
distribution createDistribution (const std::weibull_distribution< float > &dist, bool randomize_repeat)
 Function to create a distribution struct from a weibull distribution.
 

Detailed Description

ProjectBuilder header.

Copyright (C) 2016-2025 Brian Bailey

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 2.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Definition in file ProjectBuilder.h.

Function Documentation

◆ createDistribution() [1/3]

distribution createDistribution ( const std::normal_distribution< float > &  dist,
bool  randomize_repeat 
)

Function to create a distribution struct from a normal distribution.

Parameters
[in]distDistribution
[in]randomize_repeatIf true, randomize for every image.

Definition at line 5569 of file ProjectBuilder.cpp.

◆ createDistribution() [2/3]

distribution createDistribution ( const std::uniform_real_distribution< float > &  dist,
bool  randomize_repeat 
)

Function to create a distribution struct from a uniform real distribution.

Parameters
[in]distDistribution
[in]randomize_repeatIf true, randomize for every image.

Definition at line 5577 of file ProjectBuilder.cpp.

◆ createDistribution() [3/3]

distribution createDistribution ( const std::weibull_distribution< float > &  dist,
bool  randomize_repeat 
)

Function to create a distribution struct from a weibull distribution.

Parameters
[in]distDistribution
[in]randomize_repeatIf true, randomize for every image.

Definition at line 5585 of file ProjectBuilder.cpp.

◆ createTaggedPtr() [1/4]

taggedPtr createTaggedPtr ( float *  ptr)

Function to create a tagged pointer object from a float pointer.

Parameters
[in]ptrFloat pointer

Definition at line 5537 of file ProjectBuilder.cpp.

◆ createTaggedPtr() [2/4]

taggedPtr createTaggedPtr ( float *  ptr,
bool *  dirty 
)

Function to create a tagged pointer object from a float pointer.

Parameters
[in]ptrFloat pointer
[in]dirtyBool used to determine if associated object needs update

Definition at line 5553 of file ProjectBuilder.cpp.

◆ createTaggedPtr() [3/4]

taggedPtr createTaggedPtr ( int *  ptr)

Function to create a tagged pointer object from an int pointer.

Parameters
[in]ptrInt pointer

Definition at line 5545 of file ProjectBuilder.cpp.

◆ createTaggedPtr() [4/4]

taggedPtr createTaggedPtr ( int *  ptr,
bool *  dirty 
)

Function to create a tagged pointer object from an int pointer.

Parameters
[in]ptrInt pointer
[in]dirtyBool used to determine if associated object needs update

Definition at line 5561 of file ProjectBuilder.cpp.

◆ file_dialog()

std::string file_dialog ( )

Function to open file dialog.

Definition at line 158 of file ProjectBuilder.cpp.

◆ get_xml_node_values()

std::vector< std::string > get_xml_node_values ( const std::string &  xml_file,
const std::string &  label_name,
const std::string &  node_name 
)

Function to get node labels for a given set of nodes.

Parameters
[in]xml_filePath to the XML file
[in]label_nameName of the label
[in]node_nameName of the XML nodes to get labels from

Definition at line 353 of file ProjectBuilder.cpp.

◆ InitializeEnergyBalance()

void InitializeEnergyBalance ( const std::string &  xml_input_file,
BLConductanceModel boundarylayerconductancemodel,
EnergyBalanceModel energybalancemodel,
helios::Context context_ptr 
)

Definition at line 5 of file InitializeEnergyBalance.cpp.

◆ InitializeRadiation()

void InitializeRadiation ( const std::string &  xml_input_file,
SolarPosition solarposition_ptr,
RadiationModel radiation_ptr,
helios::Context context_ptr 
)

Definition at line 6 of file InitializeRadiation.cpp.

◆ InitializeSimulation()

void InitializeSimulation ( const std::string &  xml_input_file,
helios::Context context_ptr 
)

Definition at line 5 of file InitializeSimulation.cpp.

◆ interpolate()

std::vector< helios::vec3 > interpolate ( const std::vector< int > &  keypoints,
const std::vector< helios::vec3 > &  positions,
int  num_points 
)

Function to return interpolated vector based on keypoints.

Parameters
[in]keypointsVector of keypoints
[in]positionsVector of position vectors
[in]num_pointsTotal number of points (including points in positions)

◆ parse_distribution()

bool parse_distribution ( const std::string &  input_string,
distribution converted_distribution 
)

Definition at line 1303 of file ProjectBuilder.cpp.

◆ save_as_file_dialog()

std::string save_as_file_dialog ( std::vector< std::string >  extensions)

Function to open save as file dialog.

Parameters
[in]extensionsList of possible extensions

Definition at line 230 of file ProjectBuilder.cpp.

◆ toggle_button()

void toggle_button ( const char *  str_id,
bool *  v 
)

ImGUI toggle button function.

Parameters
[in]str_idString ID
[in]vBoolean representing on or off

Definition at line 124 of file ProjectBuilder.cpp.

◆ vec_to_string() [1/3]

std::string vec_to_string ( const helios::int2 v)

Function to convert vector to string.

Parameters
[in]vVector input

Definition at line 74 of file ProjectBuilder.cpp.

◆ vec_to_string() [2/3]

std::string vec_to_string ( const helios::vec2 v)

Function to convert vector to string.

Parameters
[in]vVector input

Definition at line 80 of file ProjectBuilder.cpp.

◆ vec_to_string() [3/3]

std::string vec_to_string ( const helios::vec3 v)

Function to convert vector to string.

Parameters
[in]vVector input

Definition at line 86 of file ProjectBuilder.cpp.