MercuryDPM
Beta
|
Go to the source code of this file.
Functions | |
std::ostream & | operator<< (std::ostream &os, const Vec3D &a) |
std::istream & | operator>> (std::istream &is, Vec3D &a) |
Vec3D | operator+ (const Mdouble a, const Vec3D &b) |
Vec3D | operator- (const Mdouble a, const Vec3D &b) |
Vec3D | operator- (const Vec3D &a) |
Vec3D | operator* (const Mdouble a, const Vec3D &b) |
Multiplies each element of a given vector (b) by a given scalar (a). NB: this is a global function and a friend of the Vec3D class. Gets called when a scalar multiplication of the form (Mdouble) * (Vec3D) is performed.
[in] | a | the scalar |
[in] | b | the vector |
Definition at line 522 of file Vector.cc.
References Vec3D::X, Vec3D::Y, and Vec3D::Z.
Adds a scalar to the elements of given vector NB this is a global function and a friend of the Vec3D class. Gets called when addition operation of the form (Mdouble) + (Vec3D) is performed.
[in] | a | the scalar to be added |
[in] | b | the vector the scalar gets added to. |
Definition at line 484 of file Vector.cc.
References Vec3D::X, Vec3D::Y, and Vec3D::Z.
Subtracts each element of a given vector from a scalar NB this is a global function and a friend of the Vec3D class. Gets called when subtraction operation of the form (Mdouble) - (Vec3D) is performed.
[in] | a | the scalar |
[in] | b | the vector to be subtracted the scalar gets subtracted from. |
Definition at line 497 of file Vector.cc.
References Vec3D::X, Vec3D::Y, and Vec3D::Z.
Returns the negative of a given vector. NB: this is a global function and a friend of the Vec3D class. Gets called when a negation operation of the form - (Vec3D) is performed.
[in] | a | the vector to be negated |
Definition at line 509 of file Vector.cc.
References Vec3D::X, Vec3D::Y, and Vec3D::Z.
std::ostream& operator<< | ( | std::ostream & | os, |
const Vec3D & | a | ||
) |
Adds all elements of the vector to an output stream. NB: this is a global function and a friend of the Vec3D class!
[in] | os | the output stream, |
[in] | a | The vector of interest |
Definition at line 457 of file Vector.cc.
References Vec3D::X, Vec3D::Y, and Vec3D::Z.
std::istream& operator>> | ( | std::istream & | is, |
Vec3D & | a | ||
) |
Reads all elements of a given vector from an input stream. NB: this is a global function and a friend of the Vec3D class!
[in,out] | is | the input stream |
[in,out] | a | the vector to be read in |
Definition at line 470 of file Vector.cc.
References Vec3D::X, Vec3D::Y, and Vec3D::Z.