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

Interface for Quad Geometry. More...

#include <le2d/shape/quad.hpp>

Inheritance diagram for le::shape::IQuad:
le::IGeometry le::shape::LineRect le::shape::Quad

Public Member Functions

 explicit (false) IQuad(glm
 
auto get_vertices () const -> std::span< Vertex const > final
 
void create (glm::vec2 size=default_size_v)
 
void create (kvf::Rect<> const &rect, kvf::UvRect const &uv=kvf::uv_rect_v, kvf::Color color=kvf::white_v)
 
auto get_rect () const -> kvf::Rect<>
 
auto get_uv () const -> kvf::UvRect
 
auto get_size () const -> glm::vec2
 
auto get_origin () const -> glm::vec2
 
- Public Member Functions inherited from le::IGeometry
virtual auto get_indices () const -> std::span< std::uint32_t const >=0
 
virtual auto get_topology () const -> vk::PrimitiveTopology=0
 

Static Public Attributes

static constexpr std::size_t vertex_count_v {4}
 
static constexpr auto default_size_v = glm::vec2{default_length_v}
 
- Static Public Attributes inherited from le::IGeometry
static constexpr auto default_length_v {200.0f}
 

Detailed Description

Interface for Quad Geometry.

Member Function Documentation

◆ create() [1/2]

void le::shape::IQuad::create ( glm::vec2  size = default_size_v)

◆ create() [2/2]

void le::shape::IQuad::create ( kvf::Rect<> const &  rect,
kvf::UvRect const &  uv = kvf::uv_rect_v,
kvf::Color  color = kvf::white_v 
)

◆ explicit()

le::shape::IQuad::explicit ( false  )
inline

◆ get_origin()

auto le::shape::IQuad::get_origin ( ) const -> glm::vec2
inline

◆ get_rect()

auto le::shape::IQuad::get_rect ( ) const -> kvf::Rect<>

◆ get_size()

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

◆ get_uv()

auto le::shape::IQuad::get_uv ( ) const -> kvf::UvRect

◆ get_vertices()

auto le::shape::IQuad::get_vertices ( ) const -> std::span<Vertex const>
inlinefinalvirtual

Implements le::IGeometry.

Member Data Documentation

◆ default_size_v

constexpr auto le::shape::IQuad::default_size_v = glm::vec2{default_length_v}
staticconstexpr

◆ vertex_count_v

constexpr std::size_t le::shape::IQuad::vertex_count_v {4}
staticconstexpr

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