Reference Codebot.Render.Scenes.Physics.pas
Part of the Codebot Render package
Each version implies all earlier versions
The Codebot.Render.Scenes.Physics unit defines TPhysicsScene, which is a widget scene that runs a Chipmunk2D space. The space is stepped at a fixed rate by the step thread of the scene host. Physics is simulated in studio coordinates, which is a fixed area of 1920 by 1080 that is scaled to fill the scene, so the simulation behaves the same at any size. The space is shared by the step and render threads and is locked while either one uses it. Bodies in the space can be dragged with the mouse.
Items 30 items
| Name | Kind | Line |
|---|---|---|
| GrabAcceleration | constant | 37 |
| PhysicsStep | constant | 34 |
| StudioHeight | constant | 32 |
| StudioWidth | constant | 31 |
| TPhysicsScene | class | 57 |
| DoMouseDown | procedure | 101 |
| DoMouseMove | procedure | 102 |
| DoMouseUp | procedure | 103 |
| DrawCustomBody | function | 83 |
| DrawCustomJoint | function | 85 |
| DrawCustomShape | function | 84 |
| DrawPhysics | procedure | 89 |
| Finalize | procedure | 96 |
| GenerateStudioWalls | procedure | 81 |
| Initialize | procedure | 95 |
| Lock | procedure | 112 |
| PointToStudio | function | 75 |
| ReleaseGrab | procedure | 110 |
| ResetSpace | procedure | 107 |
| ScaleToStudio | procedure | 77 |
| ShapeNearPoint | function | 79 |
| Simulate | procedure | 72 |
| Step | procedure | 100 |
| StepInterval | function | 98 |
| Unlock | procedure | 114 |
| GrabBodies | property | 92 |
| GrabCentered | property | 93 |
| GrabJoint | property | 91 |
| Paused | property | 116 |
| Space | property | 90 |