B2.PolygonShape:set: Difference between revisions

From GiderosMobile
No edit summary
m Text replacement - "<source" to "<syntaxhighlight"
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
<languages />
=== <translate>Description</translate> ===
'''Available since:''' Gideros 2011.6<br/>
<translate><br />
'''Class:''' [[Special:MyLanguage/b2.PolygonShape|b2.PolygonShape]]<br/>
Copy vertices. This assumes the vertices define a convex polygon. It is assumed that the exterior is the the right of each edge.<br />
 
<br /></translate>
=== Description ===
<source lang="lua">
Sets the vertices. This assumes the vertices define a convex polygon. It is assumed that the exterior is the the right of each edge.
b2.PolygonShape:set(vertices)
<syntaxhighlight lang="lua">
</source>
b2.PolygonShape:set(vertices)
=== <translate>Parameters</translate> ===
</syntaxhighlight>
'''vertices''': (any) <translate>A list of numbers that contains the x, y coordinates of the vertices sequentially</translate> <br/>
 
=== <translate>Examples</translate> ===
=== Parameters ===
'''Example'''<br/>
'''vertices''': (any) a list of numbers that contains the x, y coordinates of the vertices sequentially <br/>
<source lang="lua">local polygonShape = b2.PolygonShape.new()
 
polygonShape:set(1,4, 2,6, 3,7)</source>
=== Examples ===
<syntaxhighlight lang="lua">
local polygonShape = b2.PolygonShape.new()
polygonShape:set(1,4, 2,6, 3,7)
</syntaxhighlight>
 
{{B2.PolygonShape}}

Latest revision as of 16:07, 12 July 2023


Available since: Gideros 2011.6
Class: b2.PolygonShape

Description

Sets the vertices. This assumes the vertices define a convex polygon. It is assumed that the exterior is the the right of each edge.

b2.PolygonShape:set(vertices)

Parameters

vertices: (any) a list of numbers that contains the x, y coordinates of the vertices sequentially

Examples

local polygonShape = b2.PolygonShape.new()
polygonShape:set(1,4, 2,6, 3,7)




LiquidFun