ShapeUtils class

A class containing utility functions for shapes.

Note that these are all linear functions so it is necessary to calculate separately for x, y (and z, w if present) components of a vector.

Constructors

ShapeUtils()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Static Methods

addContour(List<num> vertices, List<Vector?> contour) → void
area(List<Vector?> contour) double
contour -- 2D polygon. An array of Vector2()
isClockWise(List<Vector?> pts) bool
pts -- points defining a 2D polygon
removeDupEndPts(dynamic points) → void
triangulateShape(List<Vector?> contour, List<List<Vector?>> holes) List<List<num>>
contour -- 2D polygon. An array of Vector2.