Interface Euclidean2DShapeFactory
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.geometry.GeometricShapeFactory
,java.io.Serializable
public interface Euclidean2DShapeFactory implements GeometricShapeFactory<Euclidean2DPosition, Euclidean2DTransformation>
Defines a factory of Shape for a bidimensional euclidean space.
-
-
Method Summary
Modifier and Type Method Description abstract Shape<Euclidean2DPosition, Euclidean2DTransformation>
circle(Double radius)
A circle extends in the first and second axis by its diameter. abstract Shape<Euclidean2DPosition, Euclidean2DTransformation>
rectangle(Double width, Double height)
A rectangle extends in the first and second axis by its width and height. abstract Shape<Euclidean2DPosition, Euclidean2DTransformation>
circleSector(Double radius, Double angle, Double heading)
A circle sector is the portion of a disk enclosed by two radii and an arc and it extends in the first and second axis by its radius and angle. abstract Shape<Euclidean2DPosition, Euclidean2DTransformation>
ellipse(Double width, Double height)
An ellipse extends in the first and second axis by its width and height. -
-
Method Detail
-
circle
abstract Shape<Euclidean2DPosition, Euclidean2DTransformation> circle(Double radius)
A circle extends in the first and second axis by its diameter.
- Parameters:
radius
- the radius- Returns:
the shape
-
rectangle
abstract Shape<Euclidean2DPosition, Euclidean2DTransformation> rectangle(Double width, Double height)
A rectangle extends in the first and second axis by its width and height.
- Parameters:
width
- the widthheight
- the height- Returns:
the shape
-
circleSector
abstract Shape<Euclidean2DPosition, Euclidean2DTransformation> circleSector(Double radius, Double angle, Double heading)
A circle sector is the portion of a disk enclosed by two radii and an arc and it extends in the first and second axis by its radius and angle.
- Parameters:
radius
- the radius of the circle from which the sector is extractedangle
- the angle of the arc in radians, it determines its dimension in the second axisheading
- the angle in radians of the median segment which bisects the sector.- Returns:
the shape
-
ellipse
abstract Shape<Euclidean2DPosition, Euclidean2DTransformation> ellipse(Double width, Double height)
An ellipse extends in the first and second axis by its width and height.
- Parameters:
width
- the widthheight
- the height- Returns:
the shape
-
-
-
-