Class endstone::Location¶
ClassList > endstone > Location
Represents a 3-dimensional location in a dimension within a level.
#include <endstone/level/location.h>
Inherits the following classes: endstone::Position
Public Functions¶
| Type | Name | 
|---|---|
| Location (Dimension * dimension, float x, float y, float z, float pitch=0.0, float yaw=0.0)  | 
|
| float | getPitch () const | 
| float | getYaw () const | 
| void | setPitch (float pitch)  | 
| void | setYaw (float yaw)  | 
Public Functions inherited from endstone::Position¶
| Type | Name | 
|---|---|
| Position (Dimension * dimension, float x, float y, float z)  | 
|
| Dimension * | getDimension () const | 
| void | setDimension (Dimension & dimension)  | 
Public Functions inherited from endstone::Vector¶
See endstone::Vector
| Type | Name | 
|---|---|
| constexpr | Vector ()  | 
| constexpr | Vector (T x, T y, T z)  | 
| constexpr T | distance (const Vector< T > & other) const | 
| constexpr T | distanceSquared (const Vector< T > & other) const | 
| constexpr T | getX () const | 
| constexpr T | getY () const | 
| constexpr T | getZ () const | 
| constexpr T | length () const | 
| constexpr T | lengthSquared () const | 
| constexpr Vector< T > | operator* (const Vector< T > & other) const | 
| Vector< T > | operator* (T scalar) const | 
| Vector< T > & | operator*= (const Vector< T > & other)  | 
| constexpr Vector< T > | operator+ (const Vector< T > & other) const | 
| Vector< T > | operator+ (T scalar) const | 
| Vector< T > & | operator+= (const Vector< T > & other)  | 
| constexpr Vector< T > | operator- (const Vector< T > & other) const | 
| Vector< T > | operator- (T scalar) const | 
| Vector< T > & | operator-= (const Vector< T > & other)  | 
| constexpr Vector< T > | operator/ (const Vector< T > & other) const | 
| Vector< T > | operator/ (T scalar) const | 
| Vector< T > & | operator/= (const Vector< T > & other)  | 
| constexpr void | setX (T x)  | 
| constexpr void | setY (T y)  | 
| constexpr void | setZ (T z)  | 
Public Functions Documentation¶
function Location¶
inline endstone::Location::Location (
    Dimension * dimension,
    float x,
    float y,
    float z,
    float pitch=0.0,
    float yaw=0.0
) 
function getPitch¶
Gets the pitch of this location, measured in degrees.
Returns:
the incline's pitch
function getYaw¶
Gets the yaw of this location, measured in degrees.
Returns:
the rotation's yaw
function setPitch¶
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
function setYaw¶
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
The documentation for this class was generated from the following file include/endstone/level/location.h