|
FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
|
Base class for render objects that require a collection of Fields given on a Grid. More...
#include <VertexFieldCollection.hpp>
Classes | |
| struct | Iterator |
| Abstract iterator class for inspecting the currently available VertexFields. More... | |
Public Types | |
| enum | { NumberOfInputFields = 1 } |
Public Member Functions | |
| VertexFieldCollection (VObject *that) | |
| Construct a collection of fields on the vertices of a Grid. | |
| ~VertexFieldCollection () | |
| Destructor. | |
| TypedSlot< Fiber::Field > & | insertVertexField (const string &s, const RefPtr< VertexField > &) |
| Add a vertex field under the given name. | |
| RefPtr< VertexField > & | operator[] (const string &s) |
| Retrieve a VertexField for the given name, create one, if required. | |
| RefPtr< VertexField > | operator() (const string &s) const |
| Search for a VertexField under the given name. | |
| Fiber::Info< Fiber::Skeleton > | getRefinementLevel (int Level, const RefPtr< ValuePool > &VP, int IndexDepth=0, const Fiber::BundlePtr &SpaceTime=Fiber::BundlePtr(NullPtr())) const override |
| Implementation of the virtual callback function that will load data sets from a grid into a collection of VertexFields, as specified earlier. | |
| virtual GridSelector | myGridSelector (const RefPtr< ValuePool > &VP) const |
| Virtual function that allows child classes to specify the Grid that shall be used. | |
| GridSelector | getGridSelector (const RefPtr< ValuePool > &VP) const override |
| Get the Grid that will be used here. | |
| void | retrieveFields (Fiber::FieldCollection &FieldMap, const RefPtr< Fiber::Representation > &MyRepresentation, const RefPtr< ValuePool > &Context, const RefPtr< Fiber::Skeleton > &DestVertices, Fiber::Grid &DestGrid, Fiber::Slice &DestGridSlice, const string &HelperDestGridName, bool StoreResult=true) |
| From the given Representation, retrieve all fields as required here into the provided Fieldmap. | |
| int | append (const RefPtr< VBO > &myVBO, const VertexFragment &VertexFragments, const RefPtr< GLProgram > &Shader) const |
| Append all the fields stored in these vertex fragments to the given vertex buffer object. | |
| bool | isOlderThan (const Ageable &A, const RefPtr< ValuePool > &Context) const |
| Check if all parameters in this collection of fields is older than the given age. | |
| void | updateAge (Ageable &A, const RefPtr< ValuePool > &Context) const |
| RefPtr< StringList > | getCurrentFieldnames (const RefPtr< ValuePool > &Context) const |
| Get a list of all currently selected fields. | |
| int | iterate (Iterator &It) const |
| Iterate through all available vertex fields. | |
Public Member Functions inherited from Wizt::Fish< Fiber::Grid > | |
| Fish (const string &s="grid", int prior=2) | |
| Constructor, optionally pass a parameter of this grid's name (ie. | |
| virtual | ~Fish () |
| Destructor. | |
| void | registerGridAsOutput () |
| Make grid visible as output. | |
| Fiber::Bundle::GridInfo_t | findMostRecentGrid (GridSelector &GS, const RefPtr< ValuePool > &VP, const Fiber::BundlePtr &SpaceTime=Fiber::BundlePtr(NullPtr())) const |
| This is a convenience function to find the most recent grid for the current time ( Fish<Slice>() or virtual function getTime() ). | |
| Fiber::Bundle::GridInfo_t | findMostRecentGrid (const RefPtr< ValuePool > &VP, const Fiber::BundlePtr &SpaceTime=Fiber::BundlePtr(NullPtr())) const |
| Find the most recent grid for the current time ( Fish<Slice>() or virtual function getTime() ). | |
| Fiber::Info< Fiber::Skeleton > | getRefinementLevel (int Level, const RefPtr< ValuePool > &VP, int IndexDepth=0, const Fiber::BundlePtr &SpaceTime=Fiber::BundlePtr(NullPtr())) const override |
| Get an refinement level for the given spacetime based on the GridSelector as returned by getGridSelector(). | |
| bool | IterateLevelsOnMostRecentGrid (LevelIterator &LI, const RefPtr< ValuePool > &Context, const Fiber::BundlePtr &SpaceTime=Fiber::BundlePtr(NullPtr())) const |
| Iterate over all the selected levels of a Grid via an instance of the LevelIterator. | |
| RefPtr< Fiber::Field > | getField (const Fiber::FieldSelector &FS, const RefPtr< ValuePool > &VP, const Fiber::BundlePtr &SpaceTime=Fiber::BundlePtr(NullPtr())) |
| Retrieve a field for the given FieldSelector on the currently selected Grid. | |
Public Attributes | |
| RefPtr< VertexField > | Positions |
| The coordinates are a field that will always be available here. | |
Public Attributes inherited from Wizt::Fish< Fiber::Grid > | |
| TypedSlot< Fiber::Grid > | MyGrid |
Base class for render objects that require a collection of Fields given on a Grid.
This base class supports loading the respective fields into the arrays of Vertex Buffer Object and calls an use-defined rendering methods.
| int Wizt::VertexFieldCollection::append | ( | const RefPtr< VBO > & | myVBO, |
| const VertexFragment & | VertexFragments, | ||
| const RefPtr< GLProgram > & | Shader | ||
| ) | const |
Append all the fields stored in these vertex fragments to the given vertex buffer object.
The VertexFragments may actually contain more fields, but only those required by this VBO are actually requested.
The VertexFragments structure contains a set of named data fragments.
References std::multimap< string, RefPtr< VertexField > >::begin(), std::multimap< string, RefPtr< VertexField > >::count(), std::multimap< string, RefPtr< VertexField > >::end(), and std::multimap< string, RefPtr< VertexField > >::size().
|
overridevirtual |
Get the Grid that will be used here.
This will be the Grid object that is explicitly connected, the virtual findMyGrid() or the Grid that is attached to the first VertexField found.
This function overrides Fish<Grid>::getGridSelector() to use a field from the collection or the one defined in the virtual myGridSelector() function.
Reimplemented from Wizt::Fish< Fiber::Grid >.
References std::multimap< string, RefPtr< VertexField > >::begin(), std::multimap< string, RefPtr< VertexField > >::end(), Wizt::TypedSlot< class T >::getSource(), and myGridSelector().
Referenced by Wizt::VertexRenderObject::update().
|
virtual |
Virtual function that allows child classes to specify the Grid that shall be used.
This function is called after the internal Grid object is queried (thus, will only be used if there is no Grid object explicitly connected), and before the stored vertex fields are inspected.
Reimplemented in Wizt::TensorShaderBase.
Referenced by getGridSelector().
| void Wizt::VertexFieldCollection::retrieveFields | ( | Fiber::FieldCollection & | FieldMap, |
| const RefPtr< Fiber::Representation > & | MyRepresentation, | ||
| const RefPtr< ValuePool > & | Context, | ||
| const RefPtr< Fiber::Skeleton > & | DestVertices, | ||
| Fiber::Grid & | DestGrid, | ||
| Fiber::Slice & | DestGridSlice, | ||
| const string & | HelperDestGridName, | ||
| bool | StoreResult = true |
||
| ) |
From the given Representation, retrieve all fields as required here into the provided Fieldmap.
Calls EvalFieldOnRepresentation() for each of the input slots.
| FieldMap | output - a map from strings to RefPtr<Fields>. |
| MyRepresentation | all fields are requested to reside on this Representation |
| Context | The map of VertexField input slots is evaluated relative to this ValuePool |
| DestGridSlice | Forwarded to EvalFieldOnRepresentation(): Slice of the destination grid, the place where to store a helper Grid. It may be a temporary one that is not part of a Bundle if this helper Grid should not be permanently stored. This Slice is also used to find lookup information about the current Grid object, for instance interpolation values from curvilinear to uniform coordinates. |
| StoreResult | Forwarded to EvalFieldOnRepresentation(): Flag to tell if the fields shall be stored on the destination Grid (and thus be re-used on the next call), or just returned as a temporary. |
| HelperDestGridName | Forwarded to EvalFieldOnRepresentation(): If the evaluation of the fields allows to cache some intermediate information in the form of a Grid (such as interpolation weights), then this Grid may be stored on the same Slice DestGridSlice under the provided name, which should be unique and be related to the name of the original Grid. |
References std::multimap< string, RefPtr< VertexField > >::begin(), std::multimap< string, RefPtr< VertexField > >::end(), Fiber::EvalFieldOnRepresentation(), and Positions.