ALBA
Public Member Functions | Static Public Member Functions | List of all members
albaVect3d Class Reference

#include <albaVect3d.h>

Public Member Functions

 albaVect3d ()
 
 albaVect3d (double x, double y, double z)
 
 albaVect3d (double *values)
 
albaVect3d Abs (void)
 
void Setzero (void)
 
void SetValues (double *values)
 
void SetValues (double x, double y, double z)
 
double Magnitude (void)
 
void Normalize (void)
 
albaVect3d Normal (void)
 
double Distance (albaVect3d &vector)
 
double Distance2 (albaVect3d &vector)
 
double Dot (albaVect3d &vector)
 
albaVect3d Cross (albaVect3d &vector)
 
double GetX ()
 
double GetY ()
 
double GetZ ()
 
void SetX (double x)
 
void SetY (double y)
 
void SetZ (double z)
 
double * GetVect ()
 
void GetVect (double *vect)
 
int operator== (albaVect3d &vect)
 
int operator== (double *vect)
 
albaVect3d operator+ (albaVect3d &vect)
 
albaVect3d operator+ (double *vect)
 
albaVect3d operator- (albaVect3d &vect)
 
albaVect3d operator- (double *vect)
 
albaVect3d operator* (double num)
 
albaVect3d operator/ (double num)
 
albaVect3doperator+= (albaVect3d &vect)
 
albaVect3doperator+= (double *vect)
 
albaVect3doperator-= (albaVect3d &vect)
 
albaVect3doperator-= (double *vect)
 
albaVect3doperator*= (double val)
 
albaVect3doperator/= (double val)
 
double & operator[] (int pos)
 
double AngleBetweenVectors (albaVect3d &vect, bool getMinAngle=true)
 

Static Public Member Functions

static albaVect3d Slerp (albaVect3d start, albaVect3d end, double percent)
 

Detailed Description

Class Name: albaVect3d.

High optimized class for 3-Dimensional vectors management.

Definition at line 34 of file albaVect3d.h.

Constructor & Destructor Documentation

◆ albaVect3d() [1/3]

albaVect3d::albaVect3d ( )

Default constructor, init to zero.

◆ albaVect3d() [2/3]

albaVect3d::albaVect3d ( double  x,
double  y,
double  z 
)

Constructor, sets the vector values.

◆ albaVect3d() [3/3]

albaVect3d::albaVect3d ( double *  values)

Constructor, sets the vector values.

Member Function Documentation

◆ Abs()

albaVect3d albaVect3d::Abs ( void  )

Return a vector whit the abs of each element.

◆ Setzero()

void albaVect3d::Setzero ( void  )

Sets the vector to zero.

◆ SetValues() [1/2]

void albaVect3d::SetValues ( double *  values)

Sets the vector values.

◆ SetValues() [2/2]

void albaVect3d::SetValues ( double  x,
double  y,
double  z 
)

Sets the vector values.

◆ Magnitude()

double albaVect3d::Magnitude ( void  )

Returns the magnitude of the vector.

◆ Normalize()

void albaVect3d::Normalize ( void  )

Normalize the components of the vector.

◆ Normal()

albaVect3d albaVect3d::Normal ( void  )

Return the normal of the vector (the original vector is not modified()

◆ Distance()

double albaVect3d::Distance ( albaVect3d vector)

Return the distance between the vectors.

◆ Distance2()

double albaVect3d::Distance2 ( albaVect3d vector)

Return the distance2 (quadratic distance) between the vectors.

◆ Dot()

double albaVect3d::Dot ( albaVect3d vector)

Return the dot product between the vectors.

◆ Cross()

albaVect3d albaVect3d::Cross ( albaVect3d vector)

Return the cross product between the vectors.

◆ GetX()

double albaVect3d::GetX ( )
inline

Return the Value of the X-element.

Definition at line 81 of file albaVect3d.h.

◆ GetY()

double albaVect3d::GetY ( )
inline

Return the Value of the Y-element.

Definition at line 84 of file albaVect3d.h.

◆ GetZ()

double albaVect3d::GetZ ( )
inline

Return the Value of the Z-element.

Definition at line 87 of file albaVect3d.h.

◆ SetX()

void albaVect3d::SetX ( double  x)
inline

the Value of the X-element

Definition at line 90 of file albaVect3d.h.

◆ SetY()

void albaVect3d::SetY ( double  y)
inline

the Value of the Y-element

Definition at line 93 of file albaVect3d.h.

◆ SetZ()

void albaVect3d::SetZ ( double  z)
inline

the Value of the Z-element

Definition at line 96 of file albaVect3d.h.

◆ GetVect() [1/2]

double * albaVect3d::GetVect ( )
inline

Return a pointer to the vector of double.

Definition at line 99 of file albaVect3d.h.

◆ GetVect() [2/2]

void albaVect3d::GetVect ( double *  vect)
inline

Return a pointer to the vector of double.

Definition at line 102 of file albaVect3d.h.

◆ operator==() [1/2]

int albaVect3d::operator== ( albaVect3d vect)

Operator: Return true if the vectors are equals.

◆ operator==() [2/2]

int albaVect3d::operator== ( double *  vect)

Operator: Return true if the vectors are equals.

◆ operator+() [1/2]

albaVect3d albaVect3d::operator+ ( albaVect3d vect)

Operator: Return the sum of the vectors.

◆ operator+() [2/2]

albaVect3d albaVect3d::operator+ ( double *  vect)

Operator: Return the sum of the vectors.

◆ operator-() [1/2]

albaVect3d albaVect3d::operator- ( albaVect3d vect)

Operator: Return the difference of the vectors.

◆ operator-() [2/2]

albaVect3d albaVect3d::operator- ( double *  vect)

Operator: Return the difference of the vectors.

◆ operator*()

albaVect3d albaVect3d::operator* ( double  num)

Operator: Return the scalar multiply.

◆ operator/()

albaVect3d albaVect3d::operator/ ( double  num)

Operator: Return the scalar division.

◆ operator+=() [1/2]

albaVect3d & albaVect3d::operator+= ( albaVect3d vect)

Operator: Sets the values to the sum between the vectors.

◆ operator+=() [2/2]

albaVect3d & albaVect3d::operator+= ( double *  vect)

Operator: Sets the values to the sum between the vectors.

◆ operator-=() [1/2]

albaVect3d & albaVect3d::operator-= ( albaVect3d vect)

Operator: Sets the values to the difference between the vectors.

◆ operator-=() [2/2]

albaVect3d & albaVect3d::operator-= ( double *  vect)

Operator: Sets the values to the difference between the vectors.

◆ operator*=()

albaVect3d & albaVect3d::operator*= ( double  val)

Operator: Sets the values to the product with the scalar.

◆ operator/=()

albaVect3d & albaVect3d::operator/= ( double  val)

Operator: Sets the values to the division with the scalar.

◆ operator[]()

double & albaVect3d::operator[] ( int  pos)

Operator: Gets the vect values with *double style ie: vect[0]==vect.GetX()

◆ AngleBetweenVectors()

double albaVect3d::AngleBetweenVectors ( albaVect3d vect,
bool  getMinAngle = true 
)

Returns the angle between two vectors.

◆ Slerp()

static albaVect3d albaVect3d::Slerp ( albaVect3d  start,
albaVect3d  end,
double  percent 
)
static

Do a spherical linear interpolation of two vectors.


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