nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
sea.h
Go to the documentation of this file.
1#ifndef NANOMMO_CLIENT_SEA_H_
2#define NANOMMO_CLIENT_SEA_H_
3
4#include <raylib.h>
5
6#include "client/atmosphere.h"
7#include "terrain/terrain.h"
8
9namespace nanommo {
10
11/// The sea around a land, in the land's look, which moves on its own.
12class Sea {
13 public:
14 Sea(const Terrain& terrain, const Look& look);
15 ~Sea();
16
17 Sea(const Sea&) = delete;
18 Sea& operator=(const Sea&) = delete;
19
20 /// Draws it as it is a number of seconds in, lit like the world, with the
21 /// sun's light in bands, or smooth with no bands.
22 void Draw(const Camera3D& camera, const Atmosphere& atmosphere, float bands,
23 float seconds) const;
24
25 int triangles() const { return model_.meshes[0].triangleCount; }
26
27 private:
28 Shader shader_;
29 Model model_;
30 /// The ground's height at each corner of its cells.
31 Texture2D ground_{};
32};
33
34} // namespace nanommo
35
36#endif // NANOMMO_CLIENT_SEA_H_
Sea & operator=(const Sea &)=delete
void Draw(const Camera3D &camera, const Atmosphere &atmosphere, float bands, float seconds) const
Definition sea.cc:200
Sea(const Terrain &terrain, const Look &look)
Definition sea.cc:139
Sea(const Sea &)=delete
int triangles() const
Definition sea.h:25
Definition chat.cc:9
The sky and the light, which the shaders read each frame.
Definition atmosphere.h:13
A land's colours: its atmosphere, and the colours that go into its meshes.
Definition atmosphere.h:69