Package pi.graphics.geom
Record Class OrientedBoundingBox
java.lang.Object
java.lang.Record
pi.graphics.geom.OrientedBoundingBox
- Record Components:
x- Diex-Koordinate der linken unteren Ecke des Rechtecks.y- Diey-Koordinate der linken unteren Ecke des Rechtecks.width- Die Breite des Rechtecks.height- Die Höhe des Rechtecks.rotation- Der Winkel, um den das Rechteck rotiert ist. Positive Werte drehen gegen den Uhrzeigersinn.
public record OrientedBoundingBox(double x, double y, double width, double height, double rotation)
extends Record
- Since:
- 0.53.0
-
Constructor Summary
ConstructorsConstructorDescriptionOrientedBoundingBox(double x, double y, double width, double height, double rotation) Creates an instance of aOrientedBoundingBoxrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleheight()Returns the value of theheightrecord component.doublerotation()Returns the value of therotationrecord component.final StringtoString()Returns a string representation of this record class.doublewidth()Returns the value of thewidthrecord component.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.
-
Constructor Details
-
OrientedBoundingBox
public OrientedBoundingBox(double x, double y, double width, double height, double rotation) Creates an instance of aOrientedBoundingBoxrecord class.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
x
public double x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
width
public double width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public double height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
rotation
public double rotation()Returns the value of therotationrecord component.- Returns:
- the value of the
rotationrecord component
-