PolygonShape

Shape
public sealed class PolygonShape : Shape
Represents an n-gon for ray intersections. Shape may have concave portions, although self-intersections are ill-advised.

Constructors

PolygonShape

#
public PolygonShape(IEnumerable<double> x, IEnumerable<double> y)
Create a new n-gon.
x (IEnumerable<double>)
y (IEnumerable<double>)

PolygonShape

#
public PolygonShape(params Point2d[] corners)
Create a new n-gon.
corners (params Point2d[])

PolygonShape

#
public PolygonShape(params Point3d[] corners)
Create a new n-gon.
corners (params Point3d[])

PolygonShape

#
public PolygonShape(params PointF[] corners)
Create a new n-gon.
corners (params PointF[])

Properties

Bounds

#
public override Box Bounds { get; }
Gets the bounding box for this shape.
Shape.Bounds

Count

#
public int Count { get; }
Gets the number of corners.

IsEmpty

#
public bool IsEmpty { get; }
Gets whether this polygon is considered empty (i.e. zero area).

Methods

Corner

#
public Point2d Corner(int index)
Gets the corner at the specified index.
index (int)

IsCoincident

#
public override bool IsCoincident(double x, double y)
Test whether a specific coordinate is coincident with this obstacle.
x (double)
y (double)
True if point is coincident.

Overlap

#
public override Overlap Overlap(Box box)
Determine the overlap between this shape and a box.
box (Box)Box.
Overlap topology.
Shape.Overlap