All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.unibo.alchemist.model.environments.Environment2DWithObstacles.kt Maven / Gradle / Ivy

There is a newer version: 35.0.3
Show newest version
/*
 * Copyright (C) 2010-2023, Danilo Pianini and contributors
 * listed, for each module, in the respective subproject's build.gradle.kts file.
 *
 * This file is part of Alchemist, and is distributed under the terms of the
 * GNU General Public License, with a linking exception,
 * as described in the file LICENSE in the Alchemist distribution's top directory.
 */

package it.unibo.alchemist.model.environments

import it.unibo.alchemist.model.EnvironmentWithObstacles
import it.unibo.alchemist.model.positions.Euclidean2DPosition

/**
 * A bidimensional [EnvironmentWithObstacles].
 */
interface Environment2DWithObstacles, T> :
    EnvironmentWithObstacles,
    Euclidean2DEnvironment {

    /**
     * Given a point and a range, retrieves all the obstacles within.
     *
     * @param center
     *              the center point
     * @param range
     *              the range to scan
     * @return the list of obstacles
     */
    fun getObstaclesInRange(center: Euclidean2DPosition, range: Double): List

    /**
     * Given a point and a range, retrieves all the obstacles within.
     *
     * @param centerx
     *              the x coordinate of the center
     * @param centery
     *              the y coordinate of the center
     * @param range
     *              the range to scan
     * @return the list of Obstacles
     */
    /*
     * Maintained in order not to break older code.
     */
    fun getObstaclesInRange(centerx: Double, centery: Double, range: Double): List

    /**
     * @return true if this environment has mobile obstacles, false if
     * the obstacles are static
     */
    fun hasMobileObstacles(): Boolean
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy