class Vector3

3D Vector class.

Public Methods

[more] Vector3()
Constructor.
[more] Vector3(double* array)
Array constructor.
[more] Vector3(double a, double b, double c)
Element constructor.
[more]bool operator==(const Vector3 &q) const
Equal.
[more]bool operator!=(const Vector3 &q) const
Unequal.
[more]Vector3& operator=(const Vector3 &q)
Assignment.
[more]double operator*(const Vector3 &q) const
Multiplication.
[more]Vector3& operator*(const double &s) const
Scalar Multiplication.
[more]Vector3& operator/(const double &s) const
Division by a scalar.
[more]Vector3& operator^(const Vector3 &q) const
Vector Cross product.
[more]Vector3& operator+(const Vector3 &q) const
Addition.
[more]Vector3& operator-(const Vector3 &q) const
Subtraction=.
[more]Vector3& operator*=(const double &s)
Multiplication= with a scalar!
[more]Vector3& operator+=(const Vector3 &q)
Addition=.
[more]double& operator[](int i)
Access to component
[more]double abs() const
Norm.
[more]double* get_vec() const
Get the coordinate vector.


Documentation

3D Vector class. Simple 3D vector class with some operations.
o Vector3()
Constructor.

o Vector3(double* array)
Array constructor. Accepting the 3 doubles saved in an array.

o Vector3(double a, double b, double c)
Element constructor. Accepting the 3 doubles given separately.

obool operator==(const Vector3 &q) const
Equal. this == q ?

obool operator!=(const Vector3 &q) const
Unequal. this != q ?

oVector3& operator=(const Vector3 &q)
Assignment. this = q

odouble operator*(const Vector3 &q) const
Multiplication. this * q

oVector3& operator*(const double &s) const
Scalar Multiplication. Overloaded: Multiplication with a scalar: this * s

oVector3& operator/(const double &s) const
Division by a scalar. this / s No checking for division by zero !

oVector3& operator^(const Vector3 &q) const
Vector Cross product. this x q

oVector3& operator+(const Vector3 &q) const
Addition. this + q

oVector3& operator-(const Vector3 &q) const
Subtraction=. this -= q

oVector3& operator*=(const double &s)
Multiplication= with a scalar! this -= q

oVector3& operator+=(const Vector3 &q)
Addition=. this += q

odouble& operator[](int i)
Access to component

odouble abs() const
Norm. ||this||

odouble* 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++.