![]() |
galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
|
A closed loop line collection of points. I.e. A square, triangle, etc. More...
#include <Polygon.hpp>
Public Member Functions | |
Polygon () | |
Constructor. | |
Polygon (Polygon &&) | |
Move constructor. | |
Polygon & | operator= (Polygon &&) |
Move assignment operator. | |
virtual | ~Polygon () |
Destructor. | |
void | create (const meta::vector< glm::vec2 > &points) |
Create shape. | |
const meta::vector< glm::vec2 > & | points () const |
Get list of points. | |
![]() | |
Shape () | |
Constructor. | |
Shape (Shape &&) | |
Move constructor. | |
Shape & | operator= (Shape &&) |
Move assignment operator. | |
virtual | ~Shape () |
Destructor. | |
unsigned int | mode () const |
Get OpenGL rendering mode. | |
float | width () const |
Get texture width. | |
float | height () const |
Get texture height. | |
VertexArray & | vao () |
Get vertex array object. | |
Private Attributes | |
meta::vector< glm::vec2 > | m_points |
List of points. | |
Additional Inherited Members | |
![]() | |
Colour | m_colour |
Used by all primitives. | |
![]() | |
unsigned int | m_mode |
Type to render i.e. GL_LINES, GL_TRIANGLES, etc. | |
float | m_width |
Cached width. | |
float | m_height |
Cached height. | |
VertexArray | m_vao |
Vertex Array Object. | |
A closed loop line collection of points. I.e. A square, triangle, etc.
Definition at line 21 of file Polygon.hpp.
galaxy::graphics::Polygon::Polygon | ( | ) |
Constructor.
Definition at line 16 of file Polygon.cpp.
galaxy::graphics::Polygon::Polygon | ( | Polygon && | p | ) |
Move constructor.
Definition at line 23 of file Polygon.cpp.
|
virtual |
Destructor.
Definition at line 40 of file Polygon.cpp.
Move assignment operator.
Definition at line 29 of file Polygon.cpp.
void galaxy::graphics::Polygon::create | ( | const meta::vector< glm::vec2 > & | points | ) |
Create shape.
points | List of points. The first point and the last point will be joined. |
Definition at line 44 of file Polygon.cpp.
|
nodiscard |
Get list of points.
Definition at line 76 of file Polygon.cpp.
|
private |
List of points.
Definition at line 63 of file Polygon.hpp.