Workspace 6.21.5
Public Member Functions | List of all members
RodGlypher Class Reference

Glypher that produces z-axis (particle space) aligned rods at each node.

#include <Rendering/SceneComponents/Models/rodglypher.h>

Inheritance diagram for RodGlypher:
[legend]

Public Member Functions

 RodGlypher ()
 
 RodGlypher (const RodGlypher &glypher)
 
 ~RodGlypher () override
 
RodGlypherclone () const override
 
double getDefaultHalfLength () const
 
double getDefaultRadius () const
 
bool getGenerateHemisphericalCaps () const
 
Glyph getGlyph (const Mesh::ElementHandle &elt) override
 
Glyph getGlyph (const Mesh::NodeHandle &node) override
 
const QString & getHalfLengthStateName () const
 
bool getIncludeTipsInLength () const
 
Mesh::MeshModelLibrarygetMeshModelLibrary () override
 
const QString & getOrientationStateName () const
 
const QString & getRadiusStateName () const
 
double getShapeTolerance () const
 
int getSubdivisions () const
 
bool isElementGlypher (const CSIRO::Mesh::ElementType::Type **elementType) const override
 
bool isNodeGlypher () const override
 
bool load (const DataExecution::SerializedItem &item) override
 
RodGlypheroperator= (const RodGlypher &glypher)
 
bool save (DataExecution::SerializedItem &item) const override
 
void setDefaultHalfLength (double halfLength)
 
void setDefaultRadius (double radius)
 
void setGenerateHemisphericalCaps (bool val)
 
void setGlyphedModel (const Mesh::MeshModelInterface &model) override
 
void setHalfLengthStateName (const QString &name)
 
void setIncludeTipsInLength (bool val)
 
void setIsElementGlypher (const CSIRO::Mesh::ElementType::Type *elementType)
 
void setIsNodeGlypher ()
 
void setOrientationStateName (const QString &name)
 
void setRadiusStateName (const QString &name)
 
void setShapeTolerance (double val)
 
void setSubdivisions (int subdivisions)
 
- Public Member Functions inherited from Glypher
 ~Glypher () override
 
bool canSerialize () const override
 
Glypherclone () const override=0
 
QString getCacheId () const
 
bool getEnabled () const
 
virtual Glyph getGlyph (const Mesh::ElementHandle &element)
 
virtual Glyph getGlyph (const Mesh::NodeHandle &node)=0
 
int getInterval () const
 
virtual Mesh::MeshModelLibrarygetMeshModelLibrary ()=0
 
virtual bool isElementGlypher (const CSIRO::Mesh::ElementType::Type **elementType) const
 
virtual bool isNodeGlypher () const
 
bool load (const DataExecution::SerializedItem &item) override
 
bool save (DataExecution::SerializedItem &item) const override
 
void setEnabled (bool b)
 
virtual void setGlyphedModel (const Mesh::MeshModelInterface &model)
 
void setInterval (int interval)
 
void setIntervalStateName (const QString &stateName)
 
- Public Member Functions inherited from Clonable
virtual ~Clonable ()=default
 
virtual Clonableclone () const =0
 
- Public Member Functions inherited from Serialize
virtual ~Serialize ()=default
 
virtual bool canSerialize () const =0
 
virtual bool load (const SerializedItem &item)=0
 
virtual bool save (SerializedItem &item) const =0
 

Additional Inherited Members

- Protected Member Functions inherited from Glypher
 Glypher ()
 
 Glypher (const Glypher &glypher)
 
bool matchInterval (const Mesh::ElementHandle &elt) const
 
bool matchInterval (const Mesh::NodeHandle &node) const
 
Glypheroperator= (const Glypher &glypher)
 

Constructor & Destructor Documentation

◆ RodGlypher() [1/2]

◆ RodGlypher() [2/2]

RodGlypher ( const RodGlypher glypher)

◆ ~RodGlypher()

~RodGlypher ( )
overridedefault

Member Function Documentation

◆ clone()

RodGlypher * clone ( ) const
overridevirtual
Returns
A clone of this object.
Note
Subclasses would normally return their own type rather than the Clonable type. The C++ language rules allow a more derived type to be returned from a virtual function and the compiler will still treat it as a valid override.

Implements Glypher.

◆ getDefaultHalfLength()

double getDefaultHalfLength ( ) const

◆ getDefaultRadius()

double getDefaultRadius ( ) const

◆ getGenerateHemisphericalCaps()

bool getGenerateHemisphericalCaps ( ) const

◆ getGlyph() [1/2]

CSIRO::Rendering::Glyph getGlyph ( const Mesh::ElementHandle elt)
overridevirtual

Glyph an element by meshing it.

Reimplemented from Glypher.

◆ getGlyph() [2/2]

Glyph getGlyph ( const Mesh::NodeHandle node)
overridevirtual

Glyph a node by meshing it.

Implements Glypher.

◆ getHalfLengthStateName()

const QString & getHalfLengthStateName ( ) const

◆ getIncludeTipsInLength()

bool getIncludeTipsInLength ( ) const

◆ getMeshModelLibrary()

Mesh::MeshModelLibrary & getMeshModelLibrary ( )
overridevirtual
Returns
The mesh model library the glypher uses to hold its glyphs. Most glyphers will employ their own internal model library (possibly shared between all glyphers of that type) for efficiency reasons and to keep model id's short and simple.

Implements Glypher.

◆ getOrientationStateName()

const QString & getOrientationStateName ( ) const

◆ getRadiusStateName()

const QString & getRadiusStateName ( ) const

◆ getShapeTolerance()

double getShapeTolerance ( ) const

◆ getSubdivisions()

int getSubdivisions ( ) const

◆ isElementGlypher()

bool isElementGlypher ( const CSIRO::Mesh::ElementType::Type **  elementType) const
overridevirtual

Reimplemented from Glypher.

◆ isNodeGlypher()

bool isNodeGlypher ( ) const
overridevirtual

Reimplemented from Glypher.

◆ load()

bool load ( const DataExecution::SerializedItem item)
overridevirtual
Parameters
itemSupplies the state to be loaded into this object.

This function will load the state of this object from item. For many object types, this is most easily implemented in terms of the object's input operator (>>).

It would be reasonable for subclass implementations to assume that the data provided in item is in the same form as would have been saved from a call to save.

Returns
If the state of the object could not be loaded, the function returns false. A return value of true implies that the object state was successfully loaded. If canSerialize() returns false, this function must do nothing except return false as well.

Reimplemented from Glypher.

◆ operator=()

RodGlypher & operator= ( const RodGlypher glypher)

◆ save()

bool save ( DataExecution::SerializedItem item) const
overridevirtual
Parameters
itemWhere to save the state of this object.

This function will serialise the object by saving it to item. For most object types, this is most easily implemented in terms of the object's output operator (<<).

It is allowable for an object to only serialize part of itself. This would be useful if the data it represents has a set of defaults and only those values different to the defaults need to be serialized. Such an implementation then needs to be careful how it handles the complimentary load member function.

Returns
If an object could not be serialised or if the underlying object type does not support serialisation, this function should return false. A return value of true implies that the object was successfully saved to item. If canSerialize() returns false, this function must do nothing except return false as well.

Reimplemented from Glypher.

◆ setDefaultHalfLength()

void setDefaultHalfLength ( double  halfLength)

◆ setDefaultRadius()

void setDefaultRadius ( double  radius)

Set the default radius to use when the radius state cannot be used.

See also
setRadiusStateName()

◆ setGenerateHemisphericalCaps()

void setGenerateHemisphericalCaps ( bool  val)

◆ setGlyphedModel()

void setGlyphedModel ( const Mesh::MeshModelInterface model)
overridevirtual
Parameters
modelThe model about to be glyphed.

Subclasses can reimplement this function to save internal data about the model that will be used for subsequent calls to getGlyph(). Clients are free to call this function at any time, so the subclass must keep this in mind, although it will usually only be called by a model appearance processor just before it uses the glypher to process the specified model.

NOTE: Derived classes must call this base class's method.

Reimplemented from Glypher.

◆ setHalfLengthStateName()

void setHalfLengthStateName ( const QString &  name)

◆ setIncludeTipsInLength()

void setIncludeTipsInLength ( bool  val)

◆ setIsElementGlypher()

void setIsElementGlypher ( const CSIRO::Mesh::ElementType::Type elementType)

◆ setIsNodeGlypher()

void setIsNodeGlypher ( )

◆ setOrientationStateName()

void setOrientationStateName ( const QString &  name)

◆ setRadiusStateName()

void setRadiusStateName ( const QString &  name)

Set the name of the node state to be used for the radius. If the state does not exist or is not a scalar or vector state, the default radius is used.

◆ setShapeTolerance()

void setShapeTolerance ( double  val)

◆ setSubdivisions()

void setSubdivisions ( int  subdivisions)
Parameters
subdivisionsNon-negative integer

Sets the number of subdivisions in each quadrant of the superquadric. The number of elements used in the resulting mesh is 8*(subdivisions+1)^2 and all the elements are quad shells. Elements at the poles will be degenerate with one edge of zero length (ie they will look like tri's).