UtilsLite
Utilities for C++ programming
Loading...
Searching...
No Matches
Utils::Polygon2D< Real > Class Template Reference

A class representing a 2D polygon using a dynamic matrix of vertices. More...

#include <Utils_GG2D.hh>

Inheritance diagram for Utils::Polygon2D< Real >:

Public Member Functions

 Polygon2D ()
 Default constructor for the polygon.
 

Detailed Description

template<typename Real>
class Utils::Polygon2D< Real >

A class representing a 2D polygon using a dynamic matrix of vertices.

The Polygon2D class defines a 2D polygon by storing its vertices in a dynamic matrix. Each column of the matrix represents a vertex of the polygon in 2D space, allowing for the representation of polygons with varying numbers of vertices. This class inherits from Eigen::Matrix to leverage efficient matrix operations for polygon manipulations such as transformations and evaluations.

Template Parameters
RealThe data type used for the coordinates of the polygon's vertices, typically a floating-point type (e.g., float, double).

Constructor & Destructor Documentation

◆ Polygon2D()

template<typename Real>
Utils::Polygon2D< Real >::Polygon2D ( )
inline

Default constructor for the polygon.

Initializes a new polygon with no vertices. The internal matrix structure is empty, and vertices can be added later through appropriate methods.


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