SimulationSettings

indigo.physics.SimulationSettings
See theSimulationSettings companion object
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.

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
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def withMaxDepth(value: Int): SimulationSettings
def withMinSize(value: Int): SimulationSettings

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product