Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Location()
- Location(Vector3i)
- Location(String, Vector3i)
- Location(Vector3d)
- Location(String, Vector3d)
- Location(double, double, double)
- Location(String, double, double, double)
- Location(double, double, double, float, float, float)
- Location(String, double, double, double, float, float, float)
- Location(Vector3d, Rotation3f)
- Location(Transform)
- Location(String, Transform)
- Location(String, Vector3d, Rotation3f)
- Method Details
Class Location
java.lang.Object
com.hypixel.hytale.math.vector.Location
A location in a world, consisting of a position and rotation.
-
Constructor Summary
ConstructorsConstructorDescriptionLocation()Empty Constructor for aLocationinstance.Location(double x, double y, double z) Constructor for aLocationinstance.Location(double x, double y, double z, float pitch, float yaw, float roll) Constructor for aLocationinstance.Constructor for aLocationinstance.Constructor for aLocationinstance.Constructor for aLocationinstance.Constructor for aLocationinstance.Constructor for aLocationinstance.Location(String world, org.joml.Vector3d position, Rotation3f rotation) Default Constructor for aLocationinstance.Constructor for aLocationinstance.Location(org.joml.Vector3d position) Constructor for aLocationinstance.Location(org.joml.Vector3d position, Rotation3f rotation) Constructor for aLocationinstance.Location(org.joml.Vector3i position) Constructor for aLocationinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAxis()org.joml.Vector3iorg.joml.Vector3igetAxisDirection(float pitch, float yaw) org.joml.Vector3dorg.joml.Vector3dgetWorld()inthashCode()voidsetPosition(org.joml.Vector3d position) Called to set the position in the world.voidsetRotation(Rotation3f rotation) Called to set the rotation at the position.voidCalled to set the world of the location.toString()
-
Constructor Details
-
Location
public Location()Empty Constructor for aLocationinstance. -
Location
public Location(@Nonnull org.joml.Vector3i position) Constructor for aLocationinstance.- Parameters:
position- The position in the world.
-
Location
-
Location
public Location(@Nonnull org.joml.Vector3d position) Constructor for aLocationinstance.- Parameters:
position- The position in the world.
-
Location
-
Location
public Location(double x, double y, double z) Constructor for aLocationinstance.- Parameters:
x- The X coordinate of the position.y- The Y coordinate of the position.z- The Z coordinate of the position.
-
Location
-
Location
public Location(double x, double y, double z, float pitch, float yaw, float roll) Constructor for aLocationinstance.- Parameters:
x- The X coordinate of the position.y- The Y coordinate of the position.z- The Z coordinate of the position.pitch- The pitch of the rotation.yaw- The yaw of the rotation.roll- The roll of the rotation.
-
Location
public Location(@Nullable String world, double x, double y, double z, float pitch, float yaw, float roll) Constructor for aLocationinstance.- Parameters:
world- The world the location is in, ornullif unspecified.x- The X coordinate of the position.y- The Y coordinate of the position.z- The Z coordinate of the position.pitch- The pitch of the rotation.yaw- The yaw of the rotation.roll- The roll of the rotation.
-
Location
Constructor for aLocationinstance.- Parameters:
position- The position in the world.rotation- The rotation at the position.
-
Location
-
Location
-
Location
public Location(@Nullable String world, @Nonnull org.joml.Vector3d position, @Nonnull Rotation3f rotation) Default Constructor for aLocationinstance.- Parameters:
world- The world the location is in, ornullif unspecifiedposition- The position in the world.rotation- The rotation at the position.
-
-
Method Details
-
getWorld
- Returns:
- the world the location is in, or
nullif unspecified.
-
setWorld
Called to set the world of the location.- Parameters:
world- The world the location is in, ornullif unspecified.
-
getPosition
@Nonnull public org.joml.Vector3d getPosition()- Returns:
- The position in the world.
-
setPosition
public void setPosition(@Nonnull org.joml.Vector3d position) Called to set the position in the world.- Parameters:
position- The position in the world.
-
getRotation
- Returns:
- The rotation at the position.
-
setRotation
Called to set the rotation at the position.- Parameters:
rotation- The rotation at the position.
-
getDirection
@Nonnull public org.joml.Vector3d getDirection()- Returns:
- The direction of the rotation.
-
getAxisDirection
@Nonnull public org.joml.Vector3i getAxisDirection()- Returns:
- The direction of the rotation locked to an axis.
-
getAxisDirection
@Nonnull public org.joml.Vector3i getAxisDirection(float pitch, float yaw) - Parameters:
pitch- The pitch of the rotation.yaw- The yaw of the rotation.- Returns:
- the direction of the rotation locked to an axis.
-
getAxis
- Returns:
- The axis of the rotation
-
toTransform
-
equals
-
hashCode
-
toString
-