Environment With Dynamics
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>
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
Returns a random element of the Iterable using the provided randomGenerator.
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
fun <T, P : Position<out P>> Environment<T, P>.subscriptionMonitor(): EnvironmentSubscriptionMonitor<T, P>
Returns the EnvironmentSubscriptionMonitor of this Environment.
Link copied to clipboard
fun <T, P : Position<out P>> Environment<T, P>.toGraphQLEnvironmentSurrogate(): EnvironmentSurrogate<T, P>
Converts an Environment to a EnvironmentSurrogate.
Link copied to clipboard