indigo.physics

package indigo.physics

Members list

Type members

Classlikes

enum Collider[A]

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class Circle[A]
class Box[A]
object Collider

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Collider.type
final case class Displacement(amount: Double, normal: Vector2, contact: LineSegment, massA: Mass, massB: Option[Mass])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Displacement

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
object Friction

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Friction.type
object Mass

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Mass.type
object Physics

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Physics.type
object Resistance

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Resistance.type
object Restitution

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
final case class SimulationSettings(bounds: BoundingBox, idealCount: Int, minSize: Double, maxDepth: Int, maxIterations: Int)

SimulationSettings are used to tune the Physics simulation so that it is working at the right scale for your use case, minimising expensive comparisons and allowing suitable culling to occur.

SimulationSettings are used to tune the Physics simulation so that it is working at the right scale for your use case, minimising expensive comparisons and allowing suitable culling to occur.

Value parameters

bounds

The area of the simulation, anything that goes beyond is assumed to have 'escaped' and is culled / ignored.

idealCount

The number of fine grain object comparisons you'd prefer to make at most. Actually comparisons make exceed this number. Defaults to 16.

maxDepth

The maximum depth the spatial tree should go to. Defaults to 16.

maxIterations

The maximum number of solver iterations to perform. Fewer iterations improves performance at the cost of accuracy. Defaults to 4.

minSize

The smallest sensible area to store objects against. As a guide: There is probably little point having a minSize much smaller than your smallest collider. Defaults to 1.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class World[A](colliders: Batch[Collider[A]], forces: Batch[Vector2], resistance: Resistance, settings: SimulationSettings)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object World

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
World.type

Types

opaque type Friction
opaque type Mass
opaque type Resistance

Resistance is the general resistance to movement in the atmosphere, be that wind resistance or water resistance.

Resistance is the general resistance to movement in the atmosphere, be that wind resistance or water resistance.

Attributes

opaque type Restitution