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 new file mode 100644 index 0000000..5eb7966 --- /dev/null +++ b/base/src/main/java/de/staropensource/sosengine/base/classes/Vec2.java @@ -0,0 +1,69 @@ +/* + * STAROPENSOURCE ENGINE SOURCE FILE + * Copyright (c) 2024 The StarOpenSource Engine Contributors + * Licensed under the GNU Affero General Public License v3 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.staropensource.sosengine.base.classes; + +import lombok.Getter; + +/** + * Represents a 2D float Vector. + * + * @since 1-alpha0 + */ +@SuppressWarnings({ "unused", "JavadocDeclaration", "JavadocBlankLines" }) +@Getter +public class Vec2 { + /** + * The X axis value. + * + * @since 1-alpha0 + * + * -- GETTER -- + * Returns the X axis value. + * + * @return the X axis value + * @since 1-alpha0 + */ + private float x; + + /** + * The Y axis value. + * + * @since 1-alpha0 + * + * -- GETTER -- + * Returns the Y axis value. + * + * @return the Y axis value + * @since 1-alpha0 + */ + private float y; + + /** + * Constructor. + * + * @param x the X axis value + * @param y the Y axis value + * @since 1-alpha0 + */ + public Vec2(float x, float y) { + this.x = x; + this.y = 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 new file mode 100644 index 0000000..348205c --- /dev/null +++ b/base/src/main/java/de/staropensource/sosengine/base/classes/Vec2i.java @@ -0,0 +1,69 @@ +/* + * STAROPENSOURCE ENGINE SOURCE FILE + * Copyright (c) 2024 The StarOpenSource Engine Contributors + * Licensed under the GNU Affero General Public License v3 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.staropensource.sosengine.base.classes; + +import lombok.Getter; + +/** + * Represents a 2D integer Vector. + * + * @since 1-alpha0 + */ +@SuppressWarnings({ "unused", "JavadocDeclaration", "JavadocBlankLines" }) +@Getter +public class Vec2i { + /** + * The X axis value. + * + * @since 1-alpha0 + * + * -- GETTER -- + * Returns the X axis value. + * + * @return the X axis value + * @since 1-alpha0 + */ + private int x; + + /** + * The Y axis value. + * + * @since 1-alpha0 + * + * -- GETTER -- + * Returns the Y axis value. + * + * @return the Y axis value + * @since 1-alpha0 + */ + private int y; + + /** + * Constructor. + * + * @param x the X axis value + * @param y the Y axis value + * @since 1-alpha0 + */ + public Vec2i(int x, int y) { + this.x = x; + this.y = 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 new file mode 100644 index 0000000..a91485e --- /dev/null +++ b/base/src/main/java/de/staropensource/sosengine/base/classes/Vec3.java @@ -0,0 +1,84 @@ +/* + * STAROPENSOURCE ENGINE SOURCE FILE + * Copyright (c) 2024 The StarOpenSource Engine Contributors + * Licensed under the GNU Affero General Public License v3 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.staropensource.sosengine.base.classes; + +import lombok.Getter; + +/** + * Represents a 3D float Vector. + * + * @since 1-alpha0 + */ +@SuppressWarnings({ "unused", "JavadocDeclaration", "JavadocBlankLines" }) +@Getter +public class Vec3 { + /** + * The X axis value. + * + * @since 1-alpha0 + * + * -- GETTER -- + * Returns the X axis value. + * + * @return the X axis value + * @since 1-alpha0 + */ + private float x; + + /** + * The Y axis value. + * + * @since 1-alpha0 + * + * -- GETTER -- + * Returns the Y axis value. + * + * @return the Y axis value + * @since 1-alpha0 + */ + private float y; + + /** + * The Z axis value. + * + * @since 1-alpha0 + * + * -- GETTER -- + * Returns the Z axis value. + * + * @return the Z axis value + * @since 1-alpha0 + */ + private float z; + + /** + * Constructor. + * + * @param x the X axis value + * @param y the Y axis value + * @param z the Z axis value + * @since 1-alpha0 + */ + public Vec3(float x, float y, float z) { + this.x = x; + this.y = y; + this.z = 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 new file mode 100644 index 0000000..32e2a50 --- /dev/null +++ b/base/src/main/java/de/staropensource/sosengine/base/classes/Vec3i.java @@ -0,0 +1,84 @@ +/* + * STAROPENSOURCE ENGINE SOURCE FILE + * Copyright (c) 2024 The StarOpenSource Engine Contributors + * Licensed under the GNU Affero General Public License v3 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.staropensource.sosengine.base.classes; + +import lombok.Getter; + +/** + * Represents a 3D integer Vector. + * + * @since 1-alpha0 + */ +@SuppressWarnings({ "unused", "JavadocDeclaration", "JavadocBlankLines" }) +@Getter +public class Vec3i { + /** + * The X axis value. + * + * @since 1-alpha0 + * + * -- GETTER -- + * Returns the X axis value. + * + * @return the X axis value + * @since 1-alpha0 + */ + private int x; + + /** + * The Y axis value. + * + * @since 1-alpha0 + * + * -- GETTER -- + * Returns the Y axis value. + * + * @return the Y axis value + * @since 1-alpha0 + */ + private int y; + + /** + * The Z axis value. + * + * @since 1-alpha0 + * + * -- GETTER -- + * Returns the Z axis value. + * + * @return the Z axis value + * @since 1-alpha0 + */ + private int z; + + /** + * Constructor. + * + * @param x the X axis value + * @param y the Y axis value + * @param z the Z axis value + * @since 1-alpha0 + */ + public Vec3i(int x, int y, int z) { + this.x = x; + this.y = y; + this.z = z; + } +}