MOS
cloud.hpp
1 #pragma once
2 
3 #include <atomic>
4 #include <chrono>
5 #include <vector>
6 
7 #include <mos/core/container.hpp>
8 #include <mos/core/tracked_container.hpp>
9 #include <mos/gfx/point.hpp>
10 #include <mos/gfx/shape.hpp>
11 #include <mos/gfx/texture_2d.hpp>
12 
13 namespace mos::gfx {
14 
16 class Cloud final : public Shape {
17 public:
18  enum class Blending { Additive, Transparent };
20  Cloud(Shared_texture_2D texture, Points points);
21  Cloud() = default;
22 
24  auto sort(const glm::vec3 &position) -> void;
25 
27  Shared_texture_2D texture;
28 
30  bool emissive{false};
31 
34 
36  Blending blending = Blending::Additive;
37 };
38 } // namespace mos::gfx
auto sort(const glm::vec3 &position) -> void
Sort points relative to a position.
Collection of particles for rendering, uses same texture.
Definition: cloud.hpp:16
Points points
Points.
Definition: cloud.hpp:33
Base class for geometric shapes.
Definition: shape.hpp:8
Definition: assets.hpp:17
bool emissive
If the particles are emissive or diffuse.
Definition: cloud.hpp:30
Shared_texture_2D texture
Texture for all particles.
Definition: cloud.hpp:27
Blending blending
Blending for renderinge.
Definition: cloud.hpp:36