11#include <unordered_map>
68 else modes_[view] = mode;
72 const auto it = modes_.find(view);
77 usize count()
const {
return modes_.size() + weights_.size(); }
82 else weights_[view] = {entity, joint};
86 const auto it = weights_.find(view);
87 return it == weights_.end() ?
WeightTarget{} : it->second;
91 std::unordered_map<u32, ShadingMode> modes_;
92 std::unordered_map<u32, WeightTarget> weights_;
Core type definitions and utilities for ESEngine.
The mode each view asked for. A view that never asked is Shaded, which is why a frame with nothing se...
void setWeights(u32 view, Entity entity, u32 joint)
Colour entity in view by how much joint moves each vertex; an invalid entity stops.
usize count() const
Views holding a non-default mode, for a criterion that checks nothing leaked.
WeightTarget weights(u32 view) const
ShadingMode get(u32 view) const
void set(u32 view, ShadingMode mode)
std::size_t usize
Size type for indexing and sizes.
constexpr Entity INVALID_ENTITY
Invalid entity sentinel value.
bool shadesAsClay(ShadingMode mode)
Whether a mode draws meshes as clay (the lit neutral surface).
std::uint32_t u32
Unsigned 32-bit integer.
std::uint8_t u8
Unsigned 8-bit integer.
ShadingMode
What a mesh is drawn WITH in a view, whatever its own material says.
@ Wireframe
A dark surface with every triangle edge drawn on it, hidden edges hidden.
@ Shaded
Each mesh as authored: its material, its textures, its light.
@ Clay
One neutral matte surface, lit: form and silhouette without anyone's colours.
@ Albedo
Base colour and texture with no light and no material: what was painted.
constexpr u8 kShadingModeCount
Entity identifier with packed index + generation.
The one skinned entity a view colours by a joint's weights, and which joint.