Represents a two-dimensional closed surface in 3D space.
A polygon is defined by N endpoints, or corner vertices. To be a valid polygon, there must be at least 3 vertices (a triangle).
Well-formed polygons are always planar, i.e. all the vertices lie on the same plane. It is possible to store non-planar Polygons in this structure, but their representation is ambiguous, and for all practical purposes, should be avoided.
![]() | Represents a two-dimensional closed surface in 3D space. |
![]() | Stores the vertices of this polygon. |
![]() | The default constructor creates a null polygon. |
![]() | Returns the number of edges in this polygon. |
![]() | Returns the number of vertices in this polygon. |
![]() | Returns a pointer to an array of vertices of this polygon. |
![]() | Quickly returns an arbitrary point inside this AABB. Used in GJK intersection test. |
![]() | Returns a vertex of this polygon. |
![]() | Returns a line segment between two adjacent vertices of this polygon. |
![]() | Returns a line segment between two adjacent vertices of this polygon, in the local space of this polygon. |
![]() | Returns the normal vector of the given edge. |
![]() | Returns the normal plane of the given edge. |
![]() | Computes an extreme point of this Polygon in the given direction. |
![]() | Projects this Polygon onto the given 1D axis direction vector. |
![]() | Tests if the given diagonal exists. |
![]() | Returns the diagonal that joins the two given vertices. |
![]() | Tests if this polygon is convex. |
![]() | Tests if this polygon is planar. |
![]() | Tests if this polygon is simple. |
![]() | Tests if this polygon is null. |
![]() | Tests if this polygon is finite. |
![]() | Tests if this polygon is degenerate. |
![]() | Generates the U vector of the local space of this polygon. |
![]() | Generates the V vector of the local space of this polygon. |
![]() | Returns the given vertex of this polygon mapped to a local 2D space on this polygon. |
![]() | Given a 2D point in the local space, returns the corresponding 3D point in the global (world) space. |
![]() | Computes the normal of this polygon. |
![]() | Computes the normal of this polygon in clockwise direction. |
![]() | Computes the plane this polygon is contained in. |
![]() | Computes the plane this polygon is contained in, with a normal vector that points in the clockwise direction. |
![]() | Translates this Polygon in world space. |
![]() | Applies a transformation to this Polygon. |
![]() | Tests if the given object, expressed in global (world) space, is fully contained inside this polygon. |
![]() | Tests if the given object, expressed in the local space of this polygon, is fully contained inside this polyhedron. |
![]() | Tests whether this polygon and the given object intersect. |
![]() | Tests whether this convex polygon and the given object intersect. |
![]() | Computes the closest point on this polygon to the given object. |
![]() | Returns the distance between this polygon and the given point. |
![]() | Returns the surface area of this polygon. |
![]() | Returns the total edge length of this polygon. |
![]() | Returns the center of mass of this polygon. |
![]() | Identical to CenterPoint(), but provided to enable common signature with Triangle, AABB and OBB to allow them to be used in template classes. |
![]() | Computes a point on the perimeter of this polygon. |
![]() | Computes a random point on the perimeter of this polygon. |
![]() | |
![]() | Converts this Polygon to a Polyhedron representation. |
![]() | Triangulates this Polygon using the ear-clipping method. |
![]() | Returns the smallest AABB that encloses this polygon. |
![]() | |
![]() | |
![]() | |
![]() | |
![]() | |
![]() |