ZeusMath-Library  2.0.4
zeus::TVector3D Class Reference

#include <Vector3D.h>

Inheritance diagram for zeus::TVector3D:
zeus::IVector3D zeus::IVector

Public Member Functions

 TVector3D ()
 Default constructor, initializing as zero vector. More...
 
 TVector3D (const Float &fX, const Float &fY, const Float &fZ)
 Constructor taking all components' values. More...
 
 TVector3D (const TVector3D &rVector)
 Copy constructor: Constructor taking class type object. More...
 
 TVector3D (const TVector &rVector)
 Constructor taking a generic vector object. More...
 
 TVector3D (const IVector3D &rVector)
 Constructor taking interface type object. More...
 
 TVector3D (const IVector &rVector)
 Constructor taking interface type object. More...
 
virtual ~TVector3D ()
 Virtual destructor. More...
 
TVector3D getNormalizedVector () const
 
TVector3D rotatedX (const IAngle &rAngle) const
 
TVector3D rotatedY (const IAngle &rAngle) const
 
TVector3D rotatedZ (const IAngle &rAngle) const
 
TVector3D rotatedHorizontalAngle (const IAngle &rAngle) const
 
TVector3D rotatedVerticalAngle (const IAngle &rAngle) const
 
virtual void MQUALIFIER assign3D (const IVector3D &rVector)
 
virtual bool MQUALIFIER isParallel (const IVector3D &rVector) const
 
virtual bool MQUALIFIER isCollinear (const IVector3D &rVector) const
 
virtual bool MQUALIFIER isZeroVector () const
 
virtual bool MQUALIFIER isUnitVectorX () const
 
virtual bool MQUALIFIER isUnitVectorY () const
 
virtual bool MQUALIFIER isUnitVectorZ () const
 
virtual const Float &MQUALIFIER getX () const
 
virtual const Float &MQUALIFIER getY () const
 
virtual const Float &MQUALIFIER getZ () const
 
virtual void MQUALIFIER setX (const Float &fX)
 
virtual void MQUALIFIER setY (const Float &fY)
 
virtual void MQUALIFIER setZ (const Float &fZ)
 
virtual void MQUALIFIER setValues (Float fX, Float fY, Float fZ)
 
virtual void MQUALIFIER initAsZeroVector ()
 
virtual void MQUALIFIER initAsUnitVectorX ()
 
virtual void MQUALIFIER initAsUnitVectorY ()
 
virtual void MQUALIFIER initAsUnitVectorZ ()
 
virtual void MQUALIFIER calcVectorProduct (const IVector3D &rVector, IVector3D &rProduct) const
 
virtual void MQUALIFIER calcAngleTo (const IVector3D &rVector, IAngle &rAngle) const
 
virtual Float MQUALIFIER calcDistanceTo (const IVector3D &rVector) const
 
virtual void MQUALIFIER normalize ()
 
virtual void MQUALIFIER getHorizontalAngle (IAngle &rAngle) const
 
virtual void MQUALIFIER getVerticalAngle (IAngle &rAngle) const
 
virtual void MQUALIFIER setHorizontalAngle (const IAngle &rAngle)
 
virtual void MQUALIFIER setVerticalAngle (const IAngle &rAngle)
 
virtual void MQUALIFIER rotateX (const IAngle &rAngle)
 
virtual void MQUALIFIER rotateY (const IAngle &rAngle)
 
virtual void MQUALIFIER rotateZ (const IAngle &rAngle)
 
virtual void MQUALIFIER rotateHorizontalAngle (const IAngle &rAngle)
 
virtual void MQUALIFIER rotateVerticalAngle (const IAngle &rAngle)
 
virtual void MQUALIFIER mirrorAtXYPlane ()
 
virtual void MQUALIFIER mirrorAtXZPlane ()
 
virtual void MQUALIFIER mirrorAtYZPlane ()
 
virtual void MQUALIFIER assign (const IVector &rVector)
 
virtual void MQUALIFIER assignValues (const Float *apValues, Int iSize)
 
virtual bool MQUALIFIER equals (const IVector &rVector, Float fPrecision=FLOAT_PRECISION) const
 
virtual Float MQUALIFIER getComponent (Int iIndex) const
 
virtual Float *MQUALIFIER getComponents ()
 
virtual const Float *MQUALIFIER getComponentsConst () const
 
virtual Int MQUALIFIER getDimension () const
 
virtual Float MQUALIFIER getNorm () const
 
virtual Float MQUALIFIER getNormSquared () const
 
virtual Float MQUALIFIER getLength () const
 
virtual Float MQUALIFIER getLengthSquared () const
 
virtual bool MQUALIFIER setComponent (Int iIndex, Float fValue)
 
virtual void MQUALIFIER setDimension (Int iValue)
 
virtual void MQUALIFIER add (const IVector &rVector)
 
virtual void MQUALIFIER subtract (const IVector &rVector)
 
virtual Float MQUALIFIER calcScalarProduct (const IVector &rVector) const
 
virtual void MQUALIFIER multiply (const Float &f)
 
virtual void MQUALIFIER divide (const Float &f)
 
TVector3D operator+ (const IVector &rVector) const
 
TVector3D operator- (const IVector &rVector) const
 
Float operator* (const IVector &rVector) const
 
TVector3D operator* (const Float &f) const
 
TVector3D operator/ (const Float &f) const
 
TVector3D operator^ (const IVector3D &rVector) const
 
const TVector3Doperator+= (const IVector &rVector)
 
const TVector3Doperator-= (const IVector &rVector)
 
const TVector3Doperator*= (const Float &f)
 
const TVector3Doperator/= (const Float &f)
 
const TVector3Doperator= (const IVector &rVector)
 
const TVector3Doperator= (const IVector3D &rVector)
 
const TVector3Doperator= (const TVector3D &rVector)
 
bool operator== (const IVector3D &rVector) const
 
bool operator== (const IVector &Vector) const
 
bool operator!= (const IVector3D &rVector) const
 
bool operator!= (const IVector &rVector) const
 
bool operator|| (const IVector3D &rVector) const
 
bool operator< (const TVector3D &rVector) const
 

Static Public Member Functions

static const TVector3DgetZeroVector ()
 
static const TVector3DgetUnitVectorX ()
 
static const TVector3DgetUnitVectorY ()
 
static const TVector3DgetUnitVectorZ ()
 

Detailed Description

TVector3D encapsulates a three dimensional floating point vector as base class for vector geometry calculations.

TVector3D objects are stack objects.

Constructor & Destructor Documentation

§ TVector3D() [1/6]

zeus::TVector3D::TVector3D ( )
inline

Default constructor, initializing as zero vector.

§ TVector3D() [2/6]

zeus::TVector3D::TVector3D ( const Float &  fX,
const Float &  fY,
const Float &  fZ 
)
inline

Constructor taking all components' values.

§ TVector3D() [3/6]

zeus::TVector3D::TVector3D ( const TVector3D rVector)
inline

Copy constructor: Constructor taking class type object.

§ TVector3D() [4/6]

zeus::TVector3D::TVector3D ( const TVector rVector)
inline

Constructor taking a generic vector object.

§ TVector3D() [5/6]

zeus::TVector3D::TVector3D ( const IVector3D rVector)
inline

Constructor taking interface type object.

§ TVector3D() [6/6]

zeus::TVector3D::TVector3D ( const IVector rVector)
inline

Constructor taking interface type object.

§ ~TVector3D()

virtual zeus::TVector3D::~TVector3D ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

§ add()

void MQUALIFIER zeus::TVector3D::add ( const IVector rVector)
inlinevirtual
See also
IVector::add

Implements zeus::IVector.

§ assign()

void MQUALIFIER zeus::TVector3D::assign ( const IVector rVector)
virtual
See also
IVector::assign

Implements zeus::IVector.

§ assign3D()

void MQUALIFIER zeus::TVector3D::assign3D ( const IVector3D rVector)
virtual
See also
IVector3D::assign3D

Implements zeus::IVector3D.

§ assignValues()

void MQUALIFIER zeus::TVector3D::assignValues ( const Float *  apValues,
Int  iSize 
)
virtual
See also
IVector::assignValues

Implements zeus::IVector.

§ calcAngleTo()

void MQUALIFIER zeus::TVector3D::calcAngleTo ( const IVector3D rVector,
IAngle rAngle 
) const
virtual

§ calcDistanceTo()

Float MQUALIFIER zeus::TVector3D::calcDistanceTo ( const IVector3D rVector) const
inlinevirtual

§ calcScalarProduct()

Float MQUALIFIER zeus::TVector3D::calcScalarProduct ( const IVector rVector) const
inlinevirtual

§ calcVectorProduct()

void MQUALIFIER zeus::TVector3D::calcVectorProduct ( const IVector3D rVector,
IVector3D rProduct 
) const
inlinevirtual

§ divide()

void MQUALIFIER zeus::TVector3D::divide ( const Float &  f)
inlinevirtual
See also
IVector::divide

Implements zeus::IVector.

§ equals()

bool MQUALIFIER zeus::TVector3D::equals ( const IVector rVector,
Float  fPrecision = FLOAT_PRECISION 
) const
virtual
See also
IVector::equals

Implements zeus::IVector.

§ getComponent()

Float MQUALIFIER zeus::TVector3D::getComponent ( Int  iIndex) const
virtual
See also
IVector::getComponent

Implements zeus::IVector.

§ getComponents()

Float *MQUALIFIER zeus::TVector3D::getComponents ( )
inlinevirtual
See also
IVector::getCoordinates

Implements zeus::IVector.

§ getComponentsConst()

const Float *MQUALIFIER zeus::TVector3D::getComponentsConst ( ) const
inlinevirtual
See also
IVector::getCoordinatesConst

Implements zeus::IVector.

§ getDimension()

Int MQUALIFIER zeus::TVector3D::getDimension ( ) const
inlinevirtual
See also
IVector::getDimensions

Implements zeus::IVector.

§ getHorizontalAngle()

void MQUALIFIER zeus::TVector3D::getHorizontalAngle ( IAngle rAngle) const
virtual

§ getLength()

Float MQUALIFIER zeus::TVector3D::getLength ( ) const
inlinevirtual
See also
IVector::getLength

Implements zeus::IVector.

§ getLengthSquared()

Float MQUALIFIER zeus::TVector3D::getLengthSquared ( ) const
inlinevirtual

§ getNorm()

Float MQUALIFIER zeus::TVector3D::getNorm ( ) const
virtual
See also
IVector::getNorm

Implements zeus::IVector.

§ getNormalizedVector()

TVector3D zeus::TVector3D::getNormalizedVector ( ) const
inline

Calculate the normalized vector, and return by value.

Returns
Normalized vector. In case this vector is the zero vector, the zero vector is returned.

§ getNormSquared()

Float MQUALIFIER zeus::TVector3D::getNormSquared ( ) const
virtual

§ getUnitVectorX()

static const TVector3D& zeus::TVector3D::getUnitVectorX ( )
inlinestatic

§ getUnitVectorY()

static const TVector3D& zeus::TVector3D::getUnitVectorY ( )
inlinestatic

§ getUnitVectorZ()

static const TVector3D& zeus::TVector3D::getUnitVectorZ ( )
inlinestatic

§ getVerticalAngle()

void MQUALIFIER zeus::TVector3D::getVerticalAngle ( IAngle rAngle) const
virtual

§ getX()

const Float &MQUALIFIER zeus::TVector3D::getX ( ) const
inlinevirtual
See also
IVector3D::getX

Implements zeus::IVector3D.

§ getY()

const Float &MQUALIFIER zeus::TVector3D::getY ( ) const
inlinevirtual
See also
IVector3D::getY

Implements zeus::IVector3D.

§ getZ()

const Float &MQUALIFIER zeus::TVector3D::getZ ( ) const
inlinevirtual
See also
IVector3D::getZ

Implements zeus::IVector3D.

§ getZeroVector()

static const TVector3D& zeus::TVector3D::getZeroVector ( )
inlinestatic

§ initAsUnitVectorX()

void MQUALIFIER zeus::TVector3D::initAsUnitVectorX ( )
inlinevirtual

§ initAsUnitVectorY()

void MQUALIFIER zeus::TVector3D::initAsUnitVectorY ( )
inlinevirtual

§ initAsUnitVectorZ()

void MQUALIFIER zeus::TVector3D::initAsUnitVectorZ ( )
inlinevirtual

§ initAsZeroVector()

void MQUALIFIER zeus::TVector3D::initAsZeroVector ( )
inlinevirtual

§ isCollinear()

bool MQUALIFIER zeus::TVector3D::isCollinear ( const IVector3D rVector) const
virtual

§ isParallel()

bool MQUALIFIER zeus::TVector3D::isParallel ( const IVector3D rVector) const
virtual

§ isUnitVectorX()

bool MQUALIFIER zeus::TVector3D::isUnitVectorX ( ) const
inlinevirtual

§ isUnitVectorY()

bool MQUALIFIER zeus::TVector3D::isUnitVectorY ( ) const
inlinevirtual

§ isUnitVectorZ()

bool MQUALIFIER zeus::TVector3D::isUnitVectorZ ( ) const
inlinevirtual

§ isZeroVector()

bool MQUALIFIER zeus::TVector3D::isZeroVector ( ) const
inlinevirtual

§ mirrorAtXYPlane()

virtual void MQUALIFIER zeus::TVector3D::mirrorAtXYPlane ( )
inlinevirtual

Mirror at the xy plane.

Implements zeus::IVector3D.

§ mirrorAtXZPlane()

virtual void MQUALIFIER zeus::TVector3D::mirrorAtXZPlane ( )
inlinevirtual

Mirror at the xz plane.

Implements zeus::IVector3D.

§ mirrorAtYZPlane()

virtual void MQUALIFIER zeus::TVector3D::mirrorAtYZPlane ( )
inlinevirtual

Mirror at the yz plane.

Implements zeus::IVector3D.

§ multiply()

void MQUALIFIER zeus::TVector3D::multiply ( const Float &  f)
inlinevirtual
See also
IVector::multiply

Implements zeus::IVector.

§ normalize()

void MQUALIFIER zeus::TVector3D::normalize ( )
inlinevirtual

§ operator!=() [1/2]

bool zeus::TVector3D::operator!= ( const IVector3D rVector) const
inline

Inequality.

Parameters
rVector[IN]: Vector to be compared to this vector.
Returns
true : are not equal
false: are equal

§ operator!=() [2/2]

bool zeus::TVector3D::operator!= ( const IVector rVector) const
inline

Inequality.

Parameters
rVector[IN]: Vector to be compared to this vector.
Returns
true : are not equal
false: are equal

§ operator*() [1/2]

Float zeus::TVector3D::operator* ( const IVector rVector) const
inline

Scalar product.

Parameters
rVector[IN]: Vector to be multiplied with this vector.
Returns
Scalar product.

§ operator*() [2/2]

TVector3D zeus::TVector3D::operator* ( const Float &  f) const
inline

Multiplication with a scalar from the right.

Parameters
f[IN]: Scalar.
Returns
Multiplied vector.

§ operator*=()

const TVector3D & zeus::TVector3D::operator*= ( const Float &  f)
inline

Multiplication with a scalar from the right. Assign the result to this vector.

Parameters
f[IN]: Scalar.
Returns
const reference to this vector after the assignment.

§ operator+()

TVector3D zeus::TVector3D::operator+ ( const IVector rVector) const
inline

Addition.

Parameters
rVector[IN]: Vector to be added to this vector.
Returns
Vector sum.

§ operator+=()

const TVector3D & zeus::TVector3D::operator+= ( const IVector rVector)
inline

Add a vector to this vector, and assign the result to this vector.

Parameters
rVector[IN]: Vector to be added to this vector.
Returns
const reference to this vector after the assignment.

§ operator-()

TVector3D zeus::TVector3D::operator- ( const IVector rVector) const
inline

Subtraction.

Parameters
rVector[IN]: Vector to be subtracted from this vector.
Returns
Vector difference.

§ operator-=()

const TVector3D & zeus::TVector3D::operator-= ( const IVector rVector)
inline

Subtract a vector from this vector, and assign the result to this vector.

Parameters
rVector[IN]: Vector to be subtracted from this vector.
Returns
const reference to this vector after the assignment.

§ operator/()

TVector3D zeus::TVector3D::operator/ ( const Float &  f) const
inline

Division by a scalar.

Parameters
f[IN]: Scalar.
Returns
Divided vector. zero vector in case f is zero.

§ operator/=()

const TVector3D & zeus::TVector3D::operator/= ( const Float &  f)
inline

Division by a scalar from the right. Assign the result to this vector.

Parameters
f[IN]: Scalar.
Returns
const reference to this vector after the assignment.

§ operator<()

bool zeus::TVector3D::operator< ( const TVector3D rVector) const
inline

special compare operator used for maps and sets using a binary search

§ operator=() [1/3]

const TVector3D & zeus::TVector3D::operator= ( const IVector rVector)
inline

Assignment of interface type object.

Parameters
rVector[IN]: Vector to be assigned to this vector.
Returns
const reference to this vector after the assignment.

§ operator=() [2/3]

const TVector3D & zeus::TVector3D::operator= ( const IVector3D rVector)
inline

Assignment of interface type object.

Parameters
rVector[IN]: Vector to be assigned to this vector.
Returns
const reference to this vector after the assignment.

§ operator=() [3/3]

const TVector3D & zeus::TVector3D::operator= ( const TVector3D rVector)
inline

Assignment of class type object.

Parameters
rVector[IN]: Vector to be assigned to this vector.
Returns
const reference to this vector after the assignment.

§ operator==() [1/2]

bool zeus::TVector3D::operator== ( const IVector3D rVector) const
inline

Equality.

Parameters
rVector[IN]: Vector to be compared to this vector.
Returns
true : Vectors are equal
false: Vectors are not equal

§ operator==() [2/2]

bool zeus::TVector3D::operator== ( const IVector rVector) const
inline

Equality.

Parameters
rVector[IN]: Vector to be compared to this vector.
Returns
true : Vectors are equal
false: Vectors are not equal

§ operator^()

TVector3D zeus::TVector3D::operator^ ( const IVector3D rVector) const
inline

Vector product.

Parameters
rVector[IN]: Vector to be multiplied with this vector.
Returns
Vector product.

§ operator||()

bool zeus::TVector3D::operator|| ( const IVector3D rVector) const
inline

Parallel to another vector? Pointing in the same direction.

Parameters
rVector[IN]: Vector to be compared for being parallel to this vector.
Returns
true : Vectors are parallel.
false: Vectors aren't parallel

§ rotatedHorizontalAngle()

TVector3D zeus::TVector3D::rotatedHorizontalAngle ( const IAngle rAngle) const
inline

Rotate this vector such that its horizontal angle is increased by Angle, and return as a new vector.

Parameters
rAngle[IN]: Rotation angle.
Returns
Rotated vector.

§ rotatedVerticalAngle()

TVector3D zeus::TVector3D::rotatedVerticalAngle ( const IAngle rAngle) const

Rotate this vector such that its vertical angle is increased by Angle, and return as a new vector.

Parameters
rAngle[IN]: Rotation angle.
Returns
Rotated vector.

§ rotatedX()

TVector3D zeus::TVector3D::rotatedX ( const IAngle rAngle) const

Rotate this vector around the x-axis and return as a new vector.

Parameters
rAngle[IN]: Rotation angle.
Returns
Rotated vector.

§ rotatedY()

TVector3D zeus::TVector3D::rotatedY ( const IAngle rAngle) const

Rotate this vector around the y-axis and return as a new vector.

Parameters
rAngle[IN]: Rotation angle.
Returns
Rotated vector.

§ rotatedZ()

TVector3D zeus::TVector3D::rotatedZ ( const IAngle rAngle) const

Rotate this vector around the z-axis and return as a new vector.

Parameters
rAngle[IN]: Rotation angle.
Returns
Rotated vector.

§ rotateHorizontalAngle()

void MQUALIFIER zeus::TVector3D::rotateHorizontalAngle ( const IAngle rAngle)
inlinevirtual

§ rotateVerticalAngle()

void MQUALIFIER zeus::TVector3D::rotateVerticalAngle ( const IAngle rAngle)
inlinevirtual

§ rotateX()

void MQUALIFIER zeus::TVector3D::rotateX ( const IAngle rAngle)
inlinevirtual
See also
IVector3D::rotateX

Implements zeus::IVector3D.

§ rotateY()

void MQUALIFIER zeus::TVector3D::rotateY ( const IAngle rAngle)
inlinevirtual
See also
IVector3D::rotateY

Implements zeus::IVector3D.

§ rotateZ()

void MQUALIFIER zeus::TVector3D::rotateZ ( const IAngle rAngle)
inlinevirtual
See also
IVector3D::rotateZ

Implements zeus::IVector3D.

§ setComponent()

bool MQUALIFIER zeus::TVector3D::setComponent ( Int  iIndex,
Float  fValue 
)
virtual
See also
IVector::setComponent

Implements zeus::IVector.

§ setDimension()

void MQUALIFIER zeus::TVector3D::setDimension ( Int  iValue)
inlinevirtual
See also
IVector::setDimension

Implements zeus::IVector.

§ setHorizontalAngle()

void MQUALIFIER zeus::TVector3D::setHorizontalAngle ( const IAngle rAngle)
virtual

§ setValues()

void MQUALIFIER zeus::TVector3D::setValues ( Float  fX,
Float  fY,
Float  fZ 
)
inlinevirtual

§ setVerticalAngle()

void MQUALIFIER zeus::TVector3D::setVerticalAngle ( const IAngle rAngle)
virtual

§ setX()

void MQUALIFIER zeus::TVector3D::setX ( const Float &  fX)
inlinevirtual
See also
IVector3D::setX

Implements zeus::IVector3D.

§ setY()

void MQUALIFIER zeus::TVector3D::setY ( const Float &  fY)
inlinevirtual
See also
IVector3D::setY

Implements zeus::IVector3D.

§ setZ()

void MQUALIFIER zeus::TVector3D::setZ ( const Float &  fZ)
inlinevirtual
See also
IVector3D::setZ

Implements zeus::IVector3D.

§ subtract()

void MQUALIFIER zeus::TVector3D::subtract ( const IVector rVector)
inlinevirtual
See also
IVector::subtract

Implements zeus::IVector.


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


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Wed Sep 14 2016 06:46:10