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

An elliptical circle. More...

#include <Ellipse.hpp>

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

Public Member Functions

 Ellipse ()
 Constructor.
 
 Ellipse (Ellipse &&)
 Move constructor.
 
Ellipseoperator= (Ellipse &&)
 Move assignment operator.
 
virtual ~Ellipse ()
 Destructor.
 
void create (const float fragments, const glm::vec2 &radii)
 Create the ellipse.
 
float fragments () const
 Get fragments.
 
const glm::vec2 & radii () const
 Get radii.
 
- 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
 Number of points used to create shape.
 
glm::vec2 m_radii
 Radius of ellipse.
 

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

Definition at line 20 of file Ellipse.hpp.

Constructor & Destructor Documentation

◆ Ellipse() [1/2]

galaxy::graphics::Ellipse::Ellipse ( )

Constructor.

Definition at line 20 of file Ellipse.cpp.

◆ Ellipse() [2/2]

galaxy::graphics::Ellipse::Ellipse ( Ellipse && e)

Move constructor.

Definition at line 28 of file Ellipse.cpp.

◆ ~Ellipse()

galaxy::graphics::Ellipse::~Ellipse ( )
virtual

Destructor.

Definition at line 48 of file Ellipse.cpp.

Member Function Documentation

◆ operator=()

Ellipse & galaxy::graphics::Ellipse::operator= ( Ellipse && e)

Move assignment operator.

Definition at line 35 of file Ellipse.cpp.

+ Here is the call graph for this function:

◆ create()

void galaxy::graphics::Ellipse::create ( const float fragments,
const glm::vec2 & radii )

Create the ellipse.

Parameters
fragmentsHow many points to use to create the shape. More means smoother edge.
radiiEllipse horizontal and vertical radius.

Definition at line 52 of file Ellipse.cpp.

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

◆ fragments()

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

Get fragments.

Returns
Const float.

Definition at line 92 of file Ellipse.cpp.

+ Here is the caller graph for this function:

◆ radii()

const glm::vec2 & galaxy::graphics::Ellipse::radii ( ) const
nodiscard

Get radii.

Returns
Const glm::vec2 reference.

Definition at line 97 of file Ellipse.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_fragments

float galaxy::graphics::Ellipse::m_fragments
private

Number of points used to create shape.

Definition at line 71 of file Ellipse.hpp.

◆ m_radii

glm::vec2 galaxy::graphics::Ellipse::m_radii
private

Radius of ellipse.

Definition at line 76 of file Ellipse.hpp.


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