Go to the documentation of this file.
9 #ifndef EAGINE_SHAPES_ROUND_CUBE_HPP
10 #define EAGINE_SHAPES_ROUND_CUBE_HPP
29 void positions(span<float> dest) noexcept;
31 void normals(span<float> dest) noexcept;
33 void face_coords(span<float> dest) noexcept;
74 return std::make_unique<unit_round_cube_gen>(attr_bits, divisions);
78 return std::make_unique<unit_round_cube_gen>(attr_bits, 8);
84 #if !EAGINE_LINK_LIBRARY || defined(EAGINE_IMPLEMENTING_LIBRARY)
85 #include <eagine/shapes/round_cube.inl>
88 #endif // EAGINE_SHAPES_ROUND_CUBE_HPP
auto bounding_sphere() -> math::sphere< float, true > override
Returns the bounding sphere for the generated shape.
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
Basic template for spheres in N-dimensional space.
Definition: primitives.hpp:122
Common code is placed in this namespace.
Definition: eagine.hpp:21
void attrib_values(vertex_attrib_variant, span< float >) override
Fetches the vertex attribute data for the specified variant as floats.
auto operation_count()
Returns the number of drawing instructions for the default variant.
Definition: gen_base.hpp:179
Class designating an vertex attribute variant in a shape generator.
Definition: vertex_attrib.hpp:104
void instructions(drawing_variant, span< draw_operation > ops) override
Fetches the drawing operations for the specified drawing variant.
void indices(drawing_variant, span< std::uint8_t > dest) override
Fetches the index data for the specified drawing variant.
span_size_t drawing_variant
Alias for shape drawing variant index type.
Definition: gen_base.hpp:31
Base class for shape generators re-calculating the center.
Definition: gen_base.hpp:320
auto index_type() -> index_data_type
Returns the index data type for the default draw variant.
Definition: gen_base.hpp:139
static auto unit_round_cube(vertex_attrib_bits attr_bits, int divisions)
Constructs instances of unit_round_cube_gen.
Definition: round_cube.hpp:73
Generator of centered, subdivided and rounded cube shape with unit radius.
Definition: round_cube.hpp:23
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
auto vertex_count() -> span_size_t override
Returns the shaped vertex count.