|
Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
|
#include <FloatingAnemone.hpp>
Public Member Functions | |
| string | WorldToScreen () const override |
| The name of the shader parameter used to store the translation vector. | |
| string | getShaderPrefix (const GridAnemone::AnemoneCreationContext &ARC, const GridAnemone::AnemoneExplorer &AE) const |
| bool | initializeTranslation (Anemone &RenderAnemone, const GridAnemone::AnemoneCreationContext &ARC, const RefPtr< GridAnemone::AnemoneExplorer > &AE) const |
| Call this function from. | |
| bool | updateTranslation (Anemone &RenderAnemone, const GridAnemone::AnemoneCreationContext &ARC, const RefPtr< GridAnemone::AnemoneExplorer > &AE) const |
| RefPtr< GridAnemone::AnemoneExplorer > | getAnemoneExplorer (const WeakPtr< GridAnemone > &theGridAnemone, VRenderContext &Context) const |
| Provide GLSL code defining uniform variables that relate to the floating origin approach. | |
| Public Member Functions inherited from Wizt::FloatingOriginAnemone | |
| RefPtr< GridAnemone::AnemoneExplorer > | getAnemoneExplorer (const WeakPtr< GridAnemone > &theGridAnemone, VRenderContext &Context) const |
| Creation of an AnemoneExplorer that takes care of the floating origin during rendering, it needs to be overridden in a child class of GridAnemone like this: | |
| bool | hasChangedAbsoluteTranslationVector (const RefPtr< GridAnemone::AnemoneExplorer > &AE) const |
| Public Member Functions inherited from Wizt::FloatOrigin | |
| RefPtr< Chunk< Eagle::point3 > > | computeShiftedCoordinates (const RefPtr< Chunk< Eagle::point3 > > &RawCoordinates, const Eagle::tvector3 &TranslationVector) const |
| VRenderContext::ModelViewState | getCoordinateTranslation (const VRenderContext &Context, Eagle::tvector3 &TranslationVector) const |
| VRenderContext::ModelViewState | getCoordinateTranslation (const VRenderContext &Context, Intercube &IC, Eagle::tvector3 &TranslationVector) const |
| Public Member Functions inherited from Wizt::VStateCreatorBase | |
| RefPtr< State > & | getState (const WeakPtr< ValuePool > &VP) const |
| RefPtr< InterfaceBase > | hasLocalInterface (const type_info &InterfaceType) const |
| RefPtr< State > | myState (const WeakPtr< ValuePool > &Context) const |
| virtual RefPtr< State > | newState () const |
| void | setState (const WeakPtr< ValuePool > &, const RefPtr< State > &st) const |
Static Public Member Functions | |
| static RefPtr< RenderBasin::VertexAttribute > | createPossiblyShiftedVertices (const RefPtr< TypedChunk< Eagle::PhysicalSpace::point > > &Coordinates, const BoundingBox &BBox, const GridAnemone::AnemoneCreationContext &ARC, const RefPtr< GridAnemone::AnemoneExplorer > &AE) |
| If the AnemoneExplorer is a FloatingAnemoneExplorer (which will be the case if getAnemoneExplorer() has been implemented as documented), then shift coordinates into the center of the bounding box, create a vertex attribute from it and set a CoordinateShift interface to the AnemoneExplorer. | |
| static RefPtr< RenderBasin::VertexAttribute > | createPossiblyShiftedVertices (const RefPtr< Fiber::MemBase > &Coordinates, const BoundingBox &BBox, const GridAnemone::AnemoneCreationContext &ARC, const RefPtr< GridAnemone::AnemoneExplorer > &AE, const MemCore::Attributes &Attribs, bool AllowProceduralCoordinates) |
| If the AnemoneExplorer is a FloatingAnemoneExplorer (which will be the case if getAnemoneExplorer() has been implemented as documented), then shift coordinates into the center of the bounding box, create a vertex attribute from it and set a CoordinateShift interface to the AnemoneExplorer. | |
| static std::pair< RefPtr< RenderBasin::VertexAttribute >, bool > | createPossiblyShiftedVertices (Fiber::CreativeArrayBase &myPrimaryDataFragment, const GridAnemone::AnemoneCreationContext &ARC, const RefPtr< GridAnemone::AnemoneExplorer > &AE, bool AllowProceduralCoordinates, const Fiber::CreativeArrayBase::result &AsyncCallback) |
| Same as similar function, but using a Creator to create the coordinates and possibly compute the bounding box information. | |
| Static Public Member Functions inherited from Wizt::FloatingOriginAnemone | |
| static RefPtr< RenderBasin::VertexAttribute > | createPossiblyShiftedVertices (const RefPtr< TypedChunk< Eagle::PhysicalSpace::point > > &Coordinates, const GridAnemone::AnemoneCreationContext &ARC, const RefPtr< GridAnemone::AnemoneExplorer > &AE) |
| Static Public Member Functions inherited from Wizt::FloatOrigin | |
| static VRenderContext::ModelViewState | getTranslationVector (const VRenderContext &Context, Intercube &IC, Eagle::tvector3 &TranslationVector, double CameraShiftThreshold) |
| static Eagle::tvector3 | getTranslationVector (Intercube &IC) |
Supporting Render Anemone API using shaders via FloatOrigin support. There will be two translations involved:
|
static |
If the AnemoneExplorer is a FloatingAnemoneExplorer (which will be the case if getAnemoneExplorer() has been implemented as documented), then shift coordinates into the center of the bounding box, create a vertex attribute from it and set a CoordinateShift interface to the AnemoneExplorer.
Otherwise, just load the coordinates as is.
Calls FloatingAnemoneExplorer::computeCenterShift().
|
static |
Same as similar function, but using a Creator to create the coordinates and possibly compute the bounding box information.
The bool return value tells whether the data are yet under creation, assign as:
References MemCore::CreatorBase< class Domain >::create(), createPossiblyShiftedVertices(), MemCore::CreatorBase< class Domain >::get(), Wizt::GridAnemoneCreationContext::getCurrentFragmentName(), MemCore::CreatorBase< class Domain >::request(), and MemCore::Timer::secs().
| RefPtr< GridAnemone::AnemoneExplorer > Wizt::FloatingOriginAnemone::getAnemoneExplorer | ( | const WeakPtr< GridAnemone > & | theGridAnemone, |
| VRenderContext & | Context ) const |
Provide GLSL code defining uniform variables that relate to the floating origin approach.
This GLSL code can be embedded into vertex, geometry or fragment shaders equally. The provided code is equivalent to:
Referenced by Wizt::SurfaceRenderer::getAnemoneExplorer().
| bool Wizt::FloatingAnemone::initializeTranslation | ( | Anemone & | RenderAnemone, |
| const GridAnemone::AnemoneCreationContext & | ARC, | ||
| const RefPtr< GridAnemone::AnemoneExplorer > & | AE ) const |
Call this function from.
in a child class of GridAnemone after computing shifted vertices via createPossiblyShiftedVertices() or similar functions that define the internal shift vector.
References Wizt::FloatingAnemoneExplorer::initializeTranslation().
Referenced by Wizt::EdgeShader::feedAnemone(), Wizt::FloatingSkeletonRenderer::feedAnemone(), Wizt::SurfaceRenderer::feedAnemone(), and WorldToScreen().
|
override |
The name of the shader parameter used to store the translation vector.
Shader code must be of the form such as:
References createPossiblyShiftedVertices(), Wizt::FloatingOriginAnemone::getAnemoneExplorer(), and initializeTranslation().