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

Result type for a call to Glypher::getGlyph() More...

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

Public Member Functions

 Glyph ()=default
 
 Glyph (const QString &modelId, const Mesh::TransformMatrix &matrix, bool billboarded=false)
 
const QString & getModelId () const
 
const Mesh::TransformMatrixgetTransformMatrix () const
 
bool isBillboarded () const
 
bool isValid () const
 

Detailed Description

Constructor & Destructor Documentation

◆ Glyph() [1/2]

Glyph ( )
default

Constructs an invalid glyph.

See also
isValid()

◆ Glyph() [2/2]

Glyph ( const QString &  modelId,
const Mesh::TransformMatrix matrix,
bool  billboarded = false 
)
inline
Parameters
modelIdThe id string of the glyph's model. A glypher might use only one type of glyph, in which case only one unique id string will be returned, or it might use any number of different glyphs.
matrixThe transform to apply to this glyph to place it at the correct location in the scene.
billboardedAutomatically rotate Glyph to face camera

Member Function Documentation

◆ getModelId()

const QString & getModelId ( ) const
inline
Returns
The model ID of the glyph. This would normally be passed to a Mesh::MeshModelSource to obtain the corresponding MeshModel. If this string is empty, the glyph is considered invalid and isValid() will return false.

◆ getTransformMatrix()

const Mesh::TransformMatrix & getTransformMatrix ( ) const
inline
Returns
The transform to apply to the mesh model in order to put it at the correct location. This will be in the same co-ordinate frame as whatever created the object, which is usually a node in a mesh model that was passed to Glypher::getGlyph().

◆ isBillboarded()

bool isBillboarded ( ) const
inline
Returns
Whether or not the glyph needs to be re-oriented (after transforming) so that it faces towards the current view camera.

◆ isValid()

bool isValid ( ) const
inline
Returns
True if this represents a valid glyph. Invalid glyphs can be returned from Glypher::getGlyph() to indicate that no glyph should be shown for that particular node. The default constructor creates an invalid glyph.