3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
Loading...
Searching...
No Matches
Engine3DRadSpace.Math.UPoint3 Struct Reference

Represents a 3D point with unsigned integer coordinates. More...

#include <UPoint3.hpp>

Public Member Functions

 UPoint3 (uint x, uint y, uint z)
constexpr UPoint3 (unsigned x=0, unsigned y=0, unsigned z=0)
constexpr UPoint3 (std::initializer_list< unsigned > lst)
UPoint3 operator+= (const UPoint3 &p)
 Adds another point to this point in-place.
UPoint3 operator+ (const UPoint3 &p) const
 Adds another point to this point and returns the result.
UPoint3 operator-= (const UPoint3 &p)
 Subtracts another point from this point in-place.
UPoint3 operator- (const UPoint3 &p) const
 Subtracts another point from this point and returns the result.
UPoint3 operator*= (float s)
 Multiplies this point by a scalar in-place.
UPoint3 operator* (float s) const
 Multiplies this point by a scalar and returns the result.
UPoint3 operator/= (float s)
 Divides this point by a scalar in-place.
UPoint3 operator/ (float s) const
 Divides this point by a scalar and returns the result.
auto operator<=> (const UPoint3 &) const noexcept=default
 Compares this point with another point for equality.

Public Attributes

uint X
uint Y
uint Z
unsigned X
 X coordinate of the point.
unsigned Y
 Y coordinate of the point.
unsigned Z
 Z coordinate of the point.

Detailed Description

Represents a 3D point with unsigned integer coordinates.

Constructor & Destructor Documentation

◆ UPoint3() [1/3]

Engine3DRadSpace.Math.UPoint3.UPoint3 ( uint x,
uint y,
uint z )
inline

◆ UPoint3() [2/3]

Engine3DRadSpace.Math.UPoint3.UPoint3 ( unsigned x = 0,
unsigned y = 0,
unsigned z = 0 )
inlineexplicitconstexpr

◆ UPoint3() [3/3]

Engine3DRadSpace.Math.UPoint3.UPoint3 ( std::initializer_list< unsigned > lst)
inlineexplicitconstexpr

Member Function Documentation

◆ operator*()

UPoint3 UPoint3::operator* ( float s) const

Multiplies this point by a scalar and returns the result.

Parameters
sThe scalar to multiply by.
Returns
The resulting point after multiplication.

◆ operator*=()

UPoint3 UPoint3::operator*= ( float s)

Multiplies this point by a scalar in-place.

Parameters
sThe scalar to multiply by.
Returns
A reference to this point after multiplication.

◆ operator+()

UPoint3 UPoint3::operator+ ( const UPoint3 & p) const

Adds another point to this point and returns the result.

Parameters
pThe point to add.
Returns
The resulting point after addition.

◆ operator+=()

UPoint3 UPoint3::operator+= ( const UPoint3 & p)

Adds another point to this point in-place.

Parameters
pThe point to add.
Returns
A reference to this point after addition.

◆ operator-()

UPoint3 UPoint3::operator- ( const UPoint3 & p) const

Subtracts another point from this point and returns the result.

Parameters
pThe point to subtract.
Returns
The resulting point after subtraction.

◆ operator-=()

UPoint3 UPoint3::operator-= ( const UPoint3 & p)

Subtracts another point from this point in-place.

Parameters
pThe point to subtract.
Returns
A reference to this point after subtraction.

◆ operator/()

UPoint3 UPoint3::operator/ ( float s) const

Divides this point by a scalar and returns the result.

Parameters
sThe scalar to divide by.
Returns
The resulting point after division.

◆ operator/=()

UPoint3 UPoint3::operator/= ( float s)

Divides this point by a scalar in-place.

Parameters
sThe scalar to divide by.
Returns
A reference to this point after division.

◆ operator<=>()

auto Engine3DRadSpace.Math.UPoint3.operator<=> ( const UPoint3 & ) const
defaultnoexcept

Compares this point with another point for equality.

Returns
default strong ordering

Member Data Documentation

◆ X [1/2]

uint Engine3DRadSpace.Math.UPoint3.X

◆ X [2/2]

X coordinate of the point.

◆ Y [1/2]

uint Engine3DRadSpace.Math.UPoint3.Y

◆ Y [2/2]

Y coordinate of the point.

◆ Z [1/2]

uint Engine3DRadSpace.Math.UPoint3.Z

◆ Z [2/2]

Z coordinate of the point.


The documentation for this struct was generated from the following files: