Class RectangularArea
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.NodeProperty
,it.unibo.alchemist.model.physics.properties.OccupiesSpaceProperty
,java.io.Serializable
public final class RectangularArea<T extends Object> extends AbstractNodeProperty<T> implements OccupiesSpaceProperty<T, Euclidean2DPosition, Euclidean2DTransformation>
The node occupies a rectangular width x height area.
-
-
Field Summary
Fields Modifier and Type Field Description private final Shape<Euclidean2DPosition, Euclidean2DTransformation>
shape
private final Physics2DEnvironment<T>
environment
private final Node<T>
node
private final Double
width
private final Double
height
-
Constructor Summary
Constructors Constructor Description RectangularArea(Physics2DEnvironment<T> environment, Node<T> node, Double width, Double height)
-
Method Summary
Modifier and Type Method Description Shape<Euclidean2DPosition, Euclidean2DTransformation>
getShape()
The node's shape. final Physics2DEnvironment<T>
getEnvironment()
The environment in which node is moving. Node<T>
getNode()
final Double
getWidth()
The rectangle width. final Double
getHeight()
The rectangle height. RectangularArea<T>
cloneOnNewNode(Node<T> node)
String
toString()
-
-
Method Detail
-
getShape
Shape<Euclidean2DPosition, Euclidean2DTransformation> getShape()
The node's shape.
-
getEnvironment
final Physics2DEnvironment<T> getEnvironment()
The environment in which node is moving.
-
cloneOnNewNode
RectangularArea<T> cloneOnNewNode(Node<T> node)
-
-
-
-