Tube compound object class. More...
#include <Context.h>
Public Member Functions | |
| ~Tube () override=default | |
| Tube destructor. | |
| std::vector< helios::vec3 > | getNodes () const |
| Get the Cartesian coordinates of each of the tube object nodes. | |
| uint | getNodeCount () const |
| Get the current number of nodes in the tube object. | |
| std::vector< float > | getNodeRadii () const |
| Get the radius at each of the tube object nodes. | |
| std::vector< helios::RGBcolor > | getNodeColors () const |
| Get the colors at each of the tube object nodes. | |
| std::vector< std::vector< helios::vec3 > > | getTriangleVertices () const |
| Get positions of triangle vertices comprising the tube object. | |
| uint | getSubdivisionCount () const |
| Get the number of sub-triangle divisions of the tube object. | |
| float | getLength () const |
| Get the length of the tube object. | |
| float | getVolume () const |
| Get the volume of the tube object. | |
| float | getSegmentVolume (uint segment_index) const |
| Get the volume of a segment within the tube object. | |
| void | appendTubeSegment (const helios::vec3 &node_position, float node_radius, const helios::RGBcolor &node_color) |
| Append an additional segment to the existing tube object. | |
| void | appendTubeSegment (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 (float S) |
| Scale the girth of the tube object. | |
| void | setTubeRadii (const std::vector< float > &node_radii) |
| Set tube radii at each segment node. | |
| void | scaleTubeLength (float S) |
| Scale the length of the tube object. | |
| void | setTubeNodes (const std::vector< helios::vec3 > &node_xyz) |
| Set tube vertex coordinates at each segment node. | |
| void | pruneTubeNodes (uint node_index) |
| Remove a portion of the tube downstream of a specified node. | |
Public Member Functions inherited from helios::CompoundObject | |
| virtual | ~CompoundObject ()=0 |
| Destructor. | |
| uint | getObjectID () const |
| Get the unique identifier for the object. | |
| helios::ObjectType | getObjectType () const |
| Get an enumeration specifying the type of the object. | |
| uint | getPrimitiveCount () const |
| Return the number of primitives contained in the object. | |
| std::vector< uint > | getPrimitiveUUIDs () const |
| Get the UUIDs for all primitives contained in the object. | |
| bool | doesObjectContainPrimitive (uint UUID) |
| Check whether a primitive is a member of the object based on its UUID. | |
| helios::vec3 | getObjectCenter () const |
| Calculate the Cartesian (x,y,z) point of the center of a bounding box for the Compound Object. | |
| float | getArea () const |
| Calculate the total one-sided surface area of the Compound Object. | |
| void | setColor (const helios::RGBcolor &color) |
| Method to set the diffuse color for all primitives in the Compound Object. | |
| void | setColor (const helios::RGBAcolor &color) |
| Method to set the diffuse color (with transparency) for all primitives in the Compound Object. | |
| void | overrideTextureColor () |
| 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 | useTextureColor () |
| bool | hasTexture () const |
| Method to check whether this object has texture data. | |
| std::string | getTextureFile () const |
| Method to return the texture map file of an Object. | |
| void | translate (const helios::vec3 &shift) |
| Method to translate/shift a Compound Object. | |
| void | rotate (float rotation_radians, const char *rotation_axis_xyz_string) |
| Method to rotate a Compound Object about the x-, y-, or z-axis. | |
| void | rotate (float rotation_radians, const helios::vec3 &rotation_axis_vector) |
| Method to rotate a Compound Object about an arbitrary axis passing through the origin. | |
| void | rotate (float rotation_radians, const helios::vec3 &origin, const helios::vec3 &rotation_axis_vector) |
| Method to rotate a Compound Object about an arbitrary line (not necessarily passing through the origin) | |
| void | scale (const helios::vec3 &scale) |
| Method to scale a compound object in the x-, y- and z-directions. | |
| void | scaleAboutCenter (const helios::vec3 &scale) |
| Method to scale a compound object in the x-, y- and z-directions. | |
| void | scaleAboutPoint (const helios::vec3 &scale, const helios::vec3 &point) |
| Method to scale a compound object in the x-, y- and z-directions. | |
| void | getTransformationMatrix (float(&T)[16]) const |
| Method to return the Affine transformation matrix of a Compound Object. | |
| void | setTransformationMatrix (float(&T)[16]) |
| Method to set the Affine transformation matrix of a Compound Object. | |
| void | setPrimitiveUUIDs (const std::vector< uint > &UUIDs) |
| Method to set the UUIDs of object child primitives. | |
| void | deleteChildPrimitive (uint UUID) |
| Delete a single child member of the object. | |
| void | deleteChildPrimitive (const std::vector< uint > &UUIDs) |
| Delete multiple child member of the object based on a vector of UUIDs. | |
| bool | arePrimitivesComplete () const |
| Method to query whether all object primitives are intact. | |
| template<typename T > | |
| void | setObjectData (const char *label, const T &data) |
| Add data value associated with a compound object. | |
| template<typename T > | |
| void | setObjectData (const char *label, const std::vector< T > &data) |
| Add data value associated with a compound object. | |
| template<typename T > | |
| void | getObjectData (const char *label, T &data) const |
| Get data associated with a compound object. | |
| template<typename T > | |
| void | getObjectData (const char *label, std::vector< T > &data) const |
| Get vector data associated with a compound object. | |
| HeliosDataType | getObjectDataType (const char *label) const |
| Get the Helios data type of object data. | |
| uint | getObjectDataSize (const char *label) const |
| Get the size/length of object data. | |
| bool | doesObjectDataExist (const char *label) const |
| Check if object data 'label' exists. | |
| void | clearObjectData (const char *label) |
| Clear the object data for this object. | |
| std::vector< std::string > | listObjectData () const |
| Return labels for all object data for this particular object. | |
Friends | |
| class | CompoundObject |
| class | Context |
| void Tube::appendTubeSegment | ( | const helios::vec3 & | node_position, |
| float | node_radius, | ||
| const char * | texturefile, | ||
| const helios::vec2 & | textureuv_ufrac | ||
| ) |
Append an additional segment to the existing tube object.
| [in] | node_position | Cartesian coordinates of the new tube segment node |
| [in] | node_radius | Radius of the new tube segment node |
| [in] | texturefile | Name of image file for texture map |
| [in] | textureuv_ufrac | Fractional u-coordinate of texture map at the beginning (.x) and end (.y) of the segment |
Definition at line 2119 of file Context_object.cpp.
| void Tube::appendTubeSegment | ( | const helios::vec3 & | node_position, |
| float | node_radius, | ||
| const helios::RGBcolor & | node_color | ||
| ) |
Append an additional segment to the existing tube object.
| [in] | node_position | Cartesian coordinates of the new tube segment node |
| [in] | node_radius | Radius of the new tube segment node |
| [in] | node_color | Color of the new tube segment node |
Definition at line 1984 of file Context_object.cpp.
| float Tube::getLength | ( | ) | const |
Get the length of the tube object.
Definition at line 1950 of file Context_object.cpp.
| std::vector< helios::RGBcolor > Tube::getNodeColors | ( | ) | const |
Get the colors at each of the tube object nodes.
Definition at line 1938 of file Context_object.cpp.
| uint Tube::getNodeCount | ( | ) | const |
Get the current number of nodes in the tube object.
Definition at line 1919 of file Context_object.cpp.
| std::vector< float > Tube::getNodeRadii | ( | ) | const |
Get the radius at each of the tube object nodes.
Definition at line 1923 of file Context_object.cpp.
| std::vector< helios::vec3 > Tube::getNodes | ( | ) | const |
Get the Cartesian coordinates of each of the tube object nodes.
Definition at line 1906 of file Context_object.cpp.
| float Tube::getSegmentVolume | ( | uint | segment_index | ) | const |
Get the volume of a segment within the tube object.
| [in] | segment_index | Index of the tube segment |
Definition at line 1971 of file Context_object.cpp.
| uint Tube::getSubdivisionCount | ( | ) | const |
Get the number of sub-triangle divisions of the tube object.
Definition at line 1946 of file Context_object.cpp.
| std::vector< std::vector< helios::vec3 > > Tube::getTriangleVertices | ( | ) | const |
Get positions of triangle vertices comprising the tube object.
Definition at line 1942 of file Context_object.cpp.
| float Tube::getVolume | ( | ) | const |
Get the volume of the tube object.
Definition at line 1958 of file Context_object.cpp.
| void Tube::pruneTubeNodes | ( | uint | node_index | ) |
Remove a portion of the tube downstream of a specified node.
| [in] | node_index | Index of the tube segment node beyond which will be removed |
Definition at line 2336 of file Context_object.cpp.
| void Tube::scaleTubeGirth | ( | float | S | ) |
Scale the girth of the tube object.
| [in] | S | Scaling factor |
Definition at line 2266 of file Context_object.cpp.
| void Tube::scaleTubeLength | ( | float | S | ) |
Scale the length of the tube object.
| [in] | S | Scaling factor |
Definition at line 2301 of file Context_object.cpp.
| void Tube::setTubeNodes | ( | const std::vector< helios::vec3 > & | node_xyz | ) |
Set tube vertex coordinates at each segment node.
| [in] | node_xyz | Vector of Cartesian coordinates at each tube segment node |
Definition at line 2320 of file Context_object.cpp.
| void Tube::setTubeRadii | ( | const std::vector< float > & | node_radii | ) |
Set tube radii at each segment node.
| [in] | node_radii | Vector of radii at each tube segment node |
Definition at line 2282 of file Context_object.cpp.
|
friend |