24 lines
619 B
C++
24 lines
619 B
C++
#pragma once
|
|
#include "visuals/Basic_Visual.h"
|
|
|
|
namespace renderive::render_3d {
|
|
struct Pixel {
|
|
Vec3 position;
|
|
Rgba8 color;
|
|
float size_px{1.0F};
|
|
bool operator==(const Pixel&) const = default;
|
|
};
|
|
namespace detail {
|
|
struct Pixel_Spec {
|
|
using Item = Pixel;
|
|
using Settings = Visual_Settings;
|
|
static constexpr const char* name = "Pixel";
|
|
static bool valid(const Item& item) noexcept {
|
|
return finite(item.position) && finite(item.size_px) && item.size_px > 0;
|
|
}
|
|
};
|
|
}
|
|
using Pixel_Visual = detail::Attached_Visual<detail::Pixel_Spec>;
|
|
using Pixel_State = Pixel_Visual::Properties;
|
|
}
|