Workspace 6.21.5
|
Glypher that produces spheres at each node of a model. More...
#include <Rendering/SceneComponents/Models/sphereglypher.h>
Public Types | |
enum | SphereType { Icosasphere , UVsphere } |
Public Member Functions | |
SphereGlypher () | |
SphereGlypher (const SphereGlypher &glypher) | |
~SphereGlypher () override | |
SphereGlypher * | clone () const override |
Glyph | getGlyph (const Mesh::NodeHandle &node) override |
double | getGlyphRadius (const Mesh::NodeHandle &node) const |
Mesh::MeshModelLibrary & | getMeshModelLibrary () override |
const QString & | getOrientationStateName () const |
const QString & | getRadiusStateName () const |
double | getScale () const |
SphereType | getSphereType () const |
int | getSubdivisions () const |
bool | load (const DataExecution::SerializedItem &item) override |
SphereGlypher & | operator= (const SphereGlypher &glypher) |
bool | save (DataExecution::SerializedItem &item) const override |
void | setGlyphedModel (const Mesh::MeshModelInterface &model) override |
void | setOrientationStateName (const QString &name) |
void | setRadiusStateName (const QString &name) |
void | setScale (double scale) |
void | setSphereType (SphereType t) |
void | setSubdivisions (int subdivisions) |
Public Member Functions inherited from Glypher | |
~Glypher () override | |
bool | canSerialize () const override |
Glypher * | clone () 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::MeshModelLibrary & | getMeshModelLibrary ()=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 Clonable * | clone () 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 |
Glypher & | operator= (const Glypher &glypher) |
The sphere glyphs will be sized according to the scalar node state radius
, or if there is no such node state, it will use the default radius which can be set by calling setDefaultRadius().
enum SphereType |
Specifies what type of sphere to create. The best type of sphere usually depends on whether you intend to apply texture mapping to the sphere or not. If using texture mapping, you will need UV co-ordinates and therefore must use the UVsphere type. Otherwise, use the Icosasphere type because it employs fewer triangles and gives a uniform node spacing across the whole surface.
Enumerator | |
---|---|
Icosasphere | Uniform node spacing across the sphere surface with no UV texture co-ordinates. |
UVsphere | Non-uniform node spacing but with UV texture co-ordinates added. |
SphereGlypher | ( | ) |
SphereGlypher | ( | const SphereGlypher & | glypher | ) |
|
override |
|
overridevirtual |
|
overridevirtual |
node | The node for which a glyph should be returned. |
Implements Glypher.
double getGlyphRadius | ( | const Mesh::NodeHandle & | node | ) | const |
|
overridevirtual |
Implements Glypher.
const QString & getOrientationStateName | ( | ) | const |
const QString & getRadiusStateName | ( | ) | const |
double getScale | ( | ) | const |
SphereGlypher::SphereType getSphereType | ( | ) | const |
int getSubdivisions | ( | ) | const |
|
overridevirtual |
item | Supplies 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.
Reimplemented from Glypher.
SphereGlypher & operator= | ( | const SphereGlypher & | glypher | ) |
|
overridevirtual |
item | Where 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.
Reimplemented from Glypher.
|
overridevirtual |
model | The 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.
void setOrientationStateName | ( | const QString & | name | ) |
void setRadiusStateName | ( | const QString & | name | ) |
void setScale | ( | double | scale | ) |
void setSphereType | ( | SphereType | t | ) |
void setSubdivisions | ( | int | subdivisions | ) |