Quad2 class

A 2D quadrilateral.

Constructors

Quad2.new(Vector2 point0, Vector2 point1, Vector2 point2, Vector2 point3)
Creates a Quad2 from the given points.
Quad2.fromSize(Size size)
Creates a Quad2 from a given size. The top-left corner is at (0, 0).

Properties

area double
Computes the signed area of this Quad2 using the shoelace formula.
no setter
boundingBox Aabb2
Returns the bounding box of this Quad2.
no setter
hashCode int
The hash code for this object.
no setterinherited
lineSegments List<LineSegment2>
no setter
path Path
Returns a Path representing this Quad2.
no setter
point0 Vector2
final
point1 Vector2
final
point2 Vector2
final
point3 Vector2
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tri1 Triangle
no setter
tri2 Triangle
no setter
vertices List<Vector2>
Returns a list of the vertices of this Quad2.
no setter

Methods

containsPoint(Vector2 point) bool
Whether this Quad2 contains the given point.
intersectsWithLineSegment(LineSegment2 lineSegment) Vector2?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
transform(Matrix4 t) Quad2
Transforms this Quad2 by the given transformation matrix.

Operators

operator ==(Object other) bool
The equality operator.
inherited