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

An Anemone explorer that takes care of a floating origin. More...

#include <FloatingAnemoneExplorer.hpp>

Inheritance diagram for Wizt::FloatingAnemoneExplorer:
Wizt::GridAnemone::AnemoneExplorer Wizt::ReferenceBase< AnemoneExplorer >

Public Member Functions

 FloatingAnemoneExplorer (const WeakPtr< GridAnemone > &theGridAnemone, VRenderContext &Context, const pRegionOfInterest &theRegionOfInterest, const FloatOrigin *theFloatOrigin)
bool hasChangedAbsoluteTranslationVector () const
RefPtr< RenderBasin::VertexAttributecomputeCenterShift (const RefPtr< TypedChunk< Eagle::PhysicalSpace::point > > &Points, const Eagle::PhysicalSpace::tvector &myVertexOffset, const GridAnemone::AnemoneCreationContext &ARC) const
RefPtr< RenderBasin::VertexAttributecomputeCenterShift (const RefPtr< TypedChunk< Eagle::PhysicalSpace::point > > &Points, const BoundingBox &BBox, const GridAnemone::AnemoneCreationContext &ARC) const
 Compute a vertex attribute for an Anemone based on double-precision point coordinates converted into floating precision by shifting them to the center of the given bounding box.
RefPtr< RenderBasin::VertexAttributecomputeCenterShift (const RefPtr< Fiber::MemBase > &Coordinates, const BoundingBox &BBox, const GridAnemone::AnemoneCreationContext &ARC, const MemCore::Attributes &Attribs) const
Public Member Functions inherited from Wizt::GridAnemone::AnemoneExplorer
 AnemoneExplorer (const WeakPtr< GridAnemone > &theGridAnemone, const RefPtrGridAnemoneState &theGridAnemoneState, const pRegionOfInterest &theRegionOfInterest)
RefPtr< Fiber::ChartgetCurrentChart () const
 Convenience function to get the chart currently used for rendering.
RefPtr< Fiber::GridgetCurrentGrid () const
 Convenience function to get the Grid currently used for rendering.
RefPtr< Fiber::RepresentationgetChartRepresentation (const SkeletonID &SID) const
 Get a representation in the currently selected coordinate system for the given Skeleton ID.
RefPtr< Fiber::SkeletongetSkeleton (const SkeletonID &SID) const
RenderNamespace::glsl setupRegionOfInterest (VRenderContext &Context, const FloatingAnemone &)
Public Member Functions inherited from Wizt::ReferenceBase< AnemoneExplorer >
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

Static Public Member Functions

static bool initializeTranslation (Anemone &RenderAnemone, const GridAnemone::AnemoneCreationContext &ARC, const RefPtr< GridAnemone::AnemoneExplorer > &AE)
 Setup uniform variables in the RenderAnemone containing the parameters of the Floating Origin.
static bool updateTranslation (Anemone &RenderAnemone, const GridAnemone::AnemoneCreationContext &ARC, const RefPtr< GridAnemone::AnemoneExplorer > &AE)

Public Attributes

Eagle::tvector3 myVertexOffset
Eagle::tvector3 oldVertexOffset
VRenderContext::ModelViewState myModelViewState
Public Attributes inherited from Wizt::GridAnemone::AnemoneExplorer
Timer Duration
WeakPtr< GridAnemonemyExplorersGridAnemone
RefPtrGridAnemoneState myGridAnemoneState
pRegionOfInterest myRegionOfInterest
double CoordinateCreationTime = 0.0

Additional Inherited Members

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

Detailed Description

An Anemone explorer that takes care of a floating origin.

Going via an Anemone Explorer will move all anemones into the same origin.

The AnemoneExplorer is a temporary object that exists while rendering all fragments of a surface. It is created with the first fragment and destroyed with the last fragment. As such, it defines the scope of a FloatOrigin operation and stores the ModelView matrix which is locally modified during rendering.

Author
Werner Benger

Member Function Documentation

◆ initializeTranslation()

bool Wizt::FloatingAnemoneExplorer::initializeTranslation ( Anemone & RenderAnemone,
const GridAnemone::AnemoneCreationContext & ARC,
const RefPtr< GridAnemone::AnemoneExplorer > & AE )
static

Setup uniform variables in the RenderAnemone containing the parameters of the Floating Origin.

Must be called after computeCenterShift() such that the shift parameter is known.

References Wizt::GridAnemoneCreationContext::getCurrentFragmentName(), initializeTranslation(), Wizt::Anemone::insert(), Wizt::AnemoneCreatorContext::myAnemoneCreator, and MemCore::to_string().

Referenced by Wizt::FloatingAnemone::initializeTranslation(), and initializeTranslation().