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::Point Class Referencefinal

A single point. More...

#include <Point.hpp>

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

Public Member Functions

 Point ()
 Constructor.
 
 Point (Point &&)=default
 Move constructor.
 
Pointoperator= (Point &&)=default
 Move assignment operator.
 
virtual ~Point ()
 Destructor.
 
void create (const glm::vec2 &pos)
 Initial point positon.
 
const glm::vec2 & pos () const
 Get pos.
 
- 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

glm::vec2 m_pos
 Position.
 

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

A single point.

Definition at line 20 of file Point.hpp.

Constructor & Destructor Documentation

◆ Point() [1/2]

galaxy::graphics::Point::Point ( )

Constructor.

Definition at line 18 of file Point.cpp.

◆ Point() [2/2]

galaxy::graphics::Point::Point ( Point && )
default

Move constructor.

◆ ~Point()

galaxy::graphics::Point::~Point ( )
virtual

Destructor.

Definition at line 23 of file Point.cpp.

Member Function Documentation

◆ operator=()

Point & galaxy::graphics::Point::operator= ( Point && )
default

Move assignment operator.

◆ create()

void galaxy::graphics::Point::create ( const glm::vec2 & pos)

Initial point positon.

Parameters
posX/Y coords.

Definition at line 27 of file Point.cpp.

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

◆ pos()

const glm::vec2 & galaxy::graphics::Point::pos ( ) const
nodiscard

Get pos.

Returns
Const glm::vec2 reference.

Definition at line 40 of file Point.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_pos

glm::vec2 galaxy::graphics::Point::m_pos
private

Position.

Definition at line 62 of file Point.hpp.


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