EnvironmentWithDynamics

class EnvironmentWithDynamics<T> @JvmOverloads constructor(incarnation: Incarnation<T, Euclidean2DPosition>, path: String? = null, zoom: Double = 1.0, dx: Double = 0.0, dy: Double = 0.0, obstaclesColor: Int = Color.BLACK.rgb, roomsColor: Int = Color.BLUE.rgb, backingEnvironment: Physics2DEnvironment<T> = path?.let { ImageEnvironmentWithGraph(incarnation, it, zoom, dx, dy, obstaclesColor, roomsColor) } ?: ContinuousPhysics2DEnvironment(incarnation)) : Dynamics2DEnvironment<T> , EuclideanPhysics2DEnvironmentWithObstacles<RectObstacle2D<Euclidean2DPosition>, T> (source)

This Environment uses hooks provided by Dynamics2DEnvironment to update the physical world, It also applies physical properties to any added node to perform collision detection and response. If an image path is provided a backing ImageEnvironmentWithGraph is used, otherwise the Continuous2DEnvironment will be used.

Constructors

Link copied to clipboard
constructor(incarnation: Incarnation<T, Euclidean2DPosition>, path: String? = null, zoom: Double = 1.0, dx: Double = 0.0, dy: Double = 0.0, obstaclesColor: Int = Color.BLACK.rgb, roomsColor: Int = Color.BLUE.rgb, backingEnvironment: Physics2DEnvironment<T> = path?.let { ImageEnvironmentWithGraph(incarnation, it, zoom, dx, dy, obstaclesColor, roomsColor) } ?: ContinuousPhysics2DEnvironment(incarnation))

Properties

Link copied to clipboard
open override val dimensions: Int
Link copied to clipboard
open override val globalReactions: ListSet<GlobalReaction<T>>
Link copied to clipboard
Link copied to clipboard
open override val isTerminated: Boolean
Link copied to clipboard
open override val layers: ListSet<Layer<T, Euclidean2DPosition>>
Link copied to clipboard
Link copied to clipboard
open override val nodeCount: Int
Link copied to clipboard
open override val nodes: ListSet<Node<T>>
Link copied to clipboard
Link copied to clipboard
open override val offset: DoubleArray
Link copied to clipboard
open override val origin: Euclidean2DPosition
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val size: DoubleArray
Link copied to clipboard
open override val sizeInDistanceUnits: DoubleArray

Functions

Link copied to clipboard
open override fun addGlobalReaction(reaction: GlobalReaction<T>)
Link copied to clipboard
open override fun addLayer(molecule: Molecule, layer: Layer<T, Euclidean2DPosition>)
Link copied to clipboard
open override fun addNode(node: Node<T>, position: Euclidean2DPosition): Boolean
Link copied to clipboard
open override fun addObstacle(obstacle: RectObstacle2D<Euclidean2DPosition>)
Link copied to clipboard
open override fun addTerminator(terminator: TerminationPredicate<T, Euclidean2DPosition>)
open override fun addTerminator(terminator: (Environment<T, Euclidean2DPosition>) -> Boolean)
Link copied to clipboard
open override fun farthestPositionReachable(node: Node<T>, desiredPosition: Euclidean2DPosition, hitboxRadius: Double): Euclidean2DPosition
Link copied to clipboard
open override fun getDistanceBetweenNodes(n1: Node<T>, n2: Node<T>): Double
Link copied to clipboard
open override fun getHeading(node: Node<T>): Euclidean2DPosition
Link copied to clipboard
open override fun getLayer(molecule: Molecule): Layer<T, Euclidean2DPosition>?
Link copied to clipboard
open override fun getNeighborhood(node: Node<T>): Neighborhood<T>
Link copied to clipboard
open override fun getNodeByID(id: Int): Node<T>
Link copied to clipboard
Link copied to clipboard
open override fun getNodesWithinRange(node: Node<T>, range: Double): ListSet<Node<T>>
open override fun getNodesWithinRange(position: Euclidean2DPosition, range: Double): ListSet<Node<T>>
Link copied to clipboard
Link copied to clipboard
open override fun getPosition(node: Node<T>): Euclidean2DPosition
Link copied to clipboard
Link copied to clipboard
open override fun getVelocity(node: Node<T>): Euclidean2DPosition
Link copied to clipboard
open override fun hasMobileObstacles(): Boolean
Link copied to clipboard
Link copied to clipboard
open operator override fun iterator(): Iterator<Node<T>>
Link copied to clipboard
open override fun makePosition(vararg coordinates: Number): Euclidean2DPosition
open override fun makePosition(coordinates: List<Number>): Euclidean2DPosition
open override fun makePosition(x: Double, y: Double): Euclidean2DPosition
open override fun makePosition(x: Number, y: Number): Euclidean2DPosition
Link copied to clipboard
open override fun moveNode(node: Node<T>, direction: Euclidean2DPosition)
Link copied to clipboard
open override fun moveNodeToPosition(node: Node<T>, position: Euclidean2DPosition)
Link copied to clipboard
open override fun next(current: Euclidean2DPosition, desired: Euclidean2DPosition): Euclidean2DPosition
Link copied to clipboard
open override fun removeGlobalReaction(reaction: GlobalReaction<T>)
Link copied to clipboard
open override fun removeNode(node: Node<T>)
Link copied to clipboard
Link copied to clipboard
open override fun setHeading(node: Node<T>, direction: Euclidean2DPosition)
Link copied to clipboard
open override fun setVelocity(node: Node<T>, velocity: Euclidean2DPosition)
Link copied to clipboard
open override fun updatePhysics(elapsedTime: Double)