1.3.64
 
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-2026 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 5917 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 5925 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 5933 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 5885 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 5901 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 5893 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 5909 of file ProjectBuilder.cpp.

◆ file_dialog()

std::string file_dialog ( )

Function to open file dialog.

Definition at line 165 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 360 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 1372 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 237 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 128 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 78 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 84 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 90 of file ProjectBuilder.cpp.