Difference between revisions of "B2.PolygonShape:setAsBox"

From GiderosMobile
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/>
Build vertices to represent an oriented box.<br />
+
 
<br /></translate>
+
=== Description ===
<source lang="lua">
+
Builds vertices to represent an oriented box.
b2.PolygonShape:setAsBox(hx,hy,centerx,centery,angle)
+
<syntaxhighlight lang="lua">
</source>
+
b2.PolygonShape:setAsBox(hx,hy,centerx,centery,angle)
=== <translate>Parameters</translate> ===
+
</syntaxhighlight>
'''hx''': (number) <translate>the half-width</translate> <br/>
+
 
'''hy''': (number) <translate>the half-heigh</translate> <br/>
+
=== Parameters ===
'''centerx''': (number, default = 0) <translate>the x coordinate of the center of the box in local coordinates</translate> <br/>
+
'''hx''': (number) the half-width <br/>
'''centery''': (number, default = 0) <translate>the y coordinate of the center of the box in local coordinates</translate> <br/>
+
'''hy''': (number) the half-heigh <br/>
'''angle''': (number, default = 0) <translate>the rotation of the box in local coordinates</translate> <br/>
+
'''centerx''': (number, default = 0) the x coordinate of the center of the box in local coordinates <br/>
 +
'''centery''': (number, default = 0) the y coordinate of the center of the box in local coordinates <br/>
 +
'''angle''': (number, default = 0) the rotation of the box in local coordinates <br/>
 +
 
 +
{{B2.PolygonShape}}

Latest revision as of 17:11, 12 July 2023


Available since: Gideros 2011.6
Class: b2.PolygonShape

Description

Builds vertices to represent an oriented box.

b2.PolygonShape:setAsBox(hx,hy,centerx,centery,angle)

Parameters

hx: (number) the half-width
hy: (number) the half-heigh
centerx: (number, default = 0) the x coordinate of the center of the box in local coordinates
centery: (number, default = 0) the y coordinate of the center of the box in local coordinates
angle: (number, default = 0) the rotation of the box in local coordinates




LiquidFun