Class StructurePoint
java.lang.Object
me.gamercoder215.starcosmetics.api.cosmetics.structure.StructurePoint
- All Implemented Interfaces:
Comparable<StructurePoint>
Represents a point on a Structure.
-
Constructor Summary
ConstructorsConstructorDescriptionStructurePoint(double x, double y, double z) Creates a new StructurePoint.StructurePoint(int x, int y, int z) Creates a new StructurePoint.StructurePoint(@NotNull Vector v) Constructs a StructurePoint from a Vector. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(@NotNull StructurePoint o) booleanintgetX()Fetches the relative X distance to the Center.intgetY()Fetches the relative Y distance to the Center.intgetZ()Fetches the relative Z distance to the Center.inthashCode()@NotNull LocationtoLocation(@NotNull Location relative) Converts this StructurePoint to a Location.toString()@NotNull VectortoVector()Converts this StructurePoint to a Vector, inputting its actual X, Y, and Z.
-
Constructor Details
-
StructurePoint
public StructurePoint(int x, int y, int z) Creates a new StructurePoint.- Parameters:
x- Relative X to the Centery- Relative Y to the Centerz- Relative Z to the Center
-
StructurePoint
Constructs a StructurePoint from a Vector.- Parameters:
v- Vector
-
StructurePoint
public StructurePoint(double x, double y, double z) Creates a new StructurePoint.- Parameters:
x- Relative X to the Centery- Relative Y to the Centerz- Relative Z to the Center
-
-
Method Details
-
getX
public int getX()Fetches the relative X distance to the Center.- Returns:
- Relative X Distance
-
getY
public int getY()Fetches the relative Y distance to the Center.- Returns:
- Relative Y Distance
-
getZ
public int getZ()Fetches the relative Z distance to the Center.- Returns:
- Relative Z Distance
-
toLocation
Converts this StructurePoint to a Location.- Parameters:
relative- Center Location- Returns:
- Location of this StructurePoint according to the relative Location
-
toVector
Converts this StructurePoint to a Vector, inputting its actual X, Y, and Z.- Returns:
- Vector of this StructurePoint
-
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<StructurePoint>
-