1 #ifndef CLASSIC_Vector3D_HH
2 #define CLASSIC_Vector3D_HH
41 Vector3D(
double x,
double y,
double z);
133 {
v[0] =
v[1] =
v[2] = 0.0; }
167 #endif // CLASSIC_Vector3D_HH
Matrix< T > operator-(const Matrix< T > &, const Matrix< T > &)
Matrix subtraction.
bool isZero() const
Test for zero.
Matrix< T > operator*(const Matrix< T > &, const Matrix< T > &)
Matrix multiply.
double getY() const
Get component.
void getComponents(double &x, double &y, double &z) const
Get components.
double & operator()(int i)
Get component.
void setY(double)
Set component.
Vector3D cross(const Vector3D &lhs, const Vector3D &rhs)
Vector cross product.
double getZ() const
Get component.
Matrix< T > operator+(const Matrix< T > &, const Matrix< T > &)
Matrix addition.
Vector3D operator-() const
Negative vector.
void setX(double)
Set component.
Vector3D & operator*=(double factor)
Scale and assign.
bool operator!=(const Vector3D &) const
Vector3D()
Default constructor.
bool operator==(const Vector3D &) const
void setZ(double)
Set component.
Vector3D & operator-=(const Vector3D &vector)
Subtract and assign.
double dot(const Vector3D &lhs, const Vector3D &rhs)
Vector dot product.
double getX() const
Get component.
Vector3D & operator+=(const Vector3D &vector)
Add and assign.