1 #ifndef VTESTBED_GRAPHICS_WAVYSURFACE_HH 2 #define VTESTBED_GRAPHICS_WAVYSURFACE_HH 4 #include <vtestbed/core/types.hh> 5 #include <vtestbed/graphics/SurfaceShader.hh> 6 #include <vtestbed/graphics/types.hh> 16 using array2 = vtb::core::Array2<T>;
17 using array3 = vtb::core::Array3<T>;
18 using vec3 = vtb::core::Vector3<T>;
19 using vec2 = vtb::core::Vector2<T>;
20 using int2 = vtb::core::int2;
21 using float3 = blitz::TinyVector<float,3>;
27 void step(
const array2& zeta, int2 gridSize, vec2 size);
29 inline void showSlice(
bool show) { this->_shader.showSlice(show); }
32 setSlice(
const vec2& slice) {
33 _shader.setSlice(Vector2(slice(0), slice(1)));
36 inline void show(
bool b) { this->_show = b; }
40 generateTexture(
const array2& zeta, int2 gridSize);
43 generateSurface(int2 gridSize, vec2 size);
45 void draw(
const Matrix4& transformation, Camera3D& camera)
override;
53 Buffer _indexBuffer, _vertexBuffer;
64 #endif // vim:filetype=cpp