Guillaume 1.0.0
Guillaume.
|
Represents a polygon primitive for 3D rendering. More...
#include <polygon.hpp>
Public Member Functions | |
Polygon (void) | |
Default constructor - initializes an empty polygon. | |
Polygon (const std::vector< Vertex > &vertices, const Vector< float, 3 > &rotation=Vector< float, 3 >()) | |
Constructor from a list of vertices. | |
~Polygon (void) override=default | |
Destroy the Polygon object. | |
Polygon & | addVertex (const Vertex &vertex) |
Adds a vertex to the polygon. | |
const std::vector< Vertex > & | getVertices (void) const |
Gets the vertices defining the polygon. | |
const Vector< float, 3 > & | getRotation (void) const |
Gets the rotation of the polygon in Euler angles (radians) | |
const Vector< float, 3 > & | getTranslation (void) const |
Gets the translation of the polygon in 3D space. | |
Polygon & | setRotation (const Vector< float, 3 > &rotation) |
Sets the rotation of the polygon in Euler angles (radians) | |
Polygon & | setTranslation (const Vector< float, 3 > &translation) |
Sets the translation of the polygon in 3D space. | |
![]() | |
Primitive (void) | |
Constructs a Primitive object. | |
virtual | ~Primitive (void)=default |
Destroy the Primitive object. | |
Represents a polygon primitive for 3D rendering.
The Polygon class is a derived class of Primitive that represents a polygon shape defined by a series of 3D vertices. It provides methods to manage the vertices for support 3D rendering.
|
inline |
Constructor from a list of vertices.
Initializes the polygon with the specified vertices.
vertices | A vector of Vertex objects defining the polygon vertices in 3D space |
|
inline |
Gets the rotation of the polygon in Euler angles (radians)
|
inline |
Gets the translation of the polygon in 3D space.
|
inline |
Gets the vertices defining the polygon.
Sets the rotation of the polygon in Euler angles (radians)
rotation | A Vector<float, 3> representing the new rotation |
Sets the translation of the polygon in 3D space.
translation | A Vector<float, 3> representing the new translation |