Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
MyTransformation Struct Reference

Possible implementation of a Transformation object via a std::function<>. More...

Inheritance diagram for MyTransformation:
Fiber::Transformation Wizt::ReferenceBase< Transformation >

Public Member Functions

 MyTransformation (const std::function< point3(point3)> &doTransformPoint)
RefPtr< MemBasetransform (const RefPtr< MemBase > &MB, const RefPtr< CreativeArrayBase > &SourcePositionsFragment) const override
 Implementation of the actual coordinate transition, the function must yield the transformed field in the destination coordinate system.
Public Member Functions inherited from Fiber::Transformation
virtual RefPtr< Fieldtransform (const Field &F, const RefPtr< Field > &Positions) const
 Transformation of an entire Field, where the Positions of the source coordinate system is provided unless transforming coordinates.
virtual RefPtr< CreativeArrayBasetransform (CreativeArrayBase &F, const RefPtr< CreativeArrayBase > &Positions) const
 Transformation of a Field fragment, allowing to provide a customized Creator.
Public Member Functions inherited from Wizt::ReferenceBase< Transformation >
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

Public Attributes

std::function< point3(point3)> TransformPoint

Additional Inherited Members

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

Detailed Description

Possible implementation of a Transformation object via a std::function<>.

Mainly the transform() function needs to be overridden, using a functor object here is just one option that provides convenience when creating simple transformations, but direct implementation in the virtual function call may be more appropriate in other situations.

Member Function Documentation

◆ transform()

RefPtr< MemBase > MyTransformation::transform ( const RefPtr< MemBase > & SourceData,
const RefPtr< CreativeArrayBase > & SourcePositionsFragment ) const
inlineoverridevirtual

Implementation of the actual coordinate transition, the function must yield the transformed field in the destination coordinate system.

The function must check the type of the SourceData and provide actual type-dependent transformation. Note that the field name is not available in order to avoid implementations that involve usage of the field name - all transformations must be based on types only to ensure consistency of transformations.

Implements Fiber::Transformation.