Difference between revisions of "B2.PolygonShape:setAsBox"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
=== Description ===
 
=== Description ===
<br />
+
<translate><br />
 
Build vertices to represent an oriented box.<br />
 
Build vertices to represent an oriented box.<br />
<br />
+
<br /></translate>
 
<source lang="lua">
 
<source lang="lua">
 
  b2.PolygonShape:setAsBox(hx,hy,centerx,centery,angle)
 
  b2.PolygonShape:setAsBox(hx,hy,centerx,centery,angle)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''hx''': (number) the half-width <br/>
+
'''hx''': (number) <translate>the half-width</translate> <br/>
'''hy''': (number) the half-heigh <br/>
+
'''hy''': (number) <translate>the half-heigh</translate> <br/>
'''centerx''': (number, default = 0) the x coordinate of the center of the box in local coordinates <br/>
+
'''centerx''': (number, default = 0) <translate>the x coordinate of the center of the box in local coordinates</translate> <br/>
'''centery''': (number, default = 0) the y coordinate of the center of the box in local coordinates <br/>
+
'''centery''': (number, default = 0) <translate>the y coordinate of the center of the box in local coordinates</translate> <br/>
'''angle''': (number, default = 0) the rotation of the box in local coordinates <br/>
+
'''angle''': (number, default = 0) <translate>the rotation of the box in local coordinates</translate> <br/>

Revision as of 13:33, 23 August 2018

Available since: Gideros 2011.6

Description


Build 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