|
My Project
|
Define geometric vector. More...
#include "geometry/gvector.h"

Public Member Functions | |
| GVector () | |
| GVector (double X, double Y, double Z, double hc) | |
| GVector (const GVector &other) | |
| GVector (GVector &&other) | |
| ~GVector () | |
| GVector & | operator= (GVector other) |
| GVector | operator+ (const GVector other) |
| GVector | operator- (const GVector other) |
| GVector | operator/ (const double value) |
| GVector | operator* (const double value) |
| double & | operator[] (const size_t index) |
| const double & | operator[] (const size_t index) const |
| vector< double > | getVec () const |
| double | length () |
| GVector | normalize () |
| GVector | operator* (GMatrix matrix) |
| bool | operator== (const GVector &other) const |
| bool | operator!= (const GVector &other) const |
Static Public Member Functions | |
| static GVector | cross (GVector first, GVector second) |
| static double | scalar (GVector first, GVector second) |
| static double | angle (GVector first, GVector second) |
Define geometric vector.
Geometric vector specified with 3 coordinates and length value
| GVector::GVector | ( | ) |
Emty constructor. Creates vector and sets it with zero values
Definition at line 6 of file gvector.cpp.
| GVector::GVector | ( | double | X, |
| double | Y, | ||
| double | Z, | ||
| double | hc | ||
| ) |
Constructor. Creates vector and sets it with incoming values
| [in] | X | X coordinate |
| [in] | Y | Y coordinate |
| [in] | Z | Z coordinate |
| [in] | hc | Homogeneous coordinates |
Definition at line 14 of file gvector.cpp.
| GVector::GVector | ( | const GVector & | other | ) |
Constructor. Copies incoming vector.
| [in] | other | Source vector to copy. |
Definition at line 22 of file gvector.cpp.

| GVector::GVector | ( | GVector && | other | ) |
Constructor. Transfer incoming vector.
| [in] | other | Source vector to transfer. |
Definition at line 27 of file gvector.cpp.
| GVector::~GVector | ( | ) |
Destructor. Clears current vector.
Definition at line 32 of file gvector.cpp.
Angle between two vectors
| [in] | first | First vector |
| [in] | second | Second vector |
Definition at line 148 of file gvector.cpp.

Vector product
| [in] | first | First vector to multiply |
| [in] | second | Second vector to multiply |
Definition at line 132 of file gvector.cpp.

| vector< double > GVector::getVec | ( | ) | const |
Returns current vector
Definition at line 101 of file gvector.cpp.

| double GVector::length | ( | ) |
Geometric length of vector
Definition at line 106 of file gvector.cpp.

| GVector GVector::normalize | ( | ) |
Normalize current vector
Definition at line 115 of file gvector.cpp.


| bool GVector::operator!= | ( | const GVector & | other | ) | const |
Compare two vectors
| [in] | other | Vector to compare |
Definition at line 186 of file gvector.cpp.
| GVector GVector::operator* | ( | const double | value | ) |
Multiply this vector with incoming value
| [in] | value | Value to multiply |
Definition at line 73 of file gvector.cpp.
Multiply this vector by matrix
| [in] | matrix | Matrix to multiply |
Definition at line 161 of file gvector.cpp.
Sum this vector with incoming vector values
| [in] | other | Source vector to sum |
Definition at line 43 of file gvector.cpp.
Difference between this vector and incoming vector
| [in] | other | Source vector to diff |
Definition at line 53 of file gvector.cpp.
| GVector GVector::operator/ | ( | const double | value | ) |
Divide this vector with incoming value
| [in] | value | Value to divide |
Definition at line 63 of file gvector.cpp.
Sets vector with sourse`s vector values
| [in] | other | Source vector to copy |
Definition at line 37 of file gvector.cpp.

| bool GVector::operator== | ( | const GVector & | other | ) | const |
Compare two vectors
| [in] | other | Vector to compare |
Definition at line 174 of file gvector.cpp.
| double & GVector::operator[] | ( | const size_t | index | ) |
Chooses coordinate by index: 0-X; 1-Y; 2-Z; 3-homogeneous coordinates
| [in] | index | Index of choosen coordinate |
Definition at line 83 of file gvector.cpp.
| const double & GVector::operator[] | ( | const size_t | index | ) | const |
Const method. Chooses coordinate by index: 0-X; 1-Y; 2-Z; 3-homogeneous coordinates
| [in] | index | Index of choosen coordinate |
Definition at line 92 of file gvector.cpp.
Scalar product
| [in] | first | First vector to multiply |
| [in] | second | Second vector to multiply |
Definition at line 143 of file gvector.cpp.

1.8.12