Difference between revisions of "B2.DebugDraw:setFlags"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
'''<translate>Available since</translate>:''' Gideros 2011.6<br/> | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> | ||
+ | '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.DebugDraw|b2.DebugDraw]]<br/> | ||
=== <translate>Description</translate> === | === <translate>Description</translate> === | ||
<translate><br /> | <translate><br /> | ||
Line 6: | Line 7: | ||
<br /> | <br /> | ||
<ul><br /> | <ul><br /> | ||
− | <li> | + | <li>`b2.DebugDraw.SHAPE_BIT`</li><br /> |
− | <li> | + | <li>`b2.DebugDraw.JOINT_BIT`</li><br /> |
− | <li> | + | <li>`b2.DebugDraw.AABB_BIT`</li><br /> |
− | <li> | + | <li>`b2.DebugDraw.PAIR_BIT`</li><br /> |
− | <li> | + | <li>`b2.DebugDraw.CENTER_OF_MASS_BIT`</li><br /> |
</ul><br /> | </ul><br /> | ||
<br /> | <br /> | ||
− | + | `b2.DebugDraw.SHAPE_BIT` is set by default. <br /> | |
<br /> | <br /> | ||
− | Because Lua doesn't support bitwise operations by default, you can use | + | Because Lua doesn't support bitwise operations by default, you can use ` ` operator to combine flags.<br /> |
<br /></translate> | <br /></translate> | ||
<source lang="lua"> | <source lang="lua"> |
Revision as of 09:30, 24 August 2018
Available since: Gideros 2011.6
Class: b2.DebugDraw
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)