Difference between revisions of "B2.EdgeShape.new"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
=== Description ===
 
=== Description ===
<br />
+
<translate><br />
Creates a new `b2.EdgeShape` instance and optionally sets its 2 vertices. <br />
+
Creates a new [[[b2.EdgeShape]]] instance and optionally sets its 2 vertices. <br />
If this function is called with more than 4 parameters, `b2.EdgeShape` instance<br />
+
If this function is called with more than 4 parameters, [[[b2.EdgeShape]]] instance<br />
 
is created and its 2 vertices are set. If this function is called without any <br />
 
is created and its 2 vertices are set. If this function is called without any <br />
paramaters, only `b2.EdgeShape` instance is created and you should set the 2 <br />
+
paramaters, only [[[b2.EdgeShape]]] instance is created and you should set the 2 <br />
 
vertices with [[b2.EdgeShape:set]] function. <br />
 
vertices with [[b2.EdgeShape:set]] function. <br />
<br />
+
<br /></translate>
 
<source lang="lua">
 
<source lang="lua">
 
  b2.EdgeShape.new(v1x,v1y,v2x,v2y)
 
  b2.EdgeShape.new(v1x,v1y,v2x,v2y)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''v1x''': (number, optional) - the x coordinate of 1st point of edge <br/>
+
'''v1x''': (number, optional) <translate>- the x coordinate of 1st point of edge</translate> <br/>
'''v1y''': (number, optional) - the y coordinate of 1st point of edge <br/>
+
'''v1y''': (number, optional) <translate>- the y coordinate of 1st point of edge</translate> <br/>
'''v2x''': (number, optional) - the x coordinate of 2nd point of edge <br/>
+
'''v2x''': (number, optional) <translate>- the x coordinate of 2nd point of edge</translate> <br/>
'''v2y''': (number, optional) - the y coordinate of 2nd point of edge <br/>
+
'''v2y''': (number, optional) <translate>- the y coordinate of 2nd point of edge</translate> <br/>

Revision as of 14:34, 23 August 2018

Available since: Gideros 2011.6

Description


Creates a new [[[b2.EdgeShape]]] instance and optionally sets its 2 vertices.
If this function is called with more than 4 parameters, [[[b2.EdgeShape]]] instance
is created and its 2 vertices are set. If this function is called without any
paramaters, only [[[b2.EdgeShape]]] instance is created and you should set the 2
vertices with b2.EdgeShape:set function.

 b2.EdgeShape.new(v1x,v1y,v2x,v2y)

Parameters

v1x: (number, optional) - the x coordinate of 1st point of edge
v1y: (number, optional) - the y coordinate of 1st point of edge
v2x: (number, optional) - the x coordinate of 2nd point of edge
v2y: (number, optional) - the y coordinate of 2nd point of edge