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

Represents a 4D point with integer coordinates. More...

#include <Point4.hpp>

Public Member Functions

constexpr Point4 (int x=0, int y=0, int z=0, int w=0)
constexpr Point4 (std::initializer_list< int > lst)
Point4 operator+= (const Point4 &p)
 Adds another point to this point in-place.
Point4 operator+ (const Point4 &p) const
 Adds another point to this point and returns the result.
Point4 operator-= (const Point4 &p)
 Subtracts another point from this point in-place.
Point4 operator- (const Point4 &p) const
 Subtracts another point from this point and returns the result.
Point4 operator- ()
 Inverts the coordinates of this point and returns the result.
Point4 operator*= (float s)
 Multiplies this point by a scalar in-place.
Point4 operator* (float s) const
 Multiplies this point by a scalar and returns the result.
Point4 operator/= (float s)
 Divides this point by a scalar in-place.
Point4 operator/ (float s) const
 Divides this point by a scalar and returns the result.
auto operator<=> (const Point4 &) const noexcept=default
 Compares this point with another point for equality.
 operator Engine3DRadSpace::Math::Vector4 () const
 Converts this point to a Vector4 representation.

Public Attributes

int X
 X coordinate of the point.
int Y
 Y coordinate of the point.
int Z
 Z coordinate of the point.
int W
 W coordinate of the point.

Detailed Description

Represents a 4D point with integer coordinates.

Constructor & Destructor Documentation

◆ Point4() [1/2]

Engine3DRadSpace.Math::Point4::Point4 ( int x = 0,
int y = 0,
int z = 0,
int w = 0 )
inlineexplicitconstexpr

◆ Point4() [2/2]

Engine3DRadSpace.Math::Point4::Point4 ( std::initializer_list< int > lst)
inlineexplicitconstexpr

Member Function Documentation

◆ operator Engine3DRadSpace::Math::Vector4()

Engine3DRadSpace.Math::Point4::operator Engine3DRadSpace::Math::Vector4 ( ) const

Converts this point to a Vector4 representation.

Returns
The floating point representation of this point.

◆ operator*()

Point4 Point4::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*=()

Point4 Point4::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+()

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

Adds another point to this point and returns the result.

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

◆ operator+=()

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

Adds another point to this point in-place.

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

◆ operator-() [1/2]

Point4 Point4::operator- ( )

Inverts the coordinates of this point and returns the result.

Returns
The resulting point after inversion.

◆ operator-() [2/2]

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

Subtracts another point from this point and returns the result.

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

◆ operator-=()

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

Subtracts another point from this point in-place.

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

◆ operator/()

Point4 Point4::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/=()

Point4 Point4::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::Point4::operator<=> ( const Point4 & ) const
defaultnoexcept

Compares this point with another point for equality.

Returns
default strong ordering

Member Data Documentation

◆ W

int Engine3DRadSpace.Math::Point4::W

W coordinate of the point.

◆ X

int Engine3DRadSpace.Math::Point4::X

X coordinate of the point.

◆ Y

int Engine3DRadSpace.Math::Point4::Y

Y coordinate of the point.

◆ Z

int Engine3DRadSpace.Math::Point4::Z

Z coordinate of the point.


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