25 lines
690 B
C++
25 lines
690 B
C++
#pragma once
|
|
#include "visuals/Basic_Visual.h"
|
|
namespace renderive::render_3d {
|
|
struct Splat {
|
|
Vec3 position;
|
|
Rgba8 color;
|
|
Vec2 sigma{0.05F, 0.05F};
|
|
float angle{};
|
|
bool operator==(const Splat&) const = default;
|
|
};
|
|
namespace detail {
|
|
struct Splat_Spec {
|
|
using Item = Splat;
|
|
using Settings = Visual_Settings;
|
|
static constexpr const char* name = "Splat";
|
|
static bool valid(const Item& item) noexcept {
|
|
return finite(item.position) && finite(item.sigma) && item.sigma.x > 0 &&
|
|
item.sigma.y > 0 && finite(item.angle);
|
|
}
|
|
};
|
|
}
|
|
using Splat_Visual = detail::Attached_Visual<detail::Splat_Spec>;
|
|
using Splat_State = Splat_Visual::Properties;
|
|
}
|