The RMP Motion Controller APIs
Vector3d

Vector3d is used for three-dimensional points and vectors. More...

Attributes

double X
 The X coordinate.
 
double Y
 The Y coordinate.
 
double Z
 The Z coordinate.
 

Functions

 Vector3d ()
 Default constructor. X=Y=Z=0.
 
 Vector3d (const Vector3d &rhs)
 Constructor. X=rhs.X, Y=rhs.Y, Z=rhs.Z.
 
 Vector3d (double x, double y, double z)
 Constructor. X=x, Y=y, Z=z.
 
Vector3d Cross (const Vector3d &rhs) const
 Cross Product. Vector.X = this.Y*rhs.z - this.Z*rhs.Y Vector.Y = this.Z*rhs.X - this.X*rhs.Z Vector.Z = this.X*rhs.Y - this.Y*rhs.X.
 
double Dot (const Vector3d &rhs) const
 Dot Product. this.X*rhs.X + this.Y*rhs.Y + this.Z*rhs.Z.
 
bool Equals (const Vector3d &rhs, const double tolerance) const
 Checks whether this.X==rhs.X && this.Y==rhs.Y && this.Z==rhs.Z within tolerance abs(a-b) < tolerance.
 
double Length () const
 Returns the length of the vector. Aka the magnitude =sqrt(SumSquares)
 
Vector3d Normal () const
 Returns a normalized copy of this.
 
Vector3dNormalize ()
 Normalizes this.
 
bool operator!= (const Vector3d &rhs) const
 Returns whether this is not exactly equal to rhs.
 
Vector3d operator* (double scalar) const
 Returns a Vector3d scaled scaled by. X*scalar, Y*scalar, Z*scalar.
 
Vector3doperator*= (double scalar)
 Scales each element by scalar. X*=scalar, Y*=scalar, Z*=scalar.
 
Vector3d operator+ (const Vector3d &rhs) const
 Returns a copy of rhs added to this. this.X+rhs.X, this.Y+rhs.Y, this.Z+rhs.Z.
 
Vector3doperator+= (const Vector3d &rhs)
 Adds rhs to this. this.X+=rhs.X, this.Y+=rhs.Y, this.Z+=rhs.Z.
 
Vector3d operator- () const
 Returns a copy of this with elements negated. -X, -Y, -Z.
 
Vector3d operator- (const Vector3d &rhs) const
 Returns a copy of rhs subtracted from this. this.X-rhs.X, this.Y-rhs.Y, this.Z-rhs.Z.
 
Vector3doperator-= (const Vector3d &rhs)
 Subtracts rhs from this. this.X-=rhs.X, this.Y-=rhs.Y, this.Z-=rhs.Z.
 
Vector3d operator/ (double scalar) const
 Returns a Vector3d scaled scaled by. X/scalar, Y/scalar, Z/scalar.
 
Vector3doperator/= (double scalar)
 Scales each element by scalar. X/=scalar, Y/=scalar, Z/=scalar.
 
Vector3doperator= (const Vector3d &rhs)
 Sets this = rhs.
 
bool operator== (const Vector3d &rhs) const
 Returns whether this is exactly equal to rhs.
 
Vector3dSet (const Vector3d &rhs)
 Sets X=rhs.X, Y=rhs.Y, Z=rhs.Z.
 
Vector3dSet (double x, double y, double z)
 Sets X=x, Y=y, Z=z.
 
double SumSquares () const
 Returns the sum of squares. X*X+Y*Y+Z*Z.
 

Description

Definition at line 101 of file cartesianrobot.h.