Difference between revisions of "love.math.triangulate"

m
m
Line 12: Line 12:
 
== See Also ==
 
== See Also ==
 
* [[parent::love.math]]
 
* [[parent::love.math]]
 +
* [[love.graphics.polygon]]
 +
* [[love.physics.newPolygonShape]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Triangulate a simple polygon.}}
 
{{#set:Description=Triangulate a simple polygon.}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.math.triangulate}}
 
{{i18n|love.math.triangulate}}

Revision as of 03:58, 31 August 2013

Available since LÖVE 0.9.0
This function is not supported in earlier versions.

Triangulate a simple polygon.

Function

Synopsis

triangles = love.math.triangulate( polygon )

Arguments

table polygon
Polygon to triangulate. Must not intersect itself.

Returns

table triangles
List of triangles the polygon is composed of, in the form of {{x1, y1, x2, y2, x3, y3}, {x1, y1, x2, y2, x3, y3}, ...}.

See Also

Other Languages