endstone::Location
Represents a 3-dimensional location in a dimension within a level.
Bases: endstone::Position
Functions:
Location
template <typename T, typename>
Location(T x, T y, T z, float pitch = 0.0, float yaw = 0.0)template <typename T, typename>
Location(T x, T y, T z, float pitch, Dimension &dimension)template <typename T, typename>
Location(T x, T y, T z, float pitch, float yaw, Dimension &dimension) Position
template <typename T, typename> Position(T x, T y, T z)template <typename T, typename> Position(T x, T y, T z, Dimension &dimension) getDirection
Vector getDirection() constGets a unit-vector pointing in the direction that this Location is facing.
Returns:
a vector pointing the direction of this location’s pitch and yaw
getPitch
float getPitch() constGets the pitch of this location, measured in degrees.
Returns:
the incline’s pitch
getYaw
float getYaw() constGets the yaw of this location, measured in degrees.
Returns:
the rotation’s yaw
setPitch
void setPitch(float pitch)Sets the pitch of this location, measured in degrees.
- A pitch of 0 represents level forward facing.
- A pitch of 90 represents downward facing, or negative y direction.
- A pitch of -90 represents upward facing, or positive y direction.
Increasing pitch values the equivalent of looking down.
Parameters:
pitchnew incline’s pitch
setYaw
void setYaw(float yaw)Sets the yaw of this location, measured in degrees.
- A yaw of 0 or 360 represents the positive z direction.
- A yaw of 180 represents the negative z direction.
- A yaw of 90 represents the negative x direction.
- A yaw of 270 represents the positive x direction.
Increasing yaw values are the equivalent of turning to your right-facing, increasing the scale of the next respective axis, and decreasing the scale of the previous axis.
Parameters:
yawnew rotation’s yaw