Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
Fiber::Transformator Class Referenceabstract

Callback interface to allow interfacing a full transformation pipeline provided by external means, e.g. More...

#include <Atlas.hpp>

Inheritance diagram for Fiber::Transformator:
Wizt::ReferenceBase< Transformator > ProjTransformator ProjTransformator

Classes

struct  FieldTransformator

Public Member Functions

virtual FieldTransformator get (const ChartID &TargetChartName, const Skeleton &FieldContainer, const FieldID &Fieldname)=0
 Callback function to provide a Transformation into the specific chart from the available coordinate representation.
Public Member Functions inherited from Wizt::ReferenceBase< Transformator >
auto getObjectCountID () const noexcept
bool isIdentical (const WeakPtr< Object, Object > &PossibleSelf) const noexcept
void mkAutoDestructive ()
refcount_t refcount () const noexcept
 ReferenceBase (Object *that) noexcept
const auto & self () const
refcount_t wrefcount () const noexcept

Additional Inherited Members

Public Types inherited from Wizt::ReferenceBase< Transformator >
typedef Object reference_domain_t
typedef WeakPtr< Object, Object > SelfPtr_t
Protected Member Functions inherited from Wizt::ReferenceBase< Transformator >
virtual void extremeUnction ()
ReferenceBaseoperator= (const ReferenceBase &R)
void suicide ()

Detailed Description

Callback interface to allow interfacing a full transformation pipeline provided by external means, e.g.

library functions in a plugin.

Application code needs to derive from the Transformator class and instantiate a single global instance, e.g. as follows:

struct MyTransformator : Transformator
{
... implement virtual function here ...
};
static Ref<MyTransformator> myTransformator;
[Implementation details]
Transformator object register themselves in the global Atlas singleton, i.e. in Atlas::GlobalTransformators(). Upon destruction they un-register themselves from this list of global transformators. It is therefore safe to define Transformator objects as static variables (via the MemCore::Ref<> template to honor reference-counting) in a plugin, but they may also be provided temporarily in another context.

Member Function Documentation

◆ get()

virtual FieldTransformator Fiber::Transformator::get ( const ChartID & TargetChartName,
const Skeleton & FieldContainer,
const FieldID & Fieldname )
pure virtual

Callback function to provide a Transformation into the specific chart from the available coordinate representation.

No actual data are transformed by this call, it merely specifies that the given coordinate transformation is possible.

The actual data transformation is performed by the Transformation object that is returned by this call.

It is the responsibility of the Transformator to identify an appropriate source representation within the provided Skeleton and to return the field in this given representation.

The Sourcefield is mandatory, the SourcePositions are optional: Many transformation functions are location-dependent, so the transformation will need the coordinate location of some value, thus the positions are provided when transforming some data field. In some special cases the transformations are location-independent, on which case the SourcePositions field is not needed. Also, if the positions themselves are transformed, then this field is not available yet and will be a nullptr.

Implemented in ProjTransformator, and ProjTransformator.