From 1c658a8b9496fc44063112a90284cf3a98f42634 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Tue, 11 Jun 2024 22:29:20 +0200 Subject: [PATCH] Add getters to Vec* The question now is... why did they not have these methods beforehand? --- .../sosengine/base/classes/Vec2.java | 14 +++++++++++++ .../sosengine/base/classes/Vec2i.java | 14 +++++++++++++ .../sosengine/base/classes/Vec3.java | 20 +++++++++++++++++++ .../sosengine/base/classes/Vec3i.java | 20 +++++++++++++++++++ 4 files changed, 68 insertions(+) diff --git a/base/src/main/java/de/staropensource/sosengine/base/classes/Vec2.java b/base/src/main/java/de/staropensource/sosengine/base/classes/Vec2.java index 5eb79667..58698eb1 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/classes/Vec2.java +++ b/base/src/main/java/de/staropensource/sosengine/base/classes/Vec2.java @@ -20,6 +20,7 @@ package de.staropensource.sosengine.base.classes; import lombok.Getter; +import lombok.Setter; /** * Represents a 2D float Vector. @@ -28,6 +29,7 @@ import lombok.Getter; */ @SuppressWarnings({ "unused", "JavadocDeclaration", "JavadocBlankLines" }) @Getter +@Setter public class Vec2 { /** * The X axis value. @@ -39,6 +41,12 @@ public class Vec2 { * * @return the X axis value * @since 1-alpha0 + * + * -- SETTER -- + * Sets the X axis value. + * + * @param x the X axis value + * @since 1-alpha0 */ private float x; @@ -52,6 +60,12 @@ public class Vec2 { * * @return the Y axis value * @since 1-alpha0 + * + * -- SETTER -- + * Sets the Y axis value. + * + * @param y the Y axis value + * @since 1-alpha0 */ private float y; diff --git a/base/src/main/java/de/staropensource/sosengine/base/classes/Vec2i.java b/base/src/main/java/de/staropensource/sosengine/base/classes/Vec2i.java index 348205ce..4d57989c 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/classes/Vec2i.java +++ b/base/src/main/java/de/staropensource/sosengine/base/classes/Vec2i.java @@ -20,6 +20,7 @@ package de.staropensource.sosengine.base.classes; import lombok.Getter; +import lombok.Setter; /** * Represents a 2D integer Vector. @@ -28,6 +29,7 @@ import lombok.Getter; */ @SuppressWarnings({ "unused", "JavadocDeclaration", "JavadocBlankLines" }) @Getter +@Setter public class Vec2i { /** * The X axis value. @@ -39,6 +41,12 @@ public class Vec2i { * * @return the X axis value * @since 1-alpha0 + * + * -- SETTER -- + * Sets the X axis value. + * + * @param x the X axis value + * @since 1-alpha0 */ private int x; @@ -52,6 +60,12 @@ public class Vec2i { * * @return the Y axis value * @since 1-alpha0 + * + * -- SETTER -- + * Sets the Y axis value. + * + * @param y the Y axis value + * @since 1-alpha0 */ private int y; diff --git a/base/src/main/java/de/staropensource/sosengine/base/classes/Vec3.java b/base/src/main/java/de/staropensource/sosengine/base/classes/Vec3.java index a91485e6..9ddfdcde 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/classes/Vec3.java +++ b/base/src/main/java/de/staropensource/sosengine/base/classes/Vec3.java @@ -20,6 +20,7 @@ package de.staropensource.sosengine.base.classes; import lombok.Getter; +import lombok.Setter; /** * Represents a 3D float Vector. @@ -28,6 +29,7 @@ import lombok.Getter; */ @SuppressWarnings({ "unused", "JavadocDeclaration", "JavadocBlankLines" }) @Getter +@Setter public class Vec3 { /** * The X axis value. @@ -39,6 +41,12 @@ public class Vec3 { * * @return the X axis value * @since 1-alpha0 + * + * -- SETTER -- + * Sets the X axis value. + * + * @param x the X axis value + * @since 1-alpha0 */ private float x; @@ -52,6 +60,12 @@ public class Vec3 { * * @return the Y axis value * @since 1-alpha0 + * + * -- SETTER -- + * Sets the Y axis value. + * + * @param y the Y axis value + * @since 1-alpha0 */ private float y; @@ -65,6 +79,12 @@ public class Vec3 { * * @return the Z axis value * @since 1-alpha0 + * + * -- SETTER -- + * Sets the Z axis value. + * + * @param z the Z axis value + * @since 1-alpha0 */ private float z; diff --git a/base/src/main/java/de/staropensource/sosengine/base/classes/Vec3i.java b/base/src/main/java/de/staropensource/sosengine/base/classes/Vec3i.java index 32e2a508..098e6b2b 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/classes/Vec3i.java +++ b/base/src/main/java/de/staropensource/sosengine/base/classes/Vec3i.java @@ -20,6 +20,7 @@ package de.staropensource.sosengine.base.classes; import lombok.Getter; +import lombok.Setter; /** * Represents a 3D integer Vector. @@ -28,6 +29,7 @@ import lombok.Getter; */ @SuppressWarnings({ "unused", "JavadocDeclaration", "JavadocBlankLines" }) @Getter +@Setter public class Vec3i { /** * The X axis value. @@ -39,6 +41,12 @@ public class Vec3i { * * @return the X axis value * @since 1-alpha0 + * + * -- SETTER -- + * Sets the X axis value. + * + * @param x the X axis value + * @since 1-alpha0 */ private int x; @@ -52,6 +60,12 @@ public class Vec3i { * * @return the Y axis value * @since 1-alpha0 + * + * -- SETTER -- + * Sets the Y axis value. + * + * @param y the Y axis value + * @since 1-alpha0 */ private int y; @@ -65,6 +79,12 @@ public class Vec3i { * * @return the Z axis value * @since 1-alpha0 + * + * -- SETTER -- + * Sets the Z axis value. + * + * @param z the Z axis value + * @since 1-alpha0 */ private int z;