C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2
VSN::Vector3DF Class Reference

Vector in three-dimensional space. More...

#include <vsn_vector3d.h>

+ Collaboration diagram for VSN::Vector3DF:

Public Member Functions

 Vector3DF ()
 Constructor without parameters, vector is zero.
 
 Vector3DF (float x, float y, float z)
 The constructor by coordinates.
 
 Vector3DF (float a, float b)
 The constructor by angles.
 
 Vector3DF (const Point3DF &p)
 The constructor by point.
 
 Vector3DF (const Point3DF &p1, const Point3DF &p2, bool normalize=false)
 Constructor by two points.
 
 Vector3DF (const Vector3DF &)=default
 Copy constructor.
 
 Vector3DF (Vector3DF &&)=default
 Move constructor.
 
 Vector3DF (const MbVector3D &mathVec)
 
 ~Vector3DF ()=default
 D.
 
Vector3DFNormalize ()
 Normalize.
 
Vector3DF Normalized () const
 NO TRANSLATION.
 
Vector3DFTransform (const Matrix3DF &m)
 Transform according to the matrix. A matrix acts on a vector from the right.
 
Vector3DFAdd (const Vector3DF &v1, float t1)
 Add vector v1 multiplied by t1 to a vector.
 
Vector3DFAdd (const Vector3DF &v1, float t1, const Vector3DF &v2, float t2)
 Add sum of vectors v1 and v2 multiplied with t1 and t2 correspondingly to a vector.
 
Vector3DFMove (float dx, float dy, float dz)
 Translate along a vector.
 
Vector3DFRotate (const Vector3DF &axis, float angle)
 Rotate at given angle around axis.
 
Vector3DFRotate (const Point3DF &axisP1, const Point3DF &axisP2, float angle)
 Rotate around an axis.
 
Vector3DFSetZero ()
 Set coordinates to zero.
 
Vector3DFInvert ()
 Change vector direction to opposite.
 
bool IsDegenerate () const
 Check vector for degeneracy.
 
bool IsColinear (const Vector3DF &with) const
 Check if vectors are colinear with given tolerance (by sine of angle between vectors).
 
bool IsOrthogonal (const Vector3DF &with) const
 Check if vectors are orthogonal with given tolerance.
 
float Length () const
 Calculate vector length.
 
float Length2 () const
 Calculate vector length square.
 
float Angle (const Vector3DF &with) const
 Calculate angle between vectors.
 
bool IsSame (const Vector3DF &other) const
 Are the objects equal?
 
Vector3DF Mix (const Vector3DF &v, float t) const
 NO_TRANSLATE.
 
Vector3DFoperator+= (const Vector3DF &)
 Sum up two vectors.
 
Vector3DFoperator-= (const Vector3DF &)
 Subtract point from vector.
 
Vector3DFoperator*= (float)
 Multiply vector by number.
 
Vector3DFoperator/= (float)
 Divide vector by number.
 
Vector3DF operator- () const
 Unary minus.
 
Vector3DF operator+ (const Vector3DF &) const
 Sum up two vectors.
 
Vector3DF operator- (const Vector3DF &) const
 Find the difference of vectors.
 
bool operator== (const Vector3DF &) const
 Check for equality.
 
float & operator[] (unsigned int i)
 access a single element, non-const.
 
float operator* (const Vector3DF &) const
 Calculate dot product of two vectors.
 
Vector3DF operator| (const Vector3DF &) const
 Calculate vector product of two vectors.
 
Vector3DF operator* (const Matrix3DF &) const
 Calculate the vector as this copy transformed by the matrix.
 
bool operator< (const Vector3DF &other) const
 Comparison.
 

Static Public Attributes

static const Vector3DF xAxis
 "X" vector of standard basis.
 
static const Vector3DF yAxis
 "Y" vector of standard basis.
 
static const Vector3DF zAxis
 "Z" vector of standard basis.
 

Detailed Description

Vector in three-dimensional space.

Vector describes translation or direction in three-dimensional space and is defined by three coordinates x, y, z in the Cartesian coordinate system.
Vector is not binded to space points and therefore has not method for translating it in space.


The documentation for this class was generated from the following file: