Difference between revisions of "B2.DebugDraw:setFlags"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
=== Description ===
 
=== Description ===
<br />
+
<translate><br />
 
Sets the debug drawing flags. These flags are available:<br />
 
Sets the debug drawing flags. These flags are available:<br />
 
<br />
 
<br />
 
&lt;ul&gt;<br />
 
&lt;ul&gt;<br />
&lt;li&gt;`b2.DebugDraw.SHAPE_BIT`&lt;/li&gt;<br />
+
&lt;li&gt;[[[b2.DebugDraw.SHAPE_BIT]]]&lt;/li&gt;<br />
&lt;li&gt;`b2.DebugDraw.JOINT_BIT`&lt;/li&gt;<br />
+
&lt;li&gt;[[[b2.DebugDraw.JOINT_BIT]]]&lt;/li&gt;<br />
&lt;li&gt;`b2.DebugDraw.AABB_BIT`&lt;/li&gt;<br />
+
&lt;li&gt;[[[b2.DebugDraw.AABB_BIT]]]&lt;/li&gt;<br />
&lt;li&gt;`b2.DebugDraw.PAIR_BIT`&lt;/li&gt;<br />
+
&lt;li&gt;[[[b2.DebugDraw.PAIR_BIT]]]&lt;/li&gt;<br />
&lt;li&gt;`b2.DebugDraw.CENTER_OF_MASS_BIT`&lt;/li&gt;<br />
+
&lt;li&gt;[[[b2.DebugDraw.CENTER_OF_MASS_BIT]]]&lt;/li&gt;<br />
 
&lt;/ul&gt;<br />
 
&lt;/ul&gt;<br />
 
<br />
 
<br />
`b2.DebugDraw.SHAPE_BIT` is set by default. <br />
+
[[[b2.DebugDraw.SHAPE_BIT]]] is set by default. <br />
<br />
 
Because Lua doesn&#039;t support bitwise operations by default, you can use ` ` operator to combine flags.<br />
 
 
<br />
 
<br />
 +
Because Lua doesn&#039;t support bitwise operations by default, you can use [[[ ]]] operator to combine flags.<br />
 +
<br /></translate>
 
<source lang="lua">
 
<source lang="lua">
 
  b2.DebugDraw:setFlags(flags)
 
  b2.DebugDraw:setFlags(flags)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''flags''': (number) debug draw flags <br/>
+
'''flags''': (number) <translate>debug draw flags</translate> <br/>
 
=== Examples ===
 
=== Examples ===
 
'''Example'''<br/>
 
'''Example'''<br/>
<source lang="lua">local debugDraw = b2.DebugDraw.new()<br />
+
<source lang="lua">local debugDraw = b2.DebugDraw.new()
debugDraw:setFlags(b2.DebugDraw.SHAPE_BIT  b2.DebugDraw.JOINT_BIT)<br /></source>
+
debugDraw:setFlags(b2.DebugDraw.SHAPE_BIT  b2.DebugDraw.JOINT_BIT)</source>

Revision as of 13:34, 23 August 2018

Available since: Gideros 2011.6

Description


Sets the debug drawing flags. These flags are available:

<ul>
<li>[[[b2.DebugDraw.SHAPE_BIT]]]</li>
<li>[[[b2.DebugDraw.JOINT_BIT]]]</li>
<li>[[[b2.DebugDraw.AABB_BIT]]]</li>
<li>[[[b2.DebugDraw.PAIR_BIT]]]</li>
<li>[[[b2.DebugDraw.CENTER_OF_MASS_BIT]]]</li>
</ul>

[[[b2.DebugDraw.SHAPE_BIT]]] is set by default.

Because Lua doesn't support bitwise operations by default, you can use [[[ ]]] operator to combine flags.

 b2.DebugDraw:setFlags(flags)

Parameters

flags: (number) debug draw flags

Examples

Example

local debugDraw = b2.DebugDraw.new()
debugDraw:setFlags(b2.DebugDraw.SHAPE_BIT   b2.DebugDraw.JOINT_BIT)