1#ifndef __FieldBuffer_HPP
2#define __FieldBuffer_HPP
4#include <field/Field.hpp>
5#include <GLvish/ArrayTypes.hpp>
6#include <plankton/VActionNotifier.hpp>
7#include "fishGLDllApi.h"
15template <
class ArrayType>
19typedef typename ArrayType::value_type value_type;
36template <
class ArrayType,
bool ThrowExceptionOnTypeMismatch = true>
39 typedef typename ArrayType::value_type value_type;
40 typedef typename ArrayType::Base_t Base_t;
47 using namespace Fiber;
59 printf(
" UNPARAMETERIZED FIELDBUFFER: %s LOADING?\n",
Typename(
typeid(
ArrayType)).c_str() );
60 MB.
Speak(
" UNPARAMETERIZED FIELDBUFFER DATA");
68 throw BufferArray::Error(
"FieldBuffer (unparameterized): NO data provided (nullptr in DataChunk)",
72 throw BufferArray::Error(
"FieldBuffer (unparameterized): NO data elements provided (zero elements)",
79 printf(
"GL/FieldBuffer: Data provided by %p, %u elements\n",
83 DataChunk.Speak(
"GL/FieldBuffer.hpp: FieldBuffer::create() - DataChunk ");
84 B.Speak(
"GL/FieldBuffer.hpp: FieldBuffer::create() - ArrayType ");
89 throw BufferArray::Error(
"FieldBuffer (unparameterized): NO data provided (nullptr in DataChunk)",
93 throw BufferArray::Error(
"FieldBuffer (unparameterized): NO data elements provided (zero elements)",
124 throw BufferArray::Error(
"FieldBuffer: No data chunk available on temporary array data (bug?)",
135 VActionNotifier::Warning(
"FieldBuffer(): Could not load specified data.\n");
140template <
class ArrayConstructorParam>
146 using namespace Fiber;
158 printf(
" UNPARAMETERIZED FIELDBUFFER: %s LOADING?\n",
Typename(
typeid(
ArrayType)).c_str() );
159 MB.
Speak(
" UNPARAMETERIZED FIELDBUFFER DATA");
168 throw BufferArray::Error(
"Fieldbuffer: Buffer Array/Data Mismatch: Cannot load array data",
205 VActionNotifier::Warning(
"FieldBuffer(): Could not load specified data.\n");
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
T * ptr(int c=0) const
Return pointer to data, which is good for C interface, but otherwise, avoid that.
Definition vector/Iterator.hpp:266
index_t count() const
Return the number of steps which can be traversed through this ElementIterator.
Definition HyperslabParameters.hpp:147
const type_info & getType() const noexcept
void Speak(const char *s, const char *prefix="") const
MEMCORE_API std::string Typename(const std::type_info &t)
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
note: cannot derive from FloatingSkeletonRenderer as long as independent base class TriangleRenderer ...
A named vertex attribute array, to be used for shaders.
Definition FieldBuffer.hpp:253
Definition FieldBuffer.hpp:243
Definition FieldBuffer.hpp:235
Definition FieldBuffer.hpp:227
Templated static member function to load data from MemArrays into vertex arrays.
Definition FieldBuffer.hpp:38