galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages Concepts
galaxy::components::Polygon Class Referencefinal

2D shape. More...

#include <Polygon.hpp>

+ Inheritance diagram for galaxy::components::Polygon:
+ Collaboration diagram for galaxy::components::Polygon:

Public Member Functions

 Polygon ()
 Constructor.
 
 Polygon (const nlohmann::json &json)
 JSON constructor.
 
 Polygon (Polygon &&)
 Move constructor.
 
Polygonoperator= (Polygon &&)
 Move assignment operator.
 
virtual ~Polygon ()
 Destructor.
 
nlohmann::json serialize () override
 Serializes object.
 
void deserialize (const nlohmann::json &json) override
 Deserializes from object.
 
- Public Member Functions inherited from galaxy::fs::Serializable
virtual ~Serializable ()
 Destructor.
 
virtual Serializableoperator= (Serializable &&)=default
 Move assignment operator.
 
virtual Serializableoperator= (const Serializable &)=default
 Copy assignment operator.
 

Public Attributes

graphics::Polygon m_shape
 Shape.
 

Private Member Functions

Polygonoperator= (const Polygon &)=delete
 Copy assignment operator.
 
 Polygon (const Polygon &)=delete
 Copy constructor.
 

Additional Inherited Members

- Protected Member Functions inherited from galaxy::fs::Serializable
 Serializable ()
 Constructor.
 

Detailed Description

2D shape.

Definition at line 21 of file Polygon.hpp.

Constructor & Destructor Documentation

◆ Polygon() [1/4]

galaxy::components::Polygon::Polygon ( )

Constructor.

Definition at line 16 of file Polygon.cpp.

◆ Polygon() [2/4]

galaxy::components::Polygon::Polygon ( const nlohmann::json & json)

JSON constructor.

Parameters
jsonJSON defining object.

Definition at line 21 of file Polygon.cpp.

+ Here is the call graph for this function:

◆ Polygon() [3/4]

galaxy::components::Polygon::Polygon ( Polygon && p)

Move constructor.

Definition at line 27 of file Polygon.cpp.

◆ ~Polygon()

galaxy::components::Polygon::~Polygon ( )
virtual

Destructor.

Definition at line 43 of file Polygon.cpp.

◆ Polygon() [4/4]

galaxy::components::Polygon::Polygon ( const Polygon & )
privatedelete

Copy constructor.

Member Function Documentation

◆ operator=() [1/2]

Polygon & galaxy::components::Polygon::operator= ( Polygon && p)

Move assignment operator.

Definition at line 33 of file Polygon.cpp.

◆ serialize()

nlohmann::json galaxy::components::Polygon::serialize ( )
nodiscardoverridevirtual

Serializes object.

Returns
JSON object containing data to be serialized.

Implements galaxy::fs::Serializable.

Definition at line 47 of file Polygon.cpp.

◆ deserialize()

void galaxy::components::Polygon::deserialize ( const nlohmann::json & json)
overridevirtual

Deserializes from object.

Parameters
jsonJson object to retrieve data from.

Implements galaxy::fs::Serializable.

Definition at line 69 of file Polygon.cpp.

+ Here is the caller graph for this function:

◆ operator=() [2/2]

Polygon & galaxy::components::Polygon::operator= ( const Polygon & )
privatedelete

Copy assignment operator.

Member Data Documentation

◆ m_shape

graphics::Polygon galaxy::components::Polygon::m_shape

Shape.

Definition at line 81 of file Polygon.hpp.


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