ActiveLib
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
active::geometry::Vector4 Class Reference

A 1x4 vector class. More...

#include <Vector4.h>

Public Types

using Unique = std::unique_ptr<Vector4>
 Unique pointer.
 
using Shared = std::shared_ptr<Vector4>
 Shared pointer.
 
using Option = std::optional<Vector4>
 Optional.
 

Public Member Functions

 Vector4 ()
 
 Vector4 (const double &x, const double &y, const double &z)
 
 Vector4 (const Point &source)
 
 Vector4 (const Line &source)
 
 Vector4 (const Vector3 &source)
 
 Vector4 (const Vector4 &source)
 
virtual ~Vector4 ()=default
 
Vector4operator= (const Point &source)
 
Vector4operator= (const Line &source)
 
Vector4operator= (const Vector3 &source)
 
Vector4operator= (const Vector4 &source)
 
Vector4 operator+ (const Vector4 &vect) const
 
Vector4operator+= (const Vector4 &vect)
 
Vector4 operator- (const Vector4 &vect) const
 
Vector4operator-= (const Vector4 &vect)
 
Vector4 operator* (double scale) const
 
Vector4 operator* (const Matrix4x4 &matrix) const
 
Vector4operator*= (double scale)
 
Vector4operator*= (const Matrix4x4 &matrix)
 
double & operator[] (int row)
 
const double operator[] (int row) const
 
 operator Point () const
 
bool isParallelTo (const Vector4 &ref, double prec=math::eps) const
 
bool isPerpendicularTo (const Vector4 &ref, double prec=math::eps) const
 
bool isSameSense (const Vector4 &ref, double prec=math::eps) const
 
bool isEmpty (double prec=math::eps) const
 
double dotProduct (const Vector4 &ref) const
 
Vector4 vectorProduct (const Vector4 &ref) const
 
double modulus () const
 
double magnitude () const
 
Vector4 normalised () const
 
double angleTo (const Vector4 &ref) const
 

Detailed Description

A 1x4 vector class.

Constructor & Destructor Documentation

◆ Vector4() [1/6]

Vector4::Vector4 ( )

Constructor

Here is the caller graph for this function:

◆ Vector4() [2/6]

Vector4::Vector4 ( const double & x,
const double & y,
const double & z )

Constructor

Parameters
xX coefficient
yY coefficient
zZ coefficient

◆ Vector4() [3/6]

Vector4::Vector4 ( const Point & source)

Constructor

Parameters
sourceA point to construct the vector from

◆ Vector4() [4/6]

Vector4::Vector4 ( const Line & source)

Constructor

Parameters
sourceA line to construct the vector from

◆ Vector4() [5/6]

Vector4::Vector4 ( const Vector3 & source)

Constructor

Parameters
sourceThe object to copy

◆ Vector4() [6/6]

Vector4::Vector4 ( const Vector4 & source)

Copy constructor

Parameters
sourceThe object to copy

◆ ~Vector4()

virtual active::geometry::Vector4::~Vector4 ( )
virtualdefault

Destructor

Member Function Documentation

◆ angleTo()

double Vector4::angleTo ( const Vector4 & ref) const

Get the angle between a vector and this

Parameters
refA vector
Returns
The angle between the vector and this
Here is the call graph for this function:

◆ dotProduct()

double Vector4::dotProduct ( const Vector4 & ref) const

Get the dot product of two vectors

Parameters
refA vector
Returns
The dot product
Here is the caller graph for this function:

◆ isEmpty()

bool Vector4::isEmpty ( double prec = math::eps) const

Determine if the vector is empty (all null values)

Parameters
precThe precision of the test
Returns
True if the vector is empty
Here is the caller graph for this function:

◆ isParallelTo()

bool Vector4::isParallelTo ( const Vector4 & ref,
double prec = math::eps ) const

Determine of a vector is parallel to this

Parameters
refA vector
precThe precision of the test
Returns
True if the vector is parallel to this
Here is the call graph for this function:

◆ isPerpendicularTo()

bool Vector4::isPerpendicularTo ( const Vector4 & ref,
double prec = math::eps ) const

Determine if a vector is perpendicular to this

Parameters
refA vector
precThe precision of the test
Returns
True if the vector is perpendicular to this
Here is the call graph for this function:

◆ isSameSense()

bool Vector4::isSameSense ( const Vector4 & ref,
double prec = math::eps ) const

Determine if a vector has the same sense as this

Parameters
refA vector
precThe precision of the test
Returns
True if the vector has the same sense as this

◆ magnitude()

double Vector4::magnitude ( ) const

Get the magnitude of the vector

Returns
The magnitude of the vector
Here is the caller graph for this function:

◆ modulus()

double active::geometry::Vector4::modulus ( ) const
inline

Get the modulus of the vector

Returns
The modulus of the vector
Here is the call graph for this function:

◆ normalised()

Vector4 Vector4::normalised ( ) const

Get the normalised vector

Returns
The normalised vector
Here is the call graph for this function:

◆ operator Point()

Vector4::operator Point ( ) const

Conversion operator

Returns
Point derived from this

◆ operator*() [1/2]

Vector4 Vector4::operator* ( const Matrix4x4 & matrix) const

Multiplication operator

Parameters
matrixThe matrix to multiply by
Returns
The resultant vector
Here is the call graph for this function:

◆ operator*() [2/2]

Vector4 Vector4::operator* ( double scale) const

Multiplication operator

Parameters
scaleThe scale factor
Returns
The resultant vector
Here is the call graph for this function:

◆ operator*=() [1/2]

Vector4 & Vector4::operator*= ( const Matrix4x4 & matrix)

Multiplication and assignment operator

Parameters
matrixThe matrix to multiply by
Returns
A reference to this

◆ operator*=() [2/2]

Vector4 & Vector4::operator*= ( double scale)

Multiplication and assignment operator

Parameters
scaleThe scale factor
Returns
The resultant vector

◆ operator+()

Vector4 Vector4::operator+ ( const Vector4 & vect) const

Addition operator

Parameters
vectThe vector to add
Returns
The resultant vector
Here is the call graph for this function:

◆ operator+=()

Vector4 & Vector4::operator+= ( const Vector4 & vect)

Addition and assignment operator

Parameters
vectThe vector to add
Returns
A reference to this

◆ operator-()

Vector4 Vector4::operator- ( const Vector4 & vect) const

Subtraction operator

Parameters
vectThe vector to substract
Returns
The resultant vector
Here is the call graph for this function:

◆ operator-=()

Vector4 & Vector4::operator-= ( const Vector4 & vect)

Subtraction and assignment operator

Parameters
vectThe vector to subtract
Returns
A reference to this

◆ operator=() [1/4]

Vector4 & Vector4::operator= ( const Line & source)

Assignment operator

Parameters
sourceThe object to copy
Returns
A reference to this

◆ operator=() [2/4]

Vector4 & Vector4::operator= ( const Point & source)

Assignment operator

Parameters
sourceThe object to copy
Returns
A reference to this

◆ operator=() [3/4]

Vector4 & Vector4::operator= ( const Vector3 & source)

Assignment operator

Parameters
sourceThe object to copy
Returns
A reference to this

◆ operator=() [4/4]

Vector4 & Vector4::operator= ( const Vector4 & source)

Assignment operator

Parameters
sourceThe object to copy
Returns
A reference to this

◆ operator[]() [1/2]

double & active::geometry::Vector4::operator[] ( int row)
inline

Subscript operator

Parameters
rowIndex into the vector
Returns
The requested coefficient

◆ operator[]() [2/2]

const double active::geometry::Vector4::operator[] ( int row) const
inline

Subscript operator

Parameters
rowIndex into the vector
Returns
The requested coefficient

◆ vectorProduct()

Vector4 Vector4::vectorProduct ( const Vector4 & ref) const

Get the vectorial product of two vectors (a perpendicular vector)

Parameters
refA vector
Returns
The vectorial product
Here is the call graph for this function:
Here is the caller graph for this function:

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