le2d v0.4.6
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

auto get_vertices () const -> std::span< Vertex const > final
 
auto get_indices () const -> std::span< std::uint32_t const > final
 
auto get_topology () const -> vk::PrimitiveTopology final
 
void create (float radius=100.0f, kvf::Color color=kvf::white_v)
 

Public Attributes

std::array< Vertex, vertex_count_vvertices {}
 

Static Public Attributes

static constexpr std::size_t vertex_count_v {4}
 

Detailed Description

Triangle Geometry.

Member Function Documentation

◆ create()

void le::shape::Triangle::create ( float  radius = 100.0f,
kvf::Color  color = kvf::white_v 
)

◆ get_indices()

auto le::shape::Triangle::get_indices ( ) const -> std::span<std::uint32_t const>
inlinefinalvirtual

Implements le::IGeometry.

◆ get_topology()

auto le::shape::Triangle::get_topology ( ) const -> vk::PrimitiveTopology
inlinefinalvirtual

Implements le::IGeometry.

◆ get_vertices()

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

Implements le::IGeometry.

Member Data Documentation

◆ vertex_count_v

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

◆ vertices

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

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