9#include <glm/gtc/constants.hpp>
10#include <glm/trigonometric.hpp>
12#include "galaxy/meta/Memory.hpp"
22 , m_radii {10.0f, 5.0f}
31 this->
m_radii = std::move(e.m_radii);
41 this->
m_radii = std::move(e.m_radii);
60 const auto theta = 2.0f * glm::pi<float>() /
m_fragments;
61 const auto cosine = std::cosf(theta);
62 const auto sine = std::sinf(theta);
68 meta::vector<unsigned int>
indices;
69 meta::vector<graphics::Vertex>
vertices;
83 x = cosine * x - sine * y;
84 y = sine * temp + cosine * y;
thread_local const float vertices[]
Video.cpp galaxy.
thread_local const unsigned int indices[]
Ellipse & operator=(Ellipse &&)
Move assignment operator.
float fragments() const
Get fragments.
glm::vec2 m_radii
Radius of ellipse.
virtual ~Ellipse()
Destructor.
const glm::vec2 & radii() const
Get radii.
float m_fragments
Number of points used to create shape.
void create(const float fragments, const glm::vec2 &radii)
Create the ellipse.
VertexArray m_vao
Vertex Array Object.
Shape & operator=(Shape &&)
Move assignment operator.
unsigned int m_mode
Type to render i.e. GL_LINES, GL_TRIANGLES, etc.
float m_height
Cached height.
float m_width
Cached width.
void buffer(std::span< Vertex > vertices, std::span< unsigned int > indicies)
Create vertex array object.
Represents a single vertex point.
glm::vec2 m_pos
Position..