1.3.49
 
Loading...
Searching...
No Matches
helios::CompoundObject Class Referenceabstract
Inheritance diagram for helios::CompoundObject:
helios::Box helios::Cone helios::Disk helios::Polymesh helios::Sphere helios::Tile helios::Tube

Public Member Functions

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

Detailed Description

Definition at line 179 of file Context.h.

Constructor & Destructor Documentation

◆ ~CompoundObject()

CompoundObject::~CompoundObject ( )
pure virtualdefault

Destructor.

Declare as pure virtual to force this as an abstract base class (can not be directly instantiated)

Member Function Documentation

◆ arePrimitivesComplete()

bool CompoundObject::arePrimitivesComplete ( ) const

Method to query whether all object primitives are intact.

Returns
False if any primitives have been deleted from the object since creation; True otherwise.

Definition at line 1714 of file Context_object.cpp.

◆ clearObjectData()

void CompoundObject::clearObjectData ( const char *  label)

Clear the object data for this object.

Parameters
[in]labelName/label associated with data

Definition at line 1815 of file Context_data.cpp.

◆ deleteChildPrimitive() [1/2]

void CompoundObject::deleteChildPrimitive ( const std::vector< uint > &  UUIDs)

Delete multiple child member of the object based on a vector of UUIDs.

Parameters
[in]UUIDsVector of universally unique identifiers for primitive members

Definition at line 1708 of file Context_object.cpp.

◆ deleteChildPrimitive() [2/2]

void CompoundObject::deleteChildPrimitive ( uint  UUID)

Delete a single child member of the object.

Parameters
[in]UUIDUniversally unique identifier of primitive member

Definition at line 1699 of file Context_object.cpp.

◆ doesObjectContainPrimitive()

bool CompoundObject::doesObjectContainPrimitive ( uint  UUID)

Check whether a primitive is a member of the object based on its UUID.

Definition at line 1482 of file Context_object.cpp.

◆ doesObjectDataExist()

bool CompoundObject::doesObjectDataExist ( const char *  label) const

Check if object data 'label' exists.

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

Definition at line 1861 of file Context_data.cpp.

◆ getArea()

float CompoundObject::getArea ( ) const

Calculate the total one-sided surface area of the Compound Object.

Definition at line 1502 of file Context_object.cpp.

◆ getObjectCenter()

helios::vec3 CompoundObject::getObjectCenter ( ) const

Calculate the Cartesian (x,y,z) point of the center of a bounding box for the Compound Object.

Definition at line 1486 of file Context_object.cpp.

◆ getObjectData() [1/2]

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

Get vector data associated with a compound object.

Template Parameters
TObject data type
Parameters
[in]labelName/label associated with data
[out]dataPrimitive data structure

Definition at line 511 of file Context.h.

◆ getObjectData() [2/2]

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

Get data associated with a compound object.

Parameters
[in]labelName/label associated with data
[out]dataPrimitive data structure

Definition at line 422 of file Context.h.

◆ getObjectDataSize()

uint CompoundObject::getObjectDataSize ( const char *  label) const

Get the size/length of object data.

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

Definition at line 1776 of file Context_data.cpp.

◆ getObjectDataType()

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

Get the Helios data type of object data.

Parameters
[in]labelName/label associated with data
Returns
Helios data type of object data
See also
HeliosDataType

Definition at line 1765 of file Context_data.cpp.

◆ getObjectID()

uint CompoundObject::getObjectID ( ) const

Get the unique identifier for the object.

Definition at line 1465 of file Context_object.cpp.

◆ getObjectType()

helios::ObjectType CompoundObject::getObjectType ( ) const

Get an enumeration specifying the type of the object.

Definition at line 1469 of file Context_object.cpp.

◆ getPrimitiveCount()

uint CompoundObject::getPrimitiveCount ( ) const

Return the number of primitives contained in the object.

Definition at line 1473 of file Context_object.cpp.

◆ getPrimitiveUUIDs()

std::vector< uint > CompoundObject::getPrimitiveUUIDs ( ) const

Get the UUIDs for all primitives contained in the object.

Definition at line 1478 of file Context_object.cpp.

◆ getTextureFile()

std::string CompoundObject::getTextureFile ( ) const

Method to return the texture map file of an Object.

Definition at line 1554 of file Context_object.cpp.

◆ getTransformationMatrix()

void CompoundObject::getTransformationMatrix ( float(&)  T[16]) const

Method to return the Affine transformation matrix of a Compound Object.

Parameters
[out]T1D vector corresponding to Compound Object transformation matrix

Definition at line 1683 of file Context_object.cpp.

◆ hasTexture()

bool CompoundObject::hasTexture ( ) const

Method to check whether this object has texture data.

Definition at line 1546 of file Context_object.cpp.

◆ listObjectData()

std::vector< std::string > CompoundObject::listObjectData ( ) const

Return labels for all object data for this particular object.

Definition at line 1870 of file Context_data.cpp.

◆ overrideTextureColor()

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

Definition at line 1530 of file Context_object.cpp.

◆ rotate() [1/3]

void CompoundObject::rotate ( float  rotation_radians,
const char *  rotation_axis_xyz_string 
)

Method to rotate a Compound Object about the x-, y-, or z-axis.

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

Definition at line 1577 of file Context_object.cpp.

◆ rotate() [2/3]

void CompoundObject::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)

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

Definition at line 1639 of file Context_object.cpp.

◆ rotate() [3/3]

void CompoundObject::rotate ( float  rotation_radians,
const helios::vec3 rotation_axis_vector 
)

Method to rotate a Compound Object about an arbitrary axis passing through the origin.

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

Definition at line 1621 of file Context_object.cpp.

◆ scale()

void CompoundObject::scale ( const helios::vec3 scale)

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

Parameters
[in]scaleScaling factor to apply in the x-, y- and z-directions

Definition at line 1657 of file Context_object.cpp.

◆ scaleAboutCenter()

void CompoundObject::scaleAboutCenter ( const helios::vec3 scale)

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

Parameters
[in]scaleScaling factor to apply in the x-, y- and z-directions

Definition at line 1661 of file Context_object.cpp.

◆ scaleAboutPoint()

void CompoundObject::scaleAboutPoint ( const helios::vec3 scale,
const helios::vec3 point 
)

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

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

Definition at line 1665 of file Context_object.cpp.

◆ setColor() [1/2]

void CompoundObject::setColor ( const helios::RGBAcolor color)

Method to set the diffuse color (with transparency) for all primitives in the Compound Object.

Parameters
[in]colorNew color of primitives

Definition at line 1522 of file Context_object.cpp.

◆ setColor() [2/2]

void CompoundObject::setColor ( const helios::RGBcolor color)

Method to set the diffuse color for all primitives in the Compound Object.

Parameters
[in]colorNew color of primitives

Definition at line 1514 of file Context_object.cpp.

◆ setObjectData() [1/2]

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

Add data value associated with a compound object.

Template Parameters
TObject data type
Parameters
[in]labelName/label associated with data
[in]dataPrimitive data value (vector)

Definition at line 374 of file Context.h.

◆ setObjectData() [2/2]

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

Add data value associated with a compound object.

Template Parameters
TObject data type
Parameters
[in]labelName/label associated with data
[in]dataPrimitive data value (scalar)

Definition at line 325 of file Context.h.

◆ setPrimitiveUUIDs()

void CompoundObject::setPrimitiveUUIDs ( const std::vector< uint > &  UUIDs)

Method to set the UUIDs of object child primitives.

Parameters
[in]UUIDsSet of UUIDs corresponding to child primitives of object

Definition at line 1695 of file Context_object.cpp.

◆ setTransformationMatrix()

void CompoundObject::setTransformationMatrix ( float(&)  T[16])

Method to set the Affine transformation matrix of a Compound Object.

Parameters
[in]T1D vector corresponding to Compound Object transformation matrix

Definition at line 1689 of file Context_object.cpp.

◆ translate()

void CompoundObject::translate ( const helios::vec3 shift)

Method to translate/shift a Compound Object.

Parameters
[in]shiftDistance to translate in (x,y,z) directions.

Definition at line 1558 of file Context_object.cpp.

◆ useTextureColor()

void CompoundObject::useTextureColor ( )

For all primitives in the Compound Object, use the texture map to color the primitives rather than the constant RGB color. This is method reverses a previous call to overrideTextureColor(). Note that using the texture color is the default behavior.

Definition at line 1538 of file Context_object.cpp.

Friends And Related Symbol Documentation

◆ Context

friend class Context
friend

Definition at line 661 of file Context.h.


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