galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
galaxy::graphics::Polyline Class Referencefinal

An open looped line of points. More...

#include <Polyline.hpp>

+ Inheritance diagram for galaxy::graphics::Polyline:
+ Collaboration diagram for galaxy::graphics::Polyline:

Public Member Functions

 Polyline ()
 Constructor.
 
 Polyline (Polyline &&)
 Move constructor.
 
Polylineoperator= (Polyline &&)
 Move assignment operator.
 
virtual ~Polyline ()
 Destructor.
 
void create (const meta::vector< glm::vec2 > &points)
 List of points to create a line from.
 
const meta::vector< glm::vec2 > & points () const
 Get list of points.
 
- Public Member Functions inherited from galaxy::graphics::Shape
 Shape ()
 Constructor.
 
 Shape (Shape &&)
 Move constructor.
 
Shapeoperator= (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.
 
VertexArrayvao ()
 Get vertex array object.
 

Private Attributes

meta::vector< glm::vec2 > m_points
 List of points.
 

Additional Inherited Members

- Public Attributes inherited from galaxy::graphics::Shape
Colour m_colour
 Used by all primitives.
 
- Protected Attributes inherited from galaxy::graphics::Shape
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.
 

Detailed Description

An open looped line of points.

Definition at line 21 of file Polyline.hpp.

Constructor & Destructor Documentation

◆ Polyline() [1/2]

galaxy::graphics::Polyline::Polyline ( )

Constructor.

Definition at line 16 of file Polyline.cpp.

◆ Polyline() [2/2]

galaxy::graphics::Polyline::Polyline ( Polyline && p)

Move constructor.

Definition at line 23 of file Polyline.cpp.

◆ ~Polyline()

galaxy::graphics::Polyline::~Polyline ( )
virtual

Destructor.

Definition at line 40 of file Polyline.cpp.

Member Function Documentation

◆ operator=()

Polyline & galaxy::graphics::Polyline::operator= ( Polyline && p)

Move assignment operator.

Definition at line 29 of file Polyline.cpp.

+ Here is the call graph for this function:

◆ create()

void galaxy::graphics::Polyline::create ( const meta::vector< glm::vec2 > & points)

List of points to create a line from.

Parameters
pointsList of points. Will not close or loop.

Definition at line 44 of file Polyline.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ points()

const meta::vector< glm::vec2 > & galaxy::graphics::Polyline::points ( ) const
nodiscard

Get list of points.

Returns
List of points making up shape.

Definition at line 66 of file Polyline.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_points

meta::vector<glm::vec2> galaxy::graphics::Polyline::m_points
private

List of points.

Definition at line 63 of file Polyline.hpp.


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