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

A 1x3 vector class. More...

#include <Vector3.h>

Public Types

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

Public Member Functions

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

Detailed Description

A 1x3 vector class.

Constructor & Destructor Documentation

◆ Vector3() [1/5]

Vector3::Vector3 ( )

Constructor

Here is the caller graph for this function:

◆ Vector3() [2/5]

Vector3::Vector3 ( double x,
double y,
double z = 0.0 )

Constructor

Parameters
xX coefficient
yY coefficient
zZ coefficient

◆ Vector3() [3/5]

Vector3::Vector3 ( const Point & source)

Constructor

Parameters
sourceA point to construct the vector from

◆ Vector3() [4/5]

Vector3::Vector3 ( const Line & source)

Constructor

Parameters
sourceA line to construct the vector from

◆ Vector3() [5/5]

Vector3::Vector3 ( const Vector3 & source)

Copy constructor

Parameters
sourceThe object to copy

◆ ~Vector3()

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

Destructor

Member Function Documentation

◆ altitudeAngle()

double Vector3::altitudeAngle ( ) const

Get the altitude angle of the vector

Returns
The altitude angle
Here is the call graph for this function:
Here is the caller graph for this function:

◆ angleTo()

double Vector3::angleTo ( const Vector3 & 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:

◆ azimuthAngle()

double Vector3::azimuthAngle ( ) const

Get the azimuth angle of the vector

Returns
The azimuth angle
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dotProduct()

double Vector3::dotProduct ( const Vector3 & 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 Vector3::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 Vector3::isParallelTo ( const Vector3 & 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:
Here is the caller graph for this function:

◆ isPerpendicularTo()

bool Vector3::isPerpendicularTo ( const Vector3 & 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:
Here is the caller graph for this function:

◆ isSameSense()

bool Vector3::isSameSense ( const Vector3 & 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

◆ isXyPlane()

bool active::geometry::Vector3::isXyPlane ( double prec = math::eps) const
inline

Determine if the vector is in the plane of the x/y axis

Returns
True if the vector is in the plane of the x/y axis

◆ isZAxis()

bool active::geometry::Vector3::isZAxis ( double prec = math::eps) const
inline

Determine if the vector is along the z axis

Returns
True if the vector is along the z axis

◆ magnitude()

double Vector3::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::Vector3::modulus ( ) const
inline

Get the modulus of the vector

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

◆ normalised()

Vector3 Vector3::normalised ( ) const

Get the normalised vector

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

◆ operator Point()

Vector3::operator Point ( ) const

Conversion operator

Returns
Point derived from this

◆ operator*() [1/3]

Vector3 Vector3::operator* ( const Matrix3x3 & matrix) const

Multiplication operator

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

◆ operator*() [2/3]

Vector3 Vector3::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*() [3/3]

Vector3 Vector3::operator* ( double scale) const

Multiplication operator

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

◆ operator*=() [1/3]

Vector3 & Vector3::operator*= ( const Matrix3x3 & matrix)

Multiplication and assignment operator

Parameters
matrixThe matrix to multiply by
Returns
A reference to this

◆ operator*=() [2/3]

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

Multiplication and assignment operator

Parameters
matrixThe matrix to multiply by
Returns
A reference to this

◆ operator*=() [3/3]

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

Multiplication and assignment operator

Parameters
scaleThe scale factor
Returns
The resultant vector

◆ operator+()

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

Addition operator

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

◆ operator+=()

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

Addition and assignment operator

Parameters
vectThe vector to add
Returns
A reference to this

◆ operator-()

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

Subtraction operator

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

◆ operator-=()

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

Subtraction and assignment operator

Parameters
vectThe vector to subtract
Returns
A reference to this

◆ operator=() [1/3]

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

Assignment operator

Parameters
sourceThe line to copy
Returns
A reference to this

◆ operator=() [2/3]

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

Assignment operator

Parameters
sourceThe point to copy
Returns
A reference to this

◆ operator=() [3/3]

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

Assignment operator

Parameters
sourceThe vector to copy
Returns
A reference to this

◆ operator[]() [1/2]

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

Subscript operator

Parameters
rowIndex into the vector
Returns
The requested coefficient

◆ operator[]() [2/2]

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

Subscript operator

Parameters
rowIndex into the vector
Returns
The requested coefficient

◆ vectorProduct()

Vector3 Vector3::vectorProduct ( const Vector3 & ref) const

Get the vectorial product of two vectors

Parameters
refA vector
Returns
The vectorial product (orthogonal to both)
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: