Uses of Class
toxi.geom.Polygon2D
Package
Description
-
Uses of Polygon2D in toxi.geom
Modifier and TypeMethodDescriptionPolygon2D.add
(float x, float y) Adds a new vertex to the polygon (builder pattern).Adds a new vertex to the polygon (builder pattern).Polygon2D.center()
Centers the polygon around the world origin (0,0).Polygon2D.center
(ReadonlyVec2D origin) Centers the polygon so that its new centroid is at the given point.ConvexPolygonClipper.clipPolygon
(Polygon2D poly) PolygonClipper2D.clipPolygon
(Polygon2D poly) Creates a clipped version of the polygon to the boundary shape set.SutherlandHodgemanClipper.clipPolygon
(Polygon2D poly) Polygon2D.copy()
Polygon2D.flipVertexOrder()
Flips the ordering of the polygon's vertices.static Polygon2D
Polygon2D.fromBaseEdge
(Vec2D baseA, Vec2D baseB, int res) Constructs a new regular polygon from the given base line/edge.static Polygon2D
Polygon2D.fromEdgeLength
(float len, int res) Constructs a regular polygon from the given edge length and number of vertices.ConvexPolygonClipper.getBounds()
Polygon2D.increaseVertexCount
(int count) Repeatedly inserts vertices as mid points of the longest edges until the new vertex count is reached.Polygon2D.offsetShape
(float distance) Moves each line segment of the polygon in/outward perpendicular by the given distance.Polygon2D.reduceVertices
(float minEdgeLen) Reduces the number of vertices in the polygon based on the given minimum edge length.Polygon2D.removeDuplicates
(float tolerance) Removes duplicate vertices from the polygon.Polygon2D.rotate
(float theta) Polygon2D.scale
(float scale) Polygon2D.scale
(float x, float y) Polygon2D.scale
(ReadonlyVec2D scale) Polygon2D.scaleSize
(float scale) Polygon2D.scaleSize
(float x, float y) Polygon2D.scaleSize
(ReadonlyVec2D scale) Polygon2D.smooth
(float amount, float baseWeight) Applies a laplacian-style smooth operation to all polygon vertices, causing sharp corners/angles to widen and results in a general smoother shape.BezierCurve2D.toPolygon2D
(int res) Ellipse.toPolygon2D()
Ellipse.toPolygon2D
(int res) Creates aPolygon2D
instance of the ellipse sampling it at the given resolution.Polygon2D.toPolygon2D()
Only needed forShape2D
interface.Rect.toPolygon2D()
Creates aPolygon2D
instance of the rect.Rect.toPolygon2D
(float radius, int res) Turns this rectangle into a rounded rectangle shapedPolygon2D
instance with the given corner radius.Shape2D.toPolygon2D()
Converts the shape into aPolygon2D
instance (possibly via a default resolution, e.g.Triangle2D.toPolygon2D()
Creates aPolygon2D
instance of the triangle.Polygon2D.translate
(float x, float y) Polygon2D.translate
(ReadonlyVec2D offset) Modifier and TypeMethodDescriptionConvexPolygonClipper.clipPolygon
(Polygon2D poly) PolygonClipper2D.clipPolygon
(Polygon2D poly) Creates a clipped version of the polygon to the boundary shape set.SutherlandHodgemanClipper.clipPolygon
(Polygon2D poly) Constraints this vector to the perimeter of the given polygon.boolean
Polygon2D.containsPolygon
(Polygon2D poly) final Vec2D
Vec2D.getConstrained
(Polygon2D poly) boolean
Polygon2D.intersectsPolygon
(Polygon2D poly) Checks if the given polygon intersect this one by checking all edges for line intersections.void
GridTesselator.tesselatePolygon
(Polygon2D poly) Tesselates/decomposes the given polygon into a list of 2D triangles using the currently set grid resolution.PolygonTesselator.tesselatePolygon
(Polygon2D poly) Tesselates the given polygon into a set of triangles. -
Uses of Polygon2D in toxi.geom.mesh2d
-
Uses of Polygon2D in toxi.geom.nurbs
Modifier and TypeMethodDescriptionBasicNurbsCurve.toPolygon2D
(int res) NurbsCurve.toPolygon2D
(int res) -
Uses of Polygon2D in toxi.physics2d.constraints
-
Uses of Polygon2D in toxi.processing
-
Uses of Polygon2D in toxi.sim.erosion