3D Vector class.
Public Methods
-
Vector3()
- Constructor.
-
Vector3(double* array)
- Array constructor.
-
Vector3(double a, double b, double c)
- Element constructor.
-
bool operator==(const Vector3 &q) const
- Equal.
-
bool operator!=(const Vector3 &q) const
- Unequal.
-
Vector3& operator=(const Vector3 &q)
- Assignment.
-
double operator*(const Vector3 &q) const
- Multiplication.
-
Vector3& operator*(const double &s) const
- Scalar Multiplication.
-
Vector3& operator/(const double &s) const
- Division by a scalar.
-
Vector3& operator^(const Vector3 &q) const
- Vector Cross product.
-
Vector3& operator+(const Vector3 &q) const
- Addition.
-
Vector3& operator-(const Vector3 &q) const
- Subtraction=.
-
Vector3& operator*=(const double &s)
- Multiplication= with a scalar!
-
Vector3& operator+=(const Vector3 &q)
- Addition=.
-
double& operator[](int i)
- Access to component
-
double abs() const
- Norm.
-
double* get_vec() const
- Get the coordinate vector.
Documentation
3D Vector class.
Simple 3D vector class with some operations.
- Vector3()
- Constructor.
- Vector3(double* array)
- Array constructor. Accepting the 3 doubles saved in an array.
- Vector3(double a, double b, double c)
- Element constructor. Accepting the 3 doubles given separately.
- bool operator==(const Vector3 &q) const
- Equal. this == q ?
- bool operator!=(const Vector3 &q) const
- Unequal. this != q ?
- Vector3& operator=(const Vector3 &q)
- Assignment. this = q
- double operator*(const Vector3 &q) const
- Multiplication. this * q
- Vector3& operator*(const double &s) const
- Scalar Multiplication. Overloaded: Multiplication with a scalar: this * s
- Vector3& operator/(const double &s) const
- Division by a scalar. this / s
No checking for division by zero !
- Vector3& operator^(const Vector3 &q) const
- Vector Cross product. this x q
- Vector3& operator+(const Vector3 &q) const
- Addition. this + q
- Vector3& operator-(const Vector3 &q) const
- Subtraction=. this -= q
- Vector3& operator*=(const double &s)
- Multiplication= with a scalar! this -= q
- Vector3& operator+=(const Vector3 &q)
- Addition=. this += q
- double& operator[](int i)
- Access to component
- double abs() const
- Norm. ||this||
- double* get_vec() const
- Get the coordinate vector.
- This class has no child classes.
Alphabetic index Hierarchy of classes
This page was generated with the help of DOC++.