Difference between revisions of "ReactPhysics3D"
From GiderosMobile
(added debug draw) |
|||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
<!-- GIDEROSOBJ:ReactPhysics3D--> | <!-- GIDEROSOBJ:ReactPhysics3D--> | ||
− | ''' | + | '''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 2019.10<br/> |
=== Description === | === Description === | ||
Line 9: | Line 9: | ||
Basically you: | Basically you: | ||
# '''create the 3d world''' => [[R3d.World.new]] | # '''create the 3d world''' => [[R3d.World.new]] | ||
+ | # '''add the 3d world DebugDraw (recommended for testing)''' => [[r3d.DebugDraw.new]] | ||
# '''create your body''' => [[R3d.World:createBody]] | # '''create your body''' => [[R3d.World:createBody]] | ||
# '''define the shape of your body''' => example: a sphere [[R3d.SphereShape.new]] | # '''define the shape of your body''' => example: a sphere [[R3d.SphereShape.new]] | ||
Line 17: | Line 18: | ||
=== Classes === | === 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"> | ||
− | [[ | + | [[r3d.Body]]<br/><!--GIDEROSOBJ:r3d.Body--> |
− | <!-- GIDEROSOBJ:r3d.Body --> | + | [[r3d.DebugDraw]]<br/><!--GIDEROSOBJ:r3d.DebugDraw--> |
− | [[ | + | [[r3d.Fixture]]<br/><!--GIDEROSOBJ:r3d.Fixture--> |
− | <!-- GIDEROSOBJ:r3d.Fixture --> | + | [[r3d.Joint]]<br/><!--GIDEROSOBJ:r3d.Joint--> |
− | [[ | + | <!--[[Special:MyLanguage/r3d.FixedJoint|r3d.FixedJoint]]<br/>--><!--GIDEROSOBJ:r3d.FixedJoint--> |
− | <!-- GIDEROSOBJ:r3d.Joint --> | + | <!--[[Special:MyLanguage/r3d.HingeJoint|r3d.HingeJoint]]<br/>--><!--GIDEROSOBJ:r3d.HingeJoint--> |
− | <!--[[Special:MyLanguage/r3d.FixedJoint|r3d.FixedJoint]]<br/>--> | + | [[r3d.Shape]]<br/><!--GIDEROSOBJ:r3d.Shape--> |
− | <!-- GIDEROSOBJ:r3d.FixedJoint --> | + | <!--[[Special:MyLanguage/r3d.BallAndSocketShape|r3d.BallAndSocketShape]]<br/>--><!--GIDEROSOBJ:r3d.BallAndSocketShape--> |
− | <!--[[Special:MyLanguage/r3d.HingeJoint|r3d.HingeJoint]]<br/>--> | + | <!--[[Special:MyLanguage/r3d.BoxShape|r3d.BoxShape]]<br/>--><!--GIDEROSOBJ:r3d.BoxShape--> |
− | <!-- GIDEROSOBJ:r3d.HingeJoint --> | + | <!--[[Special:MyLanguage/r3d.CapsuleShape|r3d.CapsuleShape]]<br/>--><!--GIDEROSOBJ:r3d.CapsuleShape--> |
− | [[ | + | <!--[[Special:MyLanguage/r3d.ConcaveMeshShape|r3d.ConcaveMeshShape]]<br/>--><!--GIDEROSOBJ:r3d.ConcaveMeshShape--> |
− | <!-- GIDEROSOBJ:r3d.Shape --> | + | <!--[[Special:MyLanguage/r3d.ConvexMeshShape|r3d.ConvexMeshShape]]<br/>--><!--GIDEROSOBJ:r3d.ConvexMeshShape--> |
− | <!--[[Special:MyLanguage/r3d.BallAndSocketShape|r3d.BallAndSocketShape]]<br/>--> | + | <!--[[Special:MyLanguage/r3d.HeightFieldShape|r3d.HeightFieldShape]]<br/>--><!--GIDEROSOBJ:r3d.HeightFieldShape--> |
− | <!-- GIDEROSOBJ:r3d.BallAndSocketShape --> | + | <!--[[Special:MyLanguage/r3d.SphereShape|r3d.SphereShape]]<br/>--><!--GIDEROSOBJ:r3d.SphereShape--> |
− | <!--[[Special:MyLanguage/r3d.BoxShape|r3d.BoxShape]]<br/>--> | + | [[r3d.World]]<br /><!--GIDEROSOBJ:r3d.World--> |
− | <!-- GIDEROSOBJ:r3d.BoxShape --> | ||
− | <!--[[Special:MyLanguage/r3d.CapsuleShape|r3d.CapsuleShape]]<br/>--> | ||
− | <!-- GIDEROSOBJ:r3d.CapsuleShape --> | ||
− | <!--[[Special:MyLanguage/r3d.ConcaveMeshShape|r3d.ConcaveMeshShape]]<br/>--> | ||
− | <!-- GIDEROSOBJ:r3d.ConcaveMeshShape --> | ||
− | <!--[[Special:MyLanguage/r3d.ConvexMeshShape|r3d.ConvexMeshShape]]<br/>--> | ||
− | <!-- GIDEROSOBJ:r3d.ConvexMeshShape --> | ||
− | <!--[[Special:MyLanguage/r3d.HeightFieldShape|r3d.HeightFieldShape]]<br/>--> | ||
− | <!-- GIDEROSOBJ:r3d.HeightFieldShape --> | ||
− | <!--[[Special:MyLanguage/r3d.SphereShape|r3d.SphereShape]]<br/>--> | ||
− | <!-- GIDEROSOBJ:r3d.SphereShape --> | ||
− | [[ | ||
− | <!-- GIDEROSOBJ:r3d.World --> | ||
</div> | </div> | ||
{{GIDEROS IMPORTANT LINKS}} | {{GIDEROS IMPORTANT LINKS}} |
Revision as of 01:58, 13 December 2020
Supported platforms:
Available since: Gideros 2019.10
Description
ReactPhysics3D is an open source 3D physics and collision engine [React Physics 3D home page].
Basically you:
- create the 3d world => R3d.World.new
- add the 3d world DebugDraw (recommended for testing) => r3d.DebugDraw.new
- create your body => R3d.World:createBody
- define the shape of your body => example: a sphere R3d.SphereShape.new
- add the fixture => R3d.Body:createFixture
- add joints (optional) => example: a fixed joint R3d.World:createFixedJoint
- HAVE FUN!
Classes