endstone/util

Classes

NameDescription
ColorRepresents a color with red, green, blue, and alpha components.
Colors
ImageRepresents an RGBA image.
NotNull
Nullable
SocketAddressRepresents an IP Socket Address (hostname + port number).
UUIDImplementation of Universally Unique Identifier (UUID)
VectorRepresents a 3-dimensional vector.

Type Aliases

NameDescription
Result

Functions

classColor

Defined in <endstone/util/color.h>

Represents a color with red, green, blue, and alpha components.

Variables

NameDescription
BIT_MASK
DEFAULT_ALPHA

Methods

NameDescription
Color
getRedGets the red component of the color.
setRedCreates a new Color object with specified component.
getGreenGets the green component of the color.
setGreenCreates a new Color object with specified component.
getBlueGets the blue component of the color.
setBlueCreates a new Color object with specified component.
getAlphaGets the alpha component of the color.
setAlphaCreates a new Color object with specified component.
asRGBAGets the color as an RGBA integer.
asABGRGets the color as an ABGR integer.
asRGBGets the color as an RGB integer.
asBGRGets the color as an BGR integer.
operator==
operator!=
fromRGBACreates a new Color object from a red, green, blue, and alpha.
fromRGBCreates a new Color object from a red, green, and blue.
fromBGRCreates a new Color object from a blue, green, and red.
fromRGBACreates a new color object from an integer that contains the red, green, blue, and alpha bytes.
fromABGRCreates a new color object from an integer that contains the alpha, blue, green, and red bytes.
fromRGBCreates a new color object from an integer that contains the red, green, and blue bytes in the lowest order 24 bits.
fromBGR

varBIT_MASKstaticconstexpr

int BIT_MASK

varDEFAULT_ALPHAstaticconstexpr

int DEFAULT_ALPHA

methColorconstexpr

constexpr Color(const std::uint8_t red, const std::uint8_t green, const std::uint8_t blue, const std::uint8_t alpha = DEFAULT_ALPHA)

methgetRedconst

int getRed() const

Gets the red component of the color.

Returns

TypeDescription
intThe red component (0–255) of the color.

methsetRedconst

Color setRed(const int red) const

Creates a new Color object with specified component.

Parameters

NameTypeDescription
redconst intthe red component, from 0 to 255

Returns

TypeDescription
Colora new color object with the red component

methgetGreenconst

int getGreen() const

Gets the green component of the color.

Returns

TypeDescription
intThe green component (0–255) of the color.

methsetGreenconst

Color setGreen(const int green) const

Creates a new Color object with specified component.

Parameters

NameTypeDescription
greenconst intthe green component, from 0 to 255

Returns

TypeDescription
Colora new color object with the green component

methgetBlueconst

int getBlue() const

Gets the blue component of the color.

Returns

TypeDescription
intThe blue component (0–255) of the color.

methsetBlueconst

Color setBlue(const int blue) const

Creates a new Color object with specified component.

Parameters

NameTypeDescription
blueconst intthe blue component, from 0 to 255

Returns

TypeDescription
Colora new color object with the blue component

methgetAlphaconst

int getAlpha() const

Gets the alpha component of the color.

Returns

TypeDescription
intThe alpha component (0–255) of the color.

methsetAlphaconst

Color setAlpha(const int alpha) const

Creates a new Color object with specified component.

Parameters

NameTypeDescription
alphaconst intthe alpha component, from 0 to 255

Returns

TypeDescription
Colora new color object with the alpha component

methasRGBAconst

int asRGBA() const

Gets the color as an RGBA integer.

Returns

TypeDescription
intAn integer representation of this color, as 0xRRGGBBAA

methasABGRconst

int asABGR() const

Gets the color as an ABGR integer.

Returns

TypeDescription
intAn integer representation of this color, as 0xAABBGGRR

methasRGBconst

int asRGB() const

Gets the color as an RGB integer.

Returns

TypeDescription
intAn integer representation of this color, as 0xRRGGBB

methasBGRconst

int asBGR() const

Gets the color as an BGR integer.

Returns

TypeDescription
intAn integer representation of this color, as 0xBBGGRR

methoperator==const

bool operator==(const Color& other) const

methoperator!=const

bool operator!=(const Color& other) const

methfromRGBAstatic

Color fromRGBA(int red, int green, int blue, int alpha)

Creates a new Color object from a red, green, blue, and alpha.

Parameters

NameTypeDescription
redintinteger from 0-255
greenintinteger from 0-255
blueintinteger from 0-255
alphaintinteger from 0-255

Returns

TypeDescription
Colora new Color object for the red, green, blue, alpha

methfromRGBstatic

Color fromRGB(const int red, const int green, const int blue)

Creates a new Color object from a red, green, and blue.

Parameters

NameTypeDescription
redconst intinteger from 0-255
greenconst intinteger from 0-255
blueconst intinteger from 0-255

Returns

TypeDescription
Colora new Color object for the red, green, blue

methfromBGRstatic

Color fromBGR(const int blue, const int green, const int red)

Creates a new Color object from a blue, green, and red.

Parameters

NameTypeDescription
blueconst intinteger from 0-255
greenconst intinteger from 0-255
redconst intinteger from 0-255

Returns

TypeDescription
Colora new Color object for the red, green, blue

methfromRGBAstatic

Color fromRGBA(const int rgba)

Creates a new color object from an integer that contains the red, green, blue, and alpha bytes.

Parameters

NameTypeDescription
rgbaconst intthe integer storing the red, green, blue, and alpha values

Returns

TypeDescription
Colora new color object for specified values

methfromABGRstatic

Color fromABGR(const int abgr)

Creates a new color object from an integer that contains the alpha, blue, green, and red bytes.

Parameters

NameTypeDescription
abgrconst intthe integer storing the alpha, blue, green, and red values

Returns

TypeDescription
Colora new color object for specified values

methfromRGBstatic

Color fromRGB(const int rgb)

Creates a new color object from an integer that contains the red, green, and blue bytes in the lowest order 24 bits.

Parameters

NameTypeDescription
rgbconst intthe integer storing the red, green, and blue values

Returns

TypeDescription
Colora new color object for specified values

methfromBGRstatic

Color fromBGR(const int bgr)

classColors

Defined in <endstone/util/color.h>

Variables

NameDescription
WHITE
BLACK

varWHITEstaticconstexpr

auto WHITE

varBLACKstaticconstexpr

auto BLACK

classImage

Defined in <endstone/util/image.h>

Represents an RGBA image.

Each pixel is four bytes: R, G, B, A, in row-major order.

Enums

NameDescription
Type

Methods

NameDescription
ImageCreate an empty image (all pixels transparent black).
Image
getWidthGet the image width.
getHeightGet the image height.
getDepthGet the image depth.
getColorGet the color of a pixel.
setColorSet the color of a pixel.
getDataGets the raw pixel buffer (row-major, H x W x D).
fromArrayCreates an image from the pixel data in a byte array.
fromBufferCreates an image from the pixel data in a byte buffer.

enumType

Type

Values

NameValueDescription
Invalid0
Grayscale18-bit pixels, grayscale
RGB33x8-bit pixels, true color
RGBA44x8-bit pixels, true color with transparency mask

methImageexplicit

Image(const Type type, const int width, const int height)

Create an empty image (all pixels transparent black).

Parameters

NameTypeDescription
typeconst TypeImage type
widthconst intImage width in pixels
heightconst intImage height in pixels

methImage

Image(Type type, int width, int height, const T& data)

methgetWidthconst

int getWidth() const

Get the image width.

Returns

TypeDescription
intImage width in pixels

methgetHeightconst

int getHeight() const

Get the image height.

Returns

TypeDescription
intImage height in pixels

methgetDepthconst

int getDepth() const

Get the image depth.

Returns

TypeDescription
intImage depth

methgetColorconst

Color getColor(const int x, const int y) const

Get the color of a pixel.

Parameters

NameTypeDescription
xconst intX coordinate (0 ≤ x < width)
yconst intY coordinate (0 ≤ y < height)

Returns

TypeDescription
ColorColor at (x, y)

methsetColor

void setColor(const int x, const int y, const Color color)

Set the color of a pixel.

Parameters

NameTypeDescription
xconst intX coordinate (0 ≤ x < width)
yconst intY coordinate (0 ≤ y < height)
colorconst ColorNew color for the pixel

methgetDataconst

std::string_view getData() const

Gets the raw pixel buffer (row-major, H x W x D).

Returns

TypeDescription
std::string_viewThe underlying image data buffer

methfromArraystatic

Result<Image> fromArray(Type type, const int width, const int height, const std::vector<unsigned char>& array)

Creates an image from the pixel data in a byte array.

Parameters

NameTypeDescription
typeTypeImage type
widthconst intImage width in pixels
heightconst intImage height in pixels
arrayconst std::vector<unsigned char>&

Returns

TypeDescription
Result<Image>The image on success, or an error on failure.

methfromBufferstatic

Result<Image> fromBuffer(Type type, const int width, const int height, std::string_view buffer)

Creates an image from the pixel data in a byte buffer.

Parameters

NameTypeDescription
typeTypeImage type
widthconst intImage width in pixels
heightconst intImage height in pixels
bufferstd::string_view

Returns

TypeDescription
Result<Image>The image on success, or an error on failure.

classNotNull

Defined in <endstone/util/pointers.h>

Type Aliases

NameDescription
pointer_type

Methods

typepointer_type

std::shared_ptr<T> pointer_type

methNotNull

NotNull() =delete

methNotNull

NotNull(std::shared_ptr<T> ptr)

methNotNull

NotNull(const NotNull& other) =default

methoperator=

NotNull& operator=(const NotNull& other) =default

methgetconstnoexcept

const pointer_type& get() const noexcept

methoperator->constnoexcept

T* operator->() const noexcept

methoperator*constnoexcept

T& operator*() const noexcept

methNotNull

NotNull(std::nullptr_t) =delete

methoperator=

NotNull& operator=(std::nullptr_t) =delete

methoperator++

NotNull& operator++() =delete

methoperator--

NotNull& operator--() =delete

methoperator++

NotNull operator++(int) =delete

methoperator--

NotNull operator--(int) =delete

methoperator+=

NotNull& operator+=(std::ptrdiff_t) =delete

methoperator-=

NotNull& operator-=(std::ptrdiff_t) =delete

methoperator[]const

void operator[](std::ptrdiff_t) const =delete

methswapnoexcept

void swap(NotNull& other) noexcept

classNullable

Defined in <endstone/util/pointers.h>

Methods

methNullableconstexprnoexcept

constexpr Nullable() noexcept=default

methNullableconstexprnoexcept

constexpr Nullable(std::nullptr_t) noexcept

methNullable

Nullable(std::shared_ptr<T> ptr)

methNullable

Nullable(const NotNull<T>& other)

methgetconstnoexcept

const std::shared_ptr<T>& get() const noexcept

methoperator->constnoexcept

T* operator->() const noexcept

methoperator*constnoexcept

T& operator*() const noexcept

methoperator boolconstexplicitnoexcept

operator bool() const noexcept

methoperator==const

bool operator==(const Nullable&) const =default

methoperator!=const

bool operator!=(const Nullable&) const =default

methoperator==constnoexcept

bool operator==(std::nullptr_t) const noexcept

methoperator!=constnoexcept

bool operator!=(std::nullptr_t) const noexcept

classSocketAddress

Defined in <endstone/util/socket_address.h>

Represents an IP Socket Address (hostname + port number).

Methods

methSocketAddress

SocketAddress() =default

methSocketAddress

SocketAddress(std::string hostname, std::uint32_t port)

methgetHostnameconst

const std::string& getHostname() const

Gets the hostname.

Returns

TypeDescription
const std::string&The hostname of this socket address

methgetPortconst

std::uint32_t getPort() const

Gets the port number.

Returns

TypeDescription
std::uint32_tThe port number of this socket address

methoperator==const

bool operator==(const SocketAddress& other) const =default

classUUID

Defined in <endstone/util/uuid.h>

Implementation of Universally Unique Identifier (UUID)

Adapted from https://github.com/boostorg/uuid/blob/develop/include/boost/uuid/uuid.hpp

Variables

NameDescription
data

Methods

vardata

methbeginnoexcept

std::uint8_t* begin() noexcept

methbeginconstnoexcept

const uint8_t* begin() const noexcept

methendnoexcept

std::uint8_t* end() noexcept

methendconstnoexcept

const uint8_t* end() const noexcept

methisNilconstnoexcept

bool isNil() const noexcept

methversionconstnoexcept

int version() const noexcept

methswapnoexcept

void swap(UUID& rhs) noexcept

methstrconst

std::string str() const

methsizestaticconstexprnoexcept

std::size_t size() noexcept

classVector

Defined in <endstone/util/vector.h>

Represents a 3-dimensional vector.

Variables

NameDescription
x_
y_
z_

Methods

NameDescription
VectorConstruct the vector with all components as 0.
VectorConstruct the vector with provided components.
Vector
Vector
operator=
operator=
getXGets the X component.
setXSet the X component.
getYGets the Y component.
setYSet the Y component.
getZGets the Z component.
setZSet the Z component.
getBlockXGets the floored value of the X component, indicating the block that this vector is contained with.
getBlockYGets the floored value of the Y component, indicating the block that this vector is contained with.
getBlockZGets the floored value of the Z component, indicating the block that this vector is contained with.
operator+
operator-
operator*
operator/
operator+=
operator-=
operator*=
operator/=
operator+
operator-
operator*
operator/
operator==
operator!=
lengthGets the magnitude of the vector, defined as sqrt(x^2+y^2+z^2).
lengthSquaredGets the magnitude of the vector squared.
distanceGet the distance between this vector and another.
distanceSquaredGet the squared distance between this vector and another.
angleGets the angle between this vector and another in radians.
midpointSets this vector to the midpoint between this vector and another.
getMidpointGets a new midpoint vector between this vector and another.
dotCalculates the dot product of this vector with another. The dot product is defined as x1*x2+y1*y2+z1*z2. The returned value is a scalar.
crossProductCalculates the cross-product of this vector with another.
getCrossProductCalculates the cross-product of this vector with another without mutating the original.
normalizeConverts this vector to a unit vector (a vector with length of 1).
zeroZero this vector's components.
isZeroCheck whether or not each component of this vector is equal to 0.
normalizeZerosConverts each component of value -0.0 to 0.0.
isInAABBReturns whether this vector is in an axis-aligned bounding box.
isInSphereReturns whether this vector is within a sphere.
isNormalizedReturns if a vector is normalized.
rotateAroundXRotates the vector around the x-axis.
rotateAroundYRotates the vector around the y-axis.
rotateAroundZRotates the vector around the z-axis.
rotateAroundAxisRotates the vector around a given arbitrary axis in 3-dimensional space.
rotateAroundNonUnitAxisRotates the vector around a given arbitrary axis in 3-dimensional space.

varx_protected

float x_

vary_protected

float y_

varz_protected

float z_

methVectorconstexpr

constexpr Vector() =default

Construct the vector with all components as 0.

methVectorconstexpr

constexpr Vector(T x, T y, T z)

Construct the vector with provided components.

Parameters

NameTypeDescription
xTX component
yTY component
zTZ component

methVector

Vector(const Vector& other) =default

methVectornoexcept

Vector(Vector&& other) noexcept=default

methoperator=

Vector& operator=(const Vector& other) =default

methoperator=noexcept

Vector& operator=(Vector&& other) noexcept=default

methgetXconstconstexpr

float getX() const

Gets the X component.

Returns

TypeDescription
floatThe X component.

methsetXconstexpr

Vector& setX(T x)

Set the X component.

Parameters

NameTypeDescription
xTThe new X component.

Returns

TypeDescription
Vector&This vector.

methgetYconstconstexpr

float getY() const

Gets the Y component.

Returns

TypeDescription
floatThe Y component.

methsetYconstexpr

Vector& setY(T y)

Set the Y component.

Parameters

NameTypeDescription
yTThe new Y component.

Returns

TypeDescription
Vector&This vector.

methgetZconstconstexpr

float getZ() const

Gets the Z component.

Returns

TypeDescription
floatThe Z component.

methsetZconstexpr

Vector& setZ(T z)

Set the Z component.

Parameters

NameTypeDescription
zTThe new Z component.

Returns

TypeDescription
Vector&This vector.

methgetBlockXconst

int getBlockX() const

Gets the floored value of the X component, indicating the block that this vector is contained with.

Returns

TypeDescription
intblock X

methgetBlockYconst

int getBlockY() const

Gets the floored value of the Y component, indicating the block that this vector is contained with.

Returns

TypeDescription
intblock y

methgetBlockZconst

int getBlockZ() const

Gets the floored value of the Z component, indicating the block that this vector is contained with.

Returns

TypeDescription
intblock z

methoperator+constconstexpr

Vector operator+(const Vector& other) const

methoperator-constconstexpr

Vector operator-(const Vector& other) const

methoperator*constconstexpr

Vector operator*(const Vector& other) const

methoperator/constconstexpr

Vector operator/(const Vector& other) const

methoperator+=

Vector& operator+=(const Vector& other)

methoperator-=

Vector& operator-=(const Vector& other)

methoperator*=

Vector& operator*=(const Vector& other)

methoperator/=

Vector& operator/=(const Vector& other)

methoperator+constconstexpr

Vector operator+(T scalar) const

methoperator-constconstexpr

Vector operator-(T scalar) const

methoperator*constconstexpr

Vector operator*(T scalar) const

methoperator/constconstexpr

Vector operator/(T scalar) const

methoperator==constnoexcept

bool operator==(const Vector& other) const noexcept

methoperator!=constnoexcept

bool operator!=(const Vector& other) const noexcept

methlengthconst

float length() const

Gets the magnitude of the vector, defined as sqrt(x^2+y^2+z^2).

Returns

TypeDescription
floatthe magnitude

methlengthSquaredconstconstexpr

float lengthSquared() const

Gets the magnitude of the vector squared.

Returns

TypeDescription
floatthe magnitude

methdistanceconst

float distance(const Vector& other) const

Get the distance between this vector and another.

Parameters

NameTypeDescription
otherconst Vector&The other vector

Returns

TypeDescription
floatthe distance

methdistanceSquaredconstconstexpr

float distanceSquared(const Vector& other) const

Get the squared distance between this vector and another.

Parameters

NameTypeDescription
otherconst Vector&The other vector

Returns

TypeDescription
floatthe distance

methangleconst

float angle(const Vector& other) const

Gets the angle between this vector and another in radians.

Parameters

NameTypeDescription
otherconst Vector&The other vector

Returns

TypeDescription
floatangle in radians

methmidpointconstexpr

Vector& midpoint(const Vector& other)

Sets this vector to the midpoint between this vector and another.

Parameters

NameTypeDescription
otherconst Vector&The other vector

Returns

TypeDescription
Vector&this same vector (now a midpoint)

methgetMidpointconstconstexpr

Vector getMidpoint(const Vector& other) const

Gets a new midpoint vector between this vector and another.

Parameters

NameTypeDescription
otherconst Vector&The other vector

Returns

TypeDescription
Vectora new midpoint vector

methdotconstconstexpr

float dot(const Vector& other) const

Calculates the dot product of this vector with another. The dot product is defined as x1*x2+y1*y2+z1*z2. The returned value is a scalar.

Parameters

NameTypeDescription
otherconst Vector&The other vector

Returns

TypeDescription
floatdot product

methcrossProductconstexpr

Vector& crossProduct(const Vector& other)

Calculates the cross-product of this vector with another.

The cross-product is defined as:

  • x = y1 * z2 - y2 * z1
  • y = z1 * x2 - z2 * x1
  • z = x1 * y2 - x2 * y1

Parameters

NameTypeDescription
otherconst Vector&The other vector

Returns

TypeDescription
Vector&the same vector

methgetCrossProductconstconstexpr

Vector getCrossProduct(const Vector& other) const

Calculates the cross-product of this vector with another without mutating the original.

The cross-product is defined as:

  • x = y1 * z2 - y2 * z1
  • y = z1 * x2 - z2 * x1
  • z = x1 * y2 - x2 * y1

Parameters

NameTypeDescription
otherconst Vector&The other vector

Returns

TypeDescription
Vectora new vector

methnormalize

Vector& normalize()

Converts this vector to a unit vector (a vector with length of 1).

Returns

TypeDescription
Vector&the same vector

methzeroconstexpr

Vector& zero()

Zero this vector's components.

Returns

TypeDescription
Vector&the same vector

methisZeroconstconstexpr

bool isZero() const

Check whether or not each component of this vector is equal to 0.

Returns

TypeDescription
booltrue if equal to zero, false if at least one component is non-zero

methnormalizeZerosconstexpr

Vector& normalizeZeros()

Converts each component of value -0.0 to 0.0.

Returns

TypeDescription
Vector&This vector.

methisInAABBconstconstexpr

bool isInAABB(const Vector& min, const Vector& max) const

Returns whether this vector is in an axis-aligned bounding box.

The minimum and maximum vectors given must be truly the minimum and maximum X, Y and Z components.

Parameters

NameTypeDescription
minconst Vector&Minimum vector
maxconst Vector&Maximum vector

Returns

TypeDescription
boolwhether this vector is in the AABB

methisInSphereconstconstexpr

bool isInSphere(const Vector& origin, float radius) const

Returns whether this vector is within a sphere.

Parameters

NameTypeDescription
originconst Vector&Sphere origin.
radiusfloatSphere radius

Returns

TypeDescription
boolwhether this vector is in the sphere

methisNormalizedconst

bool isNormalized() const

Returns if a vector is normalized.

Returns

TypeDescription
boolwhether the vector is normalized

methrotateAroundX

Vector& rotateAroundX(float angle)

Rotates the vector around the x-axis.

Parameters

NameTypeDescription
anglefloatthe angle to rotate the vector about. This angle is passed in radians

Returns

TypeDescription
Vector&the same vector

methrotateAroundY

Vector& rotateAroundY(float angle)

Rotates the vector around the y-axis.

Parameters

NameTypeDescription
anglefloatthe angle to rotate the vector about. This angle is passed in radians

Returns

TypeDescription
Vector&the same vector

methrotateAroundZ

Vector& rotateAroundZ(float angle)

Rotates the vector around the z-axis.

Parameters

NameTypeDescription
anglefloatthe angle to rotate the vector about. This angle is passed in radians

Returns

TypeDescription
Vector&the same vector

methrotateAroundAxis

Vector& rotateAroundAxis(const Vector& axis, float angle)

Rotates the vector around a given arbitrary axis in 3-dimensional space.

Rotation will follow the general Right-Hand-Rule, which means rotation will be counterclockwise when the axis is pointing towards the observer.

This method will always make sure the provided axis is a unit vector, to not modify the length of the vector when rotating. If you are experienced with the scaling of a non-unit axis vector, you can use rotateAroundNonUnitAxis(Vector, float).

Parameters

NameTypeDescription
axisconst Vector&the axis to rotate the vector around. If the passed vector is not of length 1, it gets normalized before using it for the rotation.
anglefloatthe angle to rotate the vector around the axis

Returns

TypeDescription
Vector&the same vector

methrotateAroundNonUnitAxis

Vector& rotateAroundNonUnitAxis(const Vector& axis, float angle)

Rotates the vector around a given arbitrary axis in 3-dimensional space.

Rotation will follow the general Right-Hand-Rule, which means rotation will be counterclockwise when the axis is pointing towards the observer.

Note that the vector length will change accordingly to the axis vector length. If the provided axis is not a unit vector, the rotated vector will not have its previous length. The scaled length of the resulting vector will be related to the axis vector. If you are not sure about the scaling of the vector, use rotateAroundAxis(Vector, float).

Parameters

NameTypeDescription
axisconst Vector&the axis to rotate the vector around.
anglefloatthe angle to rotate the vector around the axis

Returns

TypeDescription
Vector&the same vector

typeResult

nonstd::expected<T, std::string> Result

funchash_valuenoexcept

std::size_t hash_value(UUID const& u) noexcept

funcoperator!=noexcept

bool operator!=(UUID const& lhs, UUID const& rhs) noexcept

funcoperator<noexcept

bool operator<(UUID const& lhs, UUID const& rhs) noexcept

funcoperator<=noexcept

bool operator<=(UUID const& lhs, UUID const& rhs) noexcept

funcoperator==noexcept

bool operator==(UUID const& lhs, UUID const& rhs) noexcept

funcoperator>noexcept

bool operator>(UUID const& lhs, UUID const& rhs) noexcept

funcoperator>=noexcept

bool operator>=(UUID const& lhs, UUID const& rhs) noexcept

funcswapnoexcept

void swap(UUID& lhs, UUID& rhs) noexcept

On this page

classColorvarBIT_MASKvarDEFAULT_ALPHAmethColormethgetRedmethsetRedmethgetGreenmethsetGreenmethgetBluemethsetBluemethgetAlphamethsetAlphamethasRGBAmethasABGRmethasRGBmethasBGRmethoperator==methoperator!=methfromRGBAmethfromRGBmethfromBGRmethfromRGBAmethfromABGRmethfromRGBmethfromBGRclassColorsvarWHITEvarBLACKclassImageenumTypemethImagemethImagemethgetWidthmethgetHeightmethgetDepthmethgetColormethsetColormethgetDatamethfromArraymethfromBufferclassNotNulltypepointer_typemethNotNullmethNotNullmethNotNullmethoperator=methgetmethoperator->methoperator*methNotNullmethoperator=methoperator++methoperator--methoperator++methoperator--methoperator+=methoperator-=methoperator[]methswapclassNullablemethNullablemethNullablemethNullablemethNullablemethgetmethoperator->methoperator*methoperator boolmethoperator==methoperator!=methoperator==methoperator!=classSocketAddressmethSocketAddressmethSocketAddressmethgetHostnamemethgetPortmethoperator==classUUIDvardatamethbeginmethbeginmethendmethendmethisNilmethversionmethswapmethstrmethsizeclassVectorvarx_vary_varz_methVectormethVectormethVectormethVectormethoperator=methoperator=methgetXmethsetXmethgetYmethsetYmethgetZmethsetZmethgetBlockXmethgetBlockYmethgetBlockZmethoperator+methoperator-methoperator*methoperator/methoperator+=methoperator-=methoperator*=methoperator/=methoperator+methoperator-methoperator*methoperator/methoperator==methoperator!=methlengthmethlengthSquaredmethdistancemethdistanceSquaredmethanglemethmidpointmethgetMidpointmethdotmethcrossProductmethgetCrossProductmethnormalizemethzeromethisZeromethnormalizeZerosmethisInAABBmethisInSpheremethisNormalizedmethrotateAroundXmethrotateAroundYmethrotateAroundZmethrotateAroundAxismethrotateAroundNonUnitAxistypeResultfunchash_valuefuncoperator!=funcoperator<funcoperator<=funcoperator==funcoperator>funcoperator>=funcswap