Difference between revisions of "LiquidFun"
From GiderosMobile
(grouping shapes and joints) |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | |||
<!-- GIDEROSOBJ:LiquidFun --> | <!-- GIDEROSOBJ:LiquidFun --> | ||
− | ''' | + | '''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> |
− | ''' | + | '''Available since:''' Gideros 2011.6<br/> |
− | === | + | === Description === |
− | LiquidFun | + | LiquidFun physics engine, is a 2D rigid-body and fluid simulation C++ engine based on '''Box2D'''. The fluid simulation was implemented by Google '''http://google.github.io/liquidfun/Programmers-Guide/html/index.html'''. |
− | === | + | To add LiquidFun physics engine to your application you call: |
+ | <syntaxhighlight lang="lua"> | ||
+ | require "liquidfun" | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | Basically you: | ||
+ | # '''create the 2d world''' => [[B2.World.new]] | ||
+ | # '''debug drawing (recommanded for testing)''' => [[B2.DebugDraw]] | ||
+ | # '''create your body''' => [[B2.World]] | ||
+ | # '''define the shape of your body''' => example: a sphere [[B2.CircleShape]] | ||
+ | # '''add the fixture''' => [[B2.Body:createFixture]]''' | ||
+ | # '''add joints (optional)''' => [[B2.World:createJoint]] | ||
+ | # ''' HAVE FUN! ''' | ||
+ | |||
+ | === Classes === | ||
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> | <div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> | ||
− | [[ | + | [[b2]] '''(Joint defs, ...)'''<br/> |
− | [[ | + | [[b2.Body]]<br/> |
− | <!--[[ | + | <!--[[b2.ChainShape]]<br/>--> |
− | <!--[[ | + | <!--[[b2.CircleShape]]<br/>--> |
− | [[ | + | [[b2.Contact]]<br/> |
− | [[ | + | [[b2.DebugDraw]]<br/> |
− | <!--[[ | + | <!--[[b2.DistanceJoint]]<br/>--> |
− | <!--[[ | + | <!--[[b2.EdgeShape]]<br/>--> |
− | [[ | + | [[b2.Fixture]]<br/> |
− | <!--[[ | + | <!--[[b2.FrictionJoint]]<br/>--> |
− | <!--[[ | + | <!--[[b2.GearJoint]]<br/>--> |
− | [[ | + | [[b2.Joint]]<br/> |
− | [[ | + | [[b2.Manifold]]<br/> |
− | <!--[[ | + | <!--[[b2.MouseJoint]]<br/>--> |
− | [[ | + | [[b2.ParticleSystem]]<br/> |
− | <!--[[ | + | <!--[[b2.PolygonShape]]<br/>--> |
− | <!--[[ | + | <!--[[b2.PrismaticJoint]]<br/>--> |
− | <!--[[ | + | <!--[[b2.PulleyJoint]]<br/>--> |
− | <!--[[ | + | <!--[[b2.RevoluteJoint]]<br/>--> |
− | <!--[[ | + | <!--[[b2.RopeJoint]]<br/>--> |
− | [[ | + | [[b2.Shape]]<br/> |
− | <!--[[ | + | <!--[[b2.WeldJoint]]<br/>--> |
− | <!--[[ | + | <!--[[b2.WheelJoint]]<br/>--> |
− | [[ | + | [[b2.World]]<br/> |
− | [[ | + | [[b2.WorldManifold]]<br/> |
</div> | </div> | ||
{{GIDEROS IMPORTANT LINKS}} | {{GIDEROS IMPORTANT LINKS}} |
Latest revision as of 14:30, 13 July 2023
Supported platforms:
Available since: Gideros 2011.6
Description
LiquidFun physics engine, is a 2D rigid-body and fluid simulation C++ engine based on Box2D. The fluid simulation was implemented by Google http://google.github.io/liquidfun/Programmers-Guide/html/index.html.
To add LiquidFun physics engine to your application you call:
require "liquidfun"
Basically you:
- create the 2d world => B2.World.new
- debug drawing (recommanded for testing) => B2.DebugDraw
- create your body => B2.World
- define the shape of your body => example: a sphere B2.CircleShape
- add the fixture => B2.Body:createFixture
- add joints (optional) => B2.World:createJoint
- HAVE FUN!
Classes
b2 (Joint defs, ...)
b2.Body
b2.Contact
b2.DebugDraw
b2.Fixture
b2.Joint
b2.Manifold
b2.ParticleSystem
b2.Shape
b2.World
b2.WorldManifold