A struct that represents a single polygon.
More...
#include <Polygon.h>
|
| Polygon (const Geometry::Vec3 &p1, const Geometry::Vec3 &p2, const Geometry::Vec3 &p3, MinSG::GeometryNode *geoNodePtr) |
| A constructor that creates a poylgon out of three points. More...
|
|
| Polygon (const std::tuple< Geometry::Vec3, Geometry::Vec3, Geometry::Vec3 > &points, MinSG::GeometryNode *geoNodePtr) |
| A constructor that creates a polyon out of a tuple of points. More...
|
|
Geometry::Vec3 | getVertex (const short &idx) |
| Return the vertex associated with the given index. More...
|
|
|
static Geometry::Vec3 | polygonCenter (const Geometry::Vec3 &p1, const Geometry::Vec3 &p2, const Geometry::Vec3 &p3) |
| Compute the center point of a polygon. More...
|
|
static Geometry::Vec3 | polygonNormal (const Geometry::Vec3 &p1, const Geometry::Vec3 &p2, const Geometry::Vec3 &p3) |
| Compute the normal vector of a polygon. More...
|
|
|
Geometry::Vec3 | p1 |
| The first vertex of the polygon. More...
|
|
Geometry::Vec3 | p2 |
| The second vertex of the polygon. More...
|
|
Geometry::Vec3 | p3 |
| The third vertex of the polygon. More...
|
|
Geometry::Vec3 | center |
| The center point of the polygon. More...
|
|
Geometry::Vec3 | normal |
| The normal vector of the polygon. More...
|
|
Geometry::Vec3 | min |
| The lower corner of this polygon's AABB. More...
|
|
Geometry::Vec3 | max |
| The upper corner of this polygon's AABB. More...
|
|
MinSG::GeometryNode * | geoNodePtr |
| A pointer to the GeometryNode from which this polygon originates. More...
|
|
A struct that represents a single polygon.
◆ Polygon() [1/2]
Pathfinder::Polygon::Polygon |
( |
const Geometry::Vec3 & |
p1, |
|
|
const Geometry::Vec3 & |
p2, |
|
|
const Geometry::Vec3 & |
p3, |
|
|
MinSG::GeometryNode * |
geoNodePtr |
|
) |
| |
A constructor that creates a poylgon out of three points.
- Parameters
-
p1 | The first vertex. |
p2 | The second vertex. |
p3 | The third vertex. |
geoNodePtr | A pointer to the GeometryNode containing the source mesh. |
◆ Polygon() [2/2]
Pathfinder::Polygon::Polygon |
( |
const std::tuple< Geometry::Vec3, Geometry::Vec3, Geometry::Vec3 > & |
points, |
|
|
MinSG::GeometryNode * |
geoNodePtr |
|
) |
| |
A constructor that creates a polyon out of a tuple of points.
- Parameters
-
points | A tuple containing the three vertices. |
geoNodePtr | A pointer to the GeometryNode containing the source mesh. |
◆ getVertex()
Geometry::Vec3 Pathfinder::Polygon::getVertex |
( |
const short & |
idx | ) |
|
Return the vertex associated with the given index.
0 = p1, 1 = p2, 2 = p3.
- Parameters
-
idx | The index of the vertex. |
- Returns
- The vertex associated to idx.
◆ polygonCenter()
Geometry::Vec3 Pathfinder::Polygon::polygonCenter |
( |
const Geometry::Vec3 & |
p1, |
|
|
const Geometry::Vec3 & |
p2, |
|
|
const Geometry::Vec3 & |
p3 |
|
) |
| |
|
static |
Compute the center point of a polygon.
- Parameters
-
p1 | The first vertex of the polygon. |
p2 | The second vertex of the polygon. |
p3 | The third vertex of the polygon. |
- Returns
- The center point of the polygon defined by p1, p2 and p3.
◆ polygonNormal()
Geometry::Vec3 Pathfinder::Polygon::polygonNormal |
( |
const Geometry::Vec3 & |
p1, |
|
|
const Geometry::Vec3 & |
p2, |
|
|
const Geometry::Vec3 & |
p3 |
|
) |
| |
|
static |
Compute the normal vector of a polygon.
- Parameters
-
p1 | The first vertex of the polygon. |
p2 | The second vertex of the polygon. |
p3 | The third vertex of the polygon. |
- Returns
- The normal vector of the polygon defined by p1, p2 and p3.
◆ center
Geometry::Vec3 Pathfinder::Polygon::center |
The center point of the polygon.
◆ geoNodePtr
MinSG::GeometryNode* Pathfinder::Polygon::geoNodePtr |
A pointer to the GeometryNode from which this polygon originates.
◆ max
Geometry::Vec3 Pathfinder::Polygon::max |
The upper corner of this polygon's AABB.
◆ min
Geometry::Vec3 Pathfinder::Polygon::min |
The lower corner of this polygon's AABB.
◆ normal
Geometry::Vec3 Pathfinder::Polygon::normal |
The normal vector of the polygon.
◆ p1
Geometry::Vec3 Pathfinder::Polygon::p1 |
The first vertex of the polygon.
◆ p2
Geometry::Vec3 Pathfinder::Polygon::p2 |
The second vertex of the polygon.
◆ p3
Geometry::Vec3 Pathfinder::Polygon::p3 |
The third vertex of the polygon.
The documentation for this struct was generated from the following files: