PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
PixelBullet::AVector3< T > Class Template Reference

Public Member Functions

 AVector3 () noexcept
 Default constructor: initializes coordinates to zero.
 
 AVector3 (T x, T y, T z) noexcept
 Parameterized constructor.
 
 AVector3 (const AVector3 &other) noexcept
 Copy constructor.
 
 AVector3 (AVector3 &&other) noexcept
 Move constructor.
 
AVector3operator= (const AVector3 &other) noexcept
 Copy assignment operator.
 
AVector3operator= (AVector3 &&other) noexcept
 Move assignment operator.
 
AVector3 operator+ (const AVector3 &other) const noexcept
 Addition operator.
 
AVector3operator+= (const AVector3 &other) noexcept
 Compound addition.
 
AVector3 operator- (const AVector3 &other) const noexcept
 Subtraction operator.
 
AVector3operator-= (const AVector3 &other) noexcept
 Compound subtraction.
 
AVector3 operator- () const noexcept
 Unary negation.
 
AVector3 operator* (T scalar) const noexcept
 Scalar multiplication.
 
AVector3operator*= (T scalar) noexcept
 Compound scalar multiplication.
 
AVector3 operator/ (T scalar) const noexcept
 Scalar division.
 
AVector3operator/= (T scalar) noexcept
 Compound scalar division.
 
bool operator== (const AVector3 &other) const noexcept
 Equality operators.
 
bool operator!= (const AVector3 &other) const noexcept
 
GetX () const noexcept
 Getters.
 
GetY () const noexcept
 
GetZ () const noexcept
 
void SetX (T x) noexcept
 Setters.
 
void SetY (T y) noexcept
 
void SetZ (T z) noexcept
 
Dot (const AVector3 &other) const noexcept
 Additional operations:
 
AVector3 Cross (const AVector3 &other) const noexcept
 Cross product.
 
Length () const noexcept
 Returns the vector's magnitude.
 
AVector3 Normalized () const noexcept
 Returns a normalized (unit-length) copy of the vector.
 

Constructor & Destructor Documentation

◆ AVector3() [1/4]

template<typename T >
PixelBullet::AVector3< T >::AVector3 ( )
inlinenoexcept

Default constructor: initializes coordinates to zero.

◆ AVector3() [2/4]

template<typename T >
PixelBullet::AVector3< T >::AVector3 ( T x,
T y,
T z )
inlinenoexcept

Parameterized constructor.

◆ AVector3() [3/4]

template<typename T >
PixelBullet::AVector3< T >::AVector3 ( const AVector3< T > & other)
inlinenoexcept

Copy constructor.

◆ AVector3() [4/4]

template<typename T >
PixelBullet::AVector3< T >::AVector3 ( AVector3< T > && other)
inlinenoexcept

Move constructor.

Member Function Documentation

◆ Cross()

template<typename T >
AVector3 PixelBullet::AVector3< T >::Cross ( const AVector3< T > & other) const
inlinenoexcept

Cross product.

◆ Dot()

template<typename T >
T PixelBullet::AVector3< T >::Dot ( const AVector3< T > & other) const
inlinenoexcept

Additional operations:

Dot product.

◆ GetX()

template<typename T >
T PixelBullet::AVector3< T >::GetX ( ) const
inlinenoexcept

Getters.

◆ Length()

template<typename T >
T PixelBullet::AVector3< T >::Length ( ) const
inlinenoexcept

Returns the vector's magnitude.

◆ Normalized()

template<typename T >
AVector3 PixelBullet::AVector3< T >::Normalized ( ) const
inlinenoexcept

Returns a normalized (unit-length) copy of the vector.

Return zero vector if length is zero.

◆ operator*()

template<typename T >
AVector3 PixelBullet::AVector3< T >::operator* ( T scalar) const
inlinenoexcept

Scalar multiplication.

◆ operator*=()

template<typename T >
AVector3 & PixelBullet::AVector3< T >::operator*= ( T scalar)
inlinenoexcept

Compound scalar multiplication.

◆ operator+()

template<typename T >
AVector3 PixelBullet::AVector3< T >::operator+ ( const AVector3< T > & other) const
inlinenoexcept

Addition operator.

◆ operator+=()

template<typename T >
AVector3 & PixelBullet::AVector3< T >::operator+= ( const AVector3< T > & other)
inlinenoexcept

Compound addition.

◆ operator-() [1/2]

template<typename T >
AVector3 PixelBullet::AVector3< T >::operator- ( ) const
inlinenoexcept

Unary negation.

◆ operator-() [2/2]

template<typename T >
AVector3 PixelBullet::AVector3< T >::operator- ( const AVector3< T > & other) const
inlinenoexcept

Subtraction operator.

◆ operator-=()

template<typename T >
AVector3 & PixelBullet::AVector3< T >::operator-= ( const AVector3< T > & other)
inlinenoexcept

Compound subtraction.

◆ operator/()

template<typename T >
AVector3 PixelBullet::AVector3< T >::operator/ ( T scalar) const
inlinenoexcept

Scalar division.

◆ operator/=()

template<typename T >
AVector3 & PixelBullet::AVector3< T >::operator/= ( T scalar)
inlinenoexcept

Compound scalar division.

◆ operator=() [1/2]

template<typename T >
AVector3 & PixelBullet::AVector3< T >::operator= ( AVector3< T > && other)
inlinenoexcept

Move assignment operator.

◆ operator=() [2/2]

template<typename T >
AVector3 & PixelBullet::AVector3< T >::operator= ( const AVector3< T > & other)
inlinenoexcept

Copy assignment operator.

◆ operator==()

template<typename T >
bool PixelBullet::AVector3< T >::operator== ( const AVector3< T > & other) const
inlinenoexcept

Equality operators.

◆ SetX()

template<typename T >
void PixelBullet::AVector3< T >::SetX ( T x)
inlinenoexcept

Setters.


The documentation for this class was generated from the following file: