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

Node mapper returning a particular node state as its value.

#include <Mesh/DataStructures/vectornodetexturemapper.h>

Inheritance diagram for VectorNodeTextureMapper:
[legend]

Public Member Functions

 VectorNodeTextureMapper ()
 
 VectorNodeTextureMapper (const VectorNodeTextureMapper &mapper)
 
 ~VectorNodeTextureMapper () override
 
bool canSerialize () const override
 
VectorNodeTextureMapperclone () const override
 
Application::Memento::DatacreateMementoData (const MeshModelInterface &model) const override
 
const QString & getStateNameR () const
 
const QString & getStateNameS () const
 
const QString & getStateNameT () const
 
const Mesh::Array3dVectorgetTextureData () const
 
Vector3d getValue (const NodeHandle &node, Application::Memento::Data &mementoData) const override
 
bool load (const DataExecution::SerializedItem &item) override
 
VectorNodeTextureMapperoperator= (const VectorNodeTextureMapper &mapper)
 
bool save (DataExecution::SerializedItem &item) const override
 
void setStateNameR (const QString &name)
 
void setStateNameS (const QString &name)
 
void setStateNameT (const QString &name)
 
void setTextureData (const Mesh::Array3dVector *data)
 
- Public Member Functions inherited from VectorNodeMapper
virtual bool canSerialize () const =0
 
VectorNodeMapperclone () const override=0
 
virtual Application::Memento::DatacreateMementoData (const MeshModelInterface &model) const =0
 
virtual Vector3d getValue (const NodeHandle &node, Application::Memento::Data &mementoData) const =0
 
virtual bool load (const DataExecution::SerializedItem &item)=0
 
void logText (const QString &msg) const
 
virtual bool save (DataExecution::SerializedItem &item) const =0
 
- Public Member Functions inherited from Clonable
virtual ~Clonable ()=default
 
virtual Clonableclone () const =0
 

Constructor & Destructor Documentation

◆ VectorNodeTextureMapper() [1/2]

The mapper is constructed with no state name set. The vector mapping defaults to mapping the vector magnitude.

See also
setStateName()

◆ VectorNodeTextureMapper() [2/2]

◆ ~VectorNodeTextureMapper()

~VectorNodeTextureMapper ( )
override

Member Function Documentation

◆ canSerialize()

bool canSerialize ( ) const
overridevirtual

Implements VectorNodeMapper.

◆ clone()

VectorNodeTextureMapper * 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 VectorNodeMapper.

◆ createMementoData()

Application::Memento::Data * createMementoData ( const MeshModelInterface model) const
overridevirtual
Parameters
modelThe model that will be used for mapping nodes to values.
Returns
A memento object which client code cannot do anything useful with except pass it around. The memento is ultimately only useful to the getValue() function. It holds internal data the mapper will use to perform the required mapping.
Note
The memento can be considered valid for as long as model is not modified and the state name of the mapper remains the same. As soon as the state name or anything in model is changed, the caller should obtain a new memento.

Implements VectorNodeMapper.

◆ getStateNameR()

const QString & getStateNameR ( ) const
Returns
The name of the state to map to a value.
See also
setStateNameR()

◆ getStateNameS()

const QString & getStateNameS ( ) const
Returns
The name of the state to map to a value.
See also
setStateNameS()

◆ getStateNameT()

const QString & getStateNameT ( ) const
Returns
The name of the state to map to a value.
See also
setStateNameT()

◆ getTextureData()

const Array3dVector * getTextureData ( ) const

◆ getValue()

Vector3d getValue ( const NodeHandle node,
Application::Memento::Data mementoData 
) const
overridevirtual
Parameters
nodeThe node whose state should be mapped to a value.
mementoDataThe data from the memento created by a previous call to createMementoData(). It is used internally by this function to work out what value needs to be returned.
Returns
The value of the requested state from this node. If mementoData is invalid, which can happen if the requested node state is not in the model passed to createMementoData(), then this function returns 0.

Implements VectorNodeMapper.

◆ load()

bool load ( const DataExecution::SerializedItem item)
overridevirtual

Implements VectorNodeMapper.

◆ operator=()

VectorNodeTextureMapper & operator= ( const VectorNodeTextureMapper mapper)

◆ save()

bool save ( DataExecution::SerializedItem item) const
overridevirtual

Implements VectorNodeMapper.

◆ setStateNameR()

void setStateNameR ( const QString &  name)
Parameters
nameThe name of the state to be mapped to be used as the R coordinate to lookup a value in the vector dataset provided.
See also
getStateNameR()

◆ setStateNameS()

void setStateNameS ( const QString &  name)
Parameters
nameThe name of the state to be mapped to be used as the S coordinate to lookup a value in the vector dataset provided.
See also
getStateNameS()

◆ setStateNameT()

void setStateNameT ( const QString &  name)
Parameters
nameThe name of the state to be mapped to be used as the T coordinate to lookup a value in the vector dataset provided.
See also
getStateNameT()

◆ setTextureData()

void setTextureData ( const Mesh::Array3dVector data)