Class SimpleVectorOperation
- All Implemented Interfaces:
VectorOperation
- Author:
- Kristian
-
Constructor Summary
ConstructorDescriptionSimpleVectorOperation
(org.bukkit.block.BlockFace signFace) Instantiates a vector operation to rotate vectors in the direction of a sign face -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.block.BlockFace
Gets the block face of a sign given upon instantiationorg.bukkit.Axis
Gets the normal axis orthogonal to the iris planeorg.bukkit.util.Vector
performToAbstractSpaceOperation
(@NotNull org.bukkit.util.Vector vector) Performs this vector operation on the given vectororg.bukkit.util.BlockVector
performToRealSpaceOperation
(@NotNull org.bukkit.util.BlockVector vector) Performs the reverse of this vector operation on the given vectororg.bukkit.util.Vector
performToRealSpaceOperation
(@NotNull org.bukkit.util.Vector vector) Performs the reverse of this vector operation on the given vectorvoid
setFlipZAxis
(boolean flipZAxis) Sets whether to flip the Z- axis
-
Constructor Details
-
SimpleVectorOperation
Instantiates a vector operation to rotate vectors in the direction of a sign faceGate structures have their relative location represented by a vector where x = outwards, y = down and z = right. The vector operation rotates the given vectors so that "outwards" is going the same direction as the given sign face.
- Parameters:
signFace
-The sign face of a gate's sign
- Throws:
InvalidStructureException
-
-
Method Details
-
getFacing
public org.bukkit.block.BlockFace getFacing()Description copied from interface:VectorOperation
Gets the block face of a sign given upon instantiation- Specified by:
getFacing
in interfaceVectorOperation
- Returns:
The block face of a sign given upon instantiation
-
getIrisNormal
public org.bukkit.Axis getIrisNormal()Description copied from interface:VectorOperation
Gets the normal axis orthogonal to the iris planeSaid another way, get the axis going directly towards or away from a stargate's entrance.
- Specified by:
getIrisNormal
in interfaceVectorOperation
- Returns:
The normal axis orthogonal to the iris plane
-
setFlipZAxis
public void setFlipZAxis(boolean flipZAxis) Description copied from interface:VectorOperation
Sets whether to flip the Z- axis- Specified by:
setFlipZAxis
in interfaceVectorOperation
- Parameters:
flipZAxis
-Whether to flip the z-axis
-
performToAbstractSpaceOperation
public org.bukkit.util.Vector performToAbstractSpaceOperation(@NotNull @NotNull org.bukkit.util.Vector vector) Description copied from interface:VectorOperation
Performs this vector operation on the given vectorInverse operation of doInverse; A vector operation that rotates around the origin, and flips the z-axis. Does not permute input vector
- Specified by:
performToAbstractSpaceOperation
in interfaceVectorOperation
- Parameters:
vector
-The vector to perform the operation on
- Returns:
- vector
A new vector with the operation applied
-
performToRealSpaceOperation
public org.bukkit.util.Vector performToRealSpaceOperation(@NotNull @NotNull org.bukkit.util.Vector vector) Description copied from interface:VectorOperation
Performs the reverse of this vector operation on the given vectorInverse operation of doOperation; A vector operation that rotates around the origin and flips the z-axis. Does not permute input vector
- Specified by:
performToRealSpaceOperation
in interfaceVectorOperation
- Parameters:
vector
-The vector to perform the inverse operation on
- Returns:
- vector
A new vector with the inverse operation applied
-
performToRealSpaceOperation
public org.bukkit.util.BlockVector performToRealSpaceOperation(@NotNull @NotNull org.bukkit.util.BlockVector vector) Description copied from interface:VectorOperation
Performs the reverse of this vector operation on the given vectorInverse operation of doOperation; A vector operation that rotates around the origin and flips the z-axis. Does not permute input vector
- Specified by:
performToRealSpaceOperation
in interfaceVectorOperation
- Parameters:
vector
-The vector to perform the inverse operation on
- Returns:
- vector
A new vector with the inverse operation applied
-