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

A class representing a 2D triangle defined by three vertices. More...

#include <Utils_GG2D.hh>

Public Member Functions

 Triangle2D ()
 Default constructor for the triangle.
 

Detailed Description

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

A class representing a 2D triangle defined by three vertices.

The Triangle2D class defines a 2D triangle using three points, \( P_a \), \( P_b \), and \( P_c \), which represent the vertices of the triangle. This class provides a structure to represent and manipulate a triangle in a two-dimensional space, allowing for operations such as area calculation, centroid determination, and intersection checks with other geometric entities.

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

Constructor & Destructor Documentation

◆ Triangle2D()

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

Default constructor for the triangle.

Initializes a new triangle with uninitialized vertices. This constructor can be used to create an empty triangle which can later be defined using specific points.


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