13 #include <Geometry/Vec3.h> 14 #include <MinSG/Core/Nodes/GeometryNode.h> 81 const Geometry::Vec3& p1,
82 const Geometry::Vec3& p2,
83 const Geometry::Vec3& p3,
84 MinSG::GeometryNode* geoNodePtr
96 const std::tuple<Geometry::Vec3, Geometry::Vec3, Geometry::Vec3>& points,
97 MinSG::GeometryNode* geoNodePtr
127 const Geometry::Vec3& p1,
128 const Geometry::Vec3& p2,
129 const Geometry::Vec3& p3
145 const Geometry::Vec3& p1,
146 const Geometry::Vec3& p2,
147 const Geometry::Vec3& p3
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.
Definition: Polygon.cpp:18
Geometry::Vec3 getVertex(const short &idx)
Return the vertex associated with the given index.
Definition: Polygon.cpp:76
Geometry::Vec3 p2
The second vertex of the polygon.
Definition: Polygon.h:32
static Geometry::Vec3 polygonCenter(const Geometry::Vec3 &p1, const Geometry::Vec3 &p2, const Geometry::Vec3 &p3)
Compute the center point of a polygon.
Definition: Polygon.cpp:87
Geometry::Vec3 p1
The first vertex of the polygon.
Definition: Polygon.h:26
A struct that represents a single polygon.
Definition: Polygon.h:21
Geometry::Vec3 min
The lower corner of this polygon's AABB.
Definition: Polygon.h:56
Geometry::Vec3 normal
The normal vector of the polygon.
Definition: Polygon.h:50
Geometry::Vec3 center
The center point of the polygon.
Definition: Polygon.h:44
Geometry::Vec3 p3
The third vertex of the polygon.
Definition: Polygon.h:38
MinSG::GeometryNode * geoNodePtr
A pointer to the GeometryNode from which this polygon originates.
Definition: Polygon.h:68
static Geometry::Vec3 polygonNormal(const Geometry::Vec3 &p1, const Geometry::Vec3 &p2, const Geometry::Vec3 &p3)
Compute the normal vector of a polygon.
Definition: Polygon.cpp:96
Geometry::Vec3 max
The upper corner of this polygon's AABB.
Definition: Polygon.h:62