Moves SimpleVectorOperation to its own class
All checks were successful
EpicKnarvik97/Stargate/pipeline/head This commit looks good
All checks were successful
EpicKnarvik97/Stargate/pipeline/head This commit looks good
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
package net.knarcraft.stargate.portal;
|
package net.knarcraft.stargate.portal;
|
||||||
|
|
||||||
import net.knarcraft.stargate.SimpleVectorOperation;
|
import net.knarcraft.stargate.transformation.SimpleVectorOperation;
|
||||||
import net.knarcraft.stargate.container.BlockLocation;
|
import net.knarcraft.stargate.container.BlockLocation;
|
||||||
import net.knarcraft.stargate.container.RelativeBlockVector;
|
import net.knarcraft.stargate.container.RelativeBlockVector;
|
||||||
import net.knarcraft.stargate.portal.property.PortalLocation;
|
import net.knarcraft.stargate.portal.property.PortalLocation;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
package net.knarcraft.stargate;
|
package net.knarcraft.stargate.transformation;
|
||||||
|
|
||||||
import org.bukkit.Axis;
|
import org.bukkit.Axis;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
@@ -32,7 +32,7 @@ public class SimpleVectorOperation {
|
|||||||
*
|
*
|
||||||
* @param signFace <p>The sign face of a gate's sign</p>
|
* @param signFace <p>The sign face of a gate's sign</p>
|
||||||
*/
|
*/
|
||||||
public SimpleVectorOperation(BlockFace signFace) {
|
public SimpleVectorOperation(@NotNull BlockFace signFace) {
|
||||||
if (normalAxes.isEmpty()) {
|
if (normalAxes.isEmpty()) {
|
||||||
initializeIrisNormalAxes();
|
initializeIrisNormalAxes();
|
||||||
initializeOperations();
|
initializeOperations();
|
||||||
@@ -47,6 +47,7 @@ public class SimpleVectorOperation {
|
|||||||
*
|
*
|
||||||
* @return <p>The block face of a sign given upon instantiation</p>
|
* @return <p>The block face of a sign given upon instantiation</p>
|
||||||
*/
|
*/
|
||||||
|
@NotNull
|
||||||
public BlockFace getFacing() {
|
public BlockFace getFacing() {
|
||||||
return facing;
|
return facing;
|
||||||
}
|
}
|
||||||
@@ -58,6 +59,7 @@ public class SimpleVectorOperation {
|
|||||||
*
|
*
|
||||||
* @return <p>The normal axis orthogonal to the opening plane</p>
|
* @return <p>The normal axis orthogonal to the opening plane</p>
|
||||||
*/
|
*/
|
||||||
|
@NotNull
|
||||||
public Axis getNormalAxis() {
|
public Axis getNormalAxis() {
|
||||||
return normalAxis;
|
return normalAxis;
|
||||||
}
|
}
|
||||||
@@ -77,6 +79,7 @@ public class SimpleVectorOperation {
|
|||||||
* @param vector <p>The vector to perform the operation on</p>
|
* @param vector <p>The vector to perform the operation on</p>
|
||||||
* @return vector <p>A new vector with the operation applied</p>
|
* @return vector <p>A new vector with the operation applied</p>
|
||||||
*/
|
*/
|
||||||
|
@NotNull
|
||||||
public Vector performToAbstractSpaceOperation(@NotNull Vector vector) {
|
public Vector performToAbstractSpaceOperation(@NotNull Vector vector) {
|
||||||
Vector clone = vector.clone();
|
Vector clone = vector.clone();
|
||||||
clone.rotateAroundAxis(rotationAxes.get(facing), rotationAngles.get(facing));
|
clone.rotateAroundAxis(rotationAxes.get(facing), rotationAngles.get(facing));
|
||||||
@@ -92,6 +95,7 @@ public class SimpleVectorOperation {
|
|||||||
* @param vector <p>The vector to perform the inverse operation on</p>
|
* @param vector <p>The vector to perform the inverse operation on</p>
|
||||||
* @return vector <p>A new vector with the operation applied</p>
|
* @return vector <p>A new vector with the operation applied</p>
|
||||||
*/
|
*/
|
||||||
|
@NotNull
|
||||||
public Vector performToRealSpaceOperation(@NotNull Vector vector) {
|
public Vector performToRealSpaceOperation(@NotNull Vector vector) {
|
||||||
Vector clone = vector.clone();
|
Vector clone = vector.clone();
|
||||||
if (flipZAxis) {
|
if (flipZAxis) {
|
||||||
@@ -106,6 +110,7 @@ public class SimpleVectorOperation {
|
|||||||
* @param vector <p>The vector to perform the inverse operation on</p>
|
* @param vector <p>The vector to perform the inverse operation on</p>
|
||||||
* @return vector <p>A new vector with the operation applied</p>
|
* @return vector <p>A new vector with the operation applied</p>
|
||||||
*/
|
*/
|
||||||
|
@NotNull
|
||||||
public BlockVector performToRealSpaceOperation(@NotNull BlockVector vector) {
|
public BlockVector performToRealSpaceOperation(@NotNull BlockVector vector) {
|
||||||
return performToRealSpaceOperation((Vector) vector).toBlockVector();
|
return performToRealSpaceOperation((Vector) vector).toBlockVector();
|
||||||
}
|
}
|
Reference in New Issue
Block a user