Go to the documentation of this file.
9 #ifndef EAGINE_SHAPES_VALUE_TREE_HPP
10 #define EAGINE_SHAPES_VALUE_TREE_HPP
12 #include "../config/basic.hpp"
13 #include "../main_ctx_object.hpp"
14 #include "../value_tree/wrappers.hpp"
69 std::map<vertex_attrib_variant, std::string> _variant_names{};
89 return std::make_unique<value_tree_loader>(std::move(source), parent);
95 #if !EAGINE_LINK_LIBRARY || defined(EAGINE_IMPLEMENTING_LIBRARY)
96 #include <eagine/shapes/value_tree.inl>
99 #endif // EAGINE_SHAPES_VALUE_TREE_HPP
Helper class used to initialize main context objects.
Definition: main_ctx_object.hpp:45
void attrib_values(vertex_attrib_variant, span< byte >) override
Fetches the vertex attribute data for the specified variant as bytes.
std::ptrdiff_t span_size_t
Signed span size type used by eagine.
Definition: types.hpp:36
bitfield< vertex_attrib_kind > vertex_attrib_bits
Alias for vertex_attrib_kind bitfield type.
Definition: vertex_attrib.hpp:85
auto values_per_vertex(vertex_attrib_variant) -> span_size_t override
Returns the number of values per vertex for the specified variant.
Base class for main context objects.
Definition: main_ctx_object.hpp:71
Common code is placed in this namespace.
Definition: eagine.hpp:21
auto operation_count()
Returns the number of drawing instructions for the default variant.
Definition: gen_base.hpp:179
auto vertex_count() -> span_size_t override
Returns the shaped vertex count.
Handle class for value tree compounds.
Definition: wrappers.hpp:223
void instructions(drawing_variant, span< draw_operation > ops) override
Fetches the drawing operations for the specified drawing variant.
Loader that fetches shape data from a value tree (JSON, YAML, etc.)
Definition: value_tree.hpp:28
Class designating an vertex attribute variant in a shape generator.
Definition: vertex_attrib.hpp:104
auto attrib_type(vertex_attrib_variant vav) -> attrib_data_type override
Returns the attribute data type for the specified variant.
span_size_t drawing_variant
Alias for shape drawing variant index type.
Definition: gen_base.hpp:31
auto attribute_variants(vertex_attrib_kind) -> span_size_t override
Returns the count of shape attribute variants.
Base class for shape generators re-calculating the center.
Definition: gen_base.hpp:320
auto is_attrib_normalized(vertex_attrib_variant) -> bool override
Indicates if the specified variant attribute values should be normalized.
auto index_type() -> index_data_type
Returns the index data type for the default draw variant.
Definition: gen_base.hpp:139
vertex_attrib_kind
Shape vertex attribute kind enumeration.
Definition: vertex_attrib.hpp:25
attrib_data_type
Shape vertex attribute data type enumeration.
Definition: drawing.hpp:67
static auto from_value_tree(valtree::compound source, main_ctx_parent parent)
Constructs instances of value_tree_loader.
Definition: value_tree.hpp:88
index_data_type
Shape element index type enumeration.
Definition: drawing.hpp:111
auto index_count()
Returns the index count for the default drawing variant.
Definition: gen_base.hpp:147
void indices(drawing_variant, span< std::uint16_t > dest) override
Fetches the index data for the specified drawing variant.
auto variant_name(vertex_attrib_variant) -> string_view override
Returns the name of the specified attribute variant.