Polygon class
Class for representing a planar polygon with an arbitrary amount of edges.
@author {@link https://github.com/Mugen87|Mugen87} @author {@link https://github.com/robp94|robp94}
- Implementers
Constructors
- Polygon()
Properties
Methods
-
computeCentroid(
) → Polygon - Computes the centroid for this polygon.
-
contains(
Vector3 point, [double epsilon = 1e-3]) → bool - Returns true if the polygon contains the given point.
-
convex(
[bool ccw = true]) → bool - Returns true if the polygon is convex.
-
coplanar(
[double epsilon = 1e-3]) → bool - Returns true if the polygon is coplanar.
-
distanceToPoint(
Vector3 point) → double - Computes the signed distance from the given 3D vector to this polygon. The method uses the polygon's plane abstraction in order to compute this value.
-
fromContour(
List< Vector3> points) → Polygon - Creates the polygon based on the given array of points in 3D space. The method assumes the contour (the sequence of points) is defined in CCW order.
-
getContour(
List< Vector3> result) → List<Vector3> - Determines the contour (sequence of points) of this polygon and stores the result in the given array.
-
getEdge(
int i) → HalfEdge? -
leftOn(
Vector3 a, Vector3 b, Vector3 c) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited