Difference between revisions of "B2.EdgeShape.new"

From GiderosMobile
m (Text replacement - "</source" to "</syntaxhighlight")
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
 
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
'''Class:''' [[Special:MyLanguage/b2.EdgeShape|b2.EdgeShape]]<br/>
+
'''Class:''' [[b2.EdgeShape]]<br/>
  
 
=== Description ===
 
=== Description ===
Creates a new [[Special:MyLanguage/b2.EdgeShape|b2.EdgeShape]] instance and optionally sets its 2 vertices.
+
Creates a new '''b2.EdgeShape''' instance and optionally sets its 2 vertices.
 +
<syntaxhighlight lang="lua">
 +
b2.EdgeShape.new(v1x,v1y,v2x,v2y)
 +
</syntaxhighlight>
  
If this function is called with more than 4 parameters, [[Special:MyLanguage/b2.EdgeShape|b2.EdgeShape]] instance is created and its 2 vertices are set. If this function is called without any paramaters, only [[Special:MyLanguage/b2.EdgeShape|b2.EdgeShape]] instance is created and you should set the 2 vertices with [[b2.EdgeShape:set]] function.
+
If this function is called with more than 4 parameters, '''b2.EdgeShape''' instance is created and its 2 vertices are set.
<source lang="lua">
+
 
b2.EdgeShape.new(v1x,v1y,v2x,v2y)
+
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.
</source>
 
  
 
=== Parameters ===
 
=== Parameters ===
'''v1x''': (number, optional) - the x coordinate of 1st point of edge <br/>
+
'''v1x''': (number, optional) - the x coordinate of 1st point of edge<br/>
'''v1y''': (number, optional) - the y coordinate of 1st point of edge <br/>
+
'''v1y''': (number, optional) - the y coordinate of 1st point of edge<br/>
'''v2x''': (number, optional) - the x coordinate of 2nd point of edge <br/>
+
'''v2x''': (number, optional) - the x coordinate of 2nd point of edge<br/>
'''v2y''': (number, optional) - the y coordinate of 2nd point of edge <br/>
+
'''v2y''': (number, optional) - the y coordinate of 2nd point of edge<br/>
  
 
{{B2.EdgeShape}}
 
{{B2.EdgeShape}}

Latest revision as of 17:15, 12 July 2023

Available since: Gideros 2011.6
Class: b2.EdgeShape

Description

Creates a new b2.EdgeShape instance and optionally sets its 2 vertices.

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

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.

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




LiquidFun