Go to the documentation of this file.
9 #ifndef EAGINE_SHAPES_ARRAY_HPP
10 #define EAGINE_SHAPES_ARRAY_HPP
19 class array_gen :
public delegated_gen {
21 std::array<float, 3> _d;
29 std::shared_ptr<generator> gen,
30 std::array<float, 3> d,
32 : delegated_gen{std::move(gen)}
38 void attrib_values(vertex_attrib_variant, span<float>)
override;
54 auto bounding_sphere() -> math::sphere<float, true>
override;
57 static inline auto array(
58 std::shared_ptr<generator> gen,
59 std::array<float, 3> d,
61 return std::make_unique<array_gen>(std::move(gen), d, count);
64 static inline auto ortho_array_xyz(
65 std::shared_ptr<generator> gen,
66 std::array<float, 3> d,
67 std::array<span_size_t, 3> n) noexcept {
70 array(array(std::move(gen), {d[0], z, z}, n[0]), {z, d[1], z}, n[1]),
78 #if !EAGINE_LINK_LIBRARY || defined(EAGINE_IMPLEMENTING_LIBRARY)
79 #include <eagine/shapes/array.inl>
82 #endif // EAGINE_SHAPES_ARRAY_HPP
std::ptrdiff_t span_size_t
Signed span size type used by eagine.
Definition: types.hpp:36
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
void attrib_values(vertex_attrib_variant vav, span< byte > dest) override
Fetches the vertex attribute data for the specified variant as bytes.
Definition: delegated.hpp:62
span_size_t drawing_variant
Alias for shape drawing variant index type.
Definition: gen_base.hpp:31
auto index_type() -> index_data_type
Returns the index data type for the default draw variant.
Definition: gen_base.hpp:139
void instructions(span< draw_operation > dest)
Fetches the drawing operations for the default drawing variant.
Definition: gen_base.hpp:187
void indices(span< std::uint8_t > dest)
Fetches the index data for the default drawing variant.
Definition: gen_base.hpp:155
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