ZeusMath-Library  2.0.4
zeus::IVector Class Referenceabstract

#include <IVector.hpp>

Inheritance diagram for zeus::IVector:
zeus::IVector2D zeus::IVector3D zeus::TVector zeus::TVector2D zeus::TVector3D

Public Member Functions

virtual void MQUALIFIER assign (const IVector &rVector)=0
 
virtual void MQUALIFIER assignValues (const Float *apValues, Int iSize)=0
 
virtual bool MQUALIFIER equals (const IVector &rVector, Float fPrecision=FLOAT_PRECISION) const =0
 
virtual Float MQUALIFIER getComponent (Int iIndex) const =0
 
virtual Float *MQUALIFIER getComponents ()=0
 
virtual const Float *MQUALIFIER getComponentsConst () const =0
 
virtual Int MQUALIFIER getDimension () const =0
 
virtual Float MQUALIFIER getNorm () const =0
 
virtual Float MQUALIFIER getNormSquared () const =0
 
virtual Float MQUALIFIER getLength () const =0
 
virtual Float MQUALIFIER getLengthSquared () const =0
 
virtual bool MQUALIFIER setComponent (Int iIndex, Float fValue)=0
 
virtual void MQUALIFIER setDimension (Int iValue)=0
 
virtual void MQUALIFIER add (const IVector &rVector)=0
 
virtual void MQUALIFIER subtract (const IVector &rVector)=0
 
virtual Float MQUALIFIER calcScalarProduct (const IVector &rVector) const =0
 
virtual void MQUALIFIER multiply (const Float &f)=0
 
virtual void MQUALIFIER divide (const Float &f)=0
 

Detailed Description

IVector encapsulates a n dimensional floating point vector as base class for vector geometry calculations.

Member Function Documentation

§ add()

virtual void MQUALIFIER zeus::IVector::add ( const IVector rVector)
pure virtual

Addition. Adds a vector and assigns the result to this vector.

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

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ assign()

virtual void MQUALIFIER zeus::IVector::assign ( const IVector rVector)
pure virtual

Assignment of an other vector. This method might resize the vector.

Parameters
rVector[IN]: Reference to interface type object to be assigned to this object.

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ assignValues()

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

Assignment of values. This method might resize the vector.

Parameters
apValues[IN]: Values to assign
iSize: Size of the data array

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ calcScalarProduct()

virtual Float MQUALIFIER zeus::IVector::calcScalarProduct ( const IVector rVector) const
pure virtual

Scalar product.

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

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ divide()

virtual void MQUALIFIER zeus::IVector::divide ( const Float &  f)
pure virtual

Division by a scalar. Assigns the result to this vector.

Parameters
f[IN]: Scalar.

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ equals()

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

Checks if two vectors are equal

Parameters
rVector[IN]: Vector to be compared to this vector.
fPrecision[IN]: Precision
Return values
true: is equal.
falseis not equal

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ getComponent()

virtual Float MQUALIFIER zeus::IVector::getComponent ( Int  iIndex) const
pure virtual

Returns the i-th component of the vector

Parameters
iIndex: Index starting at zero
Returns
ith component

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ getComponents()

virtual Float* MQUALIFIER zeus::IVector::getComponents ( )
pure virtual

Returns the array of the vector components

Returns
Pointer to array of components

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ getComponentsConst()

virtual const Float* MQUALIFIER zeus::IVector::getComponentsConst ( ) const
pure virtual

Returns the const array of the vector components

Returns
Pointer to array of components

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ getDimension()

virtual Int MQUALIFIER zeus::IVector::getDimension ( ) const
pure virtual

Returns the dimensions of the vector

Returns
dimension

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ getLength()

virtual Float MQUALIFIER zeus::IVector::getLength ( ) const
pure virtual

Calculate the norm/length.

Returns
Norm/length.

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ getLengthSquared()

virtual Float MQUALIFIER zeus::IVector::getLengthSquared ( ) const
pure virtual

Calculate the norm/length.

Returns
Norm/length.

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ getNorm()

virtual Float MQUALIFIER zeus::IVector::getNorm ( ) const
pure virtual

Calculate the norm/length squared.

Returns
Norm/length squared.

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ getNormSquared()

virtual Float MQUALIFIER zeus::IVector::getNormSquared ( ) const
pure virtual

Calculate the norm/length squared.

Returns
Norm/length squared.

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ multiply()

virtual void MQUALIFIER zeus::IVector::multiply ( const Float &  f)
pure virtual

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

Parameters
f[IN]: Scalar.

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ setComponent()

virtual bool MQUALIFIER zeus::IVector::setComponent ( Int  iIndex,
Float  fValue 
)
pure virtual

Sets the i-th component of the vector

Parameters
iIndex: Index starting at zero
fValue: Value to set
Return values
true: Value set
falseiIndex is out of bounds

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ setDimension()

virtual void MQUALIFIER zeus::IVector::setDimension ( Int  iValue)
pure virtual

Resizes the vector

Parameters
iValue: New vector dimension

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.

§ subtract()

virtual void MQUALIFIER zeus::IVector::subtract ( const IVector rVector)
pure virtual

Subtraction. Subtracts a vector and assigns the result to this vector.

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

Implemented in zeus::TVector3D, zeus::TVector2D, and zeus::TVector.


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


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