Package fr.r1r0r0.deltaengine.model
Class Dimension
java.lang.Object
fr.r1r0r0.deltaengine.model.Dimension
public final class Dimension
extends java.lang.Object
Represent the 2D dimension of an elements, a rectangle, used for the graphic size and the hit-box
-
Field Summary
Fields Modifier and Type Field Description static Dimension
DEFAULT_DIMENSION
Default dimensionprivate double
height
private static double
MAX_HEIGHT
private static double
MAX_WIDTH
private static double
MIN_HEIGHT
private static double
MIN_WIDTH
private double
width
-
Constructor Summary
Constructors Constructor Description Dimension(double width, double height)
Constructor -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
DEFAULT_DIMENSION
Default dimension -
MIN_WIDTH
private static final double MIN_WIDTH- See Also:
- Constant Field Values
-
MAX_WIDTH
private static final double MAX_WIDTH- See Also:
- Constant Field Values
-
MIN_HEIGHT
private static final double MIN_HEIGHT- See Also:
- Constant Field Values
-
MAX_HEIGHT
private static final double MAX_HEIGHT- See Also:
- Constant Field Values
-
width
private final double width -
height
private final double height
-
-
Constructor Details
-
Dimension
public Dimension(double width, double height)Constructor- Parameters:
width
- the widthheight
- the height
-
-
Method Details
-
getWidth
public double getWidth()Return the attribute width- Returns:
- the attribute width
-
getHeight
public double getHeight()Return the attribute height- Returns:
- the attribute height
-
copy
-