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

Triangle Geometry. More...

#include <le2d/shape/triangle.hpp>

Inheritance diagram for le::shape::Triangle:
le::IGeometry

Public Member Functions

 explicit (false) Triangle(float const radius=default_radius_v
 
- 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

kvf::Color const color
 
std::array< Vertex, vertex_count_vvertices {}
 

Static Public Attributes

static constexpr auto vertex_count_v {4uz}
 
static constexpr auto default_radius_v = 0.5f * default_length_v
 
- Static Public Attributes inherited from le::IGeometry
static constexpr auto default_length_v {200.0f}
 

Detailed Description

Triangle Geometry.

Member Function Documentation

◆ explicit()

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

Member Data Documentation

◆ color

kvf::Color const le::shape::Triangle::color
Initial value:
= kvf::white_v) { create(radius, color); }
auto get_vertices() const -> std::span<Vertex const> final { return vertices; }
auto get_indices() const -> std::span<std::uint32_t const> final { return {}; }
auto get_topology() const -> vk::PrimitiveTopology final { return vk::PrimitiveTopology::eTriangleList; }
void create(float radius = default_radius_v, kvf::Color color = kvf::white_v)
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
kvf::Color const color
Definition triangle.hpp:15
std::array< Vertex, vertex_count_v > vertices
Definition triangle.hpp:23
static constexpr auto default_radius_v
Definition triangle.hpp:13
Drawable vertex.
Definition vertex.hpp:7

◆ default_radius_v

constexpr auto le::shape::Triangle::default_radius_v = 0.5f * default_length_v
staticconstexpr

◆ vertex_count_v

constexpr auto le::shape::Triangle::vertex_count_v {4uz}
staticconstexpr

◆ vertices

std::array<Vertex, vertex_count_v> le::shape::Triangle::vertices {}

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