blob: ba467033bd1342e39317836801ca16e8bd648fd9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#pragma once
#include "chronology.h"
#include "collection.h"
#include "config/types.h"
#include "game/worldobject.h"
#include "gfx/models/mesh.h"
#include "gfx/models/texture.h"
#include "gfx/renderable.h"
#include <memory>
class SceneShader;
class GeoData;
class Water : public WorldObject, public Renderable {
public:
explicit Water(std::shared_ptr<GeoData>);
void render(const SceneShader & shader) const override;
void tick(TickDuration) override;
float waveCycle {0.F};
struct Vertex {
GlobalPosition3D pos;
};
private:
void generateMeshes();
std::shared_ptr<GeoData> geoData;
Collection<MeshT<Vertex>, false> meshes;
Texture::Ptr water;
};
|