Interface for shape loaders or generators. More...
#include <eagine/shapes/gen_base.hpp>
Public Member Functions | |
| virtual auto | attrib_bits () noexcept -> vertex_attrib_bits=0 |
| Returns the set of vertex attributes supported by this generator. | |
| auto | has (vertex_attrib_kind attrib) noexcept |
| Tests if the specified attribute is supported by this generator. | |
| virtual auto | enable (generator_capability cap, bool value=true) noexcept -> bool=0 |
| Enables or disables the specified generator capability. | |
| auto | disable (generator_capability cap) noexcept |
| Disables the specified generator capability. | |
| virtual auto | is_enabled (generator_capability cap) noexcept -> bool=0 |
| Indicates if the specified generator capability is enabled. | |
| auto | strips_allowed () noexcept -> bool |
| Indicates if element strips are enabled. | |
| auto | fans_allowed () noexcept -> bool |
| Indicates if element fans are enabled. | |
| auto | primitive_restart () noexcept -> bool |
| Indicates if primitive restart is enabled. | |
| virtual auto | vertex_count () -> span_size_t=0 |
| Returns the shaped vertex count. | |
| virtual auto | attribute_variants (vertex_attrib_kind) -> span_size_t=0 |
| Returns the count of shape attribute variants. | |
| virtual auto | variant_name (vertex_attrib_variant vav) -> string_view=0 |
| Returns the name of the specified attribute variant. | |
| auto | find_variant (vertex_attrib_kind attrib, string_view name) -> vertex_attrib_variant |
| Finds attribute variant by kind and name. | |
| virtual auto | values_per_vertex (vertex_attrib_variant) -> span_size_t=0 |
| Returns the number of values per vertex for the specified variant. | |
| auto | value_count (vertex_attrib_variant vav) -> span_size_t |
| Returns the total number of values for the specified attribute variant. | |
| virtual auto | attrib_type (vertex_attrib_variant vav) -> attrib_data_type=0 |
| Returns the attribute data type for the specified variant. | |
| virtual auto | is_attrib_normalized (vertex_attrib_variant vav) -> bool=0 |
| Indicates if the specified variant attribute values should be normalized. | |
| virtual void | attrib_values (vertex_attrib_variant, span< byte > dest)=0 |
| Fetches the vertex attribute data for the specified variant as bytes. | |
| virtual void | attrib_values (vertex_attrib_variant, span< std::int16_t >)=0 |
| Fetches the vertex attribute data for the specified variant as integers. | |
| virtual void | attrib_values (vertex_attrib_variant, span< std::int32_t >)=0 |
| Fetches the vertex attribute data for the specified variant as integers. | |
| virtual void | attrib_values (vertex_attrib_variant, span< std::uint16_t >)=0 |
| Fetches the vertex attribute data for the specified variant as integers. | |
| virtual void | attrib_values (vertex_attrib_variant, span< std::uint32_t >)=0 |
| Fetches the vertex attribute data for the specified variant as integers. | |
| virtual void | attrib_values (vertex_attrib_variant, span< float > dest)=0 |
| Fetches the vertex attribute data for the specified variant as floats. | |
| virtual auto | draw_variant_count () -> span_size_t=0 |
| Returns the count of possible shape draw variants. | |
| auto | draw_variant (span_size_t index) -> drawing_variant |
| Returns the identifier of the drawing variant at the specified index. | |
| virtual auto | index_type (drawing_variant) -> index_data_type=0 |
| Returns the index data type for the specified draw variant. | |
| auto | index_type () -> index_data_type |
| Returns the index data type for the default draw variant. | |
| virtual auto | index_count (drawing_variant) -> span_size_t=0 |
| Returns the index count for the specified drawing variant. | |
| auto | index_count () |
| Returns the index count for the default drawing variant. | |
| virtual void | indices (drawing_variant, span< std::uint8_t > dest)=0 |
| Fetches the index data for the specified drawing variant. | |
| void | indices (span< std::uint8_t > dest) |
| Fetches the index data for the default drawing variant. | |
| virtual void | indices (drawing_variant, span< std::uint16_t > dest)=0 |
| Fetches the index data for the specified drawing variant. | |
| void | indices (span< std::uint16_t > dest) |
| Fetches the index data for the default drawing variant. | |
| virtual void | indices (drawing_variant, span< std::uint32_t > dest)=0 |
| Fetches the index data for the specified drawing variant. | |
| void | indices (span< std::uint32_t > dest) |
| Fetches the index data for the default drawing variant. | |
| virtual auto | operation_count (drawing_variant) -> span_size_t=0 |
| Returns the number of drawing instructions for the specified variant. | |
| auto | operation_count () |
| Returns the number of drawing instructions for the default variant. | |
| virtual void | instructions (drawing_variant, span< draw_operation > dest)=0 |
| Fetches the drawing operations for the specified drawing variant. | |
| void | instructions (span< draw_operation > dest) |
| Fetches the drawing operations for the default drawing variant. | |
| virtual auto | bounding_sphere () -> math::sphere< float, true > |
| Returns the bounding sphere for the generated shape. | |
| virtual void | ray_intersections (drawing_variant, span< const math::line< float, true >> rays, span< optionally_valid< float >> intersections) |
| Calculates the intersections of the shape geometry with a ray. | |
| void | ray_intersections (span< const math::line< float, true >> rays, span< optionally_valid< float >> intersections) |
| Calculates the intersections of the shape geometry with a ray. | |
| auto | ray_intersection (drawing_variant var, const math::line< float, true > &ray) -> optionally_valid< float > |
| Returns the parameter for the nearest intersection with a ray. | |
| auto | ray_intersection (const math::line< float, true > &ray) -> optionally_valid< float > |
| Returns the parameter for the nearest intersection with a ray. | |
Public Member Functions inherited from eagine::interface< generator > | |
| constexpr | interface (const interface &)=delete |
| Not copyable. | |
| auto | operator= (interface &&)=delete |
| Not move assignable. | |
| auto | operator= (const interface &)=delete |
| Not copy assignable. | |
Additional Inherited Members | |
Protected Member Functions inherited from eagine::interface< generator > | |
| constexpr | interface () noexcept=default |
| Default constructible by derived. | |
| constexpr | interface (interface &&) noexcept=default |
| Move constructible by derived. | |
Interface for shape loaders or generators.