1 #ifndef VTESTBED_GRAPHICS_GERSTNERSURFACE_HH 2 #define VTESTBED_GRAPHICS_GERSTNERSURFACE_HH 4 #include <vtestbed/core/types.hh> 5 #include <vtestbed/graphics/GerstnerShader.hh> 6 #include <vtestbed/graphics/SurfaceShader.hh> 7 #include <vtestbed/graphics/types.hh> 17 using vec3 = vtb::core::Vector<T,3>;
18 using vec2 = vtb::core::Vector<T,2>;
19 using int2 = vtb::core::int2;
20 using vertex_matrix = vtb::core::Array<vec3,2>;
25 Buffer _indexBuffer, _vertexBuffer;
35 void step(
const vertex_matrix& zeta, int2 gridSize, vec2 size);
37 inline void showSlice(
bool show) { this->_shader.showSlice(show); }
40 setSlice(
const vec2& slice) {
41 _shader.setSlice(Vector2(slice(0), slice(1)));
44 inline void show(
bool b) { this->_show = b; }
51 vtb::core::Array2<vec3> zeta
54 void draw(
const Matrix4& transformation, Camera3D& camera)
override;
62 #endif // vim:filetype=cpp