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))
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun farthestPositionReachable(node: Node<T>, desiredPosition: Euclidean2DPosition, hitboxRadius: Double): Euclidean2DPosition
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun getNodesWithin(shape: Shape<Euclidean2DPosition, Euclidean2DTransformation>): List<Node<T>>
Link copied to clipboard
Link copied to clipboard
open override fun getObstaclesInRange(center: Euclidean2DPosition, range: Double): List<RectObstacle2D<Euclidean2DPosition>>
open override fun getObstaclesInRange(centerx: Double, centery: Double, range: Double): List<RectObstacle2D<Euclidean2DPosition>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Nonnull
Link copied to clipboard
open override fun next(current: Euclidean2DPosition, desired: Euclidean2DPosition): Euclidean2DPosition
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard