Package-level declarations

Types

Link copied to clipboard
abstract class EntityCollision(val platform: RattlePlatform, val physics: PhysicsSpace, val settings: EntityCollision.Settings) : Destroyable
Link copied to clipboard
abstract class SimpleBodies(platform: RattlePlatform, physics: PhysicsSpace, val settings: SimpleBodies.Settings = Settings()) : Destroyable
Link copied to clipboard
data class SimpleBodyDesc(val type: RigidBodyType, val geom: SimpleGeometry, val material: PhysicsMaterial, val mass: Collider.Mass = Collider.Mass.Density(1.0), val visibility: Visibility = Visibility.VISIBLE, val isCcdEnabled: Boolean = false, val linearVelocity: DVec3 = DVec3.zero, val angularVelocity: DVec3 = DVec3.zero, val gravityScale: Double = 1.0, val linearDamping: Double = DEFAULT_LINEAR_DAMPING, val angularDamping: Double = DEFAULT_ANGULAR_DAMPING)
Link copied to clipboard
interface SimpleGeometry

A subset of Geometry that a SimpleBodies can support. Since the simple-bodies engine also handles showing bodies to players, we can't display all shapes. This is the subset that we can support.

Link copied to clipboard
abstract class TerrainCollision(platform: RattlePlatform, physics: PhysicsSpace, val settings: TerrainCollision.Settings = Settings()) : Destroyable
Link copied to clipboard
Link copied to clipboard
abstract class WorldPhysics(val physics: PhysicsSpace, val terrain: TerrainCollision?, val entities: EntityCollision?, val simpleBodies: SimpleBodies) : Destroyable

WorldPhysics as an object stores a lot of state that must be safely accessed by callers. This is implemented not on WorldPhysics itself, but by wrapping classes and methods that return a WorldPhysics object (by e.g. returning a Synchronized of WorldPhysics, requiring callers to lock the object before use).

Properties

Link copied to clipboard
Link copied to clipboard
const val TILES_IN_SLICE: Int

Functions

Link copied to clipboard
fun posInChunk(i: Int): IVec3