Stores the state associated with simulation. More...
#include <Context.h>
Public Member Functions | |
Context () | |
Context default constructor. | |
~Context () | |
Context destructor. | |
Context (const Context &)=delete | |
Deleted copy constructor to prevent copying of Context. | |
void | operator= (const Context &)=delete |
Deleted assignment operator to prevent copying of Context. | |
void | seedRandomGenerator (uint seed) |
Set seed for random generator. | |
std::minstd_rand0 * | getRandomGenerator () |
Get the random number generator engine. | |
void | markGeometryClean () |
Mark the Context geometry as "clean", meaning that the geometry has not been modified since last set as clean. | |
void | markGeometryDirty () |
Mark the Context geometry as "dirty", meaning that the geometry has been modified since last set as clean. | |
bool | isGeometryDirty () const |
Query whether the Context geometry is "dirty", meaning has the geometry been modified since last set as clean. | |
void | markPrimitiveDirty (uint UUID) const |
Mark a primitive as "dirty", meaning it has been modified since last set as clean. | |
void | markPrimitiveDirty (const std::vector< uint > &UUIDs) const |
Mark multiple primitives as "dirty", meaning they have been modified since last set as clean. | |
void | markPrimitiveClean (uint UUID) const |
Mark a primitive as "clean", meaning it has not been modified since last set as clean. | |
void | markPrimitiveClean (const std::vector< uint > &UUIDs) const |
Mark multiple primitives as "clean", meaning they have not been modified since last set as clean. | |
bool | isPrimitiveDirty (uint UUID) const |
Query whether a given primitive is "dirty", meaning it has been modified since last set as clean. | |
uint | addPatch () |
Add new default Patch geometric primitive, which is centered at the origin (0,0,0), has unit length and width, horizontal orientation, and black color. | |
uint | addPatch (const helios::vec3 ¢er, const helios::vec2 &size) |
Add new Patch geometric primitive. | |
uint | addPatch (const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation) |
Add new Patch geometric primitive. | |
uint | addPatch (const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBcolor &color) |
Add new Patch geometric primitive. | |
uint | addPatch (const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBAcolor &color) |
Add new Patch geometric primitive. | |
uint | addPatch (const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation, const char *texture_file) |
Add new Patch geometric primitive. | |
uint | addPatch (const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation, const char *texture_file, const helios::vec2 &uv_center, const helios::vec2 &uv_size) |
Add new Patch geometric primitive. | |
uint | addTriangle (const helios::vec3 &vertex0, const helios::vec3 &vertex1, const helios::vec3 &vertex2) |
Add new Triangle geometric primitive. | |
uint | addTriangle (const helios::vec3 &vertex0, const helios::vec3 &vertex1, const helios::vec3 &vertex2, const helios::RGBcolor &color) |
Add new Triangle geometric primitive. | |
uint | addTriangle (const helios::vec3 &vertex0, const helios::vec3 &vertex1, const helios::vec3 &vertex2, const helios::RGBAcolor &color) |
Add new Triangle geometric primitive. | |
uint | addTriangle (const helios::vec3 &vertex0, const helios::vec3 &vertex1, const helios::vec3 &vertex2, const char *texture_file, const helios::vec2 &uv0, const helios::vec2 &uv1, const helios::vec2 &uv2) |
Add new Triangle geometric primitive. | |
uint | addVoxel (const helios::vec3 ¢er, const helios::vec3 &size) |
Add new Voxel geometric primitive. | |
uint | addVoxel (const helios::vec3 ¢er, const helios::vec3 &size, const float &rotation) |
Add new Voxel geometric primitive. | |
uint | addVoxel (const helios::vec3 ¢er, const helios::vec3 &size, const float &rotation, const helios::RGBcolor &color) |
Add new Voxel geometric primitive. | |
uint | addVoxel (const helios::vec3 ¢er, const helios::vec3 &size, const float &rotation, const helios::RGBAcolor &color) |
Add new Voxel geometric primitive. | |
void | translatePrimitive (uint UUID, const vec3 &shift) |
Translate a primitive using its UUID. | |
void | translatePrimitive (const std::vector< uint > &UUIDs, const vec3 &shift) |
Translate a group of primitives using a vector of UUIDs. | |
void | rotatePrimitive (uint UUID, float rotation_rad, const char *axis) |
Rotate a primitive about the x, y, or z axis using its UUID. | |
void | rotatePrimitive (const std::vector< uint > &UUIDs, float rotation_rad, const char *axis) |
Rotate a group of primitives about the x, y, or z axis using a vector of UUIDs. | |
void | rotatePrimitive (uint UUID, float rotation_rad, const helios::vec3 &axis) |
Rotate a primitive about an arbitrary axis passing through the origin using its UUID. | |
void | rotatePrimitive (const std::vector< uint > &UUIDs, float rotation_rad, const vec3 &axis) |
Rotate a group of primitives about an arbitrary axis passing through the origin using a vector of UUIDs. | |
void | rotatePrimitive (uint UUID, float rotation_rad, const helios::vec3 &origin, const helios::vec3 &axis) |
Rotate a primitive about an arbitrary line (not necessarily passing through the origin) using its UUID. | |
void | rotatePrimitive (const std::vector< uint > &UUIDs, float rotation_rad, const helios::vec3 &origin, const vec3 &axis) |
Rotate a group of primitives about an arbitrary line (not necessarily passing through the origin) using a vector of UUIDs. | |
void | setPrimitiveNormal (uint UUID, const helios::vec3 &origin, const helios::vec3 &new_normal) |
Rotate the primitive such that it has a specified normal vector based on its UUID. | |
void | setPrimitiveNormal (const std::vector< uint > &UUIDs, const helios::vec3 &origin, const vec3 &new_normal) |
Rotate the primitive such that it has a specified normal vector using a vector of UUIDs. | |
void | setPrimitiveElevation (uint UUID, const helios::vec3 &origin, float new_elevation) |
Rotate the primitive based on its UUID such that it has a the specified elevation angle but maintains the same azimuth angle. | |
void | setPrimitiveAzimuth (uint UUID, const helios::vec3 &origin, float new_azimuth) |
Rotate the primitive based on its UUID such that it has a the specified azimuth angle but maintains the same elevation angle. | |
void | scalePrimitive (uint UUID, const helios::vec3 &S) |
Scale a primitive using its UUID relative to the origin (0,0,0) | |
void | scalePrimitive (const std::vector< uint > &UUIDs, const helios::vec3 &S) |
Scale a group of primitives using a vector of UUIDs relative to the origin (0,0,0) | |
void | scalePrimitiveAboutPoint (uint UUID, const helios::vec3 &S, const helios::vec3 &point) |
Scale a primitive using its UUID about an arbitrary point in space. | |
void | scalePrimitiveAboutPoint (const std::vector< uint > &UUIDs, const helios::vec3 &S, const helios::vec3 &point) |
Scale a group of primitives using a vector of UUIDs about an arbitrary point in space. | |
void | deletePrimitive (uint UUID) |
Delete a single primitive from the context. | |
void | deletePrimitive (const std::vector< uint > &UUIDs) |
Delete a group of primitives from the context. | |
uint | copyPrimitive (uint UUID) |
Make a copy of a primitive from the context. | |
std::vector< uint > | copyPrimitive (const std::vector< uint > &UUIDs) |
Make a copy of a group of primitives from the context. | |
void | copyPrimitiveData (uint sourceUUID, uint destinationUUID) |
copy all primitive data from one primitive to another | |
void | renamePrimitiveData (uint UUID, const char *old_label, const char *new_label) |
Rename primitive data for a primitive. | |
void | duplicatePrimitiveData (uint UUID, const char *old_label, const char *new_label) |
Duplicate/copy primitive data. | |
bool | doesPrimitiveExist (uint UUID) const |
Check if primitive exists for a given UUID. | |
bool | doesPrimitiveExist (const std::vector< uint > &UUIDs) const |
Check if ALL primitives exists for a vector UUIDs. | |
helios::vec2 | getPatchSize (uint UUID) const |
Get the size of a patch element. | |
helios::vec3 | getPatchCenter (uint UUID) const |
Get the Cartesian (x,y,z) center position of a patch element. | |
helios::vec3 | getTriangleVertex (uint UUID, uint number) const |
Get a single vertex of a Triangle based on an index. | |
void | setTriangleVertices (uint UUID, const helios::vec3 &vertex0, const helios::vec3 &vertex1, const helios::vec3 &vertex2) |
//! Manually set the Triangle vertices | |
helios::vec3 | getVoxelCenter (uint UUID) const |
Get the Cartesian (x,y,z) center position of a voxel element. | |
helios::vec3 | getVoxelSize (uint UUID) const |
Get the size of a voxel element. | |
size_t | getPrimitiveCount (bool include_hidden_primitives=true) const |
Get the total number of Primitives in the Context. | |
size_t | getTriangleCount (bool include_hidden_primitives=true) const |
Get the total number of triangle Primitives in the Context. | |
size_t | getPatchCount (bool include_hidden_primitives=true) const |
Get the total number of patch Primitives in the Context. | |
std::vector< uint > | getAllUUIDs () const |
Get all primitive UUIDs currently in the Context. | |
std::vector< uint > | getDirtyUUIDs (bool include_deleted_UUIDs=false) const |
Get all primitive UUIDs that are marked dirty. | |
std::vector< uint > | getDeletedUUIDs () const |
Get all primitive UUIDs that were deleted since the Context was last marked clean. | |
void | hidePrimitive (uint UUID) const |
Hide primitive in the Context such that its UUID is not returned in Context::getAllUUIDs() | |
void | hidePrimitive (const std::vector< uint > &UUIDs) const |
Hide primitives in the Context such that their UUIDs are not returned in Context::getAllUUIDs() | |
void | showPrimitive (uint UUID) const |
Show a previously hidden primitive in the Context. | |
void | showPrimitive (const std::vector< uint > &UUIDs) const |
Show previously hidden primitives in the Context. | |
bool | isPrimitiveHidden (uint UUID) const |
Query whether a primitive is hidden. | |
void | cleanDeletedUUIDs (std::vector< uint > &UUIDs) const |
Delete UUIDs from vector if primitives no longer exist (1D vector) | |
void | cleanDeletedUUIDs (std::vector< std::vector< uint > > &UUIDs) const |
Delete UUIDs from vector if primitives no longer exist (2D vector) | |
void | cleanDeletedUUIDs (std::vector< std::vector< std::vector< uint > > > &UUIDs) const |
Delete UUIDs from vector if primitives no longer exist (3D vector) | |
template<typename T > | |
void | setPrimitiveData (uint UUID, const char *label, const T &data) |
Add data value associated with a primitive element. | |
template<typename T > | |
void | setPrimitiveData (uint UUID, const char *label, const std::vector< T > &data) |
Add vector data value associated with a primitive element. | |
template<typename T > | |
void | setPrimitiveData (const std::vector< uint > &UUIDs, const char *label, const std::vector< T > &data) |
Add data value associated with a vector of primitive elements. Each element in UUIDs maps to each element in data. | |
template<typename T > | |
void | setPrimitiveData (const std::vector< uint > &UUIDs, const char *label, const T &data) |
Add scalar data to multiple primitive elements. | |
template<typename T > | |
void | getPrimitiveData (uint UUID, const char *label, T &data) const |
Get data value associated with a primitive element. | |
template<typename T > | |
void | getPrimitiveData (uint UUID, const char *label, std::vector< T > &data) const |
Get data value associated with a vector of primitive elements. | |
DEPRECATED (HeliosDataType getPrimitiveDataType(uint UUID, const char *label) const) | |
Get the Helios data type of primitive data. | |
HeliosDataType | getPrimitiveDataType (const char *label) const |
Get the expected data type for a primitive data label (cached lookup) | |
uint | getPrimitiveDataSize (uint UUID, const char *label) const |
Get the size/length of primitive data. | |
bool | doesPrimitiveDataExist (uint UUID, const char *label) const |
Check if primitive data 'label' exists. | |
void | clearPrimitiveData (uint UUID, const char *label) |
Clear primitive data for a single primitive based on its UUID. | |
void | clearPrimitiveData (const std::vector< uint > &UUIDs, const char *label) |
Clear primitive data for multiple primitives based on a vector of UUIDs. | |
std::vector< std::string > | listAllPrimitiveDataLabels () const |
Lists all primitive data labels that exist in the Context. | |
void | enablePrimitiveDataValueCaching (const std::string &label) |
Enable value-level caching for a primitive data label. | |
void | disablePrimitiveDataValueCaching (const std::string &label) |
Disable value-level caching for a primitive data label. | |
bool | isPrimitiveDataValueCachingEnabled (const std::string &label) const |
Check if value-level caching is enabled for a primitive data label. | |
void | enableObjectDataValueCaching (const std::string &label) |
Enable value-level caching for an object data label. | |
void | disableObjectDataValueCaching (const std::string &label) |
Disable value-level caching for an object data label. | |
bool | isObjectDataValueCachingEnabled (const std::string &label) const |
Check if value-level caching is enabled for an object data label. | |
PrimitiveType | getPrimitiveType (uint UUID) const |
Method to get the Primitive type. | |
void | setPrimitiveParentObjectID (uint UUID, uint objID) |
Method to set the ID of the parent object the primitive belongs to (default is object 0) | |
void | setPrimitiveParentObjectID (const std::vector< uint > &UUIDs, uint objID) |
Method to set the ID of the parent object the primitive belongs to (default is object 0) for a vector of UUIDs. | |
uint | getPrimitiveParentObjectID (uint UUID) const |
Method to return the ID of the parent object the primitive belongs to (default is object 0) | |
std::vector< uint > | getPrimitiveParentObjectID (const std::vector< uint > &UUIDs) const |
Method to return the ID of the parent object the primitive belongs to (default is object 0) | |
std::vector< uint > | getUniquePrimitiveParentObjectIDs (const std::vector< uint > &UUIDs) const |
Method to return unique parent object IDs for a vector of primitive UUIDs. | |
std::vector< uint > | getUniquePrimitiveParentObjectIDs (const std::vector< uint > &UUIDs, bool include_ObjID_zero) const |
Method to return unique parent object IDs for a vector of primitive UUIDs. | |
float | getPrimitiveArea (uint UUID) const |
Method to return the surface area of a Primitive. | |
void | getPrimitiveBoundingBox (uint UUID, vec3 &min_corner, vec3 &max_corner) const |
Get the axis-aligned bounding box for a single primitive. | |
void | getPrimitiveBoundingBox (const std::vector< uint > &UUIDs, vec3 &min_corner, vec3 &max_corner) const |
Get the axis-aligned bounding box for a group of primitives. | |
void | hideObject (uint ObjID) |
Hide compound object in the Context such that its object ID is not returned in Context::getAllObjectIDs(), and is not counted in Context::getObjectCount() | |
void | hideObject (const std::vector< uint > &ObjIDs) |
Hide compound objects in the Context such that their object IDs are not returned in Context::getAllObjectIDs(), and are not counted in Context::getObjectCount() | |
void | showObject (uint ObjID) |
Show a previously hidden compound object in the Context. | |
void | showObject (const std::vector< uint > &ObjIDs) |
Show previously hidden compound objects in the Context. | |
bool | isObjectHidden (uint ObjID) const |
Query if an object is hidden. | |
float | getObjectArea (uint ObjID) const |
Method to return the one-sided surface area of an object. | |
helios::vec3 | getObjectAverageNormal (uint ObjID) const |
Method to return the average surface normal vector of an object. | |
uint | getObjectPrimitiveCount (uint ObjID) const |
Method to return the number of primitives contained in the object. | |
helios::vec3 | getObjectCenter (uint ObjID) const |
Method to return the Cartesian (x,y,z) point of the center of a bounding box for the object. | |
void | setObjectColor (uint ObjID, const helios::RGBcolor &color) const |
Method to set the diffuse color of an Object. | |
void | setObjectColor (const std::vector< uint > &ObjIDs, const helios::RGBcolor &color) const |
Method to set the diffuse color of an Object for a vector of ObjIDs. | |
void | setObjectColor (uint ObjID, const helios::RGBAcolor &color) const |
Method to set the diffuse color of an Object with transparency. | |
void | setObjectColor (const std::vector< uint > &ObjIDs, const helios::RGBAcolor &color) const |
Method to set the diffuse color of an Object with transparency for a vector of ObjIDs. | |
std::string | getObjectTextureFile (uint ObjID) const |
Method to return the texture map file of an Object. | |
void | getObjectTransformationMatrix (uint ObjID, float(&T)[16]) const |
Method to return the Affine transformation matrix of an Object. | |
void | setObjectTransformationMatrix (uint ObjID, float(&T)[16]) const |
Method to set the Affine transformation matrix of an Object. | |
void | setObjectTransformationMatrix (const std::vector< uint > &ObjIDs, float(&T)[16]) const |
Method to set the Affine transformation matrix of an Object for a vector Object IDs. | |
void | setObjectAverageNormal (uint ObjID, const vec3 &origin, const vec3 &new_normal) const |
Sets the average normal of a given object in the context. | |
void | setObjectOrigin (uint ObjID, const vec3 &origin) const |
Set the origin position of the object about which it can be rotated and scaled. | |
bool | objectHasTexture (uint ObjID) const |
Method to check whether an Object has texture data. | |
bool | doesObjectContainPrimitive (uint ObjID, uint UUID) const |
Method to check if an Object contains a Primitive. | |
void | overrideObjectTextureColor (uint ObjID) const |
Override the color in the texture map for all primitives in the Compound Object, in which case the primitives will be colored by the constant RGB color, but will apply the transparency channel in the texture to determine its shape. | |
void | overrideObjectTextureColor (const std::vector< uint > &ObjIDs) const |
Override the color in the texture map for all primitives in the Compound Object, in which case the primitives will be colored by the constant RGB color, but will apply the transparency channel in the texture to determine its shape. | |
void | useObjectTextureColor (uint ObjID) const |
void | useObjectTextureColor (const std::vector< uint > &ObjIDs) |
void | getObjectBoundingBox (uint ObjID, vec3 &min_corner, vec3 &max_corner) const |
Get the axis-aligned bounding box for a single object. | |
void | getObjectBoundingBox (const std::vector< uint > &ObjIDs, vec3 &min_corner, vec3 &max_corner) const |
Get the axis-aligned bounding box for a group of objects. | |
void | printObjectInfo (uint ObjID) const |
Prints object properties to console (useful for debugging purposes) | |
std::vector< std::string > | listObjectData (uint ObjID) const |
Return labels for all object data for this particular object. | |
std::vector< std::string > | listPrimitiveData (uint UUID) const |
Return labels for all primitive data for this particular primitive. | |
float | getPrimitiveSolidFraction (uint UUID) const |
Get fraction of primitive surface area that is non-transparent. | |
helios::vec3 | getPrimitiveNormal (uint UUID) const |
Method to return the normal vector of a Primitive. | |
void | getPrimitiveTransformationMatrix (uint UUID, float(&T)[16]) const |
Method to return the Affine transformation matrix of a Primitive. | |
void | setPrimitiveTransformationMatrix (uint UUID, float(&T)[16]) |
Method to set the Affine transformation matrix of a Primitive. | |
void | setPrimitiveTransformationMatrix (const std::vector< uint > &UUIDs, float(&T)[16]) |
Method to set the Affine transformation matrix of a Primitive for a vector UUIDs. | |
std::vector< helios::vec3 > | getPrimitiveVertices (uint UUID) const |
Method to return the (x,y,z) coordinates of the vertices of a Primitive. | |
helios::RGBcolor | getPrimitiveColor (uint UUID) const |
Method to return the diffuse color of a Primitive. | |
helios::RGBcolor | getPrimitiveColorRGB (uint UUID) const |
Method to return the diffuse color of a Primitive. | |
helios::RGBAcolor | getPrimitiveColorRGBA (uint UUID) const |
Method to return the diffuse color of a Primitive with transparency. | |
void | setPrimitiveColor (uint UUID, const helios::RGBcolor &color) const |
Method to set the diffuse color of a Primitive. | |
void | setPrimitiveColor (const std::vector< uint > &UUIDs, const helios::RGBcolor &color) const |
Method to set the diffuse color of a Primitive for a vector of UUIDs. | |
void | setPrimitiveColor (uint UUID, const helios::RGBAcolor &color) const |
Method to set the diffuse color of a Primitive with transparency. | |
void | setPrimitiveColor (const std::vector< uint > &UUIDs, const helios::RGBAcolor &color) const |
Method to set the diffuse color of a Primitive with transparency for a vector of UUIDs. | |
std::string | getPrimitiveTextureFile (uint UUID) const |
Get the path to texture map file for primitive. If primitive does not have a texture map, the result will be an empty string. | |
void | setPrimitiveTextureFile (uint UUID, const std::string &texturefile) const |
Set the texture map file for a primitive. | |
helios::int2 | getPrimitiveTextureSize (uint UUID) const |
Get the size (number of pixels) of primitive texture map image. | |
std::vector< vec2 > | getPrimitiveTextureUV (uint UUID) const |
Get u-v texture coordinates at primitive vertices. | |
bool | primitiveTextureHasTransparencyChannel (uint UUID) const |
Check if primitive texture map has a transparency channel. | |
const std::vector< std::vector< bool > > * | getPrimitiveTextureTransparencyData (uint UUID) const |
Get the transparency channel pixel data from primitive texture map. If transparency channel does not exist, an error will be thrown. | |
void | overridePrimitiveTextureColor (uint UUID) const |
Override the color in the texture map for all primitives in the Compound Object, in which case the primitives will be colored by the constant RGB color, but will apply the transparency channel in the texture to determine its shape. | |
void | overridePrimitiveTextureColor (const std::vector< uint > &UUIDs) const |
Override the color in the texture map for multiple primitives, in which case the primitives will be colored by the constant RGB color, but will apply the transparency channel in the texture to determine its shape. | |
void | usePrimitiveTextureColor (uint UUID) const |
Use the texture map to color the primitive rather than the constant RGB color. This is function reverses a previous call to overrideTextureColor(). Note that using the texture color is the default behavior. | |
void | usePrimitiveTextureColor (const std::vector< uint > &UUIDs) const |
Use the texture map to color the primitives rather than the constant RGB color. This is function reverses a previous call to overrideTextureColor(). Note that using the texture color is the default behavior. | |
bool | isPrimitiveTextureColorOverridden (uint UUID) const |
Check if color of texture map is overridden by the diffuse R-G-B color of the primitive. | |
void | printPrimitiveInfo (uint UUID) const |
Prints primitive properties to console (useful for debugging purposes) | |
template<typename T > | |
void | setObjectData (uint objID, const char *label, const T &data) |
Add data value associated with a compound object. | |
template<typename T > | |
void | setObjectData (const std::vector< uint > &objIDs, const char *label, const T &data) |
Add scalar data to multiple compound objects. | |
template<typename T > | |
void | setObjectData (const std::vector< std::vector< uint > > &objIDs, const char *label, const T &data) |
Add scalar data to multiple compound objects. | |
template<typename T > | |
void | setObjectData (const std::vector< std::vector< std::vector< uint > > > &objIDs, const char *label, const T &data) |
Add scalar data to multiple compound objects. | |
template<typename T > | |
void | setObjectData (uint objID, const char *label, const std::vector< T > &data) |
Add a vector of data for a compound object. | |
template<typename T > | |
void | setObjectData (const std::vector< uint > &objIDs, const char *label, const std::vector< T > &data) |
Add data value associated with a vector of compound objects. Each element in objIDs maps to each element in data. | |
template<typename T > | |
void | getObjectData (uint objID, const char *label, T &data) const |
Get data value associated with a compound object. | |
template<typename T > | |
void | getObjectData (uint objID, const char *label, std::vector< T > &data) const |
Get data value associated with a vector of compound objects. | |
DEPRECATED (HeliosDataType getObjectDataType(uint objID, const char *label) const) | |
Get the Helios data type of primitive data. | |
HeliosDataType | getObjectDataType (const char *label) const |
Get the expected data type for an object data label (cached lookup) | |
uint | getObjectDataSize (uint objID, const char *label) const |
Get the size/length of primitive data. | |
bool | doesObjectDataExist (uint objID, const char *label) const |
Check if primitive data 'label' exists. | |
void | clearObjectData (uint objID, const char *label) |
Clear primitive data for a single primitive based on its objID. | |
void | clearObjectData (const std::vector< uint > &objIDs, const char *label) |
Clear primitive data for multiple primitives based on a vector of objIDs. | |
std::vector< std::string > | listAllObjectDataLabels () const |
Lists all object data labels that exist in the Context. | |
bool | areObjectPrimitivesComplete (uint objID) const |
Method to query whether all object primitives are in tact. | |
void | cleanDeletedObjectIDs (std::vector< uint > &objIDs) const |
Delete Object IDs from vector if objects no longer exist (1D vector) | |
void | cleanDeletedObjectIDs (std::vector< std::vector< uint > > &objIDs) const |
Delete Object IDs from vector if objects no longer exist (2D vector) | |
void | cleanDeletedObjectIDs (std::vector< std::vector< std::vector< uint > > > &objIDs) const |
Delete Object IDs from vector if objects no longer exist (3D vector) | |
template<typename T > | |
void | setGlobalData (const char *label, const T &data) |
Add global data value (scalar) | |
template<typename T > | |
void | setGlobalData (const char *label, const std::vector< T > &data) |
Add global data value (vector) | |
template<typename T > | |
void | getGlobalData (const char *label, T &data) const |
Get global data value (scalar or vector) | |
void | renameGlobalData (const char *old_label, const char *new_label) |
Rename global data. | |
void | duplicateGlobalData (const char *old_label, const char *new_label) |
Make a copy of global data. | |
void | clearGlobalData (const char *label) |
Delete/clear global data. | |
HeliosDataType | getGlobalDataType (const char *label) const |
Get the Helios data type of global data. | |
size_t | getGlobalDataSize (const char *label) const |
Get the size/length of global data. | |
std::vector< std::string > | listGlobalData () const |
List the labels for all global data in the Context. | |
bool | doesGlobalDataExist (const char *label) const |
Check if global data 'label' exists. | |
void | incrementGlobalData (const char *label, int increment) |
Increase value of global data (int) by some value. | |
void | incrementGlobalData (const char *label, uint increment) |
Increase value of global data (uint) by some value. | |
void | incrementGlobalData (const char *label, float increment) |
Increase value of global data (float) by some value. | |
void | incrementGlobalData (const char *label, double increment) |
Increase value of global data (double) by some value. | |
CompoundObject * | getObjectPointer (uint ObjID) const |
Get a pointer to a Compound Object. | |
uint | getObjectCount () const |
Get the total number of objects that have been created in the Context. | |
bool | doesObjectExist (uint ObjID) const |
Check whether Compound Object exists in the Context. | |
std::vector< uint > | getAllObjectIDs () const |
Get the IDs for all Compound Objects in the Context. | |
void | deleteObject (uint ObjID) |
Delete a single Compound Object from the context. | |
void | deleteObject (const std::vector< uint > &ObjIDs) |
Delete a group of Compound Objects from the context. | |
uint | copyObject (uint ObjID) |
Make a copy of a Compound Objects from the context. | |
std::vector< uint > | copyObject (const std::vector< uint > &ObjIDs) |
Make a copy of a group of Compound Objects from the context. | |
void | copyObjectData (uint source_objID, uint destination_objID) |
copy all object data from one compound object to another | |
void | duplicateObjectData (uint objID, const char *old_label, const char *new_label) |
Duplicate/copy existing object data. | |
void | renameObjectData (uint objID, const char *old_label, const char *new_label) |
Rename existing object data. | |
std::vector< uint > | filterObjectsByData (const std::vector< uint > &ObjIDs, const char *object_data, float threshold, const char *comparator) const |
Get a vector of object IDs that meet filtering criteria based on object data. | |
void | translateObject (uint ObjID, const vec3 &shift) const |
Translate a single compound object. | |
void | translateObject (const std::vector< uint > &ObjIDs, const vec3 &shift) const |
Translate multiple compound objects based on a vector of UUIDs. | |
void | rotateObject (uint ObjID, float rotation_radians, const char *rotation_axis_xyz) const |
Rotate a single compound object about the x, y, or z axis. | |
void | rotateObject (const std::vector< uint > &ObjIDs, float rotation_radians, const char *rotation_axis_xyz) const |
Rotate multiple compound objects about the x, y, or z axis based on a vector of UUIDs. | |
void | rotateObject (uint ObjID, float rotation_radians, const vec3 &rotation_axis_vector) const |
Rotate a single compound object about an arbitrary axis passing through the origin. | |
void | rotateObject (const std::vector< uint > &ObjIDs, float rotation_radians, const vec3 &rotation_axis_vector) const |
Rotate multiple compound objects about an arbitrary axis passing through the origin based on a vector of UUIDs. | |
void | rotateObject (uint ObjID, float rotation_radians, const vec3 &rotation_origin, const vec3 &rotation_axis_vector) const |
Rotate a single compound object about an arbitrary line (not necessarily passing through the origin) | |
void | rotateObject (const std::vector< uint > &ObjIDs, float rotation_radians, const vec3 &rotation_origin, const vec3 &rotation_axis_vector) const |
Rotate multiple compound objects about an arbitrary line (not necessarily passing through the origin) based on a vector of UUIDs. | |
void | rotateObjectAboutOrigin (uint ObjID, float rotation_radians, const vec3 &rotation_axis_vector) const |
Rotate a single compound object about an arbitrary line passing through the objects origin point. | |
void | rotateObjectAboutOrigin (const std::vector< uint > &ObjIDs, float rotation_radians, const vec3 &rotation_axis_vector) const |
Rotate multiple compound objects about an arbitrary line passing through the objects origin point. | |
void | scaleObject (uint ObjID, const helios::vec3 &scalefact) const |
Method to scale a compound object in the x-, y- and z-directions. | |
void | scaleObject (const std::vector< uint > &ObjIDs, const helios::vec3 &scalefact) const |
Method to scale a compound object in the x-, y- and z-directions. | |
void | scaleObjectAboutCenter (uint ObjID, const helios::vec3 &scalefact) const |
Method to scale a compound object in the x-, y- and z-directions. | |
void | scaleObjectAboutCenter (const std::vector< uint > &ObjIDs, const helios::vec3 &scalefact) const |
Method to scale a compound object in the x-, y- and z-directions. | |
void | scaleObjectAboutPoint (uint ObjID, const helios::vec3 &scalefact, const helios::vec3 &point) const |
Method to scale a compound object in the x-, y- and z-directions about an arbitrary point. | |
void | scaleObjectAboutPoint (const std::vector< uint > &ObjIDs, const helios::vec3 &scalefact, const helios::vec3 &point) const |
Method to scale a compound object in the x-, y- and z-directions about an arbitrary point. | |
void | scaleObjectAboutOrigin (uint ObjID, const helios::vec3 &scalefact) const |
Method to scale a compound object in the x-, y- and z-directions about its origin point. | |
void | scaleObjectAboutOrigin (const std::vector< uint > &ObjIDs, const helios::vec3 &scalefact) const |
Method to scale a compound object in the x-, y- and z-directions about its origin point. | |
std::vector< uint > | getObjectPrimitiveUUIDs (uint ObjID) const |
Get primitive UUIDs associated with compound object (single object ID input) | |
std::vector< uint > | getObjectPrimitiveUUIDs (const std::vector< uint > &ObjIDs) const |
Get primitive UUIDs associated with compound objects (1D vector of object IDs input) | |
std::vector< uint > | getObjectPrimitiveUUIDs (const std::vector< std::vector< uint > > &ObjIDs) const |
Get primitive UUIDs associated with compound objects (2D vector of object IDs input) | |
helios::ObjectType | getObjectType (uint ObjID) const |
Get an enumeration specifying the type of the object. | |
Tile * | getTileObjectPointer (uint ObjID) const |
Get a pointer to a Tile Compound Object. | |
float | getTileObjectAreaRatio (uint ObjID) const |
Get the area ratio of a tile object (total object area / sub-patch area) | |
std::vector< float > | getTileObjectAreaRatio (const std::vector< uint > &ObjIDs) const |
Get the area ratio of a multiple tile objects (total object area / sub-patch area) | |
void | setTileObjectSubdivisionCount (const std::vector< uint > &ObjIDs, const int2 &new_subdiv) |
Change the subdivision count of a tile object. | |
void | setTileObjectSubdivisionCount (const std::vector< uint > &ObjIDs, float area_ratio) |
change the subdivisions of a tile object | |
helios::vec3 | getTileObjectCenter (uint ObjID) const |
Get the Cartesian (x,y,z) center position of a tile object. | |
helios::vec2 | getTileObjectSize (uint ObjID) const |
get the size of a tile object from the context | |
helios::int2 | getTileObjectSubdivisionCount (uint ObjID) const |
get the subdivision count of a tile object from the context | |
helios::vec3 | getTileObjectNormal (uint ObjID) const |
get the normal of a tile object from the context | |
std::vector< helios::vec2 > | getTileObjectTextureUV (uint ObjID) const |
get the texture UV coordinates of a tile object from the context | |
std::vector< helios::vec3 > | getTileObjectVertices (uint ObjID) const |
get the vertices of a tile object from the context | |
Sphere * | getSphereObjectPointer (uint ObjID) const |
Get a pointer to a Sphere Compound Object. | |
helios::vec3 | getSphereObjectCenter (uint ObjID) const |
get the center of a Sphere object from the context | |
helios::vec3 | getSphereObjectRadius (uint ObjID) const |
get the radius of a Sphere object from the context | |
uint | getSphereObjectSubdivisionCount (uint ObjID) const |
get the subdivision count of a Sphere object from the context | |
float | getSphereObjectVolume (uint ObjID) const |
get the volume of a Sphere object from the context | |
Tube * | getTubeObjectPointer (uint ObjID) const |
Get a pointer to a Tube Compound Object. | |
uint | getTubeObjectSubdivisionCount (uint ObjID) const |
get the subdivision count of a Tube object from the context | |
std::vector< helios::vec3 > | getTubeObjectNodes (uint ObjID) const |
get the nodes of a Tube object from the context | |
uint | getTubeObjectNodeCount (uint ObjID) const |
get the number of nodes of a Tube object from the context | |
std::vector< float > | getTubeObjectNodeRadii (uint ObjID) const |
get the node radii of a Tube object from the context | |
std::vector< RGBcolor > | getTubeObjectNodeColors (uint ObjID) const |
get the node colors of a Tube object from the context | |
float | getTubeObjectVolume (uint ObjID) const |
get the volume of a Tube object from the context | |
float | getTubeObjectSegmentVolume (uint ObjID, uint segment_index) const |
get the volume of a segment within a Tube object | |
void | appendTubeSegment (uint ObjID, const helios::vec3 &node_position, float radius, const RGBcolor &color) |
Append a tube segment to an existing tube object. | |
void | appendTubeSegment (uint ObjID, const helios::vec3 &node_position, float node_radius, const char *texturefile, const helios::vec2 &textureuv_ufrac) |
Append an additional segment to the existing tube object. | |
void | scaleTubeGirth (uint ObjID, float scale_factor) |
Scale the girth for all nodes of a tube object. | |
void | setTubeRadii (uint ObjID, const std::vector< float > &node_radii) |
Set tube radii at each segment node. | |
void | scaleTubeLength (uint ObjID, float scale_factor) |
Scale the length of a tube object by an arbitrary factor for all tube nodes. | |
void | pruneTubeNodes (uint ObjID, uint node_index) |
Remove a portion of the tube downstream of a specified node. | |
void | setTubeNodes (uint ObjID, const std::vector< helios::vec3 > &node_xyz) |
Set tube vertex coordinates at each segment node. | |
Box * | getBoxObjectPointer (uint ObjID) const |
Get a pointer to a Box Compound Object. | |
helios::vec3 | getBoxObjectCenter (uint ObjID) const |
get the center of a Box object from the context | |
helios::vec3 | getBoxObjectSize (uint ObjID) const |
get the size of a Box object from the context | |
helios::int3 | getBoxObjectSubdivisionCount (uint ObjID) const |
get the subdivision count of a Box object from the context | |
float | getBoxObjectVolume (uint ObjID) const |
get the volume of a Box object from the context | |
Disk * | getDiskObjectPointer (uint ObjID) const |
Get a pointer to a Disk Compound Object. | |
helios::vec3 | getDiskObjectCenter (uint ObjID) const |
get the center of a Disk object from the context | |
helios::vec2 | getDiskObjectSize (uint ObjID) const |
get the size of a Disk object from the context | |
uint | getDiskObjectSubdivisionCount (uint ObjID) const |
get the subdivision count of a Disk object from the context | |
Polymesh * | getPolymeshObjectPointer (uint ObjID) const |
Get a pointer to a Polygon Mesh Compound Object. | |
float | getPolymeshObjectVolume (uint ObjID) const |
Get the volume of a Polygon Mesh object from the context. | |
Cone * | getConeObjectPointer (uint ObjID) const |
Get a pointer to a Cone Compound Object. | |
uint | getConeObjectSubdivisionCount (uint ObjID) const |
get the subdivision count of a Cone object from the context | |
std::vector< helios::vec3 > | getConeObjectNodes (uint ObjID) const |
get the nodes of a Cone object from the context | |
std::vector< float > | getConeObjectNodeRadii (uint ObjID) const |
get the node radii of a Cone object from the context | |
helios::vec3 | getConeObjectNode (uint ObjID, int number) const |
get a node of a Cone object from the context | |
float | getConeObjectNodeRadius (uint ObjID, int number) const |
get a node radius of a Cone object from the context | |
helios::vec3 | getConeObjectAxisUnitVector (uint ObjID) const |
get the axis unit vector of a Cone object from the context | |
float | getConeObjectLength (uint ObjID) const |
get the length of a Cone object from the context | |
float | getConeObjectVolume (uint ObjID) const |
get the volume of a Cone object from the context | |
uint | addTileObject (const vec3 ¢er, const vec2 &size, const SphericalCoord &rotation, const int2 &subdiv) |
Add a patch that is subdivided into a regular grid of sub-patches (tiled) | |
uint | addTileObject (const vec3 ¢er, const vec2 &size, const SphericalCoord &rotation, const int2 &subdiv, const RGBcolor &color) |
Add a patch that is subdivided into a regular grid of sub-patches (tiled) | |
uint | addTileObject (const vec3 ¢er, const vec2 &size, const SphericalCoord &rotation, const int2 &subdiv, const char *texturefile) |
Add a patch that is subdivided into a regular grid of sub-patches (tiled) | |
uint | addTileObject (const vec3 ¢er, const vec2 &size, const SphericalCoord &rotation, const int2 &subdiv, const char *texturefile, const int2 &texture_repeat) |
Add a patch that is subdivided into a regular grid of sub-patches (tiled texture) | |
uint | addSphereObject (uint Ndivs, const vec3 ¢er, float radius) |
Add a spherical compound object to the Context. | |
uint | addSphereObject (uint Ndivs, const vec3 ¢er, float radius, const RGBcolor &color) |
Add a spherical compound object to the Context. | |
uint | addSphereObject (uint Ndivs, const vec3 ¢er, float radius, const char *texturefile) |
Add a spherical compound object to the Context colored by texture map. | |
uint | addSphereObject (uint Ndivs, const vec3 ¢er, const vec3 &radius) |
Add a spherical/ellipsoidal compound object to the Context. | |
uint | addSphereObject (uint Ndivs, const vec3 ¢er, const vec3 &radius, const RGBcolor &color) |
Add a spherical/ellipsoidal compound object to the Context. | |
uint | addSphereObject (uint Ndivs, const vec3 ¢er, const vec3 &radius, const char *texturefile) |
Add a spherical/ellipsoidal compound object to the Context colored by texture map. | |
uint | addTubeObject (uint radial_subdivisions, const std::vector< vec3 > &nodes, const std::vector< float > &radius) |
Add a 3D tube compound object to the Context. | |
uint | addTubeObject (uint radial_subdivisions, const std::vector< vec3 > &nodes, const std::vector< float > &radius, const std::vector< RGBcolor > &color) |
Add a 3D tube compound object to the Context and specify its diffuse color. | |
uint | addTubeObject (uint radial_subdivisions, const std::vector< vec3 > &nodes, const std::vector< float > &radius, const char *texturefile) |
Add a 3D tube compound object to the Context that is texture-mapped. Texture is mapped to span the entire tube. | |
uint | addTubeObject (uint radial_subdivisions, const std::vector< vec3 > &nodes, const std::vector< float > &radius, const char *texturefile, const std::vector< float > &textureuv_ufrac) |
Add a 3D tube compound object to the Context that is texture-mapped. | |
uint | addBoxObject (const vec3 ¢er, const vec3 &size, const int3 &subdiv) |
Add a rectangular prism tessellated with Patch primitives. | |
uint | addBoxObject (const vec3 ¢er, const vec3 &size, const int3 &subdiv, const RGBcolor &color) |
Add a rectangular prism tessellated with Patch primitives. | |
uint | addBoxObject (const vec3 ¢er, const vec3 &size, const int3 &subdiv, const char *texturefile) |
Add a rectangular prism tessellated with Patch primitives. | |
uint | addBoxObject (const vec3 ¢er, const vec3 &size, const int3 &subdiv, const RGBcolor &color, bool reverse_normals) |
Add a rectangular prism tessellated with Patch primitives. | |
uint | addBoxObject (vec3 center, const vec3 &size, const int3 &subdiv, const char *texturefile, bool reverse_normals) |
Add a rectangular prism tessellated with Patch primitives. | |
uint | addDiskObject (uint Ndivs, const helios::vec3 ¢er, const helios::vec2 &size) |
Add new Disk geometric primitive to the Context given its center, and size. | |
uint | addDiskObject (uint Ndivs, const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation) |
Add new Disk Compound Object. | |
uint | addDiskObject (uint Ndivs, const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBcolor &color) |
Add new Disk Compound Object. | |
uint | addDiskObject (uint Ndivs, const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBAcolor &color) |
Add new Disk Compound Object. | |
uint | addDiskObject (uint Ndivs, const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation, const char *texture_file) |
Add new Disk Compound Object. | |
uint | addDiskObject (const int2 &Ndivs, const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBcolor &color) |
Add new Disk Compound Object. | |
uint | addDiskObject (const int2 &Ndivs, const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBAcolor &color) |
Add new Disk Compound Object. | |
uint | addDiskObject (const int2 &Ndivs, const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation, const char *texturefile) |
Add new Disk Compound Object. | |
uint | addPolymeshObject (const std::vector< uint > &UUIDs) |
Add new Polymesh Compound Object. | |
uint | addConeObject (uint Ndivs, const vec3 &node0, const vec3 &node1, float radius0, float radius1) |
Add a 3D cone compound object to the Context. | |
uint | addConeObject (uint Ndivs, const vec3 &node0, const vec3 &node1, float radius0, float radius1, const RGBcolor &color) |
Add a 3D cone compound object to the Context and specify its diffuse color. | |
uint | addConeObject (uint Ndivs, const vec3 &node0, const vec3 &node1, float radius0, float radius1, const char *texturefile) |
Add a 3D cone compound object to the Context that is texture-mapped. | |
std::vector< uint > | addSphere (uint Ndivs, const vec3 ¢er, float radius) |
Add a spherical compound object to the Context. | |
std::vector< uint > | addSphere (uint Ndivs, const vec3 ¢er, float radius, const RGBcolor &color) |
Add a spherical compound object to the Context. | |
std::vector< uint > | addSphere (uint Ndivs, const vec3 ¢er, float radius, const char *texturefile) |
Add a spherical compound object to the Context colored by texture map. | |
std::vector< uint > | addTile (const vec3 ¢er, const vec2 &size, const SphericalCoord &rotation, const int2 &subdiv) |
Add a patch that is subdivided into a regular grid of sub-patches (tiled) | |
std::vector< uint > | addTile (const vec3 ¢er, const vec2 &size, const SphericalCoord &rotation, const int2 &subdiv, const RGBcolor &color) |
Add a patch that is subdivided into a regular grid of sub-patches (tiled) | |
std::vector< uint > | addTile (const vec3 ¢er, const vec2 &size, const SphericalCoord &rotation, const int2 &subdiv, const char *texturefile) |
Add a patch that is subdivided into a regular grid of sub-patches (tiled) | |
std::vector< uint > | addTile (const vec3 ¢er, const vec2 &size, const SphericalCoord &rotation, const int2 &subdiv, const char *texturefile, const int2 &texture_repeat) |
Add a patch that is subdivided into a regular grid of sub-patches (tiled texture) | |
std::vector< uint > | addTube (uint Ndivs, const std::vector< vec3 > &nodes, const std::vector< float > &radius) |
Add a 3D tube compound object to the Context. | |
std::vector< uint > | addTube (uint radial_subdivisions, const std::vector< vec3 > &nodes, const std::vector< float > &radius, const std::vector< RGBcolor > &color) |
Add a 3D tube compound object to the Context and specify its diffuse color. | |
std::vector< uint > | addTube (uint radial_subdivisions, const std::vector< vec3 > &nodes, const std::vector< float > &radius, const char *texturefile) |
Add a 3D tube compound object to the Context that is texture-mapped. | |
std::vector< uint > | addBox (const vec3 ¢er, const vec3 &size, const int3 &subdiv) |
Add a rectangular prism tessellated with Patch primitives. | |
std::vector< uint > | addBox (const vec3 ¢er, const vec3 &size, const int3 &subdiv, const RGBcolor &color) |
Add a rectangular prism tessellated with Patch primitives. | |
std::vector< uint > | addBox (const vec3 ¢er, const vec3 &size, const int3 &subdiv, const char *texturefile) |
Add a rectangular prism tessellated with Patch primitives. | |
std::vector< uint > | addBox (const vec3 ¢er, const vec3 &size, const int3 &subdiv, const RGBcolor &color, bool reverse_normals) |
Add a rectangular prism tessellated with Patch primitives. | |
std::vector< uint > | addBox (const vec3 ¢er, const vec3 &size, const int3 &subdiv, const char *texturefile, bool reverse_normals) |
Add a rectangular prism tessellated with Patch primitives. | |
std::vector< uint > | addDisk (uint Ndivs, const helios::vec3 ¢er, const helios::vec2 &size) |
Add new Disk geometric primitive to the Context given its center, and size. | |
std::vector< uint > | addDisk (uint Ndivs, const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation) |
Add new Disk geometric primitive. | |
std::vector< uint > | addDisk (uint Ndivs, const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBcolor &color) |
Add new Disk geometric primitive. | |
std::vector< uint > | addDisk (uint Ndivs, const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBAcolor &color) |
Add new Disk geometric primitive. | |
std::vector< uint > | addDisk (uint Ndivs, const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation, const char *texture_file) |
Add new Disk geometric primitive. | |
std::vector< uint > | addDisk (const int2 &Ndivs, const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBcolor &color) |
Add new Disk geometric primitive. | |
std::vector< uint > | addDisk (const int2 &Ndivs, const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBAcolor &color) |
Add new Disk geometric primitive. | |
std::vector< uint > | addDisk (const int2 &Ndivs, const helios::vec3 ¢er, const helios::vec2 &size, const helios::SphericalCoord &rotation, const char *texturefile) |
Add new Disk geometric primitive. | |
std::vector< uint > | addCone (uint Ndivs, const vec3 &node0, const vec3 &node1, float radius0, float radius1) |
Add a 3D cone to the Context. | |
std::vector< uint > | addCone (uint Ndivs, const vec3 &node0, const vec3 &node1, float radius0, float radius1, RGBcolor &color) |
Add a 3D cone to the Context and specify its diffuse color. | |
std::vector< uint > | addCone (uint Ndivs, const vec3 &node0, const vec3 &node1, float radius0, float radius1, const char *texturefile) |
Add a 3D cone to the Context that is texture-mapped. | |
void | addTimeseriesData (const char *label, float value, const Date &date, const Time &time) |
Add a data point to timeseries of data. | |
void | setCurrentTimeseriesPoint (const char *label, uint index) |
Set the Context date and time by providing the index of a timeseries data point. | |
float | queryTimeseriesData (const char *label, const Date &date, const Time &time) const |
Get a timeseries data point by specifying a date and time vector. | |
float | queryTimeseriesData (const char *label) const |
Get a timeseries data point at the time currently set in the Context. | |
float | queryTimeseriesData (const char *label, uint index) const |
Get a timeseries data point by index in the timeseries. | |
Time | queryTimeseriesTime (const char *label, uint index) const |
Get the time associated with a timeseries data point. | |
Date | queryTimeseriesDate (const char *label, uint index) const |
Get the date associated with a timeseries data point. | |
uint | getTimeseriesLength (const char *label) const |
Get the length of timeseries data. | |
bool | doesTimeseriesVariableExist (const char *label) const |
Query whether a timeseries variable exists. | |
std::vector< std::string > | listTimeseriesVariables () const |
List all existing timeseries variables. | |
void | loadTabularTimeseriesData (const std::string &data_file, const std::vector< std::string > &column_labels, const std::string &delimiter, const std::string &date_string_format="YYYYMMDD", uint headerlines=0) |
Load tabular weather data from text file into timeseries. | |
void | getDomainBoundingBox (helios::vec2 &xbounds, helios::vec2 &ybounds, helios::vec2 &zbounds) const |
Get a box that bounds all primitives in the domain. | |
void | getDomainBoundingBox (const std::vector< uint > &UUIDs, helios::vec2 &xbounds, helios::vec2 &ybounds, helios::vec2 &zbounds) const |
Get a box that bounds a subset of primitives. | |
void | getDomainBoundingSphere (helios::vec3 ¢er, float &radius) const |
Get the center and radius of a sphere that bounds all primitives in the domain. | |
void | getDomainBoundingSphere (const std::vector< uint > &UUIDs, helios::vec3 ¢er, float &radius) const |
Get the center and radius of a sphere that bounds a subset of primitives. | |
void | cropDomainX (const vec2 &xbounds) |
Crop the domain in the x-direction such that all primitives lie within some specified x interval. | |
void | cropDomainY (const vec2 &ybounds) |
Crop the domain in the y-direction such that all primitives lie within some specified y interval. | |
void | cropDomainZ (const vec2 &zbounds) |
Crop the domain in the z-direction such that all primitives lie within some specified z interval. | |
void | cropDomain (std::vector< uint > &UUIDs, const vec2 &xbounds, const vec2 &ybounds, const vec2 &zbounds) |
Crop specified UUIDs such that they lie within some specified axis-aligned box. | |
void | cropDomain (const vec2 &xbounds, const vec2 &ybounds, const vec2 &zbounds) |
Crop the domain such that all primitives lie within some specified axis-aligned box. | |
void | colorPrimitiveByDataPseudocolor (const std::vector< uint > &UUIDs, const std::string &primitive_data, const std::string &colormap, uint Ncolors) |
Overwrite primitive color based on a pseudocolor mapping of primitive data values. | |
void | colorPrimitiveByDataPseudocolor (const std::vector< uint > &UUIDs, const std::string &primitive_data, const std::string &colormap, uint Ncolors, float data_min, float data_max) |
Overwrite primitive color based on a pseudocolor mapping of primitive data values. Clamp to specified data range. | |
std::vector< uint > | loadXML (const char *filename, bool quiet=false) |
Load inputs specified in an XML file. | |
std::vector< std::string > | getLoadedXMLFiles () |
Get names of XML files that are currently loaded. | |
void | writeXML (const char *filename, bool quiet=false) const |
Write Context geometry and data to XML file for all UUIDs in the context. | |
void | writeXML (const char *filename, const std::vector< uint > &UUIDs, bool quiet=false) const |
Write Context geometry and data to XML file for a subset of UUIDs in the context. | |
void | writeXML_byobject (const char *filename, const std::vector< uint > &UUIDs, bool quiet=false) const |
Write Context geometry and data to XML file for a subset of compound object IDs in the context. | |
void | writePrimitiveData (const std::string &filename, const std::vector< std::string > &column_format, bool print_header=false) const |
Write primitive data to an ASCII text file for all primitives in the Context. | |
void | writePrimitiveData (const std::string &filename, const std::vector< std::string > &column_format, const std::vector< uint > &UUIDs, bool print_header=false) const |
Write primitive data to an ASCII text file for selected primitives in the Context. | |
std::vector< uint > | loadPLY (const char *filename, bool silent=false) |
Load geometry contained in a Stanford polygon file (.ply). Model will be placed at the origin with no scaling or rotation applied. | |
std::vector< uint > | loadPLY (const char *filename, const vec3 &origin, float height, const std::string &upaxis="YUP", bool silent=false) |
Load geometry contained in a Stanford polygon file (.ply) | |
std::vector< uint > | loadPLY (const char *filename, const vec3 &origin, float height, const SphericalCoord &rotation, const std::string &upaxis="YUP", bool silent=false) |
Load geometry contained in a Stanford polygon file (.ply) | |
std::vector< uint > | loadPLY (const char *filename, const vec3 &origin, float height, const RGBcolor &default_color, const std::string &upaxis="YUP", bool silent=false) |
Load geometry contained in a Stanford polygon file (.ply) | |
std::vector< uint > | loadPLY (const char *filename, const vec3 &origin, float height, const SphericalCoord &rotation, const RGBcolor &default_color, const std::string &upaxis="YUP", bool silent=false) |
Load geometry contained in a Stanford polygon file (.ply) | |
void | writePLY (const char *filename) const |
Write geometry in the Context to a Stanford polygon file (.ply) | |
void | writePLY (const char *filename, const std::vector< uint > &UUIDs) const |
Write a subset of geometry in the Context to a Stanford polygon file (.ply) | |
std::vector< uint > | loadOBJ (const char *filename, bool silent=false) |
Load geometry contained in a Wavefront OBJ file (.obj). Model will be placed at the origin without any scaling or rotation applied. | |
std::vector< uint > | loadOBJ (const char *filename, const vec3 &origin, float height, const SphericalCoord &rotation, const RGBcolor &default_color, bool silent=false) |
Load geometry contained in a Wavefront OBJ file (.obj) | |
std::vector< uint > | loadOBJ (const char *filename, const vec3 &origin, float height, const SphericalCoord &rotation, const RGBcolor &default_color, const char *upaxis, bool silent=false) |
Load geometry contained in a Wavefront OBJ file (.obj) | |
std::vector< uint > | loadOBJ (const char *filename, const vec3 &origin, const helios::vec3 &scale, const SphericalCoord &rotation, const RGBcolor &default_color, const char *upaxis, bool silent=false) |
Load geometry contained in a Wavefront OBJ file (.obj) | |
void | writeOBJ (const std::string &filename, bool write_normals=false, bool silent=false) const |
Write geometry in the Context to a Wavefront file (.obj) | |
void | writeOBJ (const std::string &filename, const std::vector< uint > &UUIDs, bool write_normals=false, bool silent=false) const |
Write geometry in the Context to a Wavefront file (.obj) for a subset of UUIDs. | |
void | writeOBJ (const std::string &filename, const std::vector< uint > &UUIDs, const std::vector< std::string > &primitive_dat_fields, bool write_normals=false, bool silent=false) const |
Write geometry in the Context to a Wavefront file (.obj) | |
std::filesystem::path | resolveFilePath (const std::string &filename) const |
Unified file path resolution for Context methods - resolves relative paths using build directory. | |
void | setDate (int day, int month, int year) |
Set simulation date by day, month, year. | |
void | setDate (const Date &date) |
Set simulation date by Date vector. | |
void | setDate (int Julian_day, int year) |
Set simulation date by Julian day. | |
helios::Date | getDate () const |
Get simulation date. | |
const char * | getMonthString () const |
Get a string corresponding to the month of the simulation date. | |
int | getJulianDate () const |
Get simulation date by Julian day. | |
void | setTime (int minute, int hour) |
Set simulation time. | |
void | setTime (int second, int minute, int hour) |
Set simulation time. | |
void | setTime (const Time &time) |
Set simulation time using Time vector. | |
helios::Time | getTime () const |
Get the simulation time. | |
void | setLocation (const helios::Location &location) |
Set the location of the simulation (latitude, longitude, and UTC offset) | |
helios::Location | getLocation () const |
Get the location of the simulation (latitude, longitude, and UTC offset) | |
float | randu () |
Draw a random number from a uniform distribution between 0 and 1. | |
float | randu (float min, float max) |
Draw a random number from a uniform distribution with specified range. | |
int | randu (int min, int max) |
Draw a random number from a uniform distribution with specified range. | |
float | randn () |
Draw a random number from a normal distribution with mean = 0, stddev = 1. | |
float | randn (float mean, float stddev) |
Draw a random number from a normal distribution with specified mean and standard deviation. | |
void | duplicatePrimitiveData (const char *existing_data_label, const char *copy_data_label) |
Duplicate primitive data to create a copy of the primitive data with a new name/label. | |
void | calculatePrimitiveDataMean (const std::vector< uint > &UUIDs, const std::string &label, float &mean) const |
Calculate mean of primitive data values (float) for a subset of primitives. | |
void | calculatePrimitiveDataMean (const std::vector< uint > &UUIDs, const std::string &label, double &mean) const |
Calculate mean of primitive data values (double) for a subset of primitives. | |
void | calculatePrimitiveDataMean (const std::vector< uint > &UUIDs, const std::string &label, helios::vec2 &mean) const |
Calculate mean of primitive data values (vec2) for a subset of primitives. | |
void | calculatePrimitiveDataMean (const std::vector< uint > &UUIDs, const std::string &label, helios::vec3 &mean) const |
Calculate mean of primitive data values (vec3) for a subset of primitives. | |
void | calculatePrimitiveDataMean (const std::vector< uint > &UUIDs, const std::string &label, helios::vec4 &mean) const |
Calculate mean of primitive data values (vec4) for a subset of primitives. | |
void | calculatePrimitiveDataAreaWeightedMean (const std::vector< uint > &UUIDs, const std::string &label, float &awt_mean) const |
Calculate mean of primitive data values (float) for a subset of primitives, where each value in the mean calculation is weighted by the primitive's one-sided surface area. | |
void | calculatePrimitiveDataAreaWeightedMean (const std::vector< uint > &UUIDs, const std::string &label, double &awt_mean) const |
Calculate mean of primitive data values (double) for a subset of primitives, where each value in the mean calculation is weighted by the primitive's one-sided surface area. | |
void | calculatePrimitiveDataAreaWeightedMean (const std::vector< uint > &UUIDs, const std::string &label, helios::vec2 &awt_mean) const |
Calculate mean of primitive data values (vec2) for a subset of primitives, where each value in the mean calculation is weighted by the primitive's one-sided surface area. | |
void | calculatePrimitiveDataAreaWeightedMean (const std::vector< uint > &UUIDs, const std::string &label, helios::vec3 &awt_mean) const |
Calculate mean of primitive data values (vec2) for a subset of primitives, where each value in the mean calculation is weighted by the primitive's one-sided surface area. | |
void | calculatePrimitiveDataAreaWeightedMean (const std::vector< uint > &UUIDs, const std::string &label, helios::vec4 &awt_mean) const |
Calculate mean of primitive data values (vec2) for a subset of primitives, where each value in the mean calculation is weighted by the primitive's one-sided surface area. | |
void | calculatePrimitiveDataSum (const std::vector< uint > &UUIDs, const std::string &label, float &sum) const |
Calculate sum of primitive data values (float) for a subset of primitives. | |
void | calculatePrimitiveDataSum (const std::vector< uint > &UUIDs, const std::string &label, double &sum) const |
Calculate sum of primitive data values (double) for a subset of primitives. | |
void | calculatePrimitiveDataSum (const std::vector< uint > &UUIDs, const std::string &label, helios::vec2 &sum) const |
Calculate sum of primitive data values (vec2) for a subset of primitives. | |
void | calculatePrimitiveDataSum (const std::vector< uint > &UUIDs, const std::string &label, helios::vec3 &sum) const |
Calculate sum of primitive data values (vec3) for a subset of primitives. | |
void | calculatePrimitiveDataSum (const std::vector< uint > &UUIDs, const std::string &label, helios::vec4 &sum) const |
Calculate sum of primitive data values (vec4) for a subset of primitives. | |
void | calculatePrimitiveDataAreaWeightedSum (const std::vector< uint > &UUIDs, const std::string &label, float &awt_sum) const |
Calculate sum of primitive data values (float) for a subset of primitives, where each value in the sum calculation is weighted by the primitive's one-sided surface area. | |
void | calculatePrimitiveDataAreaWeightedSum (const std::vector< uint > &UUIDs, const std::string &label, double &sum) const |
Calculate sum of primitive data values (double) for a subset of primitives, where each value in the sum calculation is weighted by the primitive's one-sided surface area. | |
void | calculatePrimitiveDataAreaWeightedSum (const std::vector< uint > &UUIDs, const std::string &label, helios::vec2 &sum) const |
Calculate sum of primitive data values (vec2) for a subset of primitives, where each value in the sum calculation is weighted by the primitive's one-sided surface area. | |
void | calculatePrimitiveDataAreaWeightedSum (const std::vector< uint > &UUIDs, const std::string &label, helios::vec3 &sum) const |
Calculate sum of primitive data values (vec3) for a subset of primitives, where each value in the sum calculation is weighted by the primitive's one-sided surface area. | |
void | calculatePrimitiveDataAreaWeightedSum (const std::vector< uint > &UUIDs, const std::string &label, helios::vec4 &sum) const |
Calculate sum of primitive data values (vec4) for a subset of primitives, where each value in the sum calculation is weighted by the primitive's one-sided surface area. | |
void | scalePrimitiveData (const std::vector< uint > &UUIDs, const std::string &label, float scaling_factor) |
Multiply primitive data values by a constant scaling factor for a subset of primitives. | |
void | scalePrimitiveData (const std::string &label, float scaling_factor) |
Multiply primitive data values by a constant scaling factor for all primitives. | |
void | incrementPrimitiveData (const std::vector< uint > &UUIDs, const char *label, int increment) |
Increase value of primitive data (int) by some value. | |
void | incrementPrimitiveData (const std::vector< uint > &UUIDs, const char *label, uint increment) |
Increase value of primitive data (uint) by some value. | |
void | incrementPrimitiveData (const std::vector< uint > &UUIDs, const char *label, float increment) |
Increase value of primitive data (float) by some value. | |
void | incrementPrimitiveData (const std::vector< uint > &UUIDs, const char *label, double increment) |
Increase value of primitive data (double) by some value. | |
void | aggregatePrimitiveDataSum (const std::vector< uint > &UUIDs, const std::vector< std::string > &primitive_data_labels, const std::string &result_primitive_data_label) |
Sum multiple primitive data values for each primitive together and store result in new primitive data. | |
void | aggregatePrimitiveDataProduct (const std::vector< uint > &UUIDs, const std::vector< std::string > &primitive_data_labels, const std::string &result_primitive_data_label) |
Multiply primitive data values for each primitive together and store result in new primitive data. | |
float | sumPrimitiveSurfaceArea (const std::vector< uint > &UUIDs) const |
Sum the one-sided surface area of a group of primitives. | |
std::vector< uint > | filterPrimitivesByData (const std::vector< uint > &UUIDs, const std::string &primitive_data_label, float filter_value, const std::string &comparator) const |
Filter a set of primitives based on their primitive data and a condition and float value. | |
std::vector< uint > | filterPrimitivesByData (const std::vector< uint > &UUIDs, const std::string &primitive_data_label, double filter_value, const std::string &comparator) const |
Filter a set of primitives based on their primitive data and a condition and double value. | |
std::vector< uint > | filterPrimitivesByData (const std::vector< uint > &UUIDs, const std::string &primitive_data_label, int filter_value, const std::string &comparator) const |
Filter a set of primitives based on their primitive data and a condition and int value. | |
std::vector< uint > | filterPrimitivesByData (const std::vector< uint > &UUIDs, const std::string &primitive_data_label, uint filter_value, const std::string &comparator) const |
Filter a set of primitives based on their primitive data and a condition and uint value. | |
std::vector< uint > | filterPrimitivesByData (const std::vector< uint > &UUIDs, const std::string &primitive_data_label, const std::string &filter_value) const |
Get set of primitives whose primitive data matches a given string. | |
std::vector< uint > | filterObjectsByData (const std::vector< uint > &objIDs, const std::string &object_data_label, float filter_value, const std::string &comparator) const |
Filter a set of compound objects based on their object data and a condition and float value. | |
std::vector< uint > | filterObjectsByData (const std::vector< uint > &objIDs, const std::string &object_data_label, double filter_value, const std::string &comparator) const |
Filter a set of compound objects based on their object data and a condition and double value. | |
std::vector< uint > | filterObjectsByData (const std::vector< uint > &objIDs, const std::string &object_data_label, int filter_value, const std::string &comparator) const |
Filter a set of compound objects based on their object data and a condition and int value. | |
std::vector< uint > | filterObjectsByData (const std::vector< uint > &objIDs, const std::string &object_data_label, uint filter_value, const std::string &comparator) const |
Filter a set of compound objects based on their object data and a condition and uint value. | |
std::vector< uint > | filterObjectsByData (const std::vector< uint > &objIDs, const std::string &object_data_label, const std::string &filter_value) const |
Get set of compound objects whose object data matches a given string. | |
std::vector< std::string > | generateTexturesFromColormap (const std::string &texturefile, const std::vector< RGBcolor > &colormap_data) |
Generates texture files by applying a colormap to an input texture image. | |
std::vector< RGBcolor > | generateColormap (const std::string &colormap, uint Ncolors) |
Generates a colormap with a specified number of colors based on the selected colormap type. | |
std::vector< RGBcolor > | generateColormap (const std::vector< helios::RGBcolor > &ctable, const std::vector< float > &cfrac, uint Ncolors) |
Generates a colormap of interpolated colors based on input color table and fractions. | |
template<typename T > | |
void | storeDataWithTypeCasting (uint UUID, const char *label, const T &data, HeliosDataType target_type) |
template<typename T > | |
void | storeObjectDataWithTypeCasting (uint objID, const char *label, const T &data, HeliosDataType target_type) |
template<typename T > | |
HeliosDataType | registerOrValidatePrimitiveDataType (const std::string &label, HeliosDataType data_type) |
template<typename T > | |
HeliosDataType | registerOrValidateObjectDataType (const std::string &label, HeliosDataType data_type) |
template<typename T > | |
void | incrementPrimitiveValueRegistry (const std::string &label, const T &value) |
Template implementation for incrementing primitive value registry. | |
template<typename T > | |
void | decrementPrimitiveValueRegistry (const std::string &label, const T &value) |
Template implementation for decrementing primitive value registry. | |
template<typename T > | |
void | incrementObjectValueRegistry (const std::string &label, const T &value) |
Template implementation for incrementing object value registry. | |
template<typename T > | |
void | decrementObjectValueRegistry (const std::string &label, const T &value) |
Template implementation for decrementing object value registry. | |
template<typename T > | |
void | getUniquePrimitiveDataValues (const std::string &label, std::vector< T > &values) const |
Get all unique values for a primitive data label (requires caching to be enabled) | |
template<typename T > | |
void | getUniqueObjectDataValues (const std::string &label, std::vector< T > &values) const |
Get all unique values for an object data label (requires caching to be enabled) | |
Static Public Member Functions | |
static int | selfTest (int argc, char **argv) |
Run a self-test of the Context. The Context self-test runs through validation checks of Context-related methods to ensure they are working properly. | |
static bool | scanXMLForTag (const std::string &filename, const std::string &tag, const std::string &label="") |
Scan a Helios XML file to check if a tag exists. | |
Stores the state associated with simulation.
The Context provides an interface to global information about the application environment. It allows access to application-level operations such as adding geometry, running models, and visualization. After creation, the Context must first be initialized via a call to initializeContext(), after which geometry and models can be added and simulated.
Context::Context | ( | ) |
Context default constructor.
Definition at line 20 of file Context.cpp.
Context::~Context | ( | ) |
Context destructor.
Definition at line 3096 of file Context.cpp.
uint Context::addPatch | ( | const helios::vec3 & | center, |
const helios::vec2 & | size, | ||
const helios::SphericalCoord & | rotation, | ||
const helios::RGBAcolor & | color | ||
) |
Add new Patch geometric primitive.
Method to add a new Patch to the Context given its center, size, spherical rotation, and diffuse RGBcolor.
[in] | center | 3D coordinates of Patch center |
[in] | size | width and length of Patch |
[in] | rotation | Spherical rotation |
[in] | color | diffuse R-G-B-A color of Patch |
Definition at line 36 of file Context_primitive.cpp.
uint Context::addPatch | ( | const helios::vec3 & | center, |
const helios::vec2 & | size, | ||
const helios::SphericalCoord & | rotation, | ||
const helios::RGBcolor & | color | ||
) |
Add new Patch geometric primitive.
Method to add a new Patch to the Context given its center, size, spherical rotation, and diffuse RGBcolor.
[in] | center | 3D coordinates of Patch center |
[in] | size | width and length of Patch |
[in] | rotation | Spherical rotation |
[in] | color | diffuse R-G-B color of Patch |
Definition at line 32 of file Context_primitive.cpp.
uint Context::addVoxel | ( | const helios::vec3 & | center, |
const helios::vec3 & | size, | ||
const float & | rotation, | ||
const helios::RGBAcolor & | color | ||
) |
Add new Voxel geometric primitive.
Method to add a new Voxel to the Context given its center, size, spherical rotation, and diffuse RGBAcolor.
[in] | center | 3D coordinates of Voxel center |
[in] | size | width, length, and height of Voxel |
[in] | rotation | spherical rotation angle (elevation,azimuth) in radians of Voxel |
[in] | color | diffuse R-G-B-A color of Voxel |
Definition at line 186 of file Context_primitive.cpp.
uint Context::addVoxel | ( | const helios::vec3 & | center, |
const helios::vec3 & | size, | ||
const float & | rotation, | ||
const helios::RGBcolor & | color | ||
) |
Add new Voxel geometric primitive.
Method to add a new Voxel to the Context given its center, size, spherical rotation, and diffuse RGBcolor.
[in] | center | 3D coordinates of Voxel center |
[in] | size | width, length, and height of Voxel |
[in] | rotation | spherical rotation angle (elevation,azimuth) in radians of Voxel |
[in] | color | diffuse R-G-B color of Voxel |
Definition at line 182 of file Context_primitive.cpp.
void Context::aggregatePrimitiveDataProduct | ( | const std::vector< uint > & | UUIDs, |
const std::vector< std::string > & | primitive_data_labels, | ||
const std::string & | result_primitive_data_label | ||
) |
Multiply primitive data values for each primitive together and store result in new primitive data.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | primitive_data_labels | Vector of primitive data labels, whose values for each primitive will be multiplied |
[in] | result_primitive_data_label | New primitive data label where result will be stored |
Definition at line 1184 of file Context_data.cpp.
void Context::aggregatePrimitiveDataSum | ( | const std::vector< uint > & | UUIDs, |
const std::vector< std::string > & | primitive_data_labels, | ||
const std::string & | result_primitive_data_label | ||
) |
Sum multiple primitive data values for each primitive together and store result in new primitive data.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | primitive_data_labels | Vector of primitive data labels, whose values for each primitive will be summed |
[in] | result_primitive_data_label | New primitive data label where result will be stored |
Definition at line 1053 of file Context_data.cpp.
void Context::appendTubeSegment | ( | uint | ObjID, |
const helios::vec3 & | node_position, | ||
float | node_radius, | ||
const char * | texturefile, | ||
const helios::vec2 & | textureuv_ufrac | ||
) |
Append an additional segment to the existing tube object.
[in] | ObjID | object ID of the Tube object |
[in] | node_position | Cartesian coordinates of the new tube segment node |
[in] | node_radius | Radius of the new tube segment node |
[in] | texturefile | Name of image file for texture map |
[in] | textureuv_ufrac | Fractional u-coordinate of texture map at the beginning (.x) and end (.y) of the segment |
Definition at line 4392 of file Context.cpp.
void Context::appendTubeSegment | ( | uint | ObjID, |
const helios::vec3 & | node_position, | ||
float | radius, | ||
const RGBcolor & | color | ||
) |
Append a tube segment to an existing tube object.
[in] | ObjID | object ID of the Tube object |
[in] | node_position | Cartesian coordinates of the node |
[in] | radius | Radius of the tube segment |
[in] | color | RGB color of the tube segment |
Definition at line 4383 of file Context.cpp.
bool Context::areObjectPrimitivesComplete | ( | uint | objID | ) | const |
Method to query whether all object primitives are in tact.
[in] | objID | Object ID for object to be queried. |
Definition at line 960 of file Context.cpp.
void Context::calculatePrimitiveDataAreaWeightedMean | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
double & | awt_mean | ||
) | const |
Calculate mean of primitive data values (double) for a subset of primitives, where each value in the mean calculation is weighted by the primitive's one-sided surface area.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | awt_mean | Area-weighted mean of primitive data |
Definition at line 568 of file Context_data.cpp.
void Context::calculatePrimitiveDataAreaWeightedMean | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
float & | awt_mean | ||
) | const |
Calculate mean of primitive data values (float) for a subset of primitives, where each value in the mean calculation is weighted by the primitive's one-sided surface area.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | awt_mean | Area-weighted mean of primitive data |
Definition at line 540 of file Context_data.cpp.
void Context::calculatePrimitiveDataAreaWeightedMean | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
helios::vec2 & | awt_mean | ||
) | const |
Calculate mean of primitive data values (vec2) for a subset of primitives, where each value in the mean calculation is weighted by the primitive's one-sided surface area.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | awt_mean | Area-weighted mean of primitive data |
Definition at line 597 of file Context_data.cpp.
void Context::calculatePrimitiveDataAreaWeightedMean | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
helios::vec3 & | awt_mean | ||
) | const |
Calculate mean of primitive data values (vec2) for a subset of primitives, where each value in the mean calculation is weighted by the primitive's one-sided surface area.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | awt_mean | Area-weighted mean of primitive data |
Definition at line 625 of file Context_data.cpp.
void Context::calculatePrimitiveDataAreaWeightedMean | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
helios::vec4 & | awt_mean | ||
) | const |
Calculate mean of primitive data values (vec2) for a subset of primitives, where each value in the mean calculation is weighted by the primitive's one-sided surface area.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | awt_mean | Area-weighted mean of primitive data |
Definition at line 653 of file Context_data.cpp.
void Context::calculatePrimitiveDataAreaWeightedSum | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
double & | sum | ||
) | const |
Calculate sum of primitive data values (double) for a subset of primitives, where each value in the sum calculation is weighted by the primitive's one-sided surface area.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | sum | Sum of primitive data |
Definition at line 803 of file Context_data.cpp.
void Context::calculatePrimitiveDataAreaWeightedSum | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
float & | awt_sum | ||
) | const |
Calculate sum of primitive data values (float) for a subset of primitives, where each value in the sum calculation is weighted by the primitive's one-sided surface area.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | awt_sum | Sum of primitive data |
Definition at line 776 of file Context_data.cpp.
void Context::calculatePrimitiveDataAreaWeightedSum | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
helios::vec2 & | sum | ||
) | const |
Calculate sum of primitive data values (vec2) for a subset of primitives, where each value in the sum calculation is weighted by the primitive's one-sided surface area.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | sum | Sum of primitive data |
Definition at line 830 of file Context_data.cpp.
void Context::calculatePrimitiveDataAreaWeightedSum | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
helios::vec3 & | sum | ||
) | const |
Calculate sum of primitive data values (vec3) for a subset of primitives, where each value in the sum calculation is weighted by the primitive's one-sided surface area.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | sum | Sum of primitive data |
Definition at line 857 of file Context_data.cpp.
void Context::calculatePrimitiveDataAreaWeightedSum | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
helios::vec4 & | sum | ||
) | const |
Calculate sum of primitive data values (vec4) for a subset of primitives, where each value in the sum calculation is weighted by the primitive's one-sided surface area.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | sum | Sum of primitive data |
Definition at line 884 of file Context_data.cpp.
void Context::calculatePrimitiveDataMean | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
double & | mean | ||
) | const |
Calculate mean of primitive data values (double) for a subset of primitives.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | mean | Mean of primitive data |
Definition at line 456 of file Context_data.cpp.
void Context::calculatePrimitiveDataMean | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
float & | mean | ||
) | const |
Calculate mean of primitive data values (float) for a subset of primitives.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | mean | Mean of primitive data |
Definition at line 435 of file Context_data.cpp.
void Context::calculatePrimitiveDataMean | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
helios::vec2 & | mean | ||
) | const |
Calculate mean of primitive data values (vec2) for a subset of primitives.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | mean | Mean of primitive data |
Definition at line 477 of file Context_data.cpp.
void Context::calculatePrimitiveDataMean | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
helios::vec3 & | mean | ||
) | const |
Calculate mean of primitive data values (vec3) for a subset of primitives.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | mean | Mean of primitive data |
Definition at line 498 of file Context_data.cpp.
void Context::calculatePrimitiveDataMean | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
helios::vec4 & | mean | ||
) | const |
Calculate mean of primitive data values (vec4) for a subset of primitives.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | mean | Mean of primitive data |
Definition at line 519 of file Context_data.cpp.
void Context::calculatePrimitiveDataSum | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
double & | sum | ||
) | const |
Calculate sum of primitive data values (double) for a subset of primitives.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | sum | Sum of primitive data |
Definition at line 700 of file Context_data.cpp.
void Context::calculatePrimitiveDataSum | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
float & | sum | ||
) | const |
Calculate sum of primitive data values (float) for a subset of primitives.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | sum | Sum of primitive data |
Definition at line 681 of file Context_data.cpp.
void Context::calculatePrimitiveDataSum | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
helios::vec2 & | sum | ||
) | const |
Calculate sum of primitive data values (vec2) for a subset of primitives.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | sum | Sum of primitive data |
Definition at line 719 of file Context_data.cpp.
void Context::calculatePrimitiveDataSum | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
helios::vec3 & | sum | ||
) | const |
Calculate sum of primitive data values (vec3) for a subset of primitives.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | sum | Sum of primitive data |
Definition at line 738 of file Context_data.cpp.
void Context::calculatePrimitiveDataSum | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
helios::vec4 & | sum | ||
) | const |
Calculate sum of primitive data values (vec4) for a subset of primitives.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[out] | sum | Sum of primitive data |
Definition at line 757 of file Context_data.cpp.
void Context::cleanDeletedObjectIDs | ( | std::vector< std::vector< std::vector< uint > > > & | objIDs | ) | const |
Delete Object IDs from vector if objects no longer exist (3D vector)
[in,out] | objIDs | Vector of object IDs. Object IDs for objects that do not exist will be deleted from the vector. |
Definition at line 991 of file Context.cpp.
void Context::cleanDeletedObjectIDs | ( | std::vector< std::vector< uint > > & | objIDs | ) | const |
Delete Object IDs from vector if objects no longer exist (2D vector)
[in,out] | objIDs | Vector of object IDs. Object IDs for objects that do not exist will be deleted from the vector. |
Definition at line 979 of file Context.cpp.
void Context::cleanDeletedObjectIDs | ( | std::vector< uint > & | objIDs | ) | const |
Delete Object IDs from vector if objects no longer exist (1D vector)
[in,out] | objIDs | Vector of object IDs. Object IDs for objects that do not exist will be deleted from the vector. |
Definition at line 969 of file Context.cpp.
void Context::cleanDeletedUUIDs | ( | std::vector< std::vector< std::vector< uint > > > & | UUIDs | ) | const |
Delete UUIDs from vector if primitives no longer exist (3D vector)
[in,out] | UUIDs | Vector of primitive UUIDs. UUIDs for primitives that do not exist will be deleted from the vector. |
Definition at line 560 of file Context.cpp.
void Context::cleanDeletedUUIDs | ( | std::vector< std::vector< uint > > & | UUIDs | ) | const |
Delete UUIDs from vector if primitives no longer exist (2D vector)
[in,out] | UUIDs | Vector of primitive UUIDs. UUIDs for primitives that do not exist will be deleted from the vector. |
Definition at line 548 of file Context.cpp.
void Context::cleanDeletedUUIDs | ( | std::vector< uint > & | UUIDs | ) | const |
Delete UUIDs from vector if primitives no longer exist (1D vector)
[in,out] | UUIDs | Vector of primitive UUIDs. UUIDs for primitives that do not exist will be deleted from the vector. |
Definition at line 540 of file Context.cpp.
void Context::clearGlobalData | ( | const char * | label | ) |
Delete/clear global data.
[in] | label | Name/label associated with data |
Definition at line 2112 of file Context_data.cpp.
void Context::clearObjectData | ( | const std::vector< uint > & | objIDs, |
const char * | label | ||
) |
Clear primitive data for multiple primitives based on a vector of objIDs.
[in] | objIDs | Vector of unique universal identifiers for compound objects |
[in] | label | Name/label associated with data |
Definition at line 1728 of file Context_data.cpp.
void Context::clearObjectData | ( | uint | objID, |
const char * | label | ||
) |
Clear primitive data for a single primitive based on its objID.
[in] | objID | Unique universal identifier of compound object |
[in] | label | Name/label associated with data |
Definition at line 1697 of file Context_data.cpp.
void Context::clearPrimitiveData | ( | const std::vector< uint > & | UUIDs, |
const char * | label | ||
) |
Clear primitive data for multiple primitives based on a vector of UUIDs.
[in] | UUIDs | Vector of unique universal identifiers for Primitive elements |
[in] | label | Name/label associated with data |
Definition at line 268 of file Context_data.cpp.
void Context::clearPrimitiveData | ( | uint | UUID, |
const char * | label | ||
) |
Clear primitive data for a single primitive based on its UUID.
[in] | UUID | Unique universal identifier of Primitive element |
[in] | label | Name/label associated with data |
Definition at line 237 of file Context_data.cpp.
void Context::colorPrimitiveByDataPseudocolor | ( | const std::vector< uint > & | UUIDs, |
const std::string & | primitive_data, | ||
const std::string & | colormap, | ||
uint | Ncolors | ||
) |
Overwrite primitive color based on a pseudocolor mapping of primitive data values.
[in] | UUIDs | Primitives to apply psudocolor mapping |
[in] | primitive_data | Label of primitive data for mapping |
[in] | colormap | Label of a Helios colormap (e.g., "hot", "cool", "rainbow", "lava") |
[in] | Ncolors | Number of discrete colors in color mapping |
Definition at line 2826 of file Context.cpp.
void Context::colorPrimitiveByDataPseudocolor | ( | const std::vector< uint > & | UUIDs, |
const std::string & | primitive_data, | ||
const std::string & | colormap, | ||
uint | Ncolors, | ||
float | data_min, | ||
float | data_max | ||
) |
Overwrite primitive color based on a pseudocolor mapping of primitive data values. Clamp to specified data range.
[in] | UUIDs | Primitives to apply psudocolor mapping |
[in] | primitive_data | Label of primitive data for mapping |
[in] | colormap | Label of a Helios colormap (e.g., "hot", "cool", "rainbow", "lava") |
[in] | Ncolors | Number of discrete colors in color mapping |
[in] | data_min | Minimum data value to clip colormap |
[in] | data_max | Maximum data value to clip colormap |
Definition at line 2830 of file Context.cpp.
Make a copy of a group of Compound Objects from the context.
[in] | ObjIDs | Identifier for Compound Object. |
Definition at line 1062 of file Context.cpp.
Make a copy of a Compound Objects from the context.
[in] | ObjID | Identifier for Compound Object. |
Definition at line 1073 of file Context.cpp.
copy all object data from one compound object to another
[in] | source_objID | uint Object identifier for compound object that is the source of data for copying |
[in] | destination_objID | uint Object identifier for compound object that is the destination for data copying |
Definition at line 1605 of file Context_data.cpp.
Make a copy of a group of primitives from the context.
[in] | UUIDs | Vector of unique universal identifiers (UUIDs) of primitive to be copied |
Definition at line 482 of file Context_primitive.cpp.
Make a copy of a primitive from the context.
[in] | UUID | Unique universal identifier (UUID) of primitive to be copied |
Definition at line 493 of file Context_primitive.cpp.
copy all primitive data from one primitive to another
[in] | sourceUUID | unique universal identifier (UUID) of primitive that is the source of data for copying |
[in] | destinationUUID | unique universal identifier (UUID) of primitive that is the destination for data copying |
Definition at line 301 of file Context_data.cpp.
Crop the domain such that all primitives lie within some specified axis-aligned box.
[in] | xbounds | Minimum (xbounds.x) and maximum (xbounds.y) extent of cropped domain in x-direction. |
[in] | ybounds | Minimum (ybounds.x) and maximum (ybounds.y) extent of cropped domain in y-direction. |
[in] | zbounds | Minimum (zbounds.x) and maximum (zbounds.y) extent of cropped domain in z-direction. |
Definition at line 954 of file Context.cpp.
void Context::cropDomain | ( | std::vector< uint > & | UUIDs, |
const vec2 & | xbounds, | ||
const vec2 & | ybounds, | ||
const vec2 & | zbounds | ||
) |
Crop specified UUIDs such that they lie within some specified axis-aligned box.
[in,out] | UUIDs | vector of UUIDs to crop |
[in] | xbounds | Minimum (xbounds.x) and maximum (xbounds.y) extent of cropped domain in x-direction. |
[in] | ybounds | Minimum (ybounds.x) and maximum (ybounds.y) extent of cropped domain in y-direction. |
[in] | zbounds | Minimum (zbounds.x) and maximum (zbounds.y) extent of cropped domain in z-direction. |
Definition at line 933 of file Context.cpp.
void Context::cropDomainX | ( | const vec2 & | xbounds | ) |
Crop the domain in the x-direction such that all primitives lie within some specified x interval.
[in] | xbounds | Minimum (xbounds.x) and maximum (xbounds.y) extent of cropped domain in x-direction. |
Definition at line 876 of file Context.cpp.
void Context::cropDomainY | ( | const vec2 & | ybounds | ) |
Crop the domain in the y-direction such that all primitives lie within some specified y interval.
[in] | ybounds | Minimum (ybounds.x) and maximum (ybounds.y) extent of cropped domain in y-direction. |
Definition at line 895 of file Context.cpp.
void Context::cropDomainZ | ( | const vec2 & | zbounds | ) |
Crop the domain in the z-direction such that all primitives lie within some specified z interval.
[in] | zbounds | Minimum (zbounds.x) and maximum (zbounds.y) extent of cropped domain in z-direction. |
Definition at line 914 of file Context.cpp.
|
inline |
|
inline |
void Context::deleteObject | ( | const std::vector< uint > & | ObjIDs | ) |
Delete a group of Compound Objects from the context.
[in] | ObjIDs | Identifier for Compound Object. |
Definition at line 1036 of file Context.cpp.
void Context::deleteObject | ( | uint | ObjID | ) |
Delete a single Compound Object from the context.
[in] | ObjID | Identifier for Compound Object. |
Definition at line 1042 of file Context.cpp.
void Context::deletePrimitive | ( | const std::vector< uint > & | UUIDs | ) |
Delete a group of primitives from the context.
[in] | UUIDs | Vector of unique universal identifiers (UUIDs) of primitives to be deleted |
Definition at line 446 of file Context_primitive.cpp.
void Context::deletePrimitive | ( | uint | UUID | ) |
Delete a single primitive from the context.
[in] | UUID | Unique universal identifier (UUID) of primitive to be deleted |
Definition at line 452 of file Context_primitive.cpp.
helios::Context::DEPRECATED | ( | HeliosDataType getObjectDataType(uint objID, const char *label) const | ) |
Get the Helios data type of primitive data.
[in] | objID | Unique universal identifier of compound object |
[in] | label | Name/label associated with data |
helios::Context::DEPRECATED | ( | HeliosDataType getPrimitiveDataType(uint UUID, const char *label) const | ) |
Get the Helios data type of primitive data.
[in] | UUID | Unique universal identifier of Primitive element |
[in] | label | Name/label associated with data |
void Context::disableObjectDataValueCaching | ( | const std::string & | label | ) |
Disable value-level caching for an object data label.
[in] | label | The object data label to disable caching for. |
Definition at line 56 of file Context_data.cpp.
void Context::disablePrimitiveDataValueCaching | ( | const std::string & | label | ) |
Disable value-level caching for a primitive data label.
[in] | label | The primitive data label to disable caching for. |
Definition at line 40 of file Context_data.cpp.
bool Context::doesGlobalDataExist | ( | const char * | label | ) | const |
Check if global data 'label' exists.
[in] | label | Name/label associated with data |
Definition at line 2171 of file Context_data.cpp.
Method to check if an Object contains a Primitive.
[in] | ObjID | Identifier of the object. |
[in] | UUID | Universal unique identifier of primitive. |
Definition at line 4163 of file Context.cpp.
bool Context::doesObjectDataExist | ( | uint | objID, |
const char * | label | ||
) | const |
Check if primitive data 'label' exists.
[in] | objID | Unique universal identifier of compound object |
[in] | label | Name/label associated with data |
Definition at line 1596 of file Context_data.cpp.
bool Context::doesObjectExist | ( | uint | ObjID | ) | const |
Check whether Compound Object exists in the Context.
[in] | ObjID | Identifier for Compound Object. |
Definition at line 1018 of file Context.cpp.
bool Context::doesPrimitiveDataExist | ( | uint | UUID, |
const char * | label | ||
) | const |
Check if primitive data 'label' exists.
[in] | UUID | Unique universal identifier of Primitive element |
[in] | label | Name/label associated with data |
Definition at line 228 of file Context_data.cpp.
bool Context::doesPrimitiveExist | ( | const std::vector< uint > & | UUIDs | ) | const |
Check if ALL primitives exists for a vector UUIDs.
[in] | UUIDs | Vector of unique universal identifiers of primitive elements |
Definition at line 579 of file Context_primitive.cpp.
bool Context::doesPrimitiveExist | ( | uint | UUID | ) | const |
Check if primitive exists for a given UUID.
[in] | UUID | Unique universal identifier of primitive element |
Definition at line 575 of file Context_primitive.cpp.
void Context::duplicateGlobalData | ( | const char * | old_label, |
const char * | new_label | ||
) |
Make a copy of global data.
[in] | old_label | Old name/label associated with data |
[in] | new_label | New name/label associated with data |
Definition at line 2055 of file Context_data.cpp.
void Context::duplicateObjectData | ( | uint | objID, |
const char * | old_label, | ||
const char * | new_label | ||
) |
Duplicate/copy existing object data.
[in] | objID | Object ID for object to be queried. |
[in] | old_label | Name/label associated with data |
[in] | new_label | Name/label associated with data |
Definition at line 1639 of file Context_data.cpp.
void Context::duplicatePrimitiveData | ( | const char * | existing_data_label, |
const char * | copy_data_label | ||
) |
Duplicate primitive data to create a copy of the primitive data with a new name/label.
[in] | existing_data_label | Name of existing primitive data to be duplicated |
[in] | copy_data_label | Name of new primitive data copy |
Definition at line 401 of file Context_data.cpp.
void Context::duplicatePrimitiveData | ( | uint | UUID, |
const char * | old_label, | ||
const char * | new_label | ||
) |
Duplicate/copy primitive data.
[in] | UUID | unique universal identifier (UUID) of primitive that is the source of data for copying |
[in] | old_label | old label of data to be copied |
[in] | new_label | new label of data to be copied |
Definition at line 352 of file Context_data.cpp.
void Context::enableObjectDataValueCaching | ( | const std::string & | label | ) |
Enable value-level caching for an object data label.
[in] | label | The object data label to enable caching for. Must have string, int, or uint type. |
Definition at line 52 of file Context_data.cpp.
void Context::enablePrimitiveDataValueCaching | ( | const std::string & | label | ) |
Enable value-level caching for a primitive data label.
[in] | label | The primitive data label to enable caching for. Must have string, int, or uint type. |
Definition at line 36 of file Context_data.cpp.
std::vector< uint > Context::filterObjectsByData | ( | const std::vector< uint > & | ObjIDs, |
const char * | object_data, | ||
float | threshold, | ||
const char * | comparator | ||
) | const |
Get a vector of object IDs that meet filtering criteria based on object data.
[in] | ObjIDs | Vector of object IDs to filter |
[in] | object_data | object data field to use when filtering |
[in] | threshold | Value for filter threshold |
[in] | comparator | Points will be filtered if "object_data (comparator) threshold", where (comparator) is one of ">", "<", or "=" |
Definition at line 1160 of file Context.cpp.
std::vector< uint > Context::filterObjectsByData | ( | const std::vector< uint > & | objIDs, |
const std::string & | object_data_label, | ||
const std::string & | filter_value | ||
) | const |
Get set of compound objects whose object data matches a given string.
[in] | objIDs | Universal unique identifiers of objects to be considered. |
[in] | object_data_label | Name of object data. |
[in] | filter_value | String to use as filter. |
Definition at line 2022 of file Context_data.cpp.
std::vector< uint > Context::filterObjectsByData | ( | const std::vector< uint > & | objIDs, |
const std::string & | object_data_label, | ||
double | filter_value, | ||
const std::string & | comparator | ||
) | const |
Filter a set of compound objects based on their object data and a condition and double value.
[in] | objIDs | Universal unique identifiers of objects to be considered. |
[in] | object_data_label | Name of object data. |
[in] | filter_value | Value to use as filter. |
[in] | comparator | Operator to use for filter comparison. Valid comparators are '==', '>', '<', '>=','<='. |
Definition at line 1917 of file Context_data.cpp.
std::vector< uint > Context::filterObjectsByData | ( | const std::vector< uint > & | objIDs, |
const std::string & | object_data_label, | ||
float | filter_value, | ||
const std::string & | comparator | ||
) | const |
Filter a set of compound objects based on their object data and a condition and float value.
[in] | objIDs | Universal unique identifiers of objects to be considered. |
[in] | object_data_label | Name of object data. |
[in] | filter_value | Value to use as filter. |
[in] | comparator | Operator to use for filter comparison. Valid comparators are '==', '>', '<', '>=','<='. |
Definition at line 1882 of file Context_data.cpp.
std::vector< uint > Context::filterObjectsByData | ( | const std::vector< uint > & | objIDs, |
const std::string & | object_data_label, | ||
int | filter_value, | ||
const std::string & | comparator | ||
) | const |
Filter a set of compound objects based on their object data and a condition and int value.
[in] | objIDs | Universal unique identifiers of objects to be considered. |
[in] | object_data_label | Name of object data. |
[in] | filter_value | Value to use as filter. |
[in] | comparator | Operator to use for filter comparison. Valid comparators are '==', '>', '<', '>=','<='. |
Definition at line 1952 of file Context_data.cpp.
std::vector< uint > Context::filterObjectsByData | ( | const std::vector< uint > & | objIDs, |
const std::string & | object_data_label, | ||
uint | filter_value, | ||
const std::string & | comparator | ||
) | const |
Filter a set of compound objects based on their object data and a condition and uint value.
[in] | objIDs | Universal unique identifiers of objects to be considered. |
[in] | object_data_label | Name of object data. |
[in] | filter_value | Value to use as filter. |
[in] | comparator | Operator to use for filter comparison. Valid comparators are '==', '>', '<', '>=','<='. |
Definition at line 1987 of file Context_data.cpp.
std::vector< uint > Context::filterPrimitivesByData | ( | const std::vector< uint > & | UUIDs, |
const std::string & | primitive_data_label, | ||
const std::string & | filter_value | ||
) | const |
Get set of primitives whose primitive data matches a given string.
[in] | UUIDs | Universal unique identifiers of primitives to be considered. |
[in] | primitive_data_label | Name of primitive data. |
[in] | filter_value | String to use as filter. |
Definition at line 1546 of file Context_data.cpp.
std::vector< uint > Context::filterPrimitivesByData | ( | const std::vector< uint > & | UUIDs, |
const std::string & | primitive_data_label, | ||
double | filter_value, | ||
const std::string & | comparator | ||
) | const |
Filter a set of primitives based on their primitive data and a condition and double value.
[in] | UUIDs | Universal unique identifiers of primitives to be considered. |
[in] | primitive_data_label | Name of primitive data. |
[in] | filter_value | Value to use as filter. |
[in] | comparator | Operator to use for filter comparison. Valid comparators are '==', '>', '<', '>=','<='. |
Definition at line 1429 of file Context_data.cpp.
std::vector< uint > Context::filterPrimitivesByData | ( | const std::vector< uint > & | UUIDs, |
const std::string & | primitive_data_label, | ||
float | filter_value, | ||
const std::string & | comparator | ||
) | const |
Filter a set of primitives based on their primitive data and a condition and float value.
[in] | UUIDs | Universal unique identifiers of primitives to be considered. |
[in] | primitive_data_label | Name of primitive data. |
[in] | filter_value | Value to use as filter. |
[in] | comparator | Operator to use for filter comparison. Valid comparators are '==', '>', '<', '>=','<='. |
Definition at line 1390 of file Context_data.cpp.
std::vector< uint > Context::filterPrimitivesByData | ( | const std::vector< uint > & | UUIDs, |
const std::string & | primitive_data_label, | ||
int | filter_value, | ||
const std::string & | comparator | ||
) | const |
Filter a set of primitives based on their primitive data and a condition and int value.
[in] | UUIDs | Universal unique identifiers of primitives to be considered. |
[in] | primitive_data_label | Name of primitive data. |
[in] | filter_value | Value to use as filter. |
[in] | comparator | Operator to use for filter comparison. Valid comparators are '==', '>', '<', '>=','<='. |
Definition at line 1468 of file Context_data.cpp.
std::vector< uint > Context::filterPrimitivesByData | ( | const std::vector< uint > & | UUIDs, |
const std::string & | primitive_data_label, | ||
uint | filter_value, | ||
const std::string & | comparator | ||
) | const |
Filter a set of primitives based on their primitive data and a condition and uint value.
[in] | UUIDs | Universal unique identifiers of primitives to be considered. |
[in] | primitive_data_label | Name of primitive data. |
[in] | filter_value | Value to use as filter. |
[in] | comparator | Operator to use for filter comparison. Valid comparators are '==', '>', '<', '>=','<='. |
Definition at line 1507 of file Context_data.cpp.
Generates a colormap with a specified number of colors based on the selected colormap type.
[in] | colormap | The name of the colormap to generate (e.g., "hot", "cool", "lava", etc.). |
[in] | Ncolors | The desired number of colors in the output colormap. |
Definition at line 2955 of file Context.cpp.
std::vector< RGBcolor > Context::generateColormap | ( | const std::vector< helios::RGBcolor > & | ctable, |
const std::vector< float > & | cfrac, | ||
uint | Ncolors | ||
) |
Generates a colormap of interpolated colors based on input color table and fractions.
[in] | ctable | A vector of RGB colors defining the input color points for interpolation. |
[in] | cfrac | A vector of fractional values corresponding to each color in the color table, must match the size of ctable. |
[in] | Ncolors | Desired number of output colors in the generated colormap. Must be greater than 0. |
Definition at line 2915 of file Context.cpp.
std::vector< std::string > Context::generateTexturesFromColormap | ( | const std::string & | texturefile, |
const std::vector< RGBcolor > & | colormap_data | ||
) |
Generates texture files by applying a colormap to an input texture image.
This function reads an existing texture file and modifies its colors based on a provided colormap. A new set of texture files is created, one for each color in the colormap. Each texture file reflects the applied color from the colormap while preserving the texture's original alpha values.
[in] | texturefile | The path to the input texture file that will be used as the base for generating new textures. |
[in] | colormap_data | A vector containing the RGB colors that will be applied to the texture file. Each color in the colormap results in the generation of one texture file. |
Definition at line 3042 of file Context.cpp.
std::vector< uint > Context::getAllObjectIDs | ( | ) | const |
Get the IDs for all Compound Objects in the Context.
Definition at line 1022 of file Context.cpp.
std::vector< uint > Context::getAllUUIDs | ( | ) | const |
Get all primitive UUIDs currently in the Context.
Definition at line 458 of file Context.cpp.
helios::vec3 Context::getBoxObjectCenter | ( | uint | ObjID | ) | const |
get the center of a Box object from the context
[in] | ObjID | object ID of the Box object |
Definition at line 4446 of file Context.cpp.
Get a pointer to a Box Compound Object.
[in] | ObjID | Identifier for Box Compound Object. |
Definition at line 2387 of file Context_object.cpp.
helios::vec3 Context::getBoxObjectSize | ( | uint | ObjID | ) | const |
get the size of a Box object from the context
[in] | ObjID | object ID of the Box object |
Definition at line 4450 of file Context.cpp.
helios::int3 Context::getBoxObjectSubdivisionCount | ( | uint | ObjID | ) | const |
get the subdivision count of a Box object from the context
[in] | ObjID | object ID of the Box object |
Definition at line 4454 of file Context.cpp.
float Context::getBoxObjectVolume | ( | uint | ObjID | ) | const |
get the volume of a Box object from the context
[in] | ObjID | object ID of the Box object |
Definition at line 4458 of file Context.cpp.
helios::vec3 Context::getConeObjectAxisUnitVector | ( | uint | ObjID | ) | const |
get the axis unit vector of a Cone object from the context
[in] | ObjID | object ID of the Cone object |
Definition at line 4494 of file Context.cpp.
float Context::getConeObjectLength | ( | uint | ObjID | ) | const |
get the length of a Cone object from the context
[in] | ObjID | object ID of the Cone object |
Definition at line 4498 of file Context.cpp.
helios::vec3 Context::getConeObjectNode | ( | uint | ObjID, |
int | number | ||
) | const |
get a node of a Cone object from the context
[in] | ObjID | object ID of the Cone object |
[in] | number | index of the node (0 = base, 1 = tip) |
Definition at line 4486 of file Context.cpp.
std::vector< float > Context::getConeObjectNodeRadii | ( | uint | ObjID | ) | const |
get the node radii of a Cone object from the context
[in] | ObjID | object ID of the Cone object |
Definition at line 4482 of file Context.cpp.
float Context::getConeObjectNodeRadius | ( | uint | ObjID, |
int | number | ||
) | const |
get a node radius of a Cone object from the context
[in] | ObjID | object ID of the Cone object |
[in] | number | index of the node (0 = base, 1 = tip) |
Definition at line 4490 of file Context.cpp.
std::vector< helios::vec3 > Context::getConeObjectNodes | ( | uint | ObjID | ) | const |
get the nodes of a Cone object from the context
[in] | ObjID | object ID of the Cone object |
Definition at line 4478 of file Context.cpp.
Get a pointer to a Cone Compound Object.
[in] | ObjID | Identifier for Cone Compound Object. |
Definition at line 2553 of file Context_object.cpp.
get the subdivision count of a Cone object from the context
[in] | ObjID | object ID of the Cone object |
Definition at line 4474 of file Context.cpp.
float Context::getConeObjectVolume | ( | uint | ObjID | ) | const |
get the volume of a Cone object from the context
[in] | ObjID | object ID of the Cone object |
Definition at line 4502 of file Context.cpp.
Date Context::getDate | ( | ) | const |
Get simulation date.
Definition at line 349 of file Context.cpp.
std::vector< uint > Context::getDeletedUUIDs | ( | ) | const |
Get all primitive UUIDs that were deleted since the Context was last marked clean.
Definition at line 497 of file Context.cpp.
std::vector< uint > Context::getDirtyUUIDs | ( | bool | include_deleted_UUIDs = false | ) | const |
Get all primitive UUIDs that are marked dirty.
[in] | include_deleted_UUIDs | [optional] If true, deleted UUIDs are included in the returned vector. |
Definition at line 477 of file Context.cpp.
helios::vec3 Context::getDiskObjectCenter | ( | uint | ObjID | ) | const |
get the center of a Disk object from the context
[in] | ObjID | object ID of the Disk object |
Definition at line 4462 of file Context.cpp.
Get a pointer to a Disk Compound Object.
[in] | ObjID | Identifier for Disk Compound Object. |
Definition at line 2453 of file Context_object.cpp.
helios::vec2 Context::getDiskObjectSize | ( | uint | ObjID | ) | const |
get the size of a Disk object from the context
[in] | ObjID | object ID of the Disk object |
Definition at line 4466 of file Context.cpp.
get the subdivision count of a Disk object from the context
[in] | ObjID | object ID of the Disk object |
Definition at line 4470 of file Context.cpp.
void Context::getDomainBoundingBox | ( | const std::vector< uint > & | UUIDs, |
helios::vec2 & | xbounds, | ||
helios::vec2 & | ybounds, | ||
helios::vec2 & | zbounds | ||
) | const |
Get a box that bounds a subset of primitives.
[in] | UUIDs | Subset of primitive UUIDs for bounding box calculation. |
[out] | xbounds | Domain bounds in x-direction (xbounds.x=min bound, xbounds.y=max bound) |
[out] | ybounds | Domain bounds in x-direction (ybounds.x=min bound, ybounds.y=max bound) |
[out] | zbounds | Domain bounds in x-direction (zbounds.x=min bound, zbounds.y=max bound) |
Definition at line 781 of file Context.cpp.
void Context::getDomainBoundingBox | ( | helios::vec2 & | xbounds, |
helios::vec2 & | ybounds, | ||
helios::vec2 & | zbounds | ||
) | const |
Get a box that bounds all primitives in the domain.
[out] | xbounds | Domain bounds in x-direction (xbounds.x=min bound, xbounds.y=max bound) |
[out] | ybounds | Domain bounds in x-direction (ybounds.x=min bound, ybounds.y=max bound) |
[out] | zbounds | Domain bounds in x-direction (zbounds.x=min bound, zbounds.y=max bound) |
Definition at line 777 of file Context.cpp.
void Context::getDomainBoundingSphere | ( | const std::vector< uint > & | UUIDs, |
helios::vec3 & | center, | ||
float & | radius | ||
) | const |
Get the center and radius of a sphere that bounds a subset of primitives.
[in] | UUIDs | Subset of primitive UUIDs for bounding sphere calculation. |
[out] | center | Center of primitive bounding sphere. |
[out] | radius | Radius of primitive bounding sphere. |
Definition at line 865 of file Context.cpp.
void Context::getDomainBoundingSphere | ( | helios::vec3 & | center, |
float & | radius | ||
) | const |
Get the center and radius of a sphere that bounds all primitives in the domain.
[out] | center | Center of domain bounding sphere. |
[out] | radius | Radius of domain bounding sphere. |
Definition at line 854 of file Context.cpp.
|
inline |
size_t Context::getGlobalDataSize | ( | const char * | label | ) | const |
Get the size/length of global data.
[in] | label | Name/label associated with data |
Definition at line 2128 of file Context_data.cpp.
HeliosDataType Context::getGlobalDataType | ( | const char * | label | ) | const |
Get the Helios data type of global data.
[in] | label | Name/label associated with data |
Definition at line 2119 of file Context_data.cpp.
int Context::getJulianDate | ( | ) | const |
Get simulation date by Julian day.
Definition at line 381 of file Context.cpp.
std::vector< std::string > Context::getLoadedXMLFiles | ( | ) |
Get names of XML files that are currently loaded.
Definition at line 2250 of file Context_fileIO.cpp.
helios::Location Context::getLocation | ( | ) | const |
Get the location of the simulation (latitude, longitude, and UTC offset)
Definition at line 419 of file Context.cpp.
const char * Context::getMonthString | ( | ) | const |
Get a string corresponding to the month of the simulation date.
Definition at line 353 of file Context.cpp.
float Context::getObjectArea | ( | uint | ObjID | ) | const |
Method to return the one-sided surface area of an object.
[in] | ObjID | Identifier of the object. |
Definition at line 4033 of file Context.cpp.
helios::vec3 Context::getObjectAverageNormal | ( | uint | ObjID | ) | const |
Method to return the average surface normal vector of an object.
[in] | ObjID | Identifier of the object. |
Definition at line 4037 of file Context.cpp.
void Context::getObjectBoundingBox | ( | const std::vector< uint > & | ObjIDs, |
vec3 & | min_corner, | ||
vec3 & | max_corner | ||
) | const |
Get the axis-aligned bounding box for a group of objects.
[in] | ObjIDs | Vector of object identifiers. |
[out] | min_corner | (x,y,z) coordinate of the bounding box corner in the -x, -y and -z direction. |
[out] | max_corner | (x,y,z) coordinate of the bounding box corner in the +x, +y and +z direction. |
Definition at line 4192 of file Context.cpp.
Get the axis-aligned bounding box for a single object.
[in] | ObjID | Identifier of the object. |
[out] | min_corner | (x,y,z) coordinate of the bounding box corner in the -x, -y and -z direction. |
[out] | max_corner | (x,y,z) coordinate of the bounding box corner in the +x, +y and +z direction. |
Definition at line 4187 of file Context.cpp.
helios::vec3 Context::getObjectCenter | ( | uint | ObjID | ) | const |
Method to return the Cartesian (x,y,z) point of the center of a bounding box for the object.
[in] | ObjID | Identifier of the object. |
Definition at line 4059 of file Context.cpp.
uint Context::getObjectCount | ( | ) | const |
Get the total number of objects that have been created in the Context.
Definition at line 1014 of file Context.cpp.
|
inline |
Get data value associated with a vector of compound objects.
T | Object data type |
[in] | objID | Unique identifier of compound object |
[in] | label | Name/label associated with data |
[in] | data | Object data value (vector) |
|
inline |
Get the size/length of primitive data.
[in] | objID | Unique universal identifier of compound object |
[in] | label | Name/label associated with data |
Definition at line 1587 of file Context_data.cpp.
HeliosDataType Context::getObjectDataType | ( | const char * | label | ) | const |
Get the expected data type for an object data label (cached lookup)
[in] | label | Name/label associated with object data |
Definition at line 1569 of file Context_data.cpp.
CompoundObject * Context::getObjectPointer | ( | uint | ObjID | ) | const |
Get a pointer to a Compound Object.
[in] | ObjID | Identifier for Compound Object. |
Definition at line 1005 of file Context.cpp.
Method to return the number of primitives contained in the object.
[in] | ObjID | Identifier of the object. |
Definition at line 4055 of file Context.cpp.
std::vector< uint > Context::getObjectPrimitiveUUIDs | ( | const std::vector< std::vector< uint > > & | ObjIDs | ) | const |
Get primitive UUIDs associated with compound objects (2D vector of object IDs input)
[in] | ObjIDs | vector of object IDs to retrieve primitive UUIDs for |
Definition at line 1410 of file Context.cpp.
Get primitive UUIDs associated with compound objects (1D vector of object IDs input)
[in] | ObjIDs | vector of object IDs to retrieve primitive UUIDs for |
Definition at line 1395 of file Context.cpp.
Get primitive UUIDs associated with compound object (single object ID input)
[in] | ObjID | object ID to retrieve primitive UUIDs for |
Definition at line 1373 of file Context.cpp.
std::string Context::getObjectTextureFile | ( | uint | ObjID | ) | const |
Method to return the texture map file of an Object.
[in] | ObjID | Identifier of the object. |
Definition at line 4063 of file Context.cpp.
void Context::getObjectTransformationMatrix | ( | uint | ObjID, |
float(&) | T[16] | ||
) | const |
Method to return the Affine transformation matrix of an Object.
[in] | ObjID | Identifier of the object. |
[out] | T | 1D vector corresponding to Primitive transformation matrix |
Definition at line 4067 of file Context.cpp.
helios::ObjectType Context::getObjectType | ( | uint | ObjID | ) | const |
Get an enumeration specifying the type of the object.
[in] | ObjID | Object ID for which object type will be retrieved |
Definition at line 1428 of file Context.cpp.
helios::vec3 Context::getPatchCenter | ( | uint | UUID | ) | const |
Get the Cartesian (x,y,z) center position of a patch element.
[in] | UUID | Unique universal identifier for patch. |
Definition at line 613 of file Context_primitive.cpp.
helios::vec2 Context::getPatchSize | ( | uint | UUID | ) | const |
Get the size of a patch element.
[in] | UUID | Unique universal identifier for patch. |
Definition at line 602 of file Context_primitive.cpp.
Get a pointer to a Polygon Mesh Compound Object.
[in] | ObjID | Identifier for Polygon Mesh Compound Object. |
Definition at line 2510 of file Context_object.cpp.
float Context::getPolymeshObjectVolume | ( | uint | ObjID | ) | const |
Get the volume of a Polygon Mesh object from the context.
[in] | ObjID | object ID of the Polygon Mesh object |
Definition at line 4506 of file Context.cpp.
float Context::getPrimitiveArea | ( | uint | UUID | ) | const |
Method to return the surface area of a Primitive.
[in] | UUID | Universal unique identifier of primitive. |
Definition at line 3204 of file Context.cpp.
void Context::getPrimitiveBoundingBox | ( | const std::vector< uint > & | UUIDs, |
vec3 & | min_corner, | ||
vec3 & | max_corner | ||
) | const |
Get the axis-aligned bounding box for a group of primitives.
[in] | UUIDs | Vector of universal unique identifiers of primitives |
[out] | min_corner | (x,y,z) coordinate of the bounding box corner in the -x, -y and -z direction. |
[out] | max_corner | (x,y,z) coordinate of the bounding box corner in the +x, +y and +z direction. |
Definition at line 3218 of file Context.cpp.
Get the axis-aligned bounding box for a single primitive.
[in] | UUID | Universal unique identifier of primitive |
[out] | min_corner | (x,y,z) coordinate of the bounding box corner in the -x, -y and -z direction. |
[out] | max_corner | (x,y,z) coordinate of the bounding box corner in the +x, +y and +z direction. |
Definition at line 3213 of file Context.cpp.
helios::RGBcolor Context::getPrimitiveColor | ( | uint | UUID | ) | const |
Method to return the diffuse color of a Primitive.
[in] | UUID | Universal unique identifier of primitive. |
Definition at line 3280 of file Context.cpp.
helios::RGBcolor Context::getPrimitiveColorRGB | ( | uint | UUID | ) | const |
Method to return the diffuse color of a Primitive.
[in] | UUID | Universal unique identifier of primitive. |
Definition at line 3284 of file Context.cpp.
helios::RGBAcolor Context::getPrimitiveColorRGBA | ( | uint | UUID | ) | const |
Method to return the diffuse color of a Primitive with transparency.
[in] | UUID | Universal unique identifier of primitive. |
Definition at line 3288 of file Context.cpp.
|
inline |
Get data value associated with a vector of primitive elements.
T | Primitive data type |
[in] | UUID | Unique universal identifier of Primitive element |
[in] | label | Name/label associated with data |
[in] | data | Primitive data value (vector) |
|
inline |
Get the size/length of primitive data.
[in] | UUID | Unique universal identifier of Primitive element |
[in] | label | Name/label associated with data |
Definition at line 219 of file Context_data.cpp.
HeliosDataType Context::getPrimitiveDataType | ( | const char * | label | ) | const |
Get the expected data type for a primitive data label (cached lookup)
[in] | label | Name/label associated with primitive data |
Definition at line 96 of file Context_data.cpp.
helios::vec3 Context::getPrimitiveNormal | ( | uint | UUID | ) | const |
Method to return the normal vector of a Primitive.
[in] | UUID | Universal unique identifier of primitive. |
Definition at line 3257 of file Context.cpp.
Method to return the ID of the parent object the primitive belongs to (default is object 0)
[in] | UUIDs | Vector of universal unique identifiers of primitives. |
Definition at line 3153 of file Context.cpp.
Method to return the ID of the parent object the primitive belongs to (default is object 0)
[in] | UUID | Universal unique identifier of primitive. |
Definition at line 3144 of file Context.cpp.
float Context::getPrimitiveSolidFraction | ( | uint | UUID | ) | const |
Get fraction of primitive surface area that is non-transparent.
[in] | UUID | Universal unique identifier for primitive. |
Definition at line 3374 of file Context.cpp.
std::string Context::getPrimitiveTextureFile | ( | uint | UUID | ) | const |
Get the path to texture map file for primitive. If primitive does not have a texture map, the result will be an empty string.
[in] | UUID | Unique universal identifier of primitive to be queried |
Definition at line 3312 of file Context.cpp.
helios::int2 Context::getPrimitiveTextureSize | ( | uint | UUID | ) | const |
Get the size (number of pixels) of primitive texture map image.
[in] | UUID | Unique universal identifier of primitive to be queried |
Definition at line 3320 of file Context.cpp.
const std::vector< std::vector< bool > > * Context::getPrimitiveTextureTransparencyData | ( | uint | UUID | ) | const |
Get the transparency channel pixel data from primitive texture map. If transparency channel does not exist, an error will be thrown.
[in] | UUID | Unique universal identifier of primitive to be queried |
Definition at line 3340 of file Context.cpp.
std::vector< helios::vec2 > Context::getPrimitiveTextureUV | ( | uint | UUID | ) | const |
Get u-v texture coordinates at primitive vertices.
[in] | UUID | Unique universal identifier of primitive to be queried |
Definition at line 3328 of file Context.cpp.
void Context::getPrimitiveTransformationMatrix | ( | uint | UUID, |
float(&) | T[16] | ||
) | const |
Method to return the Affine transformation matrix of a Primitive.
[in] | UUID | Universal unique identifier of primitive. |
[out] | T | 1D vector corresponding to Primitive transformation matrix |
Definition at line 3261 of file Context.cpp.
PrimitiveType Context::getPrimitiveType | ( | uint | UUID | ) | const |
Method to get the Primitive type.
[in] | UUID | Universal unique identifier of primitive. |
Definition at line 3106 of file Context.cpp.
std::vector< helios::vec3 > Context::getPrimitiveVertices | ( | uint | UUID | ) | const |
Method to return the (x,y,z) coordinates of the vertices of a Primitive.
[in] | UUID | Universal unique identifier of primitive. |
Definition at line 3275 of file Context.cpp.
std::minstd_rand0 * Context::getRandomGenerator | ( | ) |
Get the random number generator engine.
Definition at line 48 of file Context.cpp.
helios::vec3 Context::getSphereObjectCenter | ( | uint | ObjID | ) | const |
get the center of a Sphere object from the context
[in] | ObjID | object ID of the Sphere object |
Definition at line 4339 of file Context.cpp.
Get a pointer to a Sphere Compound Object.
[in] | ObjID | Identifier for Sphere Compound Object. |
Definition at line 1818 of file Context_object.cpp.
helios::vec3 Context::getSphereObjectRadius | ( | uint | ObjID | ) | const |
get the radius of a Sphere object from the context
[in] | ObjID | object ID of the Sphere object |
Definition at line 4343 of file Context.cpp.
get the subdivision count of a Sphere object from the context
[in] | ObjID | object ID of the Sphere object |
Definition at line 4347 of file Context.cpp.
float Context::getSphereObjectVolume | ( | uint | ObjID | ) | const |
get the volume of a Sphere object from the context
[in] | ObjID | object ID of the Sphere object |
Definition at line 4351 of file Context.cpp.
std::vector< float > Context::getTileObjectAreaRatio | ( | const std::vector< uint > & | ObjIDs | ) | const |
Get the area ratio of a multiple tile objects (total object area / sub-patch area)
[in] | ObjIDs | Vector of identifiers for Tile Compound Object. |
Definition at line 1467 of file Context.cpp.
float Context::getTileObjectAreaRatio | ( | uint | ObjID | ) | const |
Get the area ratio of a tile object (total object area / sub-patch area)
[in] | ObjID | Identifier for Tile Compound Object. |
Definition at line 1440 of file Context.cpp.
helios::vec3 Context::getTileObjectCenter | ( | uint | ObjID | ) | const |
Get the Cartesian (x,y,z) center position of a tile object.
[in] | ObjID | object ID of the tile object |
Definition at line 4315 of file Context.cpp.
helios::vec3 Context::getTileObjectNormal | ( | uint | ObjID | ) | const |
get the normal of a tile object from the context
[in] | ObjID | object ID of the tile object |
Definition at line 4327 of file Context.cpp.
Get a pointer to a Tile Compound Object.
[in] | ObjID | Identifier for Tile Compound Object. |
Definition at line 1731 of file Context_object.cpp.
helios::vec2 Context::getTileObjectSize | ( | uint | ObjID | ) | const |
get the size of a tile object from the context
[in] | ObjID | object ID of the tile object |
Definition at line 4319 of file Context.cpp.
helios::int2 Context::getTileObjectSubdivisionCount | ( | uint | ObjID | ) | const |
get the subdivision count of a tile object from the context
[in] | ObjID | object ID of the tile object |
Definition at line 4323 of file Context.cpp.
std::vector< helios::vec2 > Context::getTileObjectTextureUV | ( | uint | ObjID | ) | const |
get the texture UV coordinates of a tile object from the context
[in] | ObjID | object ID of the tile object |
Definition at line 4331 of file Context.cpp.
std::vector< helios::vec3 > Context::getTileObjectVertices | ( | uint | ObjID | ) | const |
get the vertices of a tile object from the context
[in] | ObjID | object ID of the tile object |
Definition at line 4335 of file Context.cpp.
Time Context::getTime | ( | ) | const |
Get the simulation time.
Definition at line 411 of file Context.cpp.
helios::vec3 Context::getTriangleVertex | ( | uint | UUID, |
uint | number | ||
) | const |
Get a single vertex of a Triangle based on an index.
[in] | UUID | Universal unique identifier of Triangle element. |
[in] | number | Index of vertex (0, 1, or 2) |
Definition at line 635 of file Context_primitive.cpp.
get the node colors of a Tube object from the context
[in] | ObjID | object ID of the Tube object |
Definition at line 4371 of file Context.cpp.
get the number of nodes of a Tube object from the context
[in] | ObjID | object ID of the Tube object |
Definition at line 4363 of file Context.cpp.
std::vector< float > Context::getTubeObjectNodeRadii | ( | uint | ObjID | ) | const |
get the node radii of a Tube object from the context
[in] | ObjID | object ID of the Tube object |
Definition at line 4367 of file Context.cpp.
std::vector< helios::vec3 > Context::getTubeObjectNodes | ( | uint | ObjID | ) | const |
get the nodes of a Tube object from the context
[in] | ObjID | object ID of the Tube object |
Definition at line 4359 of file Context.cpp.
Get a pointer to a Tube Compound Object.
[in] | ObjID | Identifier for Tube Compound Object. |
Definition at line 1892 of file Context_object.cpp.
get the volume of a segment within a Tube object
[in] | ObjID | object ID of the Tube object |
[in] | segment_index | Index of the segment within the Tube object |
Definition at line 4379 of file Context.cpp.
get the subdivision count of a Tube object from the context
[in] | ObjID | object ID of the Tube object |
Definition at line 4355 of file Context.cpp.
float Context::getTubeObjectVolume | ( | uint | ObjID | ) | const |
get the volume of a Tube object from the context
[in] | ObjID | object ID of the Tube object |
Definition at line 4375 of file Context.cpp.
|
inline |
Get all unique values for an object data label (requires caching to be enabled)
T | Data type (std::string, int, or uint) |
[in] | label | The object data label to query. |
[out] | values | Vector to store the unique values. |
|
inline |
Get all unique values for a primitive data label (requires caching to be enabled)
T | Data type (std::string, int, or uint) |
[in] | label | The primitive data label to query. |
[out] | values | Vector to store the unique values. |
std::vector< uint > Context::getUniquePrimitiveParentObjectIDs | ( | const std::vector< uint > & | UUIDs | ) | const |
Method to return unique parent object IDs for a vector of primitive UUIDs.
[in] | UUIDs | Vector of universal unique identifiers of primitives. |
Definition at line 3167 of file Context.cpp.
std::vector< uint > Context::getUniquePrimitiveParentObjectIDs | ( | const std::vector< uint > & | UUIDs, |
bool | include_ObjID_zero | ||
) | const |
Method to return unique parent object IDs for a vector of primitive UUIDs.
[in] | UUIDs | Vector of universal unique identifiers of primitives. |
[in] | include_ObjID_zero | Include object ID 0 in the list of unique parent object IDs. |
Definition at line 3172 of file Context.cpp.
helios::vec3 Context::getVoxelCenter | ( | uint | UUID | ) | const |
Get the Cartesian (x,y,z) center position of a voxel element.
[in] | UUID | Unique universal identifier for voxel. |
Definition at line 679 of file Context_primitive.cpp.
helios::vec3 Context::getVoxelSize | ( | uint | UUID | ) | const |
Get the size of a voxel element.
[in] | UUID | Unique universal identifier for voxel. |
Definition at line 668 of file Context_primitive.cpp.
void Context::hideObject | ( | const std::vector< uint > & | ObjIDs | ) |
Hide compound objects in the Context such that their object IDs are not returned in Context::getAllObjectIDs(), and are not counted in Context::getObjectCount()
[in] | ObjIDs | Identifier of the object. |
Definition at line 3997 of file Context.cpp.
void Context::hideObject | ( | uint | ObjID | ) |
Hide compound object in the Context such that its object ID is not returned in Context::getAllObjectIDs(), and is not counted in Context::getObjectCount()
[in] | ObjID | Identifier of the object. |
Definition at line 3980 of file Context.cpp.
void Context::hidePrimitive | ( | const std::vector< uint > & | UUIDs | ) | const |
Hide primitives in the Context such that their UUIDs are not returned in Context::getAllUUIDs()
[in] | UUIDs | Vector of primitive UUIDs to hide |
Definition at line 511 of file Context.cpp.
void Context::hidePrimitive | ( | uint | UUID | ) | const |
Hide primitive in the Context such that its UUID is not returned in Context::getAllUUIDs()
[in] | UUID | Primitive UUID to hide |
Definition at line 501 of file Context.cpp.
void Context::incrementGlobalData | ( | const char * | label, |
double | increment | ||
) |
Increase value of global data (double) by some value.
[in] | label | Global data label string |
[in] | increment | Value to increment global data by |
Definition at line 2226 of file Context_data.cpp.
void Context::incrementGlobalData | ( | const char * | label, |
float | increment | ||
) |
Increase value of global data (float) by some value.
[in] | label | Global data label string |
[in] | increment | Value to increment global data by |
Definition at line 2209 of file Context_data.cpp.
void Context::incrementGlobalData | ( | const char * | label, |
int | increment | ||
) |
Increase value of global data (int) by some value.
[in] | label | Global data label string |
[in] | increment | Value to increment global data by |
Definition at line 2175 of file Context_data.cpp.
void Context::incrementGlobalData | ( | const char * | label, |
uint | increment | ||
) |
Increase value of global data (uint) by some value.
[in] | label | Global data label string |
[in] | increment | Value to increment global data by |
Definition at line 2192 of file Context_data.cpp.
|
inline |
void Context::incrementPrimitiveData | ( | const std::vector< uint > & | UUIDs, |
const char * | label, | ||
double | increment | ||
) |
Increase value of primitive data (double) by some value.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | primitive data label string |
[in] | increment | Value to increment primitive data by |
Definition at line 1032 of file Context_data.cpp.
void Context::incrementPrimitiveData | ( | const std::vector< uint > & | UUIDs, |
const char * | label, | ||
float | increment | ||
) |
Increase value of primitive data (float) by some value.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | primitive data label string |
[in] | increment | Value to increment primitive data by |
Definition at line 1011 of file Context_data.cpp.
void Context::incrementPrimitiveData | ( | const std::vector< uint > & | UUIDs, |
const char * | label, | ||
int | increment | ||
) |
Increase value of primitive data (int) by some value.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | primitive data label string |
[in] | increment | Value to increment primitive data by |
Definition at line 969 of file Context_data.cpp.
void Context::incrementPrimitiveData | ( | const std::vector< uint > & | UUIDs, |
const char * | label, | ||
uint | increment | ||
) |
Increase value of primitive data (uint) by some value.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | primitive data label string |
[in] | increment | Value to increment primitive data by |
Definition at line 990 of file Context_data.cpp.
|
inline |
bool Context::isGeometryDirty | ( | ) | const |
Query whether the Context geometry is "dirty", meaning has the geometry been modified since last set as clean.
Definition at line 263 of file Context.cpp.
bool Context::isObjectDataValueCachingEnabled | ( | const std::string & | label | ) | const |
Check if value-level caching is enabled for an object data label.
[in] | label | The object data label to check. |
Definition at line 64 of file Context_data.cpp.
bool Context::isObjectHidden | ( | uint | ObjID | ) | const |
Query if an object is hidden.
[in] | ObjID | Identifier of the object. |
Definition at line 4026 of file Context.cpp.
bool Context::isPrimitiveDataValueCachingEnabled | ( | const std::string & | label | ) | const |
Check if value-level caching is enabled for a primitive data label.
[in] | label | The primitive data label to check. |
Definition at line 48 of file Context_data.cpp.
bool Context::isPrimitiveDirty | ( | uint | UUID | ) | const |
Query whether a given primitive is "dirty", meaning it has been modified since last set as clean.
[in] | UUID | Universal unique identifier of the primitive to query |
Definition at line 305 of file Context.cpp.
bool Context::isPrimitiveHidden | ( | uint | UUID | ) | const |
Query whether a primitive is hidden.
[in] | UUID | Unique universal identifier of primitive element |
Definition at line 533 of file Context.cpp.
bool Context::isPrimitiveTextureColorOverridden | ( | uint | UUID | ) | const |
Check if color of texture map is overridden by the diffuse R-G-B color of the primitive.
[in] | UUID | Unique universal identifier of primitive to be queried |
Definition at line 3370 of file Context.cpp.
std::vector< std::string > Context::listAllObjectDataLabels | ( | ) | const |
Lists all object data labels that exist in the Context.
Definition at line 2160 of file Context_data.cpp.
std::vector< std::string > Context::listAllPrimitiveDataLabels | ( | ) | const |
Lists all primitive data labels that exist in the Context.
Definition at line 2148 of file Context_data.cpp.
std::vector< std::string > Context::listGlobalData | ( | ) | const |
List the labels for all global data in the Context.
Definition at line 2137 of file Context_data.cpp.
std::vector< std::string > Context::listObjectData | ( | uint | ObjID | ) | const |
Return labels for all object data for this particular object.
Definition at line 1761 of file Context_data.cpp.
std::vector< std::string > Context::listPrimitiveData | ( | uint | UUID | ) | const |
Return labels for all primitive data for this particular primitive.
Definition at line 397 of file Context_data.cpp.
std::vector< std::string > Context::listTimeseriesVariables | ( | ) | const |
List all existing timeseries variables.
Definition at line 767 of file Context.cpp.
std::vector< uint > Context::loadOBJ | ( | const char * | filename, |
bool | silent = false |
||
) |
Load geometry contained in a Wavefront OBJ file (.obj). Model will be placed at the origin without any scaling or rotation applied.
[in] | filename | name of OBJ file |
[in] | silent | [optional] If set to true, output messaged will be disabled |
Definition at line 3557 of file Context_fileIO.cpp.
std::vector< uint > Context::loadOBJ | ( | const char * | filename, |
const vec3 & | origin, | ||
const helios::vec3 & | scale, | ||
const SphericalCoord & | rotation, | ||
const RGBcolor & | default_color, | ||
const char * | upaxis, | ||
bool | silent = false |
||
) |
Load geometry contained in a Wavefront OBJ file (.obj)
[in] | filename | name of OBJ file |
[in] | origin | (x,y,z) coordinate of PLY object origin (i.e., coordinate shift) |
[in] | scale | (x,y,z) scaling factor to be applied to OBJ vertex coordinates (if scale.x=scale.y=scale.z=0, no scaling is applied). |
[in] | rotation | Spherical rotation of PLY object about origin |
[in] | default_color | Color to be used if no r-g-b color values are given for PLY nodes |
[in] | upaxis | Direction of "up" vector used when creating OBJ file (one of "XUP", "YUP", or "ZUP" - "ZUP" is default). |
[in] | silent | [optional] If set to true, output messaged will be disabled |
Definition at line 3569 of file Context_fileIO.cpp.
std::vector< uint > Context::loadOBJ | ( | const char * | filename, |
const vec3 & | origin, | ||
float | height, | ||
const SphericalCoord & | rotation, | ||
const RGBcolor & | default_color, | ||
bool | silent = false |
||
) |
Load geometry contained in a Wavefront OBJ file (.obj)
[in] | filename | name of OBJ file |
[in] | origin | (x,y,z) coordinate of PLY object origin (i.e., coordinate shift) |
[in] | height | A z-scaling factor is applied to make the model 'height' tall. If height=0, no scaling is applied |
[in] | rotation | Spherical rotation of PLY object about origin |
[in] | default_color | Color to be used if no r-g-b color values are given for PLY nodes |
[in] | silent | [optional] If set to true, output messaged will be disabled |
Definition at line 3561 of file Context_fileIO.cpp.
std::vector< uint > Context::loadOBJ | ( | const char * | filename, |
const vec3 & | origin, | ||
float | height, | ||
const SphericalCoord & | rotation, | ||
const RGBcolor & | default_color, | ||
const char * | upaxis, | ||
bool | silent = false |
||
) |
Load geometry contained in a Wavefront OBJ file (.obj)
[in] | filename | name of OBJ file |
[in] | origin | (x,y,z) coordinate of PLY object origin (i.e., coordinate shift) |
[in] | height | A z-scaling factor is applied to make the model 'height' tall. If height=0, no scaling is applied |
[in] | rotation | Spherical rotation of PLY object about origin |
[in] | default_color | Color to be used if no r-g-b color values are given for PLY nodes |
[in] | upaxis | Direction of "up" vector used when creating OBJ file (one of "XUP", "YUP", or "ZUP" - "ZUP" is default). |
[in] | silent | [optional] If set to true, output messaged will be disabled |
Definition at line 3565 of file Context_fileIO.cpp.
std::vector< uint > Context::loadPLY | ( | const char * | filename, |
bool | silent = false |
||
) |
Load geometry contained in a Stanford polygon file (.ply). Model will be placed at the origin with no scaling or rotation applied.
[in] | filename | name of ply file. |
[in] | silent | [optional] If set to true, output messaged will be disabled. |
Definition at line 3191 of file Context_fileIO.cpp.
std::vector< uint > Context::loadPLY | ( | const char * | filename, |
const vec3 & | origin, | ||
float | height, | ||
const RGBcolor & | default_color, | ||
const std::string & | upaxis = "YUP" , |
||
bool | silent = false |
||
) |
Load geometry contained in a Stanford polygon file (.ply)
[in] | filename | name of ply file. |
[in] | origin | (x,y,z) coordinate of PLY object origin (i.e., coordinate shift) |
[in] | height | Scaling factor to be applied to give model an overall height of "height" (setting height=0 applies no scaling) |
[in] | default_color | Color to be used if no r-g-b color values are given for PLY nodes |
[in] | upaxis | [optional] Axis defining upward direction used in the PLY file ("XUP", "YUP", or "ZUP"). Default is "YUP". |
[in] | silent | [optional] If set to true, output messaged will be disabled |
Definition at line 3203 of file Context_fileIO.cpp.
std::vector< uint > Context::loadPLY | ( | const char * | filename, |
const vec3 & | origin, | ||
float | height, | ||
const SphericalCoord & | rotation, | ||
const RGBcolor & | default_color, | ||
const std::string & | upaxis = "YUP" , |
||
bool | silent = false |
||
) |
Load geometry contained in a Stanford polygon file (.ply)
[in] | filename | name of ply file. |
[in] | origin | (x,y,z) coordinate of PLY object origin (i.e., coordinate shift) |
[in] | height | Scaling factor to be applied to give model an overall height of "height" (setting height=0 applies no scaling) |
[in] | rotation | Spherical rotation of PLY object about origin |
[in] | default_color | Color to be used if no r-g-b color values are given for PLY nodes |
[in] | upaxis | [optional] Axis defining upward direction used in the PLY file ("XUP", "YUP", or "ZUP"). Default is "YUP". |
[in] | silent | [optional] If set to true, output messaged will be disabled |
Definition at line 3207 of file Context_fileIO.cpp.
std::vector< uint > Context::loadPLY | ( | const char * | filename, |
const vec3 & | origin, | ||
float | height, | ||
const SphericalCoord & | rotation, | ||
const std::string & | upaxis = "YUP" , |
||
bool | silent = false |
||
) |
Load geometry contained in a Stanford polygon file (.ply)
[in] | filename | name of ply file. |
[in] | origin | (x,y,z) coordinate of PLY object origin (i.e., coordinate shift). |
[in] | height | Scaling factor to be applied to give model an overall height of "height" (setting height=0 applies no scaling) |
[in] | rotation | Spherical rotation of PLY object about origin |
[in] | upaxis | [optional] Axis defining upward direction used in the PLY file ("XUP", "YUP", or "ZUP"). Default is "YUP". |
[in] | silent | [optional] If set to true, output messaged will be disabled |
Definition at line 3199 of file Context_fileIO.cpp.
std::vector< uint > Context::loadPLY | ( | const char * | filename, |
const vec3 & | origin, | ||
float | height, | ||
const std::string & | upaxis = "YUP" , |
||
bool | silent = false |
||
) |
Load geometry contained in a Stanford polygon file (.ply)
[in] | filename | name of ply file. |
[in] | origin | (x,y,z) coordinate of PLY object origin (i.e., coordinate shift) |
[in] | height | Scaling factor to be applied to give model an overall height of "height" (setting height=0 applies no scaling) |
[in] | upaxis | [optional] Axis defining upward direction used in the PLY file ("XUP", "YUP", or "ZUP"). Default is "YUP". |
[in] | silent | [optional] If set to true, output messaged will be disabled. |
Definition at line 3195 of file Context_fileIO.cpp.
void Context::loadTabularTimeseriesData | ( | const std::string & | data_file, |
const std::vector< std::string > & | column_labels, | ||
const std::string & | delimiter, | ||
const std::string & | date_string_format = "YYYYMMDD" , |
||
uint | headerlines = 0 |
||
) |
Load tabular weather data from text file into timeseries.
[in] | data_file | Path to the text file containing the tabular weather data. |
[in] | column_labels | Vector of strings indicating which columns to extract. |
[in] | delimiter | Character or string that separates values in each row. |
[in] | date_string_format | [optional] Format of date strings. Default: "YYYYMMDD". |
[in] | headerlines | [optional] Number of lines to skip at the beginning. Default: 0. |
Definition at line 4796 of file Context_fileIO.cpp.
std::vector< uint > Context::loadXML | ( | const char * | filename, |
bool | quiet = false |
||
) |
Load inputs specified in an XML file.
[in] | filename | name of XML file. |
[in] | quiet | [optional] If set to true, command line output will be disabled. Optional argument - default value is false. |
Definition at line 1115 of file Context_fileIO.cpp.
void Context::markGeometryClean | ( | ) |
Mark the Context geometry as "clean", meaning that the geometry has not been modified since last set as clean.
Definition at line 250 of file Context.cpp.
void Context::markGeometryDirty | ( | ) |
Mark the Context geometry as "dirty", meaning that the geometry has been modified since last set as clean.
Definition at line 257 of file Context.cpp.
void Context::markPrimitiveClean | ( | const std::vector< uint > & | UUIDs | ) | const |
Mark multiple primitives as "clean", meaning they have not been modified since last set as clean.
[in] | UUIDs | Vector of universal unique identifiers of primitives to mark clean |
Definition at line 299 of file Context.cpp.
void Context::markPrimitiveClean | ( | uint | UUID | ) | const |
Mark a primitive as "clean", meaning it has not been modified since last set as clean.
[in] | UUID | Universal unique identifier of the primitive to mark clean |
Definition at line 290 of file Context.cpp.
void Context::markPrimitiveDirty | ( | const std::vector< uint > & | UUIDs | ) | const |
Mark multiple primitives as "dirty", meaning they have been modified since last set as clean.
[in] | UUIDs | Vector of universal unique identifiers of primitives to mark dirty |
Definition at line 284 of file Context.cpp.
void Context::markPrimitiveDirty | ( | uint | UUID | ) | const |
Mark a primitive as "dirty", meaning it has been modified since last set as clean.
[in] | UUID | Universal unique identifier of the primitive to mark dirty |
Definition at line 275 of file Context.cpp.
bool Context::objectHasTexture | ( | uint | ObjID | ) | const |
Method to check whether an Object has texture data.
[in] | ObjID | Identifier of the object. |
Definition at line 4139 of file Context.cpp.
void Context::overrideObjectTextureColor | ( | const std::vector< uint > & | ObjIDs | ) | const |
Override the color in the texture map for all primitives in the Compound Object, in which case the primitives will be colored by the constant RGB color, but will apply the transparency channel in the texture to determine its shape.
[in] | ObjIDs | Vector of object identifiers. |
Definition at line 4171 of file Context.cpp.
void Context::overrideObjectTextureColor | ( | uint | ObjID | ) | const |
Override the color in the texture map for all primitives in the Compound Object, in which case the primitives will be colored by the constant RGB color, but will apply the transparency channel in the texture to determine its shape.
[in] | ObjID | Identifier of the object. |
Definition at line 4167 of file Context.cpp.
void Context::overridePrimitiveTextureColor | ( | const std::vector< uint > & | UUIDs | ) | const |
Override the color in the texture map for multiple primitives, in which case the primitives will be colored by the constant RGB color, but will apply the transparency channel in the texture to determine its shape.
[in] | UUIDs | Vector of universal unique identifier of primitives. |
Definition at line 3354 of file Context.cpp.
void Context::overridePrimitiveTextureColor | ( | uint | UUID | ) | const |
Override the color in the texture map for all primitives in the Compound Object, in which case the primitives will be colored by the constant RGB color, but will apply the transparency channel in the texture to determine its shape.
[in] | UUID | Universal unique identifier of primitive. |
Definition at line 3350 of file Context.cpp.
bool Context::primitiveTextureHasTransparencyChannel | ( | uint | UUID | ) | const |
Check if primitive texture map has a transparency channel.
[in] | UUID | Unique universal identifier of primitive to be queried |
Definition at line 3332 of file Context.cpp.
void Context::printObjectInfo | ( | uint | ObjID | ) | const |
Prints object properties to console (useful for debugging purposes)
[in] | ObjID | Object ID of the object that's information will be printed'. |
Definition at line 3622 of file Context.cpp.
void Context::printPrimitiveInfo | ( | uint | UUID | ) | const |
Prints primitive properties to console (useful for debugging purposes)
[in] | UUID | Universal unique identifier of primitive. |
Definition at line 3378 of file Context.cpp.
Remove a portion of the tube downstream of a specified node.
[in] | ObjID | object ID of the Tube object |
[in] | node_index | Index of the tube segment node beyond which will be removed |
Definition at line 4428 of file Context.cpp.
float Context::randn | ( | ) |
Draw a random number from a normal distribution with mean = 0, stddev = 1.
Definition at line 449 of file Context.cpp.
float Context::randn | ( | float | mean, |
float | stddev | ||
) |
Draw a random number from a normal distribution with specified mean and standard deviation.
[in] | mean | Mean value of random distribution |
[in] | stddev | Standard deviation of random normal distribution |
Definition at line 453 of file Context.cpp.
float Context::randu | ( | ) |
Draw a random number from a uniform distribution between 0 and 1.
Definition at line 423 of file Context.cpp.
float Context::randu | ( | float | min, |
float | max | ||
) |
Draw a random number from a uniform distribution with specified range.
[in] | min | Minimum value of random uniform distribution (float) |
[in] | max | Maximum value of random uniform distribution (float) |
Definition at line 427 of file Context.cpp.
int Context::randu | ( | int | min, |
int | max | ||
) |
Draw a random number from a uniform distribution with specified range.
[in] | min | Minimum value of random uniform distribution (integer) |
[in] | max | Maximum value of random uniform distribution (integer) |
Definition at line 438 of file Context.cpp.
|
inline |
|
inline |
void Context::renameGlobalData | ( | const char * | old_label, |
const char * | new_label | ||
) |
Rename global data.
[in] | old_label | Old name/label associated with data |
[in] | new_label | New name/label associated with data |
Definition at line 2045 of file Context_data.cpp.
void Context::renameObjectData | ( | uint | objID, |
const char * | old_label, | ||
const char * | new_label | ||
) |
Rename existing object data.
[in] | objID | Object ID for object to be queried. |
[in] | old_label | Name/label associated with data |
[in] | new_label | Name/label associated with data |
Definition at line 1683 of file Context_data.cpp.
void Context::renamePrimitiveData | ( | uint | UUID, |
const char * | old_label, | ||
const char * | new_label | ||
) |
Rename primitive data for a primitive.
[in] | UUID | unique universal identifier (UUID) of primitive that is the source of data for copying |
[in] | old_label | old label of data to be renamed |
[in] | new_label | new label of data to be renamed |
Definition at line 337 of file Context_data.cpp.
std::filesystem::path Context::resolveFilePath | ( | const std::string & | filename | ) | const |
Unified file path resolution for Context methods - resolves relative paths using build directory.
[in] | filename | Relative or absolute file path to resolve |
Definition at line 54 of file Context.cpp.
void Context::rotateObject | ( | const std::vector< uint > & | ObjIDs, |
float | rotation_radians, | ||
const char * | rotation_axis_xyz | ||
) | const |
Rotate multiple compound objects about the x, y, or z axis based on a vector of UUIDs.
[in] | ObjIDs | Vector of object IDs to translate |
[in] | rotation_radians | Rotation angle in radians |
[in] | rotation_axis_xyz | Axis about which to rotate (must be one of x, y, z) |
Definition at line 1262 of file Context.cpp.
void Context::rotateObject | ( | const std::vector< uint > & | ObjIDs, |
float | rotation_radians, | ||
const vec3 & | rotation_axis_vector | ||
) | const |
Rotate multiple compound objects about an arbitrary axis passing through the origin based on a vector of UUIDs.
[in] | ObjIDs | Vector of object IDs to translate |
[in] | rotation_radians | Rotation angle in radians |
[in] | rotation_axis_vector | Vector describing axis about which to rotate |
Definition at line 1277 of file Context.cpp.
void Context::rotateObject | ( | const std::vector< uint > & | ObjIDs, |
float | rotation_radians, | ||
const vec3 & | rotation_origin, | ||
const vec3 & | rotation_axis_vector | ||
) | const |
Rotate multiple compound objects about an arbitrary line (not necessarily passing through the origin) based on a vector of UUIDs.
[in] | ObjIDs | Vector of object IDs to translate |
[in] | rotation_radians | Rotation angle in radians |
[in] | rotation_origin | Cartesian coordinate of the base/origin of rotation axis |
[in] | rotation_axis_vector | Vector describing axis about which to rotate |
Definition at line 1292 of file Context.cpp.
void Context::rotateObject | ( | uint | ObjID, |
float | rotation_radians, | ||
const char * | rotation_axis_xyz | ||
) | const |
Rotate a single compound object about the x, y, or z axis.
[in] | ObjID | Object ID to rotate |
[in] | rotation_radians | Rotation angle in radians |
[in] | rotation_axis_xyz | Axis about which to rotate (must be one of x, y, z) |
Definition at line 1253 of file Context.cpp.
void Context::rotateObject | ( | uint | ObjID, |
float | rotation_radians, | ||
const vec3 & | rotation_axis_vector | ||
) | const |
Rotate a single compound object about an arbitrary axis passing through the origin.
[in] | ObjID | Object ID to rotate |
[in] | rotation_radians | Rotation angle in radians |
[in] | rotation_axis_vector | Vector describing axis about which to rotate |
Definition at line 1268 of file Context.cpp.
void Context::rotateObject | ( | uint | ObjID, |
float | rotation_radians, | ||
const vec3 & | rotation_origin, | ||
const vec3 & | rotation_axis_vector | ||
) | const |
Rotate a single compound object about an arbitrary line (not necessarily passing through the origin)
[in] | ObjID | Object ID to rotate |
[in] | rotation_radians | Rotation angle in radians |
[in] | rotation_origin | Cartesian coordinate of the base/origin of rotation axis |
[in] | rotation_axis_vector | Vector describing axis about which to rotate |
Definition at line 1283 of file Context.cpp.
void Context::rotateObjectAboutOrigin | ( | const std::vector< uint > & | ObjIDs, |
float | rotation_radians, | ||
const vec3 & | rotation_axis_vector | ||
) | const |
Rotate multiple compound objects about an arbitrary line passing through the objects origin point.
[in] | ObjIDs | Vector of object IDs to translate |
[in] | rotation_radians | Rotation angle in radians |
[in] | rotation_axis_vector | Vector describing axis about which to rotate |
Definition at line 1307 of file Context.cpp.
void Context::rotateObjectAboutOrigin | ( | uint | ObjID, |
float | rotation_radians, | ||
const vec3 & | rotation_axis_vector | ||
) | const |
Rotate a single compound object about an arbitrary line passing through the objects origin point.
[in] | ObjID | Object ID to rotate |
[in] | rotation_radians | Rotation angle in radians |
[in] | rotation_axis_vector | Vector describing axis about which to rotate |
Definition at line 1298 of file Context.cpp.
void Context::rotatePrimitive | ( | const std::vector< uint > & | UUIDs, |
float | rotation_rad, | ||
const char * | axis | ||
) |
Rotate a group of primitives about the x, y, or z axis using a vector of UUIDs.
[in] | UUIDs | Unique universal identifier (UUID) of primitive to be translated |
[in] | rotation_rad | Rotation angle in radians |
[in] | axis | Axis about which to rotate (must be one of x, y, z ) |
Definition at line 224 of file Context_primitive.cpp.
void Context::rotatePrimitive | ( | const std::vector< uint > & | UUIDs, |
float | rotation_rad, | ||
const helios::vec3 & | origin, | ||
const vec3 & | axis | ||
) |
Rotate a group of primitives about an arbitrary line (not necessarily passing through the origin) using a vector of UUIDs.
[in] | UUIDs | Unique universal identifier (UUID) of primitive to be translated |
[in] | rotation_rad | Rotation angle in radians |
[in] | origin | Cartesian coordinate of the base/origin of rotation axis |
[in] | axis | Vector describing axis about which to (rotate) |
Definition at line 272 of file Context_primitive.cpp.
void Context::rotatePrimitive | ( | const std::vector< uint > & | UUIDs, |
float | rotation_rad, | ||
const vec3 & | axis | ||
) |
Rotate a group of primitives about an arbitrary axis passing through the origin using a vector of UUIDs.
[in] | UUIDs | Unique universal identifier (UUID) of primitive to be translated |
[in] | rotation_rad | Rotation angle in radians |
[in] | axis | Vector describing axis about which to rotate |
Definition at line 252 of file Context_primitive.cpp.
void Context::rotatePrimitive | ( | uint | UUID, |
float | rotation_rad, | ||
const char * | axis | ||
) |
Rotate a primitive about the x, y, or z axis using its UUID.
[in] | UUID | Unique universal identifier (UUID) of primitive to be translated |
[in] | rotation_rad | Rotation angle in radians |
[in] | axis | Axis about which to rotate (must be one of x, y, z ) |
Definition at line 220 of file Context_primitive.cpp.
void Context::rotatePrimitive | ( | uint | UUID, |
float | rotation_rad, | ||
const helios::vec3 & | axis | ||
) |
Rotate a primitive about an arbitrary axis passing through the origin using its UUID.
[in] | UUID | Unique universal identifier (UUID) of primitive to be translated |
[in] | rotation_rad | Rotation angle in radians |
[in] | axis | Vector describing axis about which to rotate |
Definition at line 248 of file Context_primitive.cpp.
void Context::rotatePrimitive | ( | uint | UUID, |
float | rotation_rad, | ||
const helios::vec3 & | origin, | ||
const helios::vec3 & | axis | ||
) |
Rotate a primitive about an arbitrary line (not necessarily passing through the origin) using its UUID.
[in] | UUID | Unique universal identifier (UUID) of primitive to be translated |
[in] | rotation_rad | Rotation angle in radians |
[in] | origin | Cartesian coordinate of the base/origin of rotation axis |
[in] | axis | Vector describing axis about which to rotate |
Definition at line 268 of file Context_primitive.cpp.
void Context::scaleObject | ( | const std::vector< uint > & | ObjIDs, |
const helios::vec3 & | scalefact | ||
) | const |
Method to scale a compound object in the x-, y- and z-directions.
[in] | ObjIDs | Vector of object IDs to scale |
[in] | scalefact | Scaling factor to apply in the x-, y- and z-directions |
Definition at line 1322 of file Context.cpp.
void Context::scaleObject | ( | uint | ObjID, |
const helios::vec3 & | scalefact | ||
) | const |
Method to scale a compound object in the x-, y- and z-directions.
[in] | ObjID | Object ID to scale |
[in] | scalefact | Scaling factor to apply in the x-, y- and z-directions |
Definition at line 1313 of file Context.cpp.
void Context::scaleObjectAboutCenter | ( | const std::vector< uint > & | ObjIDs, |
const helios::vec3 & | scalefact | ||
) | const |
Method to scale a compound object in the x-, y- and z-directions.
[in] | ObjIDs | Vector of object IDs to scale |
[in] | scalefact | Scaling factor to apply in the x-, y- and z-directions |
Definition at line 1337 of file Context.cpp.
void Context::scaleObjectAboutCenter | ( | uint | ObjID, |
const helios::vec3 & | scalefact | ||
) | const |
Method to scale a compound object in the x-, y- and z-directions.
[in] | ObjID | Object ID to scale |
[in] | scalefact | Scaling factor to apply in the x-, y- and z-directions |
Definition at line 1328 of file Context.cpp.
void Context::scaleObjectAboutOrigin | ( | const std::vector< uint > & | ObjIDs, |
const helios::vec3 & | scalefact | ||
) | const |
Method to scale a compound object in the x-, y- and z-directions about its origin point.
[in] | ObjIDs | Vector of object IDs to scale |
[in] | scalefact | Scaling factor to apply in the x-, y- and z-directions |
Definition at line 1367 of file Context.cpp.
void Context::scaleObjectAboutOrigin | ( | uint | ObjID, |
const helios::vec3 & | scalefact | ||
) | const |
Method to scale a compound object in the x-, y- and z-directions about its origin point.
[in] | ObjID | Object ID to scale |
[in] | scalefact | Scaling factor to apply in the x-, y- and z-directions |
Definition at line 1358 of file Context.cpp.
void Context::scaleObjectAboutPoint | ( | const std::vector< uint > & | ObjIDs, |
const helios::vec3 & | scalefact, | ||
const helios::vec3 & | point | ||
) | const |
Method to scale a compound object in the x-, y- and z-directions about an arbitrary point.
[in] | ObjIDs | Vector of object IDs to scale |
[in] | scalefact | Scaling factor to apply in the x-, y- and z-directions |
[in] | point | Cartesian coordinate of the point about which to scale |
Definition at line 1352 of file Context.cpp.
void Context::scaleObjectAboutPoint | ( | uint | ObjID, |
const helios::vec3 & | scalefact, | ||
const helios::vec3 & | point | ||
) | const |
Method to scale a compound object in the x-, y- and z-directions about an arbitrary point.
[in] | ObjID | Object ID to scale |
[in] | scalefact | Scaling factor to apply in the x-, y- and z-directions |
[in] | point | Cartesian coordinate of the point about which to scale |
Definition at line 1343 of file Context.cpp.
void Context::scalePrimitive | ( | const std::vector< uint > & | UUIDs, |
const helios::vec3 & | S | ||
) |
Scale a group of primitives using a vector of UUIDs relative to the origin (0,0,0)
[in] | UUIDs | Vector of unique universal identifiers (UUIDs) of primitives to be scaled |
[in] | S | Scaling factor |
Definition at line 421 of file Context_primitive.cpp.
void Context::scalePrimitive | ( | uint | UUID, |
const helios::vec3 & | S | ||
) |
Scale a primitive using its UUID relative to the origin (0,0,0)
[in] | UUID | Unique universal identifier (UUID) of primitive to be scaled |
[in] | S | Scaling factor |
Definition at line 405 of file Context_primitive.cpp.
void Context::scalePrimitiveAboutPoint | ( | const std::vector< uint > & | UUIDs, |
const helios::vec3 & | S, | ||
const helios::vec3 & | point | ||
) |
Scale a group of primitives using a vector of UUIDs about an arbitrary point in space.
[in] | UUIDs | Vector of unique universal identifiers (UUIDs) of primitives to be scaled |
[in] | S | Scaling factor |
[in] | point | Cartesian (x,y,z) coordinates of point about which to scale |
Definition at line 440 of file Context_primitive.cpp.
void Context::scalePrimitiveAboutPoint | ( | uint | UUID, |
const helios::vec3 & | S, | ||
const helios::vec3 & | point | ||
) |
Scale a primitive using its UUID about an arbitrary point in space.
[in] | UUID | Unique universal identifier (UUID) of primitive to be scaled |
[in] | S | Scaling factor |
[in] | point | Cartesian (x,y,z) coordinates of point about which to scale |
Definition at line 427 of file Context_primitive.cpp.
void Context::scalePrimitiveData | ( | const std::string & | label, |
float | scaling_factor | ||
) |
Multiply primitive data values by a constant scaling factor for all primitives.
[in] | label | Primitive data label |
[in] | scaling_factor | Factor to scale primitive data |
Definition at line 965 of file Context_data.cpp.
void Context::scalePrimitiveData | ( | const std::vector< uint > & | UUIDs, |
const std::string & | label, | ||
float | scaling_factor | ||
) |
Multiply primitive data values by a constant scaling factor for a subset of primitives.
[in] | UUIDs | Universal unique identifiers of primitives |
[in] | label | Primitive data label |
[in] | scaling_factor | Factor to scale primitive data |
Definition at line 911 of file Context_data.cpp.
void Context::scaleTubeGirth | ( | uint | ObjID, |
float | scale_factor | ||
) |
Scale the girth for all nodes of a tube object.
[in] | ObjID | object ID of the Tube object |
[in] | scale_factor | Scaling factor to apply to the girth of the tube object |
Definition at line 4401 of file Context.cpp.
void Context::scaleTubeLength | ( | uint | ObjID, |
float | scale_factor | ||
) |
Scale the length of a tube object by an arbitrary factor for all tube nodes.
[in] | ObjID | object ID of the Tube object |
[in] | scale_factor | Scaling factor to apply to the length of the tube object |
Definition at line 4419 of file Context.cpp.
|
static |
Scan a Helios XML file to check if a tag exists.
[in] | filename | name of XML file. |
[in] | tag | Tag to search for in XML file. |
[in] | label | [optional] Label to search for within the tag. |
Definition at line 2254 of file Context_fileIO.cpp.
void Context::seedRandomGenerator | ( | uint | seed | ) |
Set seed for random generator.
[in] | seed | uint used to seed the generator |
Definition at line 44 of file Context.cpp.
|
static |
Run a self-test of the Context. The Context self-test runs through validation checks of Context-related methods to ensure they are working properly.
[in] | argc | Number of command line arguments |
[in] | argv | Array of command line argument strings |
Definition at line 34 of file selfTest.cpp.
void Context::setDate | ( | const Date & | date | ) |
Set simulation date by Date vector.
[in] | date | Date vector |
Definition at line 327 of file Context.cpp.
void Context::setDate | ( | int | day, |
int | month, | ||
int | year | ||
) |
Set simulation date by day, month, year.
[in] | day | Day of the month (1-31) |
[in] | month | Month of year (1-12) |
[in] | year | Year in YYYY format |
Definition at line 315 of file Context.cpp.
void Context::setDate | ( | int | Julian_day, |
int | year | ||
) |
Set simulation date by Julian day.
[in] | Julian_day | Julian day of year (1-366) |
[in] | year | Year in YYYY format. Note: this is used to determine leap years. |
Definition at line 339 of file Context.cpp.
|
inline |
|
inline |
void Context::setLocation | ( | const helios::Location & | location | ) |
Set the location of the simulation (latitude, longitude, and UTC offset)
[in] | location | Location vector |
Definition at line 415 of file Context.cpp.
void Context::setObjectAverageNormal | ( | uint | ObjID, |
const vec3 & | origin, | ||
const vec3 & | new_normal | ||
) | const |
Sets the average normal of a given object in the context.
This function adjusts the transformation matrix of the specified object to align its average normal with a given direction, while maintaining its forward direction in world space.
[in] | ObjID | The unique identifier of the object whose average normal is being set. |
[in] | origin | The origin point about which the rotation is applied. |
[in] | new_normal | The desired new average normal direction for the object. |
Definition at line 4081 of file Context.cpp.
void Context::setObjectColor | ( | const std::vector< uint > & | ObjIDs, |
const helios::RGBAcolor & | color | ||
) | const |
Method to set the diffuse color of an Object with transparency for a vector of ObjIDs.
[in] | ObjIDs | Vector of identifiers of objects. |
[in] | color | New color of object. |
Definition at line 4157 of file Context.cpp.
void Context::setObjectColor | ( | const std::vector< uint > & | ObjIDs, |
const helios::RGBcolor & | color | ||
) | const |
Method to set the diffuse color of an Object for a vector of ObjIDs.
[in] | ObjIDs | Vector of identifiers of object. |
[in] | color | New color of object |
Definition at line 4147 of file Context.cpp.
void Context::setObjectColor | ( | uint | ObjID, |
const helios::RGBAcolor & | color | ||
) | const |
Method to set the diffuse color of an Object with transparency.
[in] | ObjID | Identifier of object. |
[in] | color | New color of object. |
Definition at line 4153 of file Context.cpp.
void Context::setObjectColor | ( | uint | ObjID, |
const helios::RGBcolor & | color | ||
) | const |
Method to set the diffuse color of an Object.
[in] | ObjID | Universal unique identifier of object. |
[in] | color | New color of object |
Definition at line 4143 of file Context.cpp.
|
inline |
|
inline |
|
inline |
Add data value associated with a vector of compound objects. Each element in objIDs maps to each element in data.
T | Object data type |
[in] | objIDs | Unique identifiers of compound object |
[in] | label | Name/label associated with data |
[in] | data | Object data value (vector) |
|
inline |
|
inline |
Add a vector of data for a compound object.
T | Object data type |
[in] | objID | Unique identifier of compound object |
[in] | label | Name/label associated with data |
[in] | data | Object data value (vector) |
|
inline |
Set the origin position of the object about which it can be rotated and scaled.
Note that this does not change the position of the object in the scene, but rather sets the origin point about which the object can later be rotated and scaled.
[in] | ObjID | Identifier of the object. |
[in] | origin | (x,y,z) Coordinates of the new origin point. |
Definition at line 4130 of file Context.cpp.
void Context::setObjectTransformationMatrix | ( | const std::vector< uint > & | ObjIDs, |
float(&) | T[16] | ||
) | const |
Method to set the Affine transformation matrix of an Object for a vector Object IDs.
[in] | ObjIDs | Vector of identifiers of the objects. |
[in] | T | 1D vector corresponding to Primitive transformation matrix |
Definition at line 4075 of file Context.cpp.
void Context::setObjectTransformationMatrix | ( | uint | ObjID, |
float(&) | T[16] | ||
) | const |
Method to set the Affine transformation matrix of an Object.
[in] | ObjID | Identifier of the object. |
[in] | T | 1D vector corresponding to Primitive transformation matrix |
Definition at line 4071 of file Context.cpp.
void Context::setPrimitiveAzimuth | ( | uint | UUID, |
const helios::vec3 & | origin, | ||
float | new_azimuth | ||
) |
Rotate the primitive based on its UUID such that it has a the specified azimuth angle but maintains the same elevation angle.
[in] | UUID | Unique universal identifier (UUID) of primitive to be translated |
[in] | origin | Cartesian coordinate of the base/origin of rotation axis |
[in] | new_azimuth | New primitive azimuth angle after rotation |
Definition at line 383 of file Context_primitive.cpp.
void Context::setPrimitiveColor | ( | const std::vector< uint > & | UUIDs, |
const helios::RGBAcolor & | color | ||
) | const |
Method to set the diffuse color of a Primitive with transparency for a vector of UUIDs.
[in] | UUIDs | Vector of universal unique identifiers of primitives. |
[in] | color | New color of primitive |
Definition at line 3306 of file Context.cpp.
void Context::setPrimitiveColor | ( | const std::vector< uint > & | UUIDs, |
const helios::RGBcolor & | color | ||
) | const |
Method to set the diffuse color of a Primitive for a vector of UUIDs.
[in] | UUIDs | Vector of universal unique identifiers of primitives. |
[in] | color | New color of primitive |
Definition at line 3296 of file Context.cpp.
void Context::setPrimitiveColor | ( | uint | UUID, |
const helios::RGBAcolor & | color | ||
) | const |
Method to set the diffuse color of a Primitive with transparency.
[in] | UUID | Universal unique identifier of primitive. |
[in] | color | New color of primitive |
Definition at line 3302 of file Context.cpp.
void Context::setPrimitiveColor | ( | uint | UUID, |
const helios::RGBcolor & | color | ||
) | const |
Method to set the diffuse color of a Primitive.
[in] | UUID | Universal unique identifier of primitive. |
[in] | color | New color of primitive |
Definition at line 3292 of file Context.cpp.
|
inline |
Add data value associated with a vector of primitive elements. Each element in UUIDs maps to each element in data.
T | Primitive data type |
[in] | UUIDs | Unique universal identifiers of Primitive elements |
[in] | label | Name/label associated with data |
[in] | data | Primitive data value (vector) |
|
inline |
|
inline |
|
inline |
void Context::setPrimitiveElevation | ( | uint | UUID, |
const helios::vec3 & | origin, | ||
float | new_elevation | ||
) |
Rotate the primitive based on its UUID such that it has a the specified elevation angle but maintains the same azimuth angle.
[in] | UUID | Unique universal identifier (UUID) of primitive to be translated |
[in] | origin | Cartesian coordinate of the base/origin of rotation axis |
[in] | new_elevation | New primitive elevation angle after rotation |
Definition at line 361 of file Context_primitive.cpp.
void Context::setPrimitiveNormal | ( | const std::vector< uint > & | UUIDs, |
const helios::vec3 & | origin, | ||
const vec3 & | new_normal | ||
) |
Rotate the primitive such that it has a specified normal vector using a vector of UUIDs.
[in] | UUIDs | Unique universal identifier (UUID) of primitive to be translated |
[in] | origin | Cartesian coordinate of the base/origin of rotation axis |
[in] | new_normal | New primitive normal vector after rotation |
Definition at line 355 of file Context_primitive.cpp.
void Context::setPrimitiveNormal | ( | uint | UUID, |
const helios::vec3 & | origin, | ||
const helios::vec3 & | new_normal | ||
) |
Rotate the primitive such that it has a specified normal vector based on its UUID.
[in] | UUID | Unique universal identifier (UUID) of primitive to be translated |
[in] | origin | Cartesian coordinate of the base/origin of rotation axis |
[in] | new_normal | New primitive normal vector after rotation |
Definition at line 288 of file Context_primitive.cpp.
Method to set the ID of the parent object the primitive belongs to (default is object 0) for a vector of UUIDs.
[in] | UUIDs | Vector of universal unique identifiers of primitives. |
[in] | objID | Identifier of primitive's parent object. |
Definition at line 3138 of file Context.cpp.
Method to set the ID of the parent object the primitive belongs to (default is object 0)
[in] | UUID | Universal unique identifier of primitive. |
[in] | objID | Identifier of primitive's parent object. |
Definition at line 3115 of file Context.cpp.
void Context::setPrimitiveTextureFile | ( | uint | UUID, |
const std::string & | texturefile | ||
) | const |
Set the texture map file for a primitive.
[in] | UUID | Unique universal identifier of primitive to be queried. |
[in] | texturefile | Path to texture image file. |
Definition at line 3316 of file Context.cpp.
void Context::setPrimitiveTransformationMatrix | ( | const std::vector< uint > & | UUIDs, |
float(&) | T[16] | ||
) |
Method to set the Affine transformation matrix of a Primitive for a vector UUIDs.
[in] | UUIDs | Vector of universal unique identifiers of primitives. |
[in] | T | 1D vector corresponding to Primitive transformation matrix |
Definition at line 3269 of file Context.cpp.
void Context::setPrimitiveTransformationMatrix | ( | uint | UUID, |
float(&) | T[16] | ||
) |
Method to set the Affine transformation matrix of a Primitive.
[in] | UUID | Universal unique identifier of primitive. |
[in] | T | 1D vector corresponding to Primitive transformation matrix |
Definition at line 3265 of file Context.cpp.
void Context::setTileObjectSubdivisionCount | ( | const std::vector< uint > & | ObjIDs, |
const int2 & | new_subdiv | ||
) |
Change the subdivision count of a tile object.
[in] | ObjIDs | object IDs of the tile objects to change |
[in] | new_subdiv | the new subdivisions desired |
Definition at line 1476 of file Context.cpp.
void Context::setTileObjectSubdivisionCount | ( | const std::vector< uint > & | ObjIDs, |
float | area_ratio | ||
) |
change the subdivisions of a tile object
[in] | ObjIDs | object IDs of the tile objects to change |
[in] | area_ratio | the approximate ratio between individual tile object area and individual subpatch area desired |
Definition at line 1599 of file Context.cpp.
void Context::setTime | ( | const Time & | time | ) |
Set simulation time using Time vector.
[in] | time | Time vector |
Definition at line 401 of file Context.cpp.
void Context::setTime | ( | int | minute, |
int | hour | ||
) |
Set simulation time.
[in] | minute | Minute of hour (0-59) |
[in] | hour | Hour of day (0-23) |
Definition at line 385 of file Context.cpp.
void Context::setTime | ( | int | second, |
int | minute, | ||
int | hour | ||
) |
Set simulation time.
[in] | second | Second of minute (0-59) |
[in] | minute | Minute of hour (0-59) |
[in] | hour | Hour of day (0-23) |
Definition at line 389 of file Context.cpp.
void Context::setTriangleVertices | ( | uint | UUID, |
const helios::vec3 & | vertex0, | ||
const helios::vec3 & | vertex1, | ||
const helios::vec3 & | vertex2 | ||
) |
//! Manually set the Triangle vertices
[in] | UUID | Unique universal identifier for Triangle. |
[in] | vertex0 | Cartesian (x,y,z) coordinate of vertex 0 |
[in] | vertex1 | Cartesian (x,y,z) coordinate of vertex 1 |
[in] | vertex2 | Cartesian (x,y,z) coordinate of vertex 2 |
Definition at line 648 of file Context_primitive.cpp.
void Context::setTubeNodes | ( | uint | ObjID, |
const std::vector< helios::vec3 > & | node_xyz | ||
) |
Set tube vertex coordinates at each segment node.
[in] | ObjID | object ID of the Tube object |
[in] | node_xyz | Vector of Cartesian coordinates at each tube segment node |
Definition at line 4437 of file Context.cpp.
void Context::setTubeRadii | ( | uint | ObjID, |
const std::vector< float > & | node_radii | ||
) |
Set tube radii at each segment node.
[in] | ObjID | object ID of the Tube object |
[in] | node_radii | Vector of radii at each tube segment node |
Definition at line 4410 of file Context.cpp.
void Context::showObject | ( | const std::vector< uint > & | ObjIDs | ) |
Show previously hidden compound objects in the Context.
[in] | ObjIDs | Identifier of the object. |
Definition at line 4020 of file Context.cpp.
void Context::showObject | ( | uint | ObjID | ) |
Show a previously hidden compound object in the Context.
[in] | ObjID | Identifier of the object. |
Definition at line 4003 of file Context.cpp.
void Context::showPrimitive | ( | const std::vector< uint > & | UUIDs | ) | const |
Show previously hidden primitives in the Context.
[in] | UUIDs | Vector of primitive UUIDs to show |
Definition at line 527 of file Context.cpp.
void Context::showPrimitive | ( | uint | UUID | ) | const |
Show a previously hidden primitive in the Context.
[in] | UUID | Primitive UUID to show |
Definition at line 517 of file Context.cpp.
|
inline |
|
inline |
float Context::sumPrimitiveSurfaceArea | ( | const std::vector< uint > & | UUIDs | ) | const |
Sum the one-sided surface area of a group of primitives.
[in] | UUIDs | Universal unique identifiers of primitives |
Definition at line 1360 of file Context_data.cpp.
Translate multiple compound objects based on a vector of UUIDs.
[in] | ObjIDs | Vector of object IDs to translate |
[in] | shift | Distance to translate in the (x,y,z) directions |
Definition at line 1247 of file Context.cpp.
Translate a single compound object.
[in] | ObjID | Object ID to translate |
[in] | shift | Distance to translate in the (x,y,z) directions |
Definition at line 1238 of file Context.cpp.
Translate a group of primitives using a vector of UUIDs.
[in] | UUIDs | Vector of unique universal identifiers (UUIDs) of primitives to be translated |
[in] | shift | Distance to translate in (x,y,z) directions |
Definition at line 211 of file Context_primitive.cpp.
Translate a primitive using its UUID.
[in] | UUID | Unique universal identifier (UUID) of primitive to be translated |
[in] | shift | Distance to translate in (x,y,z) directions |
Definition at line 207 of file Context_primitive.cpp.
void Context::useObjectTextureColor | ( | const std::vector< uint > & | ObjIDs | ) |
For all primitives in the Compound Object, use the texture map to color the primitives rather than the constant RGB color. This is function reverses a previous call to overrideTextureColor(). Note that using the texture color is the default behavior.
[in] | ObjIDs | Vector of object identifiers. |
Definition at line 4181 of file Context.cpp.
void Context::useObjectTextureColor | ( | uint | ObjID | ) | const |
For all primitives in the Compound Object, use the texture map to color the primitives rather than the constant RGB color. This is function reverses a previous call to overrideTextureColor(). Note that using the texture color is the default behavior.
[in] | ObjID | Identifier of the object. |
Definition at line 4177 of file Context.cpp.
void Context::usePrimitiveTextureColor | ( | const std::vector< uint > & | UUIDs | ) | const |
Use the texture map to color the primitives rather than the constant RGB color. This is function reverses a previous call to overrideTextureColor(). Note that using the texture color is the default behavior.
[in] | UUIDs | Vector of universal unique identifier of primitives. |
Definition at line 3364 of file Context.cpp.
void Context::usePrimitiveTextureColor | ( | uint | UUID | ) | const |
Use the texture map to color the primitive rather than the constant RGB color. This is function reverses a previous call to overrideTextureColor(). Note that using the texture color is the default behavior.
[in] | UUID | Universal unique identifier of primitive. |
Definition at line 3360 of file Context.cpp.
void Context::writeOBJ | ( | const std::string & | filename, |
bool | write_normals = false , |
||
bool | silent = false |
||
) | const |
Write geometry in the Context to a Wavefront file (.obj)
[in] | filename | Base filename of .obj and .mtl file |
[in] | write_normals | [optional] true if we should write the normal vectors |
[in] | silent | [optional] If set to true, output messaged will be disabled |
Definition at line 4040 of file Context_fileIO.cpp.
void Context::writeOBJ | ( | const std::string & | filename, |
const std::vector< uint > & | UUIDs, | ||
bool | write_normals = false , |
||
bool | silent = false |
||
) | const |
Write geometry in the Context to a Wavefront file (.obj) for a subset of UUIDs.
[in] | filename | Base filename of .obj and .mtl file |
[in] | UUIDs | Vector of UUIDs for which geometry should be written |
[in] | write_normals | [optional] true if we should write the normal vectors |
[in] | silent | [optional] If set to true, output messaged will be disabled |
Definition at line 4044 of file Context_fileIO.cpp.
void Context::writeOBJ | ( | const std::string & | filename, |
const std::vector< uint > & | UUIDs, | ||
const std::vector< std::string > & | primitive_dat_fields, | ||
bool | write_normals = false , |
||
bool | silent = false |
||
) | const |
Write geometry in the Context to a Wavefront file (.obj)
[in] | filename | Base filename of .obj and .mtl file |
[in] | UUIDs | Vector of UUIDs for which geometry should be written |
[in] | primitive_dat_fields | A .dat file will be written containing primitive data given in this vector (for Unity visualization) |
[in] | write_normals | [optional] true if we should write the normal vectors |
[in] | silent | [optional] If set to true, output messaged will be disabled |
Definition at line 4048 of file Context_fileIO.cpp.
void Context::writePLY | ( | const char * | filename | ) | const |
Write geometry in the Context to a Stanford polygon file (.ply)
[in] | filename | name of ply file |
Definition at line 3482 of file Context_fileIO.cpp.
void Context::writePLY | ( | const char * | filename, |
const std::vector< uint > & | UUIDs | ||
) | const |
Write a subset of geometry in the Context to a Stanford polygon file (.ply)
[in] | filename | name of ply file |
[in] | UUIDs | Vector of UUIDs for which geometry should be written |
Definition at line 3486 of file Context_fileIO.cpp.
void Context::writePrimitiveData | ( | const std::string & | filename, |
const std::vector< std::string > & | column_format, | ||
bool | print_header = false |
||
) | const |
Write primitive data to an ASCII text file for all primitives in the Context.
[in] | filename | Path to file that will be written. |
[in] | column_format | Vector of strings with primitive data labels - the order of the text file columns will be determined by the order of the labels in the vector. If primitive data does not exist, an error will be thrown. |
[in] | print_header | [optional] Flag specifying whether to print the name of the primitive data in the column header. |
Definition at line 4719 of file Context_fileIO.cpp.
void Context::writePrimitiveData | ( | const std::string & | filename, |
const std::vector< std::string > & | column_format, | ||
const std::vector< uint > & | UUIDs, | ||
bool | print_header = false |
||
) | const |
Write primitive data to an ASCII text file for selected primitives in the Context.
[in] | filename | Path to file that will be written. |
[in] | column_format | Vector of strings with primitive data labels - the order of the text file columns will be determined by the order of the labels in the vector. If primitive data does not exist, an error will be thrown. |
[in] | UUIDs | Unique universal identifiers for primitives to include when writing data to file. |
[in] | print_header | [optional] Flag specifying whether to print the name of the primitive data in the column header. |
Definition at line 4723 of file Context_fileIO.cpp.
void Context::writeXML | ( | const char * | filename, |
bool | quiet = false |
||
) | const |
Write Context geometry and data to XML file for all UUIDs in the context.
[in] | filename | name of XML file. |
[in] | quiet | [optional] output messages are disabled if quiet is set to 'true' (default is quiet='false') |
Definition at line 2495 of file Context_fileIO.cpp.
void Context::writeXML | ( | const char * | filename, |
const std::vector< uint > & | UUIDs, | ||
bool | quiet = false |
||
) | const |
Write Context geometry and data to XML file for a subset of UUIDs in the context.
[in] | filename | name of XML file. |
[in] | UUIDs | Universal unique identifiers of primitives that should be written to XML file. |
[in] | quiet | [optional] output messages are disabled if quiet is set to 'true' (default is quiet='false'). |
Definition at line 2508 of file Context_fileIO.cpp.
void Context::writeXML_byobject | ( | const char * | filename, |
const std::vector< uint > & | UUIDs, | ||
bool | quiet = false |
||
) | const |
Write Context geometry and data to XML file for a subset of compound object IDs in the context.
[in] | filename | name of XML file. |
[in] | UUIDs | Identifiers for compound objects that should be written to XML file. |
[in] | quiet | [optional] output messages are disabled if quiet is set to 'true' (default is quiet='false'). |
Definition at line 2499 of file Context_fileIO.cpp.