KanoopCommonQt 2.1.1
Kanoop foundational Qt utility library
Loading...
Searching...
No Matches
triangle.h
1/**
2 * @brief A 2D triangle defined by three vertices.
3 */
4#ifndef TRIANGLE_H
5#define TRIANGLE_H
6
7#include <QPointF>
8#include "Kanoop/kanoopcommon.h"
9
10/**
11 * @brief Represents a 2D triangle by its three vertex points.
12 */
13class KANOOP_EXPORT Triangle
14{
15public:
16 /** @brief Default constructor — creates a degenerate triangle at the origin. */
18
19 /**
20 * @brief Construct a triangle from three vertex points.
21 * @param a First vertex
22 * @param b Second vertex
23 * @param c Third vertex
24 */
25 Triangle(const QPointF& a, const QPointF& b, const QPointF& c) :
26 _a(a), _b(b), _c(c) {}
27
28private:
29 const QPointF _a;
30 const QPointF _b;
31 const QPointF _c;
32};
33
34#endif // TRIANGLE_H
A 2D triangle defined by three vertices.
Definition triangle.h:14
Triangle(const QPointF &a, const QPointF &b, const QPointF &c)
Construct a triangle from three vertex points.
Definition triangle.h:25
Triangle()
Default constructor — creates a degenerate triangle at the origin.
Definition triangle.h:17