Brunot
Loading...
Searching...
No Matches
Vector4D Struct Reference

#include <Vector4D.h>

Public Member Functions

 Vector4D ()=default
 Vector4D (const Eigen::Vector4f &rhs)
 Vector4D (float x, float y, float z, float w)
auto operator+= (const Vector4D &rhs) -> Vector4D &
auto operator+ (const Vector4D &rhs) const -> Vector4D
auto operator-= (const Vector4D &rhs) -> Vector4D &
auto operator- (const Vector4D &rhs) const -> Vector4D
auto operator*= (float scalar) -> Vector4D &
auto operator* (float scalar) const -> Vector4D
auto operator* (const Vector4D &rhs) const -> float
 Dot product.
auto length () const -> float
 Magnitude.
auto x () const -> const float &
auto x () -> float &
auto y () const -> const float &
auto y () -> float &
auto z () const -> const float &
auto z () -> float &
auto w () const -> const float &
auto w () -> float &
auto data () const -> const float *
auto data () -> float *

Private Attributes

Eigen::Vector4f vector

Friends

auto operator* (const AffineMatrix &rhs, const Vector4D &lhs) ->Vector4D
 matrix times vector.
auto operator*= (Vector4D &rhs, const AffineMatrix &lhs) ->Vector4D &
 applies a transformation to a vector.
auto from_json (const json &j, Vector4D &v) ->void

Constructor & Destructor Documentation

◆ Vector4D() [1/3]

Vector4D::Vector4D ( )
default
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Vector4D() [2/3]

Vector4D::Vector4D ( const Eigen::Vector4f & rhs)

◆ Vector4D() [3/3]

Vector4D::Vector4D ( float x,
float y,
float z,
float w )
Here is the call graph for this function:

Member Function Documentation

◆ data() [1/2]

auto Vector4D::data ( ) ->float *
inline

◆ data() [2/2]

auto Vector4D::data ( ) const->constfloat *
inline

◆ length()

auto Vector4D::length ( ) const->float

Magnitude.

◆ operator*() [1/2]

auto Vector4D::operator* ( const Vector4D & rhs) const->float

Dot product.

Here is the call graph for this function:

◆ operator*() [2/2]

auto Vector4D::operator* ( float scalar) const->Vector4D
Here is the call graph for this function:

◆ operator*=()

auto Vector4D::operator*= ( float scalar) ->Vector4D &
Here is the call graph for this function:

◆ operator+()

auto Vector4D::operator+ ( const Vector4D & rhs) const->Vector4D
Here is the call graph for this function:

◆ operator+=()

auto Vector4D::operator+= ( const Vector4D & rhs) ->Vector4D &
Here is the call graph for this function:

◆ operator-()

auto Vector4D::operator- ( const Vector4D & rhs) const->Vector4D
Here is the call graph for this function:

◆ operator-=()

auto Vector4D::operator-= ( const Vector4D & rhs) ->Vector4D &
Here is the call graph for this function:

◆ w() [1/2]

auto Vector4D::w ( ) ->float &
inline

◆ w() [2/2]

auto Vector4D::w ( ) const->constfloat &
inline
Here is the caller graph for this function:

◆ x() [1/2]

auto Vector4D::x ( ) ->float &
inline

◆ x() [2/2]

auto Vector4D::x ( ) const->constfloat &
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ y() [1/2]

auto Vector4D::y ( ) ->float &
inline

◆ y() [2/2]

auto Vector4D::y ( ) const->constfloat &
inline
Here is the caller graph for this function:

◆ z() [1/2]

auto Vector4D::z ( ) ->float &
inline

◆ z() [2/2]

auto Vector4D::z ( ) const->constfloat &
inline
Here is the caller graph for this function:

◆ from_json

auto from_json ( const json & j,
Vector4D & v )->void
friend

◆ operator*

auto operator* ( const AffineMatrix & rhs,
const Vector4D & lhs )->Vector4D
friend

matrix times vector.

performs rhs*lhs

Parameters
rhsthe matrix
lhsthe vector
Returns
the new Vector

◆ operator*=

auto operator*= ( Vector4D & rhs,
const AffineMatrix & lhs )->Vector4D &
friend

applies a transformation to a vector.

a*=b is equivalent to a = b * a

Parameters
rhsthe Vector to operate on
lhsthe transformation to apply
Returns
a reference to the vector for chaining

Member Data Documentation

◆ vector

Eigen::Vector4f Vector4D::vector
private

The documentation for this struct was generated from the following files:
  • /home/egrazil/sites/Brunot/The House/source/Utility/Math/Vector4D.h
  • /home/egrazil/sites/Brunot/The House/source/Utility/Math/Vector4D.cpp