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

A circle. More...

#include <Circle.hpp>

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

Public Member Functions

 Circle ()
 Constructor.
 
 Circle (Circle &&)
 Move constructor.
 
Circleoperator= (Circle &&)
 Move assignment operator.
 
virtual ~Circle ()
 Destructor.
 
void create (const float fragments, const float radius)
 Create the circle.
 
float fragments () const
 Get fragments.
 
float radius () const
 Get radius.
 
- 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

float m_fragments
 Points making up circumference.
 
float m_radius
 Radius.
 

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 circle.

Definition at line 20 of file Circle.hpp.

Constructor & Destructor Documentation

◆ Circle() [1/2]

galaxy::graphics::Circle::Circle ( )

Constructor.

Definition at line 20 of file Circle.cpp.

◆ Circle() [2/2]

galaxy::graphics::Circle::Circle ( Circle && c)

Move constructor.

Definition at line 28 of file Circle.cpp.

◆ ~Circle()

galaxy::graphics::Circle::~Circle ( )
virtual

Destructor.

Definition at line 48 of file Circle.cpp.

Member Function Documentation

◆ operator=()

Circle & galaxy::graphics::Circle::operator= ( Circle && c)

Move assignment operator.

Definition at line 35 of file Circle.cpp.

+ Here is the call graph for this function:

◆ create()

void galaxy::graphics::Circle::create ( const float fragments,
const float radius )

Create the circle.

Parameters
fragmentsNumber of points to use. Higher number means smoother shape.
radiusRadius of circle.

Definition at line 52 of file Circle.cpp.

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

◆ fragments()

float galaxy::graphics::Circle::fragments ( ) const
nodiscard

Get fragments.

Returns
Const float.

Definition at line 83 of file Circle.cpp.

+ Here is the caller graph for this function:

◆ radius()

float galaxy::graphics::Circle::radius ( ) const
nodiscard

Get radius.

Returns
Const float.

Definition at line 88 of file Circle.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_fragments

float galaxy::graphics::Circle::m_fragments
private

Points making up circumference.

Definition at line 71 of file Circle.hpp.

◆ m_radius

float galaxy::graphics::Circle::m_radius
private

Radius.

Definition at line 76 of file Circle.hpp.


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