1.3.49
 
Loading...
Searching...
No Matches
helios::Context Class Reference

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 &center, const helios::vec2 &size)
 Add new Patch geometric primitive.
 
uint addPatch (const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation)
 Add new Patch geometric primitive.
 
uint addPatch (const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBcolor &color)
 Add new Patch geometric primitive.
 
uint addPatch (const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBAcolor &color)
 Add new Patch geometric primitive.
 
uint addPatch (const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const char *texture_file)
 Add new Patch geometric primitive.
 
uint addPatch (const helios::vec3 &center, 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 &center, const helios::vec3 &size)
 Add new Voxel geometric primitive.
 
uint addVoxel (const helios::vec3 &center, const helios::vec3 &size, const float &rotation)
 Add new Voxel geometric primitive.
 
uint addVoxel (const helios::vec3 &center, const helios::vec3 &size, const float &rotation, const helios::RGBcolor &color)
 Add new Voxel geometric primitive.
 
uint addVoxel (const helios::vec3 &center, 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< uintcopyPrimitive (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< uintgetAllUUIDs () const
 Get all primitive UUIDs currently in the Context.
 
std::vector< uintgetDirtyUUIDs (bool include_deleted_UUIDs=false) const
 Get all primitive UUIDs that are marked dirty.
 
std::vector< uintgetDeletedUUIDs () 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< uintgetPrimitiveParentObjectID (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< uintgetUniquePrimitiveParentObjectIDs (const std::vector< uint > &UUIDs) const
 Method to return unique parent object IDs for a vector of primitive UUIDs.
 
std::vector< uintgetUniquePrimitiveParentObjectIDs (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::vec3getPrimitiveVertices (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< vec2getPrimitiveTextureUV (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.
 
CompoundObjectgetObjectPointer (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< uintgetAllObjectIDs () 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< uintcopyObject (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< uintfilterObjectsByData (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< uintgetObjectPrimitiveUUIDs (uint ObjID) const
 Get primitive UUIDs associated with compound object (single object ID input)
 
std::vector< uintgetObjectPrimitiveUUIDs (const std::vector< uint > &ObjIDs) const
 Get primitive UUIDs associated with compound objects (1D vector of object IDs input)
 
std::vector< uintgetObjectPrimitiveUUIDs (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.
 
TilegetTileObjectPointer (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::vec2getTileObjectTextureUV (uint ObjID) const
 get the texture UV coordinates of a tile object from the context
 
std::vector< helios::vec3getTileObjectVertices (uint ObjID) const
 get the vertices of a tile object from the context
 
SpheregetSphereObjectPointer (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
 
TubegetTubeObjectPointer (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::vec3getTubeObjectNodes (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< RGBcolorgetTubeObjectNodeColors (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.
 
BoxgetBoxObjectPointer (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
 
DiskgetDiskObjectPointer (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
 
PolymeshgetPolymeshObjectPointer (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.
 
ConegetConeObjectPointer (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::vec3getConeObjectNodes (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 &center, 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 &center, 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 &center, 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 &center, 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 &center, float radius)
 Add a spherical compound object to the Context.
 
uint addSphereObject (uint Ndivs, const vec3 &center, float radius, const RGBcolor &color)
 Add a spherical compound object to the Context.
 
uint addSphereObject (uint Ndivs, const vec3 &center, float radius, const char *texturefile)
 Add a spherical compound object to the Context colored by texture map.
 
uint addSphereObject (uint Ndivs, const vec3 &center, const vec3 &radius)
 Add a spherical/ellipsoidal compound object to the Context.
 
uint addSphereObject (uint Ndivs, const vec3 &center, const vec3 &radius, const RGBcolor &color)
 Add a spherical/ellipsoidal compound object to the Context.
 
uint addSphereObject (uint Ndivs, const vec3 &center, 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 &center, const vec3 &size, const int3 &subdiv)
 Add a rectangular prism tessellated with Patch primitives.
 
uint addBoxObject (const vec3 &center, const vec3 &size, const int3 &subdiv, const RGBcolor &color)
 Add a rectangular prism tessellated with Patch primitives.
 
uint addBoxObject (const vec3 &center, const vec3 &size, const int3 &subdiv, const char *texturefile)
 Add a rectangular prism tessellated with Patch primitives.
 
uint addBoxObject (const vec3 &center, 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 &center, const helios::vec2 &size)
 Add new Disk geometric primitive to the Context given its center, and size.
 
uint addDiskObject (uint Ndivs, const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation)
 Add new Disk Compound Object.
 
uint addDiskObject (uint Ndivs, const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBcolor &color)
 Add new Disk Compound Object.
 
uint addDiskObject (uint Ndivs, const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBAcolor &color)
 Add new Disk Compound Object.
 
uint addDiskObject (uint Ndivs, const helios::vec3 &center, 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 &center, 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 &center, 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 &center, 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< uintaddSphere (uint Ndivs, const vec3 &center, float radius)
 Add a spherical compound object to the Context.
 
std::vector< uintaddSphere (uint Ndivs, const vec3 &center, float radius, const RGBcolor &color)
 Add a spherical compound object to the Context.
 
std::vector< uintaddSphere (uint Ndivs, const vec3 &center, float radius, const char *texturefile)
 Add a spherical compound object to the Context colored by texture map.
 
std::vector< uintaddTile (const vec3 &center, 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< uintaddTile (const vec3 &center, 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< uintaddTile (const vec3 &center, 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< uintaddTile (const vec3 &center, 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< uintaddTube (uint Ndivs, const std::vector< vec3 > &nodes, const std::vector< float > &radius)
 Add a 3D tube compound object to the Context.
 
std::vector< uintaddTube (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< uintaddTube (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< uintaddBox (const vec3 &center, const vec3 &size, const int3 &subdiv)
 Add a rectangular prism tessellated with Patch primitives.
 
std::vector< uintaddBox (const vec3 &center, const vec3 &size, const int3 &subdiv, const RGBcolor &color)
 Add a rectangular prism tessellated with Patch primitives.
 
std::vector< uintaddBox (const vec3 &center, const vec3 &size, const int3 &subdiv, const char *texturefile)
 Add a rectangular prism tessellated with Patch primitives.
 
std::vector< uintaddBox (const vec3 &center, const vec3 &size, const int3 &subdiv, const RGBcolor &color, bool reverse_normals)
 Add a rectangular prism tessellated with Patch primitives.
 
std::vector< uintaddBox (const vec3 &center, const vec3 &size, const int3 &subdiv, const char *texturefile, bool reverse_normals)
 Add a rectangular prism tessellated with Patch primitives.
 
std::vector< uintaddDisk (uint Ndivs, const helios::vec3 &center, const helios::vec2 &size)
 Add new Disk geometric primitive to the Context given its center, and size.
 
std::vector< uintaddDisk (uint Ndivs, const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation)
 Add new Disk geometric primitive.
 
std::vector< uintaddDisk (uint Ndivs, const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBcolor &color)
 Add new Disk geometric primitive.
 
std::vector< uintaddDisk (uint Ndivs, const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBAcolor &color)
 Add new Disk geometric primitive.
 
std::vector< uintaddDisk (uint Ndivs, const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const char *texture_file)
 Add new Disk geometric primitive.
 
std::vector< uintaddDisk (const int2 &Ndivs, const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBcolor &color)
 Add new Disk geometric primitive.
 
std::vector< uintaddDisk (const int2 &Ndivs, const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBAcolor &color)
 Add new Disk geometric primitive.
 
std::vector< uintaddDisk (const int2 &Ndivs, const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const char *texturefile)
 Add new Disk geometric primitive.
 
std::vector< uintaddCone (uint Ndivs, const vec3 &node0, const vec3 &node1, float radius0, float radius1)
 Add a 3D cone to the Context.
 
std::vector< uintaddCone (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< uintaddCone (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 &center, 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 &center, 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< uintloadXML (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< uintloadPLY (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< uintloadPLY (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< uintloadPLY (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< uintloadPLY (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< uintloadPLY (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< uintloadOBJ (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< uintloadOBJ (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< uintloadOBJ (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< uintloadOBJ (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< uintfilterPrimitivesByData (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< uintfilterPrimitivesByData (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< uintfilterPrimitivesByData (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< uintfilterPrimitivesByData (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< uintfilterPrimitivesByData (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< uintfilterObjectsByData (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< uintfilterObjectsByData (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< uintfilterObjectsByData (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< uintfilterObjectsByData (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< uintfilterObjectsByData (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< RGBcolorgenerateColormap (const std::string &colormap, uint Ncolors)
 Generates a colormap with a specified number of colors based on the selected colormap type.
 
std::vector< RGBcolorgenerateColormap (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.
 

Detailed Description

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.

Definition at line 2033 of file Context.h.

Constructor & Destructor Documentation

◆ Context()

Context::Context ( )

Context default constructor.

Definition at line 20 of file Context.cpp.

◆ ~Context()

Context::~Context ( )

Context destructor.

Definition at line 3096 of file Context.cpp.

Member Function Documentation

◆ addPatch() [1/2]

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.

Parameters
[in]center3D coordinates of Patch center
[in]sizewidth and length of Patch
[in]rotationSpherical rotation
[in]colordiffuse R-G-B-A color of Patch
Returns
UUID of Patch

Definition at line 36 of file Context_primitive.cpp.

◆ addPatch() [2/2]

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.

Parameters
[in]center3D coordinates of Patch center
[in]sizewidth and length of Patch
[in]rotationSpherical rotation
[in]colordiffuse R-G-B color of Patch
Returns
UUID of Patch

Definition at line 32 of file Context_primitive.cpp.

◆ addVoxel() [1/2]

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.

Parameters
[in]center3D coordinates of Voxel center
[in]sizewidth, length, and height of Voxel
[in]rotationspherical rotation angle (elevation,azimuth) in radians of Voxel
[in]colordiffuse R-G-B-A color of Voxel
Returns
UUID of Voxel

Definition at line 186 of file Context_primitive.cpp.

◆ addVoxel() [2/2]

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.

Parameters
[in]center3D coordinates of Voxel center
[in]sizewidth, length, and height of Voxel
[in]rotationspherical rotation angle (elevation,azimuth) in radians of Voxel
[in]colordiffuse R-G-B color of Voxel
Returns
UUID of Voxel

Definition at line 182 of file Context_primitive.cpp.

◆ aggregatePrimitiveDataProduct()

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]primitive_data_labelsVector of primitive data labels, whose values for each primitive will be multiplied
[in]result_primitive_data_labelNew primitive data label where result will be stored
Note
An error will be thrown for primitive data types of string.

Definition at line 1184 of file Context_data.cpp.

◆ aggregatePrimitiveDataSum()

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]primitive_data_labelsVector of primitive data labels, whose values for each primitive will be summed
[in]result_primitive_data_labelNew primitive data label where result will be stored
Note
An error will be thrown for primitive data types of string.

Definition at line 1053 of file Context_data.cpp.

◆ appendTubeSegment() [1/2]

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.

Parameters
[in]ObjIDobject ID of the Tube object
[in]node_positionCartesian coordinates of the new tube segment node
[in]node_radiusRadius of the new tube segment node
[in]texturefileName of image file for texture map
[in]textureuv_ufracFractional u-coordinate of texture map at the beginning (.x) and end (.y) of the segment

Definition at line 4392 of file Context.cpp.

◆ appendTubeSegment() [2/2]

void Context::appendTubeSegment ( uint  ObjID,
const helios::vec3 node_position,
float  radius,
const RGBcolor color 
)

Append a tube segment to an existing tube object.

Parameters
[in]ObjIDobject ID of the Tube object
[in]node_positionCartesian coordinates of the node
[in]radiusRadius of the tube segment
[in]colorRGB color of the tube segment

Definition at line 4383 of file Context.cpp.

◆ areObjectPrimitivesComplete()

bool Context::areObjectPrimitivesComplete ( uint  objID) const

Method to query whether all object primitives are in tact.

  • Parameters
    [in]objIDObject ID for object to be queried.
    Returns
    False if any primitives have been deleted from the object since creation; True otherwise.

Definition at line 960 of file Context.cpp.

◆ calculatePrimitiveDataAreaWeightedMean() [1/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]awt_meanArea-weighted mean of primitive data

Definition at line 568 of file Context_data.cpp.

◆ calculatePrimitiveDataAreaWeightedMean() [2/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]awt_meanArea-weighted mean of primitive data

Definition at line 540 of file Context_data.cpp.

◆ calculatePrimitiveDataAreaWeightedMean() [3/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]awt_meanArea-weighted mean of primitive data

Definition at line 597 of file Context_data.cpp.

◆ calculatePrimitiveDataAreaWeightedMean() [4/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]awt_meanArea-weighted mean of primitive data

Definition at line 625 of file Context_data.cpp.

◆ calculatePrimitiveDataAreaWeightedMean() [5/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]awt_meanArea-weighted mean of primitive data

Definition at line 653 of file Context_data.cpp.

◆ calculatePrimitiveDataAreaWeightedSum() [1/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]sumSum of primitive data

Definition at line 803 of file Context_data.cpp.

◆ calculatePrimitiveDataAreaWeightedSum() [2/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]awt_sumSum of primitive data

Definition at line 776 of file Context_data.cpp.

◆ calculatePrimitiveDataAreaWeightedSum() [3/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]sumSum of primitive data

Definition at line 830 of file Context_data.cpp.

◆ calculatePrimitiveDataAreaWeightedSum() [4/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]sumSum of primitive data

Definition at line 857 of file Context_data.cpp.

◆ calculatePrimitiveDataAreaWeightedSum() [5/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]sumSum of primitive data

Definition at line 884 of file Context_data.cpp.

◆ calculatePrimitiveDataMean() [1/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]meanMean of primitive data

Definition at line 456 of file Context_data.cpp.

◆ calculatePrimitiveDataMean() [2/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]meanMean of primitive data

Definition at line 435 of file Context_data.cpp.

◆ calculatePrimitiveDataMean() [3/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]meanMean of primitive data

Definition at line 477 of file Context_data.cpp.

◆ calculatePrimitiveDataMean() [4/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]meanMean of primitive data

Definition at line 498 of file Context_data.cpp.

◆ calculatePrimitiveDataMean() [5/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]meanMean of primitive data

Definition at line 519 of file Context_data.cpp.

◆ calculatePrimitiveDataSum() [1/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]sumSum of primitive data

Definition at line 700 of file Context_data.cpp.

◆ calculatePrimitiveDataSum() [2/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]sumSum of primitive data

Definition at line 681 of file Context_data.cpp.

◆ calculatePrimitiveDataSum() [3/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]sumSum of primitive data

Definition at line 719 of file Context_data.cpp.

◆ calculatePrimitiveDataSum() [4/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]sumSum of primitive data

Definition at line 738 of file Context_data.cpp.

◆ calculatePrimitiveDataSum() [5/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[out]sumSum of primitive data

Definition at line 757 of file Context_data.cpp.

◆ cleanDeletedObjectIDs() [1/3]

void Context::cleanDeletedObjectIDs ( std::vector< std::vector< std::vector< uint > > > &  objIDs) const

Delete Object IDs from vector if objects no longer exist (3D vector)

Parameters
[in,out]objIDsVector 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.

◆ cleanDeletedObjectIDs() [2/3]

void Context::cleanDeletedObjectIDs ( std::vector< std::vector< uint > > &  objIDs) const

Delete Object IDs from vector if objects no longer exist (2D vector)

Parameters
[in,out]objIDsVector 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.

◆ cleanDeletedObjectIDs() [3/3]

void Context::cleanDeletedObjectIDs ( std::vector< uint > &  objIDs) const

Delete Object IDs from vector if objects no longer exist (1D vector)

Parameters
[in,out]objIDsVector 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.

◆ cleanDeletedUUIDs() [1/3]

void Context::cleanDeletedUUIDs ( std::vector< std::vector< std::vector< uint > > > &  UUIDs) const

Delete UUIDs from vector if primitives no longer exist (3D vector)

Parameters
[in,out]UUIDsVector of primitive UUIDs. UUIDs for primitives that do not exist will be deleted from the vector.

Definition at line 560 of file Context.cpp.

◆ cleanDeletedUUIDs() [2/3]

void Context::cleanDeletedUUIDs ( std::vector< std::vector< uint > > &  UUIDs) const

Delete UUIDs from vector if primitives no longer exist (2D vector)

Parameters
[in,out]UUIDsVector of primitive UUIDs. UUIDs for primitives that do not exist will be deleted from the vector.

Definition at line 548 of file Context.cpp.

◆ cleanDeletedUUIDs() [3/3]

void Context::cleanDeletedUUIDs ( std::vector< uint > &  UUIDs) const

Delete UUIDs from vector if primitives no longer exist (1D vector)

Parameters
[in,out]UUIDsVector of primitive UUIDs. UUIDs for primitives that do not exist will be deleted from the vector.

Definition at line 540 of file Context.cpp.

◆ clearGlobalData()

void Context::clearGlobalData ( const char *  label)

Delete/clear global data.

Parameters
[in]labelName/label associated with data

Definition at line 2112 of file Context_data.cpp.

◆ clearObjectData() [1/2]

void Context::clearObjectData ( const std::vector< uint > &  objIDs,
const char *  label 
)

Clear primitive data for multiple primitives based on a vector of objIDs.

Parameters
[in]objIDsVector of unique universal identifiers for compound objects
[in]labelName/label associated with data

Definition at line 1728 of file Context_data.cpp.

◆ clearObjectData() [2/2]

void Context::clearObjectData ( uint  objID,
const char *  label 
)

Clear primitive data for a single primitive based on its objID.

Parameters
[in]objIDUnique universal identifier of compound object
[in]labelName/label associated with data

Definition at line 1697 of file Context_data.cpp.

◆ clearPrimitiveData() [1/2]

void Context::clearPrimitiveData ( const std::vector< uint > &  UUIDs,
const char *  label 
)

Clear primitive data for multiple primitives based on a vector of UUIDs.

Parameters
[in]UUIDsVector of unique universal identifiers for Primitive elements
[in]labelName/label associated with data

Definition at line 268 of file Context_data.cpp.

◆ clearPrimitiveData() [2/2]

void Context::clearPrimitiveData ( uint  UUID,
const char *  label 
)

Clear primitive data for a single primitive based on its UUID.

Parameters
[in]UUIDUnique universal identifier of Primitive element
[in]labelName/label associated with data

Definition at line 237 of file Context_data.cpp.

◆ colorPrimitiveByDataPseudocolor() [1/2]

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.

Parameters
[in]UUIDsPrimitives to apply psudocolor mapping
[in]primitive_dataLabel of primitive data for mapping
[in]colormapLabel of a Helios colormap (e.g., "hot", "cool", "rainbow", "lava")
[in]NcolorsNumber of discrete colors in color mapping

Definition at line 2826 of file Context.cpp.

◆ colorPrimitiveByDataPseudocolor() [2/2]

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.

Parameters
[in]UUIDsPrimitives to apply psudocolor mapping
[in]primitive_dataLabel of primitive data for mapping
[in]colormapLabel of a Helios colormap (e.g., "hot", "cool", "rainbow", "lava")
[in]NcolorsNumber of discrete colors in color mapping
[in]data_minMinimum data value to clip colormap
[in]data_maxMaximum data value to clip colormap

Definition at line 2830 of file Context.cpp.

◆ copyObject() [1/2]

std::vector< uint > Context::copyObject ( const std::vector< uint > &  ObjIDs)

Make a copy of a group of Compound Objects from the context.

Parameters
[in]ObjIDsIdentifier for Compound Object.
Returns
ID for copied object.

Definition at line 1062 of file Context.cpp.

◆ copyObject() [2/2]

uint Context::copyObject ( uint  ObjID)

Make a copy of a Compound Objects from the context.

Parameters
[in]ObjIDIdentifier for Compound Object.
Returns
ID for copied object.

Definition at line 1073 of file Context.cpp.

◆ copyObjectData()

void Context::copyObjectData ( uint  source_objID,
uint  destination_objID 
)

copy all object data from one compound object to another

Parameters
[in]source_objIDuint Object identifier for compound object that is the source of data for copying
[in]destination_objIDuint Object identifier for compound object that is the destination for data copying

Definition at line 1605 of file Context_data.cpp.

◆ copyPrimitive() [1/2]

std::vector< uint > Context::copyPrimitive ( const std::vector< uint > &  UUIDs)

Make a copy of a group of primitives from the context.

Parameters
[in]UUIDsVector of unique universal identifiers (UUIDs) of primitive to be copied
Returns
UUIDs for copied primitives

Definition at line 482 of file Context_primitive.cpp.

◆ copyPrimitive() [2/2]

uint Context::copyPrimitive ( uint  UUID)

Make a copy of a primitive from the context.

Parameters
[in]UUIDUnique universal identifier (UUID) of primitive to be copied
Returns
UUID for copied primitive

Definition at line 493 of file Context_primitive.cpp.

◆ copyPrimitiveData()

void Context::copyPrimitiveData ( uint  sourceUUID,
uint  destinationUUID 
)

copy all primitive data from one primitive to another

Parameters
[in]sourceUUIDunique universal identifier (UUID) of primitive that is the source of data for copying
[in]destinationUUIDunique universal identifier (UUID) of primitive that is the destination for data copying

Definition at line 301 of file Context_data.cpp.

◆ cropDomain() [1/2]

void Context::cropDomain ( const vec2 xbounds,
const vec2 ybounds,
const vec2 zbounds 
)

Crop the domain such that all primitives lie within some specified axis-aligned box.

Parameters
[in]xboundsMinimum (xbounds.x) and maximum (xbounds.y) extent of cropped domain in x-direction.
[in]yboundsMinimum (ybounds.x) and maximum (ybounds.y) extent of cropped domain in y-direction.
[in]zboundsMinimum (zbounds.x) and maximum (zbounds.y) extent of cropped domain in z-direction.

Definition at line 954 of file Context.cpp.

◆ cropDomain() [2/2]

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.

Parameters
[in,out]UUIDsvector of UUIDs to crop
[in]xboundsMinimum (xbounds.x) and maximum (xbounds.y) extent of cropped domain in x-direction.
[in]yboundsMinimum (ybounds.x) and maximum (ybounds.y) extent of cropped domain in y-direction.
[in]zboundsMinimum (zbounds.x) and maximum (zbounds.y) extent of cropped domain in z-direction.

Definition at line 933 of file Context.cpp.

◆ cropDomainX()

void Context::cropDomainX ( const vec2 xbounds)

Crop the domain in the x-direction such that all primitives lie within some specified x interval.

Parameters
[in]xboundsMinimum (xbounds.x) and maximum (xbounds.y) extent of cropped domain in x-direction.

Definition at line 876 of file Context.cpp.

◆ cropDomainY()

void Context::cropDomainY ( const vec2 ybounds)

Crop the domain in the y-direction such that all primitives lie within some specified y interval.

Parameters
[in]yboundsMinimum (ybounds.x) and maximum (ybounds.y) extent of cropped domain in y-direction.

Definition at line 895 of file Context.cpp.

◆ cropDomainZ()

void Context::cropDomainZ ( const vec2 zbounds)

Crop the domain in the z-direction such that all primitives lie within some specified z interval.

Parameters
[in]zboundsMinimum (zbounds.x) and maximum (zbounds.y) extent of cropped domain in z-direction.

Definition at line 914 of file Context.cpp.

◆ decrementObjectValueRegistry()

template<typename T >
void helios::Context::decrementObjectValueRegistry ( const std::string &  label,
const T &  value 
)
inline

Template implementation for decrementing object value registry.

Definition at line 7056 of file Context.h.

◆ decrementPrimitiveValueRegistry()

template<typename T >
void helios::Context::decrementPrimitiveValueRegistry ( const std::string &  label,
const T &  value 
)
inline

Template implementation for decrementing primitive value registry.

Definition at line 6994 of file Context.h.

◆ deleteObject() [1/2]

void Context::deleteObject ( const std::vector< uint > &  ObjIDs)

Delete a group of Compound Objects from the context.

Parameters
[in]ObjIDsIdentifier for Compound Object.

Definition at line 1036 of file Context.cpp.

◆ deleteObject() [2/2]

void Context::deleteObject ( uint  ObjID)

Delete a single Compound Object from the context.

Parameters
[in]ObjIDIdentifier for Compound Object.

Definition at line 1042 of file Context.cpp.

◆ deletePrimitive() [1/2]

void Context::deletePrimitive ( const std::vector< uint > &  UUIDs)

Delete a group of primitives from the context.

Parameters
[in]UUIDsVector of unique universal identifiers (UUIDs) of primitives to be deleted

Definition at line 446 of file Context_primitive.cpp.

◆ deletePrimitive() [2/2]

void Context::deletePrimitive ( uint  UUID)

Delete a single primitive from the context.

Parameters
[in]UUIDUnique universal identifier (UUID) of primitive to be deleted

Definition at line 452 of file Context_primitive.cpp.

◆ DEPRECATED() [1/2]

helios::Context::DEPRECATED ( HeliosDataType getObjectDataType(uint objID, const char *label) const  )

Get the Helios data type of primitive data.

Parameters
[in]objIDUnique universal identifier of compound object
[in]labelName/label associated with data
Returns
Helios data type of primitive data
See also
HeliosDataType

◆ DEPRECATED() [2/2]

helios::Context::DEPRECATED ( HeliosDataType getPrimitiveDataType(uint UUID, const char *label) const  )

Get the Helios data type of primitive data.

Parameters
[in]UUIDUnique universal identifier of Primitive element
[in]labelName/label associated with data
Returns
Helios data type of primitive data
See also
HeliosDataType

◆ disableObjectDataValueCaching()

void Context::disableObjectDataValueCaching ( const std::string &  label)

Disable value-level caching for an object data label.

Parameters
[in]labelThe object data label to disable caching for.

Definition at line 56 of file Context_data.cpp.

◆ disablePrimitiveDataValueCaching()

void Context::disablePrimitiveDataValueCaching ( const std::string &  label)

Disable value-level caching for a primitive data label.

Parameters
[in]labelThe primitive data label to disable caching for.

Definition at line 40 of file Context_data.cpp.

◆ doesGlobalDataExist()

bool Context::doesGlobalDataExist ( const char *  label) const

Check if global data 'label' exists.

Parameters
[in]labelName/label associated with data
Returns
True/false

Definition at line 2171 of file Context_data.cpp.

◆ doesObjectContainPrimitive()

bool Context::doesObjectContainPrimitive ( uint  ObjID,
uint  UUID 
) const

Method to check if an Object contains a Primitive.

Parameters
[in]ObjIDIdentifier of the object.
[in]UUIDUniversal unique identifier of primitive.

Definition at line 4163 of file Context.cpp.

◆ doesObjectDataExist()

bool Context::doesObjectDataExist ( uint  objID,
const char *  label 
) const

Check if primitive data 'label' exists.

Parameters
[in]objIDUnique universal identifier of compound object
[in]labelName/label associated with data
Returns
True/false

Definition at line 1596 of file Context_data.cpp.

◆ doesObjectExist()

bool Context::doesObjectExist ( uint  ObjID) const

Check whether Compound Object exists in the Context.

Parameters
[in]ObjIDIdentifier for Compound Object.

Definition at line 1018 of file Context.cpp.

◆ doesPrimitiveDataExist()

bool Context::doesPrimitiveDataExist ( uint  UUID,
const char *  label 
) const

Check if primitive data 'label' exists.

Parameters
[in]UUIDUnique universal identifier of Primitive element
[in]labelName/label associated with data
Returns
True/false

Definition at line 228 of file Context_data.cpp.

◆ doesPrimitiveExist() [1/2]

bool Context::doesPrimitiveExist ( const std::vector< uint > &  UUIDs) const

Check if ALL primitives exists for a vector UUIDs.

Parameters
[in]UUIDsVector of unique universal identifiers of primitive elements
Returns
true if all primitives exist, false if any do not exist

Definition at line 579 of file Context_primitive.cpp.

◆ doesPrimitiveExist() [2/2]

bool Context::doesPrimitiveExist ( uint  UUID) const

Check if primitive exists for a given UUID.

Parameters
[in]UUIDUnique universal identifier of primitive element

Definition at line 575 of file Context_primitive.cpp.

◆ duplicateGlobalData()

void Context::duplicateGlobalData ( const char *  old_label,
const char *  new_label 
)

Make a copy of global data.

Parameters
[in]old_labelOld name/label associated with data
[in]new_labelNew name/label associated with data

Definition at line 2055 of file Context_data.cpp.

◆ duplicateObjectData()

void Context::duplicateObjectData ( uint  objID,
const char *  old_label,
const char *  new_label 
)

Duplicate/copy existing object data.

Parameters
[in]objIDObject ID for object to be queried.
[in]old_labelName/label associated with data
[in]new_labelName/label associated with data

Definition at line 1639 of file Context_data.cpp.

◆ duplicatePrimitiveData() [1/2]

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.

Parameters
[in]existing_data_labelName of existing primitive data to be duplicated
[in]copy_data_labelName of new primitive data copy

Definition at line 401 of file Context_data.cpp.

◆ duplicatePrimitiveData() [2/2]

void Context::duplicatePrimitiveData ( uint  UUID,
const char *  old_label,
const char *  new_label 
)

Duplicate/copy primitive data.

Parameters
[in]UUIDunique universal identifier (UUID) of primitive that is the source of data for copying
[in]old_labelold label of data to be copied
[in]new_labelnew label of data to be copied

Definition at line 352 of file Context_data.cpp.

◆ enableObjectDataValueCaching()

void Context::enableObjectDataValueCaching ( const std::string &  label)

Enable value-level caching for an object data label.

Parameters
[in]labelThe object data label to enable caching for. Must have string, int, or uint type.

Definition at line 52 of file Context_data.cpp.

◆ enablePrimitiveDataValueCaching()

void Context::enablePrimitiveDataValueCaching ( const std::string &  label)

Enable value-level caching for a primitive data label.

Parameters
[in]labelThe primitive data label to enable caching for. Must have string, int, or uint type.

Definition at line 36 of file Context_data.cpp.

◆ filterObjectsByData() [1/6]

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.

Parameters
[in]ObjIDsVector of object IDs to filter
[in]object_dataobject data field to use when filtering
[in]thresholdValue for filter threshold
[in]comparatorPoints will be filtered if "object_data (comparator) threshold", where (comparator) is one of ">", "<", or "="

Definition at line 1160 of file Context.cpp.

◆ filterObjectsByData() [2/6]

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.

Parameters
[in]objIDsUniversal unique identifiers of objects to be considered.
[in]object_data_labelName of object data.
[in]filter_valueString to use as filter.
Returns
Set of objIDs for objects with object data matching the string 'filter_value'.
Note
If object data does not exist, or object data does not have type of 'std::string', the object is excluded.

Definition at line 2022 of file Context_data.cpp.

◆ filterObjectsByData() [3/6]

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.

Parameters
[in]objIDsUniversal unique identifiers of objects to be considered.
[in]object_data_labelName of object data.
[in]filter_valueValue to use as filter.
[in]comparatorOperator to use for filter comparison. Valid comparators are '==', '>', '<', '>=','<='.
Returns
Set of objIDs for objects with object data meeting the condition of 'object_data' 'comparator' 'filter_value'.
Note
If object data does not exist, or object data does not have type of 'double', the object is excluded.

Definition at line 1917 of file Context_data.cpp.

◆ filterObjectsByData() [4/6]

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.

Parameters
[in]objIDsUniversal unique identifiers of objects to be considered.
[in]object_data_labelName of object data.
[in]filter_valueValue to use as filter.
[in]comparatorOperator to use for filter comparison. Valid comparators are '==', '>', '<', '>=','<='.
Returns
Set of objIDs for objects with object data meeting the condition of 'object_data' 'comparator' 'filter_value'.
Note
If object data does not exist, or object data does not have type of 'float', the object is excluded.

Definition at line 1882 of file Context_data.cpp.

◆ filterObjectsByData() [5/6]

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.

Parameters
[in]objIDsUniversal unique identifiers of objects to be considered.
[in]object_data_labelName of object data.
[in]filter_valueValue to use as filter.
[in]comparatorOperator to use for filter comparison. Valid comparators are '==', '>', '<', '>=','<='.
Returns
Set of objIDs for objects with object data meeting the condition of 'object_data' 'comparator' 'filter_value'.
Note
If object data does not exist, or object data does not have type of 'int', the object is excluded.

Definition at line 1952 of file Context_data.cpp.

◆ filterObjectsByData() [6/6]

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.

Parameters
[in]objIDsUniversal unique identifiers of objects to be considered.
[in]object_data_labelName of object data.
[in]filter_valueValue to use as filter.
[in]comparatorOperator to use for filter comparison. Valid comparators are '==', '>', '<', '>=','<='.
Returns
Set of objIDs for objects with object data meeting the condition of 'object_data' 'comparator' 'filter_value'.
Note
If object data does not exist, or object data does not have type of 'uint', the object is excluded.

Definition at line 1987 of file Context_data.cpp.

◆ filterPrimitivesByData() [1/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives to be considered.
[in]primitive_data_labelName of primitive data.
[in]filter_valueString to use as filter.
Returns
Set of UUIDs for primitives with primitive data matching the string 'filter_value'.
Note
If primitive data does not exist, or primitive data does not have type of 'std::string', the primitive is excluded.

Definition at line 1546 of file Context_data.cpp.

◆ filterPrimitivesByData() [2/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives to be considered.
[in]primitive_data_labelName of primitive data.
[in]filter_valueValue to use as filter.
[in]comparatorOperator to use for filter comparison. Valid comparators are '==', '>', '<', '>=','<='.
Returns
Set of UUIDs for primitives with primitive data meeting the condition of 'primitive_data' 'comparator' 'filter_value'.
Note
If primitive data does not exist, or primitive data does not have type of 'double', the primitive is excluded.

Definition at line 1429 of file Context_data.cpp.

◆ filterPrimitivesByData() [3/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives to be considered.
[in]primitive_data_labelName of primitive data.
[in]filter_valueValue to use as filter.
[in]comparatorOperator to use for filter comparison. Valid comparators are '==', '>', '<', '>=','<='.
Returns
Set of UUIDs for primitives with primitive data meeting the condition of 'primitive_data' 'comparator' 'filter_value'.
Note
If primitive data does not exist, or primitive data does not have type of 'float', the primitive is excluded.

Definition at line 1390 of file Context_data.cpp.

◆ filterPrimitivesByData() [4/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives to be considered.
[in]primitive_data_labelName of primitive data.
[in]filter_valueValue to use as filter.
[in]comparatorOperator to use for filter comparison. Valid comparators are '==', '>', '<', '>=','<='.
Returns
Set of UUIDs for primitives with primitive data meeting the condition of 'primitive_data' 'comparator' 'filter_value'.
Note
If primitive data does not exist, or primitive data does not have type of 'int', the primitive is excluded.

Definition at line 1468 of file Context_data.cpp.

◆ filterPrimitivesByData() [5/5]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives to be considered.
[in]primitive_data_labelName of primitive data.
[in]filter_valueValue to use as filter.
[in]comparatorOperator to use for filter comparison. Valid comparators are '==', '>', '<', '>=','<='.
Returns
Set of UUIDs for primitives with primitive data meeting the condition of 'primitive_data' 'comparator' 'filter_value'.
Note
If primitive data does not exist, or primitive data does not have type of 'uint', the primitive is excluded.

Definition at line 1507 of file Context_data.cpp.

◆ generateColormap() [1/2]

std::vector< RGBcolor > Context::generateColormap ( const std::string &  colormap,
uint  Ncolors 
)

Generates a colormap with a specified number of colors based on the selected colormap type.

Parameters
[in]colormapThe name of the colormap to generate (e.g., "hot", "cool", "lava", etc.).
[in]NcolorsThe desired number of colors in the output colormap.
Returns
A vector of RGBcolor objects representing the generated colormap.

Definition at line 2955 of file Context.cpp.

◆ generateColormap() [2/2]

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.

Parameters
[in]ctableA vector of RGB colors defining the input color points for interpolation.
[in]cfracA vector of fractional values corresponding to each color in the color table, must match the size of ctable.
[in]NcolorsDesired number of output colors in the generated colormap. Must be greater than 0.
Returns
A vector of RGB colors representing the generated colormap.
Note
The input vectors ctable and cfrac must have the same size, and neither can be empty. If the requested Ncolors exceeds the internal limit, it will be truncated to 9999, with a warning issued.

Definition at line 2915 of file Context.cpp.

◆ generateTexturesFromColormap()

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.

Parameters
[in]texturefileThe path to the input texture file that will be used as the base for generating new textures.
[in]colormap_dataA 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.
Returns
A vector of strings, where each string is the filename of a newly generated texture file.

Definition at line 3042 of file Context.cpp.

◆ getAllObjectIDs()

std::vector< uint > Context::getAllObjectIDs ( ) const

Get the IDs for all Compound Objects in the Context.

Returns
Vector of IDs for all objects.

Definition at line 1022 of file Context.cpp.

◆ getAllUUIDs()

std::vector< uint > Context::getAllUUIDs ( ) const

Get all primitive UUIDs currently in the Context.

Definition at line 458 of file Context.cpp.

◆ getBoxObjectCenter()

helios::vec3 Context::getBoxObjectCenter ( uint  ObjID) const

get the center of a Box object from the context

Parameters
[in]ObjIDobject ID of the Box object

Definition at line 4446 of file Context.cpp.

◆ getBoxObjectPointer()

Box * Context::getBoxObjectPointer ( uint  ObjID) const

Get a pointer to a Box Compound Object.

Parameters
[in]ObjIDIdentifier for Box Compound Object.

Definition at line 2387 of file Context_object.cpp.

◆ getBoxObjectSize()

helios::vec3 Context::getBoxObjectSize ( uint  ObjID) const

get the size of a Box object from the context

Parameters
[in]ObjIDobject ID of the Box object

Definition at line 4450 of file Context.cpp.

◆ getBoxObjectSubdivisionCount()

helios::int3 Context::getBoxObjectSubdivisionCount ( uint  ObjID) const

get the subdivision count of a Box object from the context

Parameters
[in]ObjIDobject ID of the Box object

Definition at line 4454 of file Context.cpp.

◆ getBoxObjectVolume()

float Context::getBoxObjectVolume ( uint  ObjID) const

get the volume of a Box object from the context

Parameters
[in]ObjIDobject ID of the Box object

Definition at line 4458 of file Context.cpp.

◆ getConeObjectAxisUnitVector()

helios::vec3 Context::getConeObjectAxisUnitVector ( uint  ObjID) const

get the axis unit vector of a Cone object from the context

Parameters
[in]ObjIDobject ID of the Cone object

Definition at line 4494 of file Context.cpp.

◆ getConeObjectLength()

float Context::getConeObjectLength ( uint  ObjID) const

get the length of a Cone object from the context

Parameters
[in]ObjIDobject ID of the Cone object
Returns
Dimension of cone object in the axial direction

Definition at line 4498 of file Context.cpp.

◆ getConeObjectNode()

helios::vec3 Context::getConeObjectNode ( uint  ObjID,
int  number 
) const

get a node of a Cone object from the context

Parameters
[in]ObjIDobject ID of the Cone object
[in]numberindex of the node (0 = base, 1 = tip)

Definition at line 4486 of file Context.cpp.

◆ getConeObjectNodeRadii()

std::vector< float > Context::getConeObjectNodeRadii ( uint  ObjID) const

get the node radii of a Cone object from the context

Parameters
[in]ObjIDobject ID of the Cone object

Definition at line 4482 of file Context.cpp.

◆ getConeObjectNodeRadius()

float Context::getConeObjectNodeRadius ( uint  ObjID,
int  number 
) const

get a node radius of a Cone object from the context

Parameters
[in]ObjIDobject ID of the Cone object
[in]numberindex of the node (0 = base, 1 = tip)

Definition at line 4490 of file Context.cpp.

◆ getConeObjectNodes()

std::vector< helios::vec3 > Context::getConeObjectNodes ( uint  ObjID) const

get the nodes of a Cone object from the context

Parameters
[in]ObjIDobject ID of the Cone object

Definition at line 4478 of file Context.cpp.

◆ getConeObjectPointer()

Cone * Context::getConeObjectPointer ( uint  ObjID) const

Get a pointer to a Cone Compound Object.

Parameters
[in]ObjIDIdentifier for Cone Compound Object.

Definition at line 2553 of file Context_object.cpp.

◆ getConeObjectSubdivisionCount()

uint Context::getConeObjectSubdivisionCount ( uint  ObjID) const

get the subdivision count of a Cone object from the context

Parameters
[in]ObjIDobject ID of the Cone object

Definition at line 4474 of file Context.cpp.

◆ getConeObjectVolume()

float Context::getConeObjectVolume ( uint  ObjID) const

get the volume of a Cone object from the context

Parameters
[in]ObjIDobject ID of the Cone object

Definition at line 4502 of file Context.cpp.

◆ getDate()

Date Context::getDate ( ) const

Get simulation date.

Returns
Date vector
See also
setDate(), getJulianDate()

Definition at line 349 of file Context.cpp.

◆ getDeletedUUIDs()

std::vector< uint > Context::getDeletedUUIDs ( ) const

Get all primitive UUIDs that were deleted since the Context was last marked clean.

Returns
Vector of UUIDs for primitives that were deleted since the Context was last marked clean

Definition at line 497 of file Context.cpp.

◆ getDirtyUUIDs()

std::vector< uint > Context::getDirtyUUIDs ( bool  include_deleted_UUIDs = false) const

Get all primitive UUIDs that are marked dirty.

Parameters
[in]include_deleted_UUIDs[optional] If true, deleted UUIDs are included in the returned vector.
Returns
Vector of UUIDs for primitives that are marked dirty

Definition at line 477 of file Context.cpp.

◆ getDiskObjectCenter()

helios::vec3 Context::getDiskObjectCenter ( uint  ObjID) const

get the center of a Disk object from the context

Parameters
[in]ObjIDobject ID of the Disk object

Definition at line 4462 of file Context.cpp.

◆ getDiskObjectPointer()

Disk * Context::getDiskObjectPointer ( uint  ObjID) const

Get a pointer to a Disk Compound Object.

Parameters
[in]ObjIDIdentifier for Disk Compound Object.

Definition at line 2453 of file Context_object.cpp.

◆ getDiskObjectSize()

helios::vec2 Context::getDiskObjectSize ( uint  ObjID) const

get the size of a Disk object from the context

Parameters
[in]ObjIDobject ID of the Disk object

Definition at line 4466 of file Context.cpp.

◆ getDiskObjectSubdivisionCount()

uint Context::getDiskObjectSubdivisionCount ( uint  ObjID) const

get the subdivision count of a Disk object from the context

Parameters
[in]ObjIDobject ID of the Disk object

Definition at line 4470 of file Context.cpp.

◆ getDomainBoundingBox() [1/2]

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.

  • Parameters
    [in]UUIDsSubset of primitive UUIDs for bounding box calculation.
    [out]xboundsDomain bounds in x-direction (xbounds.x=min bound, xbounds.y=max bound)
    [out]yboundsDomain bounds in x-direction (ybounds.x=min bound, ybounds.y=max bound)
    [out]zboundsDomain bounds in x-direction (zbounds.x=min bound, zbounds.y=max bound)

Definition at line 781 of file Context.cpp.

◆ getDomainBoundingBox() [2/2]

void Context::getDomainBoundingBox ( helios::vec2 xbounds,
helios::vec2 ybounds,
helios::vec2 zbounds 
) const

Get a box that bounds all primitives in the domain.

Parameters
[out]xboundsDomain bounds in x-direction (xbounds.x=min bound, xbounds.y=max bound)
[out]yboundsDomain bounds in x-direction (ybounds.x=min bound, ybounds.y=max bound)
[out]zboundsDomain bounds in x-direction (zbounds.x=min bound, zbounds.y=max bound)

Definition at line 777 of file Context.cpp.

◆ getDomainBoundingSphere() [1/2]

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.

Parameters
[in]UUIDsSubset of primitive UUIDs for bounding sphere calculation.
[out]centerCenter of primitive bounding sphere.
[out]radiusRadius of primitive bounding sphere.

Definition at line 865 of file Context.cpp.

◆ getDomainBoundingSphere() [2/2]

void Context::getDomainBoundingSphere ( helios::vec3 center,
float &  radius 
) const

Get the center and radius of a sphere that bounds all primitives in the domain.

Parameters
[out]centerCenter of domain bounding sphere.
[out]radiusRadius of domain bounding sphere.

Definition at line 854 of file Context.cpp.

◆ getGlobalData()

template<typename T >
void helios::Context::getGlobalData ( const char *  label,
T &  data 
) const
inline

Get global data value (scalar or vector)

Parameters
[in]labelName/label associated with data
[out]dataGlobal data value (scalar or vector)

Definition at line 4454 of file Context.h.

◆ getGlobalDataSize()

size_t Context::getGlobalDataSize ( const char *  label) const

Get the size/length of global data.

Parameters
[in]labelName/label associated with data
Returns
Size/length of global data array

Definition at line 2128 of file Context_data.cpp.

◆ getGlobalDataType()

HeliosDataType Context::getGlobalDataType ( const char *  label) const

Get the Helios data type of global data.

Parameters
[in]labelName/label associated with data
Returns
Helios data type of global data

Definition at line 2119 of file Context_data.cpp.

◆ getJulianDate()

int Context::getJulianDate ( ) const

Get simulation date by Julian day.

Returns
Julian day of year (1-366)
See also
setDate(), getDate()

Definition at line 381 of file Context.cpp.

◆ getLoadedXMLFiles()

std::vector< std::string > Context::getLoadedXMLFiles ( )

Get names of XML files that are currently loaded.

Returns
Vector of XML files.

Definition at line 2250 of file Context_fileIO.cpp.

◆ getLocation()

helios::Location Context::getLocation ( ) const

Get the location of the simulation (latitude, longitude, and UTC offset)

Returns
Location vector

Definition at line 419 of file Context.cpp.

◆ getMonthString()

const char * Context::getMonthString ( ) const

Get a string corresponding to the month of the simulation date.

Returns
Month string (e.g., Jan, Feb, Mar, etc)
See also
setDate(), getJulianDate()

Definition at line 353 of file Context.cpp.

◆ getObjectArea()

float Context::getObjectArea ( uint  ObjID) const

Method to return the one-sided surface area of an object.

Parameters
[in]ObjIDIdentifier of the object.

Definition at line 4033 of file Context.cpp.

◆ getObjectAverageNormal()

helios::vec3 Context::getObjectAverageNormal ( uint  ObjID) const

Method to return the average surface normal vector of an object.

Parameters
[in]ObjIDIdentifier of the object.

Definition at line 4037 of file Context.cpp.

◆ getObjectBoundingBox() [1/2]

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.

Parameters
[in]ObjIDsVector 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.

◆ getObjectBoundingBox() [2/2]

void Context::getObjectBoundingBox ( uint  ObjID,
vec3 min_corner,
vec3 max_corner 
) const

Get the axis-aligned bounding box for a single object.

Parameters
[in]ObjIDIdentifier 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.

◆ getObjectCenter()

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.

Parameters
[in]ObjIDIdentifier of the object.

Definition at line 4059 of file Context.cpp.

◆ getObjectCount()

uint Context::getObjectCount ( ) const

Get the total number of objects that have been created in the Context.

Returns
Total number of objects that have been created in the Context

Definition at line 1014 of file Context.cpp.

◆ getObjectData() [1/2]

template<typename T >
void helios::Context::getObjectData ( uint  objID,
const char *  label,
std::vector< T > &  data 
) const
inline

Get data value associated with a vector of compound objects.

Template Parameters
TObject data type
Note
the size of objIDs and data must match
Parameters
[in]objIDUnique identifier of compound object
[in]labelName/label associated with data
[in]dataObject data value (vector)

Definition at line 4253 of file Context.h.

◆ getObjectData() [2/2]

template<typename T >
void helios::Context::getObjectData ( uint  objID,
const char *  label,
T &  data 
) const
inline

Get data value associated with a compound object.

Template Parameters
TObject data type
Parameters
[in]objIDUnique identifier of compound object
[in]labelName/label associated with data
[in]dataObject data value (scalar)

Definition at line 4232 of file Context.h.

◆ getObjectDataSize()

uint Context::getObjectDataSize ( uint  objID,
const char *  label 
) const

Get the size/length of primitive data.

Parameters
[in]objIDUnique universal identifier of compound object
[in]labelName/label associated with data
Returns
Size/length of primitive data array

Definition at line 1587 of file Context_data.cpp.

◆ getObjectDataType()

HeliosDataType Context::getObjectDataType ( const char *  label) const

Get the expected data type for an object data label (cached lookup)

Parameters
[in]labelName/label associated with object data
Returns
Helios data type that all objects with this label should have
See also
HeliosDataType
Note
Returns HELIOS_TYPE_UNKNOWN if label doesn't exist in registry

Definition at line 1569 of file Context_data.cpp.

◆ getObjectPointer()

CompoundObject * Context::getObjectPointer ( uint  ObjID) const

Get a pointer to a Compound Object.

Parameters
[in]ObjIDIdentifier for Compound Object.

Definition at line 1005 of file Context.cpp.

◆ getObjectPrimitiveCount()

uint Context::getObjectPrimitiveCount ( uint  ObjID) const

Method to return the number of primitives contained in the object.

Parameters
[in]ObjIDIdentifier of the object.

Definition at line 4055 of file Context.cpp.

◆ getObjectPrimitiveUUIDs() [1/3]

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)

Parameters
[in]ObjIDsvector of object IDs to retrieve primitive UUIDs for

Definition at line 1410 of file Context.cpp.

◆ getObjectPrimitiveUUIDs() [2/3]

std::vector< uint > Context::getObjectPrimitiveUUIDs ( const std::vector< uint > &  ObjIDs) const

Get primitive UUIDs associated with compound objects (1D vector of object IDs input)

Parameters
[in]ObjIDsvector of object IDs to retrieve primitive UUIDs for

Definition at line 1395 of file Context.cpp.

◆ getObjectPrimitiveUUIDs() [3/3]

std::vector< uint > Context::getObjectPrimitiveUUIDs ( uint  ObjID) const

Get primitive UUIDs associated with compound object (single object ID input)

Parameters
[in]ObjIDobject ID to retrieve primitive UUIDs for

Definition at line 1373 of file Context.cpp.

◆ getObjectTextureFile()

std::string Context::getObjectTextureFile ( uint  ObjID) const

Method to return the texture map file of an Object.

Parameters
[in]ObjIDIdentifier of the object.

Definition at line 4063 of file Context.cpp.

◆ getObjectTransformationMatrix()

void Context::getObjectTransformationMatrix ( uint  ObjID,
float(&)  T[16] 
) const

Method to return the Affine transformation matrix of an Object.

Parameters
[in]ObjIDIdentifier of the object.
[out]T1D vector corresponding to Primitive transformation matrix

Definition at line 4067 of file Context.cpp.

◆ getObjectType()

helios::ObjectType Context::getObjectType ( uint  ObjID) const

Get an enumeration specifying the type of the object.

Parameters
[in]ObjIDObject ID for which object type will be retrieved

Definition at line 1428 of file Context.cpp.

◆ getPatchCenter()

helios::vec3 Context::getPatchCenter ( uint  UUID) const

Get the Cartesian (x,y,z) center position of a patch element.

Parameters
[in]UUIDUnique universal identifier for patch.
Returns
Center position of Patch element.
Note
If the UUID passed to this method does not correspond to a Patch, an error will be thrown.

Definition at line 613 of file Context_primitive.cpp.

◆ getPatchSize()

helios::vec2 Context::getPatchSize ( uint  UUID) const

Get the size of a patch element.

Parameters
[in]UUIDUnique universal identifier for patch.
Returns
Length x width of Patch element.
Note
If the UUID passed to this method does not correspond to a Patch, an error will be thrown.

Definition at line 602 of file Context_primitive.cpp.

◆ getPolymeshObjectPointer()

Polymesh * Context::getPolymeshObjectPointer ( uint  ObjID) const

Get a pointer to a Polygon Mesh Compound Object.

Parameters
[in]ObjIDIdentifier for Polygon Mesh Compound Object.

Definition at line 2510 of file Context_object.cpp.

◆ getPolymeshObjectVolume()

float Context::getPolymeshObjectVolume ( uint  ObjID) const

Get the volume of a Polygon Mesh object from the context.

Parameters
[in]ObjIDobject ID of the Polygon Mesh object

Definition at line 4506 of file Context.cpp.

◆ getPrimitiveArea()

float Context::getPrimitiveArea ( uint  UUID) const

Method to return the surface area of a Primitive.

Parameters
[in]UUIDUniversal unique identifier of primitive.

Definition at line 3204 of file Context.cpp.

◆ getPrimitiveBoundingBox() [1/2]

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.

Parameters
[in]UUIDsVector 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.

◆ getPrimitiveBoundingBox() [2/2]

void Context::getPrimitiveBoundingBox ( uint  UUID,
vec3 min_corner,
vec3 max_corner 
) const

Get the axis-aligned bounding box for a single primitive.

Parameters
[in]UUIDUniversal 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.

◆ getPrimitiveColor()

helios::RGBcolor Context::getPrimitiveColor ( uint  UUID) const

Method to return the diffuse color of a Primitive.

Parameters
[in]UUIDUniversal unique identifier of primitive.

Definition at line 3280 of file Context.cpp.

◆ getPrimitiveColorRGB()

helios::RGBcolor Context::getPrimitiveColorRGB ( uint  UUID) const

Method to return the diffuse color of a Primitive.

Parameters
[in]UUIDUniversal unique identifier of primitive.

Definition at line 3284 of file Context.cpp.

◆ getPrimitiveColorRGBA()

helios::RGBAcolor Context::getPrimitiveColorRGBA ( uint  UUID) const

Method to return the diffuse color of a Primitive with transparency.

Parameters
[in]UUIDUniversal unique identifier of primitive.

Definition at line 3288 of file Context.cpp.

◆ getPrimitiveData() [1/2]

template<typename T >
void helios::Context::getPrimitiveData ( uint  UUID,
const char *  label,
std::vector< T > &  data 
) const
inline

Get data value associated with a vector of primitive elements.

Template Parameters
TPrimitive data type
Note
the size of UUIDs and data must match
Parameters
[in]UUIDUnique universal identifier of Primitive element
[in]labelName/label associated with data
[in]dataPrimitive data value (vector)

Definition at line 3153 of file Context.h.

◆ getPrimitiveData() [2/2]

template<typename T >
void helios::Context::getPrimitiveData ( uint  UUID,
const char *  label,
T &  data 
) const
inline

Get data value associated with a primitive element.

Template Parameters
TPrimitive data type
Parameters
[in]UUIDUnique universal identifier of Primitive element
[in]labelName/label associated with data
[in]dataPrimitive data value (scalar)

Definition at line 3135 of file Context.h.

◆ getPrimitiveDataSize()

uint Context::getPrimitiveDataSize ( uint  UUID,
const char *  label 
) const

Get the size/length of primitive data.

Parameters
[in]UUIDUnique universal identifier of Primitive element
[in]labelName/label associated with data
Returns
Size/length of primitive data array

Definition at line 219 of file Context_data.cpp.

◆ getPrimitiveDataType()

HeliosDataType Context::getPrimitiveDataType ( const char *  label) const

Get the expected data type for a primitive data label (cached lookup)

Parameters
[in]labelName/label associated with primitive data
Returns
Helios data type that all primitives with this label should have
See also
HeliosDataType
Note
Returns HELIOS_TYPE_UNKNOWN if label doesn't exist in registry

Definition at line 96 of file Context_data.cpp.

◆ getPrimitiveNormal()

helios::vec3 Context::getPrimitiveNormal ( uint  UUID) const

Method to return the normal vector of a Primitive.

Parameters
[in]UUIDUniversal unique identifier of primitive.

Definition at line 3257 of file Context.cpp.

◆ getPrimitiveParentObjectID() [1/2]

std::vector< uint > Context::getPrimitiveParentObjectID ( const std::vector< uint > &  UUIDs) const

Method to return the ID of the parent object the primitive belongs to (default is object 0)

Parameters
[in]UUIDsVector of universal unique identifiers of primitives.

Definition at line 3153 of file Context.cpp.

◆ getPrimitiveParentObjectID() [2/2]

uint Context::getPrimitiveParentObjectID ( uint  UUID) const

Method to return the ID of the parent object the primitive belongs to (default is object 0)

Parameters
[in]UUIDUniversal unique identifier of primitive.

Definition at line 3144 of file Context.cpp.

◆ getPrimitiveSolidFraction()

float Context::getPrimitiveSolidFraction ( uint  UUID) const

Get fraction of primitive surface area that is non-transparent.

Parameters
[in]UUIDUniversal unique identifier for primitive.
Returns
Fraction of non-transparent area (=1 if primitive does not have a semi-transparent texture).

Definition at line 3374 of file Context.cpp.

◆ getPrimitiveTextureFile()

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.

Parameters
[in]UUIDUnique universal identifier of primitive to be queried
Returns
Path to texture map file.

Definition at line 3312 of file Context.cpp.

◆ getPrimitiveTextureSize()

helios::int2 Context::getPrimitiveTextureSize ( uint  UUID) const

Get the size (number of pixels) of primitive texture map image.

Parameters
[in]UUIDUnique universal identifier of primitive to be queried
Returns
Texture image resolution (columns x rows).

Definition at line 3320 of file Context.cpp.

◆ getPrimitiveTextureTransparencyData()

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.

Parameters
[in]UUIDUnique universal identifier of primitive to be queried
Returns
Transparency value (0 or 1) for each pixel in primitive texture map.

Definition at line 3340 of file Context.cpp.

◆ getPrimitiveTextureUV()

std::vector< helios::vec2 > Context::getPrimitiveTextureUV ( uint  UUID) const

Get u-v texture coordinates at primitive vertices.

Parameters
[in]UUIDUnique universal identifier of primitive to be queried

Definition at line 3328 of file Context.cpp.

◆ getPrimitiveTransformationMatrix()

void Context::getPrimitiveTransformationMatrix ( uint  UUID,
float(&)  T[16] 
) const

Method to return the Affine transformation matrix of a Primitive.

Parameters
[in]UUIDUniversal unique identifier of primitive.
[out]T1D vector corresponding to Primitive transformation matrix

Definition at line 3261 of file Context.cpp.

◆ getPrimitiveType()

PrimitiveType Context::getPrimitiveType ( uint  UUID) const

Method to get the Primitive type.

Parameters
[in]UUIDUniversal unique identifier of primitive.
See also
PrimitiveType

Definition at line 3106 of file Context.cpp.

◆ getPrimitiveVertices()

std::vector< helios::vec3 > Context::getPrimitiveVertices ( uint  UUID) const

Method to return the (x,y,z) coordinates of the vertices of a Primitive.

Parameters
[in]UUIDUniversal unique identifier of primitive.

Definition at line 3275 of file Context.cpp.

◆ getRandomGenerator()

std::minstd_rand0 * Context::getRandomGenerator ( )

Get the random number generator engine.

Returns
std::minstd_rand0 random number generator engine

Definition at line 48 of file Context.cpp.

◆ getSphereObjectCenter()

helios::vec3 Context::getSphereObjectCenter ( uint  ObjID) const

get the center of a Sphere object from the context

Parameters
[in]ObjIDobject ID of the Sphere object

Definition at line 4339 of file Context.cpp.

◆ getSphereObjectPointer()

Sphere * Context::getSphereObjectPointer ( uint  ObjID) const

Get a pointer to a Sphere Compound Object.

Parameters
[in]ObjIDIdentifier for Sphere Compound Object.

Definition at line 1818 of file Context_object.cpp.

◆ getSphereObjectRadius()

helios::vec3 Context::getSphereObjectRadius ( uint  ObjID) const

get the radius of a Sphere object from the context

Parameters
[in]ObjIDobject ID of the Sphere object

Definition at line 4343 of file Context.cpp.

◆ getSphereObjectSubdivisionCount()

uint Context::getSphereObjectSubdivisionCount ( uint  ObjID) const

get the subdivision count of a Sphere object from the context

Parameters
[in]ObjIDobject ID of the Sphere object

Definition at line 4347 of file Context.cpp.

◆ getSphereObjectVolume()

float Context::getSphereObjectVolume ( uint  ObjID) const

get the volume of a Sphere object from the context

Parameters
[in]ObjIDobject ID of the Sphere object

Definition at line 4351 of file Context.cpp.

◆ getTileObjectAreaRatio() [1/2]

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)

Parameters
[in]ObjIDsVector of identifiers for Tile Compound Object.

Definition at line 1467 of file Context.cpp.

◆ getTileObjectAreaRatio() [2/2]

float Context::getTileObjectAreaRatio ( uint  ObjID) const

Get the area ratio of a tile object (total object area / sub-patch area)

Parameters
[in]ObjIDIdentifier for Tile Compound Object.

Definition at line 1440 of file Context.cpp.

◆ getTileObjectCenter()

helios::vec3 Context::getTileObjectCenter ( uint  ObjID) const

Get the Cartesian (x,y,z) center position of a tile object.

Parameters
[in]ObjIDobject ID of the tile object
Returns
Center position of a Tile Object.
Note
If the ObjID passed to this method does not correspond to a Tile Object, an error will be thrown.

Definition at line 4315 of file Context.cpp.

◆ getTileObjectNormal()

helios::vec3 Context::getTileObjectNormal ( uint  ObjID) const

get the normal of a tile object from the context

Parameters
[in]ObjIDobject ID of the tile object

Definition at line 4327 of file Context.cpp.

◆ getTileObjectPointer()

Tile * Context::getTileObjectPointer ( uint  ObjID) const

Get a pointer to a Tile Compound Object.

Parameters
[in]ObjIDIdentifier for Tile Compound Object.

Definition at line 1731 of file Context_object.cpp.

◆ getTileObjectSize()

helios::vec2 Context::getTileObjectSize ( uint  ObjID) const

get the size of a tile object from the context

Parameters
[in]ObjIDobject ID of the tile object

Definition at line 4319 of file Context.cpp.

◆ getTileObjectSubdivisionCount()

helios::int2 Context::getTileObjectSubdivisionCount ( uint  ObjID) const

get the subdivision count of a tile object from the context

Parameters
[in]ObjIDobject ID of the tile object

Definition at line 4323 of file Context.cpp.

◆ getTileObjectTextureUV()

std::vector< helios::vec2 > Context::getTileObjectTextureUV ( uint  ObjID) const

get the texture UV coordinates of a tile object from the context

Parameters
[in]ObjIDobject ID of the tile object

Definition at line 4331 of file Context.cpp.

◆ getTileObjectVertices()

std::vector< helios::vec3 > Context::getTileObjectVertices ( uint  ObjID) const

get the vertices of a tile object from the context

Parameters
[in]ObjIDobject ID of the tile object

Definition at line 4335 of file Context.cpp.

◆ getTime()

Time Context::getTime ( ) const

Get the simulation time.

Returns
Time vector
See also
setTime()

Definition at line 411 of file Context.cpp.

◆ getTriangleVertex()

helios::vec3 Context::getTriangleVertex ( uint  UUID,
uint  number 
) const

Get a single vertex of a Triangle based on an index.

Parameters
[in]UUIDUniversal unique identifier of Triangle element.
[in]numberIndex of vertex (0, 1, or 2)
Returns
Cartesian (x,y,z) coordinate of triangle vertices indexed at "vertex"
Note
If the UUID passed to this method does not correspond to a Triangle, an error will be thrown.

Definition at line 635 of file Context_primitive.cpp.

◆ getTubeObjectNodeColors()

std::vector< RGBcolor > Context::getTubeObjectNodeColors ( uint  ObjID) const

get the node colors of a Tube object from the context

Parameters
[in]ObjIDobject ID of the Tube object

Definition at line 4371 of file Context.cpp.

◆ getTubeObjectNodeCount()

uint Context::getTubeObjectNodeCount ( uint  ObjID) const

get the number of nodes of a Tube object from the context

Parameters
[in]ObjIDobject ID of the Tube object

Definition at line 4363 of file Context.cpp.

◆ getTubeObjectNodeRadii()

std::vector< float > Context::getTubeObjectNodeRadii ( uint  ObjID) const

get the node radii of a Tube object from the context

Parameters
[in]ObjIDobject ID of the Tube object

Definition at line 4367 of file Context.cpp.

◆ getTubeObjectNodes()

std::vector< helios::vec3 > Context::getTubeObjectNodes ( uint  ObjID) const

get the nodes of a Tube object from the context

Parameters
[in]ObjIDobject ID of the Tube object

Definition at line 4359 of file Context.cpp.

◆ getTubeObjectPointer()

Tube * Context::getTubeObjectPointer ( uint  ObjID) const

Get a pointer to a Tube Compound Object.

Parameters
[in]ObjIDIdentifier for Tube Compound Object.

Definition at line 1892 of file Context_object.cpp.

◆ getTubeObjectSegmentVolume()

float Context::getTubeObjectSegmentVolume ( uint  ObjID,
uint  segment_index 
) const

get the volume of a segment within a Tube object

Parameters
[in]ObjIDobject ID of the Tube object
[in]segment_indexIndex of the segment within the Tube object

Definition at line 4379 of file Context.cpp.

◆ getTubeObjectSubdivisionCount()

uint Context::getTubeObjectSubdivisionCount ( uint  ObjID) const

get the subdivision count of a Tube object from the context

Parameters
[in]ObjIDobject ID of the Tube object

Definition at line 4355 of file Context.cpp.

◆ getTubeObjectVolume()

float Context::getTubeObjectVolume ( uint  ObjID) const

get the volume of a Tube object from the context

Parameters
[in]ObjIDobject ID of the Tube object

Definition at line 4375 of file Context.cpp.

◆ getUniqueObjectDataValues()

template<typename T >
void helios::Context::getUniqueObjectDataValues ( const std::string &  label,
std::vector< T > &  values 
) const
inline

Get all unique values for an object data label (requires caching to be enabled)

Template Parameters
TData type (std::string, int, or uint)
Parameters
[in]labelThe object data label to query.
[out]valuesVector to store the unique values.
Note
Throws helios_runtime_error if caching is not enabled for the label.

Definition at line 7163 of file Context.h.

◆ getUniquePrimitiveDataValues()

template<typename T >
void helios::Context::getUniquePrimitiveDataValues ( const std::string &  label,
std::vector< T > &  values 
) const
inline

Get all unique values for a primitive data label (requires caching to be enabled)

Template Parameters
TData type (std::string, int, or uint)
Parameters
[in]labelThe primitive data label to query.
[out]valuesVector to store the unique values.
Note
Throws helios_runtime_error if caching is not enabled for the label.

Definition at line 7113 of file Context.h.

◆ getUniquePrimitiveParentObjectIDs() [1/2]

std::vector< uint > Context::getUniquePrimitiveParentObjectIDs ( const std::vector< uint > &  UUIDs) const

Method to return unique parent object IDs for a vector of primitive UUIDs.

Parameters
[in]UUIDsVector of universal unique identifiers of primitives.

Definition at line 3167 of file Context.cpp.

◆ getUniquePrimitiveParentObjectIDs() [2/2]

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.

Parameters
[in]UUIDsVector of universal unique identifiers of primitives.
[in]include_ObjID_zeroInclude object ID 0 in the list of unique parent object IDs.

Definition at line 3172 of file Context.cpp.

◆ getVoxelCenter()

helios::vec3 Context::getVoxelCenter ( uint  UUID) const

Get the Cartesian (x,y,z) center position of a voxel element.

Parameters
[in]UUIDUnique universal identifier for voxel.
Returns
Center position of voxel element.
Note
If the UUID passed to this method does not correspond to a voxel, an error will be thrown.

Definition at line 679 of file Context_primitive.cpp.

◆ getVoxelSize()

helios::vec3 Context::getVoxelSize ( uint  UUID) const

Get the size of a voxel element.

Parameters
[in]UUIDUnique universal identifier for voxel.
Returns
Length x width x height of voxel element.
Note
If the UUID passed to this method does not correspond to a voxel, an error will be thrown.

Definition at line 668 of file Context_primitive.cpp.

◆ hideObject() [1/2]

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()

Parameters
[in]ObjIDsIdentifier of the object.

Definition at line 3997 of file Context.cpp.

◆ hideObject() [2/2]

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()

Parameters
[in]ObjIDIdentifier of the object.

Definition at line 3980 of file Context.cpp.

◆ hidePrimitive() [1/2]

void Context::hidePrimitive ( const std::vector< uint > &  UUIDs) const

Hide primitives in the Context such that their UUIDs are not returned in Context::getAllUUIDs()

Parameters
[in]UUIDsVector of primitive UUIDs to hide

Definition at line 511 of file Context.cpp.

◆ hidePrimitive() [2/2]

void Context::hidePrimitive ( uint  UUID) const

Hide primitive in the Context such that its UUID is not returned in Context::getAllUUIDs()

Parameters
[in]UUIDPrimitive UUID to hide

Definition at line 501 of file Context.cpp.

◆ incrementGlobalData() [1/4]

void Context::incrementGlobalData ( const char *  label,
double  increment 
)

Increase value of global data (double) by some value.

Parameters
[in]labelGlobal data label string
[in]incrementValue to increment global data by
Note
If global data is a vector, each value in the vector will be incremented by the same amount

Definition at line 2226 of file Context_data.cpp.

◆ incrementGlobalData() [2/4]

void Context::incrementGlobalData ( const char *  label,
float  increment 
)

Increase value of global data (float) by some value.

Parameters
[in]labelGlobal data label string
[in]incrementValue to increment global data by
Note
If global data is a vector, each value in the vector will be incremented by the same amount

Definition at line 2209 of file Context_data.cpp.

◆ incrementGlobalData() [3/4]

void Context::incrementGlobalData ( const char *  label,
int  increment 
)

Increase value of global data (int) by some value.

Parameters
[in]labelGlobal data label string
[in]incrementValue to increment global data by
Note
If global data is a vector, each value in the vector will be incremented by the same amount

Definition at line 2175 of file Context_data.cpp.

◆ incrementGlobalData() [4/4]

void Context::incrementGlobalData ( const char *  label,
uint  increment 
)

Increase value of global data (uint) by some value.

Parameters
[in]labelGlobal data label string
[in]incrementValue to increment global data by
Note
If global data is a vector, each value in the vector will be incremented by the same amount

Definition at line 2192 of file Context_data.cpp.

◆ incrementObjectValueRegistry()

template<typename T >
void helios::Context::incrementObjectValueRegistry ( const std::string &  label,
const T &  value 
)
inline

Template implementation for incrementing object value registry.

Definition at line 7043 of file Context.h.

◆ incrementPrimitiveData() [1/4]

void Context::incrementPrimitiveData ( const std::vector< uint > &  UUIDs,
const char *  label,
double  increment 
)

Increase value of primitive data (double) by some value.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelprimitive data label string
[in]incrementValue to increment primitive data by
Note
If primitive data is a vector, each value in the vector will be incremented by the same amount

Definition at line 1032 of file Context_data.cpp.

◆ incrementPrimitiveData() [2/4]

void Context::incrementPrimitiveData ( const std::vector< uint > &  UUIDs,
const char *  label,
float  increment 
)

Increase value of primitive data (float) by some value.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelprimitive data label string
[in]incrementValue to increment primitive data by
Note
If primitive data is a vector, each value in the vector will be incremented by the same amount

Definition at line 1011 of file Context_data.cpp.

◆ incrementPrimitiveData() [3/4]

void Context::incrementPrimitiveData ( const std::vector< uint > &  UUIDs,
const char *  label,
int  increment 
)

Increase value of primitive data (int) by some value.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelprimitive data label string
[in]incrementValue to increment primitive data by
Note
If primitive data is a vector, each value in the vector will be incremented by the same amount

Definition at line 969 of file Context_data.cpp.

◆ incrementPrimitiveData() [4/4]

void Context::incrementPrimitiveData ( const std::vector< uint > &  UUIDs,
const char *  label,
uint  increment 
)

Increase value of primitive data (uint) by some value.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelprimitive data label string
[in]incrementValue to increment primitive data by
Note
If primitive data is a vector, each value in the vector will be incremented by the same amount

Definition at line 990 of file Context_data.cpp.

◆ incrementPrimitiveValueRegistry()

template<typename T >
void helios::Context::incrementPrimitiveValueRegistry ( const std::string &  label,
const T &  value 
)
inline

Template implementation for incrementing primitive value registry.

Definition at line 6981 of file Context.h.

◆ isGeometryDirty()

bool Context::isGeometryDirty ( ) const

Query whether the Context geometry is "dirty", meaning has the geometry been modified since last set as clean.

See also
markGeometryClean()
markGeometryDirty()

Definition at line 263 of file Context.cpp.

◆ isObjectDataValueCachingEnabled()

bool Context::isObjectDataValueCachingEnabled ( const std::string &  label) const

Check if value-level caching is enabled for an object data label.

Parameters
[in]labelThe object data label to check.
Returns
True if caching is enabled, false otherwise.

Definition at line 64 of file Context_data.cpp.

◆ isObjectHidden()

bool Context::isObjectHidden ( uint  ObjID) const

Query if an object is hidden.

Parameters
[in]ObjIDIdentifier of the object.
Returns
True if the object is hidden, false otherwise.

Definition at line 4026 of file Context.cpp.

◆ isPrimitiveDataValueCachingEnabled()

bool Context::isPrimitiveDataValueCachingEnabled ( const std::string &  label) const

Check if value-level caching is enabled for a primitive data label.

Parameters
[in]labelThe primitive data label to check.
Returns
True if caching is enabled, false otherwise.

Definition at line 48 of file Context_data.cpp.

◆ isPrimitiveDirty()

bool Context::isPrimitiveDirty ( uint  UUID) const

Query whether a given primitive is "dirty", meaning it has been modified since last set as clean.

Parameters
[in]UUIDUniversal unique identifier of the primitive to query
Returns
True if the primitive is currently marked dirty; False otherwise

Definition at line 305 of file Context.cpp.

◆ isPrimitiveHidden()

bool Context::isPrimitiveHidden ( uint  UUID) const

Query whether a primitive is hidden.

Parameters
[in]UUIDUnique universal identifier of primitive element
Returns
true if primitive is hidden, false if not

Definition at line 533 of file Context.cpp.

◆ isPrimitiveTextureColorOverridden()

bool Context::isPrimitiveTextureColorOverridden ( uint  UUID) const

Check if color of texture map is overridden by the diffuse R-G-B color of the primitive.

Parameters
[in]UUIDUnique universal identifier of primitive to be queried

Definition at line 3370 of file Context.cpp.

◆ listAllObjectDataLabels()

std::vector< std::string > Context::listAllObjectDataLabels ( ) const

Lists all object data labels that exist in the Context.

Returns
A vector of strings containing the labels of all object data.

Definition at line 2160 of file Context_data.cpp.

◆ listAllPrimitiveDataLabels()

std::vector< std::string > Context::listAllPrimitiveDataLabels ( ) const

Lists all primitive data labels that exist in the Context.

Returns
A vector of strings containing the labels of all primitive data.

Definition at line 2148 of file Context_data.cpp.

◆ listGlobalData()

std::vector< std::string > Context::listGlobalData ( ) const

List the labels for all global data in the Context.

Returns
Vector of labels for all global data

Definition at line 2137 of file Context_data.cpp.

◆ listObjectData()

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.

◆ listPrimitiveData()

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.

◆ listTimeseriesVariables()

std::vector< std::string > Context::listTimeseriesVariables ( ) const

List all existing timeseries variables.

Definition at line 767 of file Context.cpp.

◆ loadOBJ() [1/4]

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.

Parameters
[in]filenamename of OBJ file
[in]silent[optional] If set to true, output messaged will be disabled

Definition at line 3557 of file Context_fileIO.cpp.

◆ loadOBJ() [2/4]

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)

Parameters
[in]filenamename 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]rotationSpherical rotation of PLY object about origin
[in]default_colorColor to be used if no r-g-b color values are given for PLY nodes
[in]upaxisDirection 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
Returns
Vector of UUIDs for each primitive generated from the PLY model

Definition at line 3569 of file Context_fileIO.cpp.

◆ loadOBJ() [3/4]

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)

Parameters
[in]filenamename of OBJ file
[in]origin(x,y,z) coordinate of PLY object origin (i.e., coordinate shift)
[in]heightA z-scaling factor is applied to make the model 'height' tall. If height=0, no scaling is applied
[in]rotationSpherical rotation of PLY object about origin
[in]default_colorColor 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
Returns
Vector of UUIDs for each primitive generated from the OBJ model

Definition at line 3561 of file Context_fileIO.cpp.

◆ loadOBJ() [4/4]

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)

Parameters
[in]filenamename of OBJ file
[in]origin(x,y,z) coordinate of PLY object origin (i.e., coordinate shift)
[in]heightA z-scaling factor is applied to make the model 'height' tall. If height=0, no scaling is applied
[in]rotationSpherical rotation of PLY object about origin
[in]default_colorColor to be used if no r-g-b color values are given for PLY nodes
[in]upaxisDirection 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
Returns
Vector of UUIDs for each primitive generated from the PLY model

Definition at line 3565 of file Context_fileIO.cpp.

◆ loadPLY() [1/5]

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.

Parameters
[in]filenamename of ply file.
[in]silent[optional] If set to true, output messaged will be disabled.
Returns
Vector of UUIDs for each primitive generated from the PLY model
Note
Assumes default color of blue if no colors are specified in the .ply file

Definition at line 3191 of file Context_fileIO.cpp.

◆ loadPLY() [2/5]

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)

Parameters
[in]filenamename of ply file.
[in]origin(x,y,z) coordinate of PLY object origin (i.e., coordinate shift)
[in]heightScaling factor to be applied to give model an overall height of "height" (setting height=0 applies no scaling)
[in]default_colorColor 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
Returns
Vector of UUIDs for each primitive generated from the PLY model

Definition at line 3203 of file Context_fileIO.cpp.

◆ loadPLY() [3/5]

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)

Parameters
[in]filenamename of ply file.
[in]origin(x,y,z) coordinate of PLY object origin (i.e., coordinate shift)
[in]heightScaling factor to be applied to give model an overall height of "height" (setting height=0 applies no scaling)
[in]rotationSpherical rotation of PLY object about origin
[in]default_colorColor 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
Returns
Vector of UUIDs for each primitive generated from the PLY model

Definition at line 3207 of file Context_fileIO.cpp.

◆ loadPLY() [4/5]

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)

Parameters
[in]filenamename of ply file.
[in]origin(x,y,z) coordinate of PLY object origin (i.e., coordinate shift).
[in]heightScaling factor to be applied to give model an overall height of "height" (setting height=0 applies no scaling)
[in]rotationSpherical 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
Returns
Vector of UUIDs for each primitive generated from the PLY model
Note
Assumes default color of blue if no colors are specified in the .ply file

Definition at line 3199 of file Context_fileIO.cpp.

◆ loadPLY() [5/5]

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)

Parameters
[in]filenamename of ply file.
[in]origin(x,y,z) coordinate of PLY object origin (i.e., coordinate shift)
[in]heightScaling 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.
Returns
Vector of UUIDs for each primitive generated from the PLY model
Note
Assumes default color of blue if no colors are specified in the .ply file

Definition at line 3195 of file Context_fileIO.cpp.

◆ loadTabularTimeseriesData()

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.

Parameters
[in]data_filePath to the text file containing the tabular weather data.
[in]column_labelsVector of strings indicating which columns to extract.
[in]delimiterCharacter 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.

◆ loadXML()

std::vector< uint > Context::loadXML ( const char *  filename,
bool  quiet = false 
)

Load inputs specified in an XML file.

Parameters
[in]filenamename of XML file.
[in]quiet[optional] If set to true, command line output will be disabled. Optional argument - default value is false.
Returns
Vector of UUIDs for each primitive loaded from the XML file
Note
This method is based on the pugi xml parser. See pugixml.org

Definition at line 1115 of file Context_fileIO.cpp.

◆ markGeometryClean()

void Context::markGeometryClean ( )

Mark the Context geometry as "clean", meaning that the geometry has not been modified since last set as clean.

See also
markGeometryDirty()
isGeometryDirty()

Definition at line 250 of file Context.cpp.

◆ markGeometryDirty()

void Context::markGeometryDirty ( )

Mark the Context geometry as "dirty", meaning that the geometry has been modified since last set as clean.

See also
markGeometryClean()
isGeometryDirty()

Definition at line 257 of file Context.cpp.

◆ markPrimitiveClean() [1/2]

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.

Parameters
[in]UUIDsVector of universal unique identifiers of primitives to mark clean

Definition at line 299 of file Context.cpp.

◆ markPrimitiveClean() [2/2]

void Context::markPrimitiveClean ( uint  UUID) const

Mark a primitive as "clean", meaning it has not been modified since last set as clean.

Parameters
[in]UUIDUniversal unique identifier of the primitive to mark clean

Definition at line 290 of file Context.cpp.

◆ markPrimitiveDirty() [1/2]

void Context::markPrimitiveDirty ( const std::vector< uint > &  UUIDs) const

Mark multiple primitives as "dirty", meaning they have been modified since last set as clean.

Parameters
[in]UUIDsVector of universal unique identifiers of primitives to mark dirty

Definition at line 284 of file Context.cpp.

◆ markPrimitiveDirty() [2/2]

void Context::markPrimitiveDirty ( uint  UUID) const

Mark a primitive as "dirty", meaning it has been modified since last set as clean.

Parameters
[in]UUIDUniversal unique identifier of the primitive to mark dirty

Definition at line 275 of file Context.cpp.

◆ objectHasTexture()

bool Context::objectHasTexture ( uint  ObjID) const

Method to check whether an Object has texture data.

Parameters
[in]ObjIDIdentifier of the object.

Definition at line 4139 of file Context.cpp.

◆ overrideObjectTextureColor() [1/2]

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.

Parameters
[in]ObjIDsVector of object identifiers.

Definition at line 4171 of file Context.cpp.

◆ overrideObjectTextureColor() [2/2]

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.

Parameters
[in]ObjIDIdentifier of the object.

Definition at line 4167 of file Context.cpp.

◆ overridePrimitiveTextureColor() [1/2]

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.

Parameters
[in]UUIDsVector of universal unique identifier of primitives.

Definition at line 3354 of file Context.cpp.

◆ overridePrimitiveTextureColor() [2/2]

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.

Parameters
[in]UUIDUniversal unique identifier of primitive.

Definition at line 3350 of file Context.cpp.

◆ primitiveTextureHasTransparencyChannel()

bool Context::primitiveTextureHasTransparencyChannel ( uint  UUID) const

Check if primitive texture map has a transparency channel.

Parameters
[in]UUIDUnique universal identifier of primitive to be queried
Returns
True if transparency channel data exists, false otherwise

Definition at line 3332 of file Context.cpp.

◆ printObjectInfo()

void Context::printObjectInfo ( uint  ObjID) const

Prints object properties to console (useful for debugging purposes)

Parameters
[in]ObjIDObject ID of the object that's information will be printed'.

Definition at line 3622 of file Context.cpp.

◆ printPrimitiveInfo()

void Context::printPrimitiveInfo ( uint  UUID) const

Prints primitive properties to console (useful for debugging purposes)

Parameters
[in]UUIDUniversal unique identifier of primitive.

Definition at line 3378 of file Context.cpp.

◆ pruneTubeNodes()

void Context::pruneTubeNodes ( uint  ObjID,
uint  node_index 
)

Remove a portion of the tube downstream of a specified node.

Parameters
[in]ObjIDobject ID of the Tube object
[in]node_indexIndex of the tube segment node beyond which will be removed

Definition at line 4428 of file Context.cpp.

◆ randn() [1/2]

float Context::randn ( )

Draw a random number from a normal distribution with mean = 0, stddev = 1.

Returns
Random float from normal distribution

Definition at line 449 of file Context.cpp.

◆ randn() [2/2]

float Context::randn ( float  mean,
float  stddev 
)

Draw a random number from a normal distribution with specified mean and standard deviation.

Parameters
[in]meanMean value of random distribution
[in]stddevStandard deviation of random normal distribution
Note
If standard deviation is specified as negative, the absolute value is used.

Definition at line 453 of file Context.cpp.

◆ randu() [1/3]

float Context::randu ( )

Draw a random number from a uniform distribution between 0 and 1.

Returns
Random float between 0 and 1

Definition at line 423 of file Context.cpp.

◆ randu() [2/3]

float Context::randu ( float  min,
float  max 
)

Draw a random number from a uniform distribution with specified range.

Parameters
[in]minMinimum value of random uniform distribution (float)
[in]maxMaximum value of random uniform distribution (float)
Returns
Random float between 'min' and 'max'

Definition at line 427 of file Context.cpp.

◆ randu() [3/3]

int Context::randu ( int  min,
int  max 
)

Draw a random number from a uniform distribution with specified range.

Parameters
[in]minMinimum value of random uniform distribution (integer)
[in]maxMaximum value of random uniform distribution (integer)
Returns
Random integer between 'min' and 'max'

Definition at line 438 of file Context.cpp.

◆ registerOrValidateObjectDataType()

template<typename T >
HeliosDataType helios::Context::registerOrValidateObjectDataType ( const std::string &  label,
HeliosDataType  data_type 
)
inline

Definition at line 6954 of file Context.h.

◆ registerOrValidatePrimitiveDataType()

template<typename T >
HeliosDataType helios::Context::registerOrValidatePrimitiveDataType ( const std::string &  label,
HeliosDataType  data_type 
)
inline

Definition at line 6929 of file Context.h.

◆ renameGlobalData()

void Context::renameGlobalData ( const char *  old_label,
const char *  new_label 
)

Rename global data.

Parameters
[in]old_labelOld name/label associated with data
[in]new_labelNew name/label associated with data

Definition at line 2045 of file Context_data.cpp.

◆ renameObjectData()

void Context::renameObjectData ( uint  objID,
const char *  old_label,
const char *  new_label 
)

Rename existing object data.

Parameters
[in]objIDObject ID for object to be queried.
[in]old_labelName/label associated with data
[in]new_labelName/label associated with data

Definition at line 1683 of file Context_data.cpp.

◆ renamePrimitiveData()

void Context::renamePrimitiveData ( uint  UUID,
const char *  old_label,
const char *  new_label 
)

Rename primitive data for a primitive.

Parameters
[in]UUIDunique universal identifier (UUID) of primitive that is the source of data for copying
[in]old_labelold label of data to be renamed
[in]new_labelnew label of data to be renamed

Definition at line 337 of file Context_data.cpp.

◆ resolveFilePath()

std::filesystem::path Context::resolveFilePath ( const std::string &  filename) const

Unified file path resolution for Context methods - resolves relative paths using build directory.

Parameters
[in]filenameRelative or absolute file path to resolve
Returns
std::filesystem::path Resolved absolute file path
Note
Uses HELIOS_BUILD environment variable or auto-detection to resolve relative paths

Definition at line 54 of file Context.cpp.

◆ rotateObject() [1/6]

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.

Parameters
[in]ObjIDsVector of object IDs to translate
[in]rotation_radiansRotation angle in radians
[in]rotation_axis_xyzAxis about which to rotate (must be one of x, y, z)

Definition at line 1262 of file Context.cpp.

◆ rotateObject() [2/6]

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.

Parameters
[in]ObjIDsVector of object IDs to translate
[in]rotation_radiansRotation angle in radians
[in]rotation_axis_vectorVector describing axis about which to rotate

Definition at line 1277 of file Context.cpp.

◆ rotateObject() [3/6]

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.

Parameters
[in]ObjIDsVector of object IDs to translate
[in]rotation_radiansRotation angle in radians
[in]rotation_originCartesian coordinate of the base/origin of rotation axis
[in]rotation_axis_vectorVector describing axis about which to rotate

Definition at line 1292 of file Context.cpp.

◆ rotateObject() [4/6]

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.

Parameters
[in]ObjIDObject ID to rotate
[in]rotation_radiansRotation angle in radians
[in]rotation_axis_xyzAxis about which to rotate (must be one of x, y, z)

Definition at line 1253 of file Context.cpp.

◆ rotateObject() [5/6]

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.

Parameters
[in]ObjIDObject ID to rotate
[in]rotation_radiansRotation angle in radians
[in]rotation_axis_vectorVector describing axis about which to rotate

Definition at line 1268 of file Context.cpp.

◆ rotateObject() [6/6]

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)

Parameters
[in]ObjIDObject ID to rotate
[in]rotation_radiansRotation angle in radians
[in]rotation_originCartesian coordinate of the base/origin of rotation axis
[in]rotation_axis_vectorVector describing axis about which to rotate

Definition at line 1283 of file Context.cpp.

◆ rotateObjectAboutOrigin() [1/2]

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.

Parameters
[in]ObjIDsVector of object IDs to translate
[in]rotation_radiansRotation angle in radians
[in]rotation_axis_vectorVector describing axis about which to rotate

Definition at line 1307 of file Context.cpp.

◆ rotateObjectAboutOrigin() [2/2]

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.

Parameters
[in]ObjIDObject ID to rotate
[in]rotation_radiansRotation angle in radians
[in]rotation_axis_vectorVector describing axis about which to rotate

Definition at line 1298 of file Context.cpp.

◆ rotatePrimitive() [1/6]

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.

Parameters
[in]UUIDsUnique universal identifier (UUID) of primitive to be translated
[in]rotation_radRotation angle in radians
[in]axisAxis about which to rotate (must be one of x, y, z )

Definition at line 224 of file Context_primitive.cpp.

◆ rotatePrimitive() [2/6]

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.

Parameters
[in]UUIDsUnique universal identifier (UUID) of primitive to be translated
[in]rotation_radRotation angle in radians
[in]originCartesian coordinate of the base/origin of rotation axis
[in]axisVector describing axis about which to (rotate)

Definition at line 272 of file Context_primitive.cpp.

◆ rotatePrimitive() [3/6]

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.

Parameters
[in]UUIDsUnique universal identifier (UUID) of primitive to be translated
[in]rotation_radRotation angle in radians
[in]axisVector describing axis about which to rotate

Definition at line 252 of file Context_primitive.cpp.

◆ rotatePrimitive() [4/6]

void Context::rotatePrimitive ( uint  UUID,
float  rotation_rad,
const char *  axis 
)

Rotate a primitive about the x, y, or z axis using its UUID.

Parameters
[in]UUIDUnique universal identifier (UUID) of primitive to be translated
[in]rotation_radRotation angle in radians
[in]axisAxis about which to rotate (must be one of x, y, z )

Definition at line 220 of file Context_primitive.cpp.

◆ rotatePrimitive() [5/6]

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.

Parameters
[in]UUIDUnique universal identifier (UUID) of primitive to be translated
[in]rotation_radRotation angle in radians
[in]axisVector describing axis about which to rotate

Definition at line 248 of file Context_primitive.cpp.

◆ rotatePrimitive() [6/6]

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.

Parameters
[in]UUIDUnique universal identifier (UUID) of primitive to be translated
[in]rotation_radRotation angle in radians
[in]originCartesian coordinate of the base/origin of rotation axis
[in]axisVector describing axis about which to rotate

Definition at line 268 of file Context_primitive.cpp.

◆ scaleObject() [1/2]

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.

Parameters
[in]ObjIDsVector of object IDs to scale
[in]scalefactScaling factor to apply in the x-, y- and z-directions

Definition at line 1322 of file Context.cpp.

◆ scaleObject() [2/2]

void Context::scaleObject ( uint  ObjID,
const helios::vec3 scalefact 
) const

Method to scale a compound object in the x-, y- and z-directions.

Parameters
[in]ObjIDObject ID to scale
[in]scalefactScaling factor to apply in the x-, y- and z-directions

Definition at line 1313 of file Context.cpp.

◆ scaleObjectAboutCenter() [1/2]

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.

Parameters
[in]ObjIDsVector of object IDs to scale
[in]scalefactScaling factor to apply in the x-, y- and z-directions

Definition at line 1337 of file Context.cpp.

◆ scaleObjectAboutCenter() [2/2]

void Context::scaleObjectAboutCenter ( uint  ObjID,
const helios::vec3 scalefact 
) const

Method to scale a compound object in the x-, y- and z-directions.

Parameters
[in]ObjIDObject ID to scale
[in]scalefactScaling factor to apply in the x-, y- and z-directions

Definition at line 1328 of file Context.cpp.

◆ scaleObjectAboutOrigin() [1/2]

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.

Parameters
[in]ObjIDsVector of object IDs to scale
[in]scalefactScaling factor to apply in the x-, y- and z-directions
Note
By default the object origin is its center. This can be changed by setting the object origin using the setObjectOrigin method

Definition at line 1367 of file Context.cpp.

◆ scaleObjectAboutOrigin() [2/2]

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.

Parameters
[in]ObjIDObject ID to scale
[in]scalefactScaling factor to apply in the x-, y- and z-directions
Note
By default the object origin is its center. This can be changed by setting the object origin using the setObjectOrigin method

Definition at line 1358 of file Context.cpp.

◆ scaleObjectAboutPoint() [1/2]

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.

Parameters
[in]ObjIDsVector of object IDs to scale
[in]scalefactScaling factor to apply in the x-, y- and z-directions
[in]pointCartesian coordinate of the point about which to scale

Definition at line 1352 of file Context.cpp.

◆ scaleObjectAboutPoint() [2/2]

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.

Parameters
[in]ObjIDObject ID to scale
[in]scalefactScaling factor to apply in the x-, y- and z-directions
[in]pointCartesian coordinate of the point about which to scale

Definition at line 1343 of file Context.cpp.

◆ scalePrimitive() [1/2]

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)

Parameters
[in]UUIDsVector of unique universal identifiers (UUIDs) of primitives to be scaled
[in]SScaling factor

Definition at line 421 of file Context_primitive.cpp.

◆ scalePrimitive() [2/2]

void Context::scalePrimitive ( uint  UUID,
const helios::vec3 S 
)

Scale a primitive using its UUID relative to the origin (0,0,0)

Parameters
[in]UUIDUnique universal identifier (UUID) of primitive to be scaled
[in]SScaling factor

Definition at line 405 of file Context_primitive.cpp.

◆ scalePrimitiveAboutPoint() [1/2]

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.

Parameters
[in]UUIDsVector of unique universal identifiers (UUIDs) of primitives to be scaled
[in]SScaling factor
[in]pointCartesian (x,y,z) coordinates of point about which to scale

Definition at line 440 of file Context_primitive.cpp.

◆ scalePrimitiveAboutPoint() [2/2]

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.

Parameters
[in]UUIDUnique universal identifier (UUID) of primitive to be scaled
[in]SScaling factor
[in]pointCartesian (x,y,z) coordinates of point about which to scale

Definition at line 427 of file Context_primitive.cpp.

◆ scalePrimitiveData() [1/2]

void Context::scalePrimitiveData ( const std::string &  label,
float  scaling_factor 
)

Multiply primitive data values by a constant scaling factor for all primitives.

Parameters
[in]labelPrimitive data label
[in]scaling_factorFactor to scale primitive data
Note
An error will be thrown for primitive data types of uint, int, int2, int3, int4, and string.

Definition at line 965 of file Context_data.cpp.

◆ scalePrimitiveData() [2/2]

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.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
[in]labelPrimitive data label
[in]scaling_factorFactor to scale primitive data
Note
An error will be thrown for primitive data types of uint, int, int2, int3, int4, and string.

Definition at line 911 of file Context_data.cpp.

◆ scaleTubeGirth()

void Context::scaleTubeGirth ( uint  ObjID,
float  scale_factor 
)

Scale the girth for all nodes of a tube object.

Parameters
[in]ObjIDobject ID of the Tube object
[in]scale_factorScaling factor to apply to the girth of the tube object

Definition at line 4401 of file Context.cpp.

◆ scaleTubeLength()

void Context::scaleTubeLength ( uint  ObjID,
float  scale_factor 
)

Scale the length of a tube object by an arbitrary factor for all tube nodes.

Parameters
[in]ObjIDobject ID of the Tube object
[in]scale_factorScaling factor to apply to the length of the tube object

Definition at line 4419 of file Context.cpp.

◆ scanXMLForTag()

bool Context::scanXMLForTag ( const std::string &  filename,
const std::string &  tag,
const std::string &  label = "" 
)
static

Scan a Helios XML file to check if a tag exists.

Parameters
[in]filenamename of XML file.
[in]tagTag to search for in XML file.
[in]label[optional] Label to search for within the tag.
Returns
True if tag exists in XML file, false otherwise.

Definition at line 2254 of file Context_fileIO.cpp.

◆ seedRandomGenerator()

void Context::seedRandomGenerator ( uint  seed)

Set seed for random generator.

Parameters
[in]seeduint used to seed the generator

Definition at line 44 of file Context.cpp.

◆ selfTest()

int Context::selfTest ( int  argc,
char **  argv 
)
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.

Parameters
[in]argcNumber of command line arguments
[in]argvArray of command line argument strings
Returns
0 if test was successful, 1 if test failed.

Definition at line 34 of file selfTest.cpp.

◆ setDate() [1/3]

void Context::setDate ( const Date date)

Set simulation date by Date vector.

Parameters
[in]dateDate vector
See also
getDate()

Definition at line 327 of file Context.cpp.

◆ setDate() [2/3]

void Context::setDate ( int  day,
int  month,
int  year 
)

Set simulation date by day, month, year.

Parameters
[in]dayDay of the month (1-31)
[in]monthMonth of year (1-12)
[in]yearYear in YYYY format
See also
getDate()

Definition at line 315 of file Context.cpp.

◆ setDate() [3/3]

void Context::setDate ( int  Julian_day,
int  year 
)

Set simulation date by Julian day.

Parameters
[in]Julian_dayJulian day of year (1-366)
[in]yearYear in YYYY format. Note: this is used to determine leap years.
See also
getDate()

Definition at line 339 of file Context.cpp.

◆ setGlobalData() [1/2]

template<typename T >
void helios::Context::setGlobalData ( const char *  label,
const std::vector< T > &  data 
)
inline

Add global data value (vector)

Parameters
[in]labelName/label associated with data
[in]dataGlobal data value (vector)

Definition at line 4403 of file Context.h.

◆ setGlobalData() [2/2]

template<typename T >
void helios::Context::setGlobalData ( const char *  label,
const T &  data 
)
inline

Add global data value (scalar)

Parameters
[in]labelName/label associated with data
[in]dataGlobal data value (scalar)

Definition at line 4352 of file Context.h.

◆ setLocation()

void Context::setLocation ( const helios::Location location)

Set the location of the simulation (latitude, longitude, and UTC offset)

Parameters
[in]locationLocation vector

Definition at line 415 of file Context.cpp.

◆ setObjectAverageNormal()

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.

Parameters
[in]ObjIDThe unique identifier of the object whose average normal is being set.
[in]originThe origin point about which the rotation is applied.
[in]new_normalThe desired new average normal direction for the object.

Definition at line 4081 of file Context.cpp.

◆ setObjectColor() [1/4]

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.

Parameters
[in]ObjIDsVector of identifiers of objects.
[in]colorNew color of object.

Definition at line 4157 of file Context.cpp.

◆ setObjectColor() [2/4]

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.

Parameters
[in]ObjIDsVector of identifiers of object.
[in]colorNew color of object

Definition at line 4147 of file Context.cpp.

◆ setObjectColor() [3/4]

void Context::setObjectColor ( uint  ObjID,
const helios::RGBAcolor color 
) const

Method to set the diffuse color of an Object with transparency.

Parameters
[in]ObjIDIdentifier of object.
[in]colorNew color of object.

Definition at line 4153 of file Context.cpp.

◆ setObjectColor() [4/4]

void Context::setObjectColor ( uint  ObjID,
const helios::RGBcolor color 
) const

Method to set the diffuse color of an Object.

Parameters
[in]ObjIDUniversal unique identifier of object.
[in]colorNew color of object

Definition at line 4143 of file Context.cpp.

◆ setObjectData() [1/6]

template<typename T >
void helios::Context::setObjectData ( const std::vector< std::vector< std::vector< uint > > > &  objIDs,
const char *  label,
const T &  data 
)
inline

Add scalar data to multiple compound objects.

Template Parameters
TObject data type
Parameters
[in]objIDsVector of unique identifiers of compound objects
[in]labelName/label associated with data
[in]dataObject data value (scalar)

Definition at line 3997 of file Context.h.

◆ setObjectData() [2/6]

template<typename T >
void helios::Context::setObjectData ( const std::vector< std::vector< uint > > &  objIDs,
const char *  label,
const T &  data 
)
inline

Add scalar data to multiple compound objects.

Template Parameters
TObject data type
Parameters
[in]objIDsVector of unique identifiers of compound objects
[in]labelName/label associated with data
[in]dataObject data value (scalar)

Definition at line 3884 of file Context.h.

◆ setObjectData() [3/6]

template<typename T >
void helios::Context::setObjectData ( const std::vector< uint > &  objIDs,
const char *  label,
const std::vector< T > &  data 
)
inline

Add data value associated with a vector of compound objects. Each element in objIDs maps to each element in data.

Template Parameters
TObject data type
Note
the size of objIDs and data must match
Parameters
[in]objIDsUnique identifiers of compound object
[in]labelName/label associated with data
[in]dataObject data value (vector)

Definition at line 4171 of file Context.h.

◆ setObjectData() [4/6]

template<typename T >
void helios::Context::setObjectData ( const std::vector< uint > &  objIDs,
const char *  label,
const T &  data 
)
inline

Add scalar data to multiple compound objects.

Template Parameters
TObject data type
Parameters
[in]objIDsVector of unique identifiers of compound objects
[in]labelName/label associated with data
[in]dataObject data value (scalar)

Definition at line 3786 of file Context.h.

◆ setObjectData() [5/6]

template<typename T >
void helios::Context::setObjectData ( uint  objID,
const char *  label,
const std::vector< T > &  data 
)
inline

Add a vector of data for a compound object.

Template Parameters
TObject data type
Note
the size of objIDs and data must match
Parameters
[in]objIDUnique identifier of compound object
[in]labelName/label associated with data
[in]dataObject data value (vector)

Definition at line 4122 of file Context.h.

◆ setObjectData() [6/6]

template<typename T >
void helios::Context::setObjectData ( uint  objID,
const char *  label,
const T &  data 
)
inline

Add data value associated with a compound object.

Template Parameters
TObject data type
Parameters
[in]objIDUnique identifier of compound object
[in]labelName/label associated with data
[in]dataObject data value (scalar)

Definition at line 3698 of file Context.h.

◆ setObjectOrigin()

void Context::setObjectOrigin ( uint  ObjID,
const vec3 origin 
) const

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.

Parameters
[in]ObjIDIdentifier of the object.
[in]origin(x,y,z) Coordinates of the new origin point.

Definition at line 4130 of file Context.cpp.

◆ setObjectTransformationMatrix() [1/2]

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.

Parameters
[in]ObjIDsVector of identifiers of the objects.
[in]T1D vector corresponding to Primitive transformation matrix

Definition at line 4075 of file Context.cpp.

◆ setObjectTransformationMatrix() [2/2]

void Context::setObjectTransformationMatrix ( uint  ObjID,
float(&)  T[16] 
) const

Method to set the Affine transformation matrix of an Object.

Parameters
[in]ObjIDIdentifier of the object.
[in]T1D vector corresponding to Primitive transformation matrix

Definition at line 4071 of file Context.cpp.

◆ setPrimitiveAzimuth()

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.

Parameters
[in]UUIDUnique universal identifier (UUID) of primitive to be translated
[in]originCartesian coordinate of the base/origin of rotation axis
[in]new_azimuthNew primitive azimuth angle after rotation

Definition at line 383 of file Context_primitive.cpp.

◆ setPrimitiveColor() [1/4]

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.

Parameters
[in]UUIDsVector of universal unique identifiers of primitives.
[in]colorNew color of primitive

Definition at line 3306 of file Context.cpp.

◆ setPrimitiveColor() [2/4]

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.

Parameters
[in]UUIDsVector of universal unique identifiers of primitives.
[in]colorNew color of primitive

Definition at line 3296 of file Context.cpp.

◆ setPrimitiveColor() [3/4]

void Context::setPrimitiveColor ( uint  UUID,
const helios::RGBAcolor color 
) const

Method to set the diffuse color of a Primitive with transparency.

Parameters
[in]UUIDUniversal unique identifier of primitive.
[in]colorNew color of primitive

Definition at line 3302 of file Context.cpp.

◆ setPrimitiveColor() [4/4]

void Context::setPrimitiveColor ( uint  UUID,
const helios::RGBcolor color 
) const

Method to set the diffuse color of a Primitive.

Parameters
[in]UUIDUniversal unique identifier of primitive.
[in]colorNew color of primitive

Definition at line 3292 of file Context.cpp.

◆ setPrimitiveData() [1/4]

template<typename T >
void helios::Context::setPrimitiveData ( const std::vector< uint > &  UUIDs,
const char *  label,
const std::vector< T > &  data 
)
inline

Add data value associated with a vector of primitive elements. Each element in UUIDs maps to each element in data.

Template Parameters
TPrimitive data type
Note
the size of UUIDs and data must match
Parameters
[in]UUIDsUnique universal identifiers of Primitive elements
[in]labelName/label associated with data
[in]dataPrimitive data value (vector)

Definition at line 3013 of file Context.h.

◆ setPrimitiveData() [2/4]

template<typename T >
void helios::Context::setPrimitiveData ( const std::vector< uint > &  UUIDs,
const char *  label,
const T &  data 
)
inline

Add scalar data to multiple primitive elements.

Template Parameters
TPrimitive data type
Parameters
[in]UUIDsVector of unique universal identifiers of Primitive elements
[in]labelName/label associated with data
[in]dataPrimitive data value (scalar)

Definition at line 3077 of file Context.h.

◆ setPrimitiveData() [3/4]

template<typename T >
void helios::Context::setPrimitiveData ( uint  UUID,
const char *  label,
const std::vector< T > &  data 
)
inline

Add vector data value associated with a primitive element.

Template Parameters
TPrimitive data type
Parameters
[in]UUIDUnique universal identifier of Primitive element
[in]labelName/label associated with data
[in]dataPrimitive data value (vector)

Definition at line 2964 of file Context.h.

◆ setPrimitiveData() [4/4]

template<typename T >
void helios::Context::setPrimitiveData ( uint  UUID,
const char *  label,
const T &  data 
)
inline

Add data value associated with a primitive element.

Template Parameters
TPrimitive data type
Parameters
[in]UUIDUnique universal identifier of Primitive element
[in]labelName/label associated with data
[in]dataPrimitive data value (scalar)

Definition at line 2874 of file Context.h.

◆ setPrimitiveElevation()

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.

Parameters
[in]UUIDUnique universal identifier (UUID) of primitive to be translated
[in]originCartesian coordinate of the base/origin of rotation axis
[in]new_elevationNew primitive elevation angle after rotation

Definition at line 361 of file Context_primitive.cpp.

◆ setPrimitiveNormal() [1/2]

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.

Parameters
[in]UUIDsUnique universal identifier (UUID) of primitive to be translated
[in]originCartesian coordinate of the base/origin of rotation axis
[in]new_normalNew primitive normal vector after rotation

Definition at line 355 of file Context_primitive.cpp.

◆ setPrimitiveNormal() [2/2]

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.

Parameters
[in]UUIDUnique universal identifier (UUID) of primitive to be translated
[in]originCartesian coordinate of the base/origin of rotation axis
[in]new_normalNew primitive normal vector after rotation

Definition at line 288 of file Context_primitive.cpp.

◆ setPrimitiveParentObjectID() [1/2]

void Context::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.

Parameters
[in]UUIDsVector of universal unique identifiers of primitives.
[in]objIDIdentifier of primitive's parent object.

Definition at line 3138 of file Context.cpp.

◆ setPrimitiveParentObjectID() [2/2]

void Context::setPrimitiveParentObjectID ( uint  UUID,
uint  objID 
)

Method to set the ID of the parent object the primitive belongs to (default is object 0)

Parameters
[in]UUIDUniversal unique identifier of primitive.
[in]objIDIdentifier of primitive's parent object.

Definition at line 3115 of file Context.cpp.

◆ setPrimitiveTextureFile()

void Context::setPrimitiveTextureFile ( uint  UUID,
const std::string &  texturefile 
) const

Set the texture map file for a primitive.

Parameters
[in]UUIDUnique universal identifier of primitive to be queried.
[in]texturefilePath to texture image file.

Definition at line 3316 of file Context.cpp.

◆ setPrimitiveTransformationMatrix() [1/2]

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.

Parameters
[in]UUIDsVector of universal unique identifiers of primitives.
[in]T1D vector corresponding to Primitive transformation matrix

Definition at line 3269 of file Context.cpp.

◆ setPrimitiveTransformationMatrix() [2/2]

void Context::setPrimitiveTransformationMatrix ( uint  UUID,
float(&)  T[16] 
)

Method to set the Affine transformation matrix of a Primitive.

Parameters
[in]UUIDUniversal unique identifier of primitive.
[in]T1D vector corresponding to Primitive transformation matrix

Definition at line 3265 of file Context.cpp.

◆ setTileObjectSubdivisionCount() [1/2]

void Context::setTileObjectSubdivisionCount ( const std::vector< uint > &  ObjIDs,
const int2 new_subdiv 
)

Change the subdivision count of a tile object.

Parameters
[in]ObjIDsobject IDs of the tile objects to change
[in]new_subdivthe new subdivisions desired

Definition at line 1476 of file Context.cpp.

◆ setTileObjectSubdivisionCount() [2/2]

void Context::setTileObjectSubdivisionCount ( const std::vector< uint > &  ObjIDs,
float  area_ratio 
)

change the subdivisions of a tile object

Parameters
[in]ObjIDsobject IDs of the tile objects to change
[in]area_ratiothe approximate ratio between individual tile object area and individual subpatch area desired

Definition at line 1599 of file Context.cpp.

◆ setTime() [1/3]

void Context::setTime ( const Time time)

Set simulation time using Time vector.

Parameters
[in]timeTime vector
See also
getTime()
setSunDirection()

Definition at line 401 of file Context.cpp.

◆ setTime() [2/3]

void Context::setTime ( int  minute,
int  hour 
)

Set simulation time.

Parameters
[in]minuteMinute of hour (0-59)
[in]hourHour of day (0-23)
See also
getTime()
setSunDirection()

Definition at line 385 of file Context.cpp.

◆ setTime() [3/3]

void Context::setTime ( int  second,
int  minute,
int  hour 
)

Set simulation time.

Parameters
[in]secondSecond of minute (0-59)
[in]minuteMinute of hour (0-59)
[in]hourHour of day (0-23)
See also
getTime()
setSunDirection()

Definition at line 389 of file Context.cpp.

◆ setTriangleVertices()

void Context::setTriangleVertices ( uint  UUID,
const helios::vec3 vertex0,
const helios::vec3 vertex1,
const helios::vec3 vertex2 
)

//! Manually set the Triangle vertices

Parameters
[in]UUIDUnique universal identifier for Triangle.
[in]vertex0Cartesian (x,y,z) coordinate of vertex 0
[in]vertex1Cartesian (x,y,z) coordinate of vertex 1
[in]vertex2Cartesian (x,y,z) coordinate of vertex 2

Definition at line 648 of file Context_primitive.cpp.

◆ setTubeNodes()

void Context::setTubeNodes ( uint  ObjID,
const std::vector< helios::vec3 > &  node_xyz 
)

Set tube vertex coordinates at each segment node.

Parameters
[in]ObjIDobject ID of the Tube object
[in]node_xyzVector of Cartesian coordinates at each tube segment node

Definition at line 4437 of file Context.cpp.

◆ setTubeRadii()

void Context::setTubeRadii ( uint  ObjID,
const std::vector< float > &  node_radii 
)

Set tube radii at each segment node.

Parameters
[in]ObjIDobject ID of the Tube object
[in]node_radiiVector of radii at each tube segment node

Definition at line 4410 of file Context.cpp.

◆ showObject() [1/2]

void Context::showObject ( const std::vector< uint > &  ObjIDs)

Show previously hidden compound objects in the Context.

Parameters
[in]ObjIDsIdentifier of the object.

Definition at line 4020 of file Context.cpp.

◆ showObject() [2/2]

void Context::showObject ( uint  ObjID)

Show a previously hidden compound object in the Context.

Parameters
[in]ObjIDIdentifier of the object.

Definition at line 4003 of file Context.cpp.

◆ showPrimitive() [1/2]

void Context::showPrimitive ( const std::vector< uint > &  UUIDs) const

Show previously hidden primitives in the Context.

Parameters
[in]UUIDsVector of primitive UUIDs to show

Definition at line 527 of file Context.cpp.

◆ showPrimitive() [2/2]

void Context::showPrimitive ( uint  UUID) const

Show a previously hidden primitive in the Context.

Parameters
[in]UUIDPrimitive UUID to show

Definition at line 517 of file Context.cpp.

◆ storeDataWithTypeCasting()

template<typename T >
void helios::Context::storeDataWithTypeCasting ( uint  UUID,
const char *  label,
const T &  data,
HeliosDataType  target_type 
)
inline

Definition at line 6885 of file Context.h.

◆ storeObjectDataWithTypeCasting()

template<typename T >
void helios::Context::storeObjectDataWithTypeCasting ( uint  objID,
const char *  label,
const T &  data,
HeliosDataType  target_type 
)
inline

Definition at line 6907 of file Context.h.

◆ sumPrimitiveSurfaceArea()

float Context::sumPrimitiveSurfaceArea ( const std::vector< uint > &  UUIDs) const

Sum the one-sided surface area of a group of primitives.

Parameters
[in]UUIDsUniversal unique identifiers of primitives
Returns
Sum of primitive area

Definition at line 1360 of file Context_data.cpp.

◆ translateObject() [1/2]

void Context::translateObject ( const std::vector< uint > &  ObjIDs,
const vec3 shift 
) const

Translate multiple compound objects based on a vector of UUIDs.

Parameters
[in]ObjIDsVector of object IDs to translate
[in]shiftDistance to translate in the (x,y,z) directions

Definition at line 1247 of file Context.cpp.

◆ translateObject() [2/2]

void Context::translateObject ( uint  ObjID,
const vec3 shift 
) const

Translate a single compound object.

Parameters
[in]ObjIDObject ID to translate
[in]shiftDistance to translate in the (x,y,z) directions

Definition at line 1238 of file Context.cpp.

◆ translatePrimitive() [1/2]

void Context::translatePrimitive ( const std::vector< uint > &  UUIDs,
const vec3 shift 
)

Translate a group of primitives using a vector of UUIDs.

Parameters
[in]UUIDsVector of unique universal identifiers (UUIDs) of primitives to be translated
[in]shiftDistance to translate in (x,y,z) directions

Definition at line 211 of file Context_primitive.cpp.

◆ translatePrimitive() [2/2]

void Context::translatePrimitive ( uint  UUID,
const vec3 shift 
)

Translate a primitive using its UUID.

Parameters
[in]UUIDUnique universal identifier (UUID) of primitive to be translated
[in]shiftDistance to translate in (x,y,z) directions

Definition at line 207 of file Context_primitive.cpp.

◆ useObjectTextureColor() [1/2]

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.

Parameters
[in]ObjIDsVector of object identifiers.

Definition at line 4181 of file Context.cpp.

◆ useObjectTextureColor() [2/2]

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.

Parameters
[in]ObjIDIdentifier of the object.

Definition at line 4177 of file Context.cpp.

◆ usePrimitiveTextureColor() [1/2]

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.

Parameters
[in]UUIDsVector of universal unique identifier of primitives.

Definition at line 3364 of file Context.cpp.

◆ usePrimitiveTextureColor() [2/2]

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.

Parameters
[in]UUIDUniversal unique identifier of primitive.

Definition at line 3360 of file Context.cpp.

◆ writeOBJ() [1/3]

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)

Parameters
[in]filenameBase 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.

◆ writeOBJ() [2/3]

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.

Parameters
[in]filenameBase filename of .obj and .mtl file
[in]UUIDsVector 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.

◆ writeOBJ() [3/3]

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)

Parameters
[in]filenameBase filename of .obj and .mtl file
[in]UUIDsVector of UUIDs for which geometry should be written
[in]primitive_dat_fieldsA .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.

◆ writePLY() [1/2]

void Context::writePLY ( const char *  filename) const

Write geometry in the Context to a Stanford polygon file (.ply)

Parameters
[in]filenamename of ply file

Definition at line 3482 of file Context_fileIO.cpp.

◆ writePLY() [2/2]

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)

Parameters
[in]filenamename of ply file
[in]UUIDsVector of UUIDs for which geometry should be written

Definition at line 3486 of file Context_fileIO.cpp.

◆ writePrimitiveData() [1/2]

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.

Parameters
[in]filenamePath to file that will be written.
[in]column_formatVector 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.

◆ writePrimitiveData() [2/2]

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.

Parameters
[in]filenamePath to file that will be written.
[in]column_formatVector 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]UUIDsUnique 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.

◆ writeXML() [1/2]

void Context::writeXML ( const char *  filename,
bool  quiet = false 
) const

Write Context geometry and data to XML file for all UUIDs in the context.

Parameters
[in]filenamename 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.

◆ writeXML() [2/2]

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.

Parameters
[in]filenamename of XML file.
[in]UUIDsUniversal 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.

◆ writeXML_byobject()

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.

Parameters
[in]filenamename of XML file.
[in]UUIDsIdentifiers 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.


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