le2d v0.4.8
2D game engine framework
 
Loading...
Searching...
No Matches
le::shape::Sector Class Reference

Sector Geometry. More...

#include <le2d/shape/sector.hpp>

Inheritance diagram for le::shape::Sector:
le::IGeometry

Public Types

using Params = SectorParams
 

Public Member Functions

 explicit (false) Sector(float const diameter=default_diameter_v
 
auto get_diameter () const -> float
 
auto get_size () const -> glm::vec2
 
auto get_vertex_array () const -> VertexArray const &
 
- Public Member Functions inherited from le::IGeometry
virtual auto get_vertices () const -> std::span< Vertex const >=0
 
virtual auto get_indices () const -> std::span< std::uint32_t const >=0
 
virtual auto get_topology () const -> vk::PrimitiveTopology=0
 

Public Attributes

SectorParams const & params
 

Static Public Attributes

static constexpr auto default_diameter_v = default_length_v
 
- Static Public Attributes inherited from le::IGeometry
static constexpr auto default_length_v {200.0f}
 

Detailed Description

Sector Geometry.

Member Typedef Documentation

◆ Params

Member Function Documentation

◆ explicit()

le::shape::Sector::explicit ( false  ) const
default

◆ get_diameter()

auto le::shape::Sector::get_diameter ( ) const -> float
inline

◆ get_size()

auto le::shape::Sector::get_size ( ) const -> glm::vec2
inline

◆ get_vertex_array()

auto le::shape::Sector::get_vertex_array ( ) const -> VertexArray const&
inline

Member Data Documentation

◆ default_diameter_v

constexpr auto le::shape::Sector::default_diameter_v = default_length_v
staticconstexpr

◆ params

SectorParams const& le::shape::Sector::params
Initial value:
= {}) { create(diameter, params); }
auto get_vertices() const -> std::span<Vertex const> final { return m_verts.vertices; }
auto get_indices() const -> std::span<std::uint32_t const> final { return m_verts.indices; }
auto get_topology() const -> vk::PrimitiveTopology final { return vk::PrimitiveTopology::eTriangleFan; }
void create(float diameter = default_diameter_v, Params const& params = {})
virtual auto get_vertices() const -> std::span< Vertex const >=0
virtual auto get_indices() const -> std::span< std::uint32_t const >=0
virtual auto get_topology() const -> vk::PrimitiveTopology=0
SectorParams Params
Definition sector.hpp:19
static constexpr auto default_diameter_v
Definition sector.hpp:21
SectorParams const & params
Definition sector.hpp:23
std::vector< Vertex > vertices
Definition vertex_array.hpp:10
std::vector< std::uint32_t > indices
Definition vertex_array.hpp:11
Drawable vertex.
Definition vertex.hpp:7

The documentation for this class was generated from the following file: