Gateware Libraries  R6.5A
Beta Build
GW::MATH::GVector Class Referenceabstract

Vector functions. More...

#include <GVector.h>

Inheritance diagram for GW::MATH::GVector:
Collaboration diagram for GW::MATH::GVector:

Public Member Functions

virtual GReturn AddVectorF (GVECTORF _vector1, GVECTORF _vector2, GVECTORF &_outVector)=0
 Add two vectors. More...
 
virtual GReturn SubtractVectorF (GVECTORF _vector1, GVECTORF _vector2, GVECTORF &_outVector)=0
 Subtract two vector. More...
 
virtual GReturn ScaleF (GVECTORF _vector, float _scalar, GVECTORF &_outVector)=0
 Scale the vector. More...
 
virtual GReturn DotF (GVECTORF _vector1, GVECTORF _vector2, float &_outValue)=0
 Calculates the dot product of the two vectors. More...
 
virtual GReturn CrossVector2F (GVECTORF _vector1, GVECTORF _vector2, float &_outValue)=0
 Calculates the Cross product of the two vectors which are treated as 2 elements vector. More...
 
virtual GReturn CrossVector3F (GVECTORF _vector1, GVECTORF _vector2, GVECTORF &_outVector)=0
 Calculates the cross product of the two vectors which are treated as 3 elements vectors. More...
 
virtual GReturn VectorXMatrixF (GVECTORF _vector, GMATRIXF _matrix, GVECTORF &_outVector)=0
 multiply the specified vector by the specified matrix. More...
 
virtual GReturn TransformF (GVECTORF _vector, GMATRIXF _matrix, GVECTORF &_outVector)=0
 Transform specified specified vector by specified matrix. More...
 
virtual GReturn MagnitudeF (GVECTORF _vector, float &_outMagnitude)=0
 Computes the magnitude of the specified vector. More...
 
virtual GReturn NormalizeF (GVECTORF _vector, GVECTORF &_outVector)=0
 Normalizes the specified vector. More...
 
virtual GReturn LerpF (GVECTORF _vector1, GVECTORF _vector2, float _ratio, GVECTORF &_outVector)=0
 Linear interpolates between two specified vectors. More...
 
virtual GReturn SplineF (GVECTORF _vector1, GVECTORF _vector2, GVECTORF _vector3, GVECTORF _vector4, float _ratio, GVECTORF &_outVector)=0
 Calculate the interpolation on a cuvre which connects two specified 3D vectors. More...
 
virtual GReturn AddVectorD (GVECTORD _vector1, GVECTORD _vector2, GVECTORD &_outVector)=0
 Add two vectors. More...
 
virtual GReturn SubtractVectorD (GVECTORD _vector1, GVECTORD _vector2, GVECTORD &_outVector)=0
 Subtract two vector. More...
 
virtual GReturn ScaleD (GVECTORD _vector, double _scalar, GVECTORD &_outVector)=0
 Scale the vector. More...
 
virtual GReturn DotD (GVECTORD _vector1, GVECTORD _vector2, double &_outValue)=0
 Calculates the dot product of the two vectors. More...
 
virtual GReturn CrossVector2D (GVECTORD _vector1, GVECTORD _vector2, double &_outValue)=0
 Calculates the Cross product of the two vectors which are treated as 2 elements vector. More...
 
virtual GReturn CrossVector3D (GVECTORD _vector1, GVECTORD _vector2, GVECTORD &_outVector)=0
 multiply the specified vector by the specified matrix. More...
 
virtual GReturn VectorXMatrixD (GVECTORD _vector, GMATRIXD _matrix, GVECTORD &_outVector)=0
 multiply the specified vector by the specified matrix. More...
 
virtual GReturn TransformD (GVECTORD _vector, GMATRIXD _matrix, GVECTORD &_outVector)=0
 Transform specified specified vector by specified matrix. More...
 
virtual GReturn MagnitudeD (GVECTORD _vector, double &_outMagnitude)=0
 Computes the magnitude of the specified vector. More...
 
virtual GReturn NormalizeD (GVECTORD _vector, GVECTORD &_outVector)=0
 Normalizes the specified vector. More...
 
virtual GReturn LerpD (GVECTORD _vector1, GVECTORD _vector2, double _ratio, GVECTORD &_outVector)=0
 Spherical linear interpolates between two specified vectors. More...
 
virtual GReturn SplineD (GVECTORD _vector1, GVECTORD _vector2, GVECTORD _vector3, GVECTORD _vector4, double _ratio, GVECTORD &_outVector)=0
 Calculate the interpolation between two specified 3D vectors. More...
 
- Public Member Functions inherited from GW::CORE::GInterface
virtual GReturn GetCount (unsigned int &_outCount)=0
 Return the total number of active references to this object. More...
 
virtual GReturn IncrementCount ()=0
 Increase the total number of active references to this object. More...
 
virtual GReturn DecrementCount ()=0
 Decrease the total number of active references to this object. More...
 
virtual GReturn RequestInterface (const GUUIID &_interfaceID, void **_outputInterface)=0
 Requests an interface that may or may not be supported by this object. More...
 

Detailed Description

Vector functions.

Include float vector and double vector's functions

Member Function Documentation

◆ AddVectorD()

virtual GReturn GW::MATH::GVector::AddVectorD ( GVECTORD  _vector1,
GVECTORD  _vector2,
GVECTORD _outVector 
)
pure virtual

Add two vectors.

Adds the two specified vectors and stores the result in the output vector.

Parameters
[in]_vector1The first vector
[in]_vector2The second vecotr
[out]_outVectorThe result of addition
Return values
SUCCESSThe calculation succeed

◆ AddVectorF()

virtual GReturn GW::MATH::GVector::AddVectorF ( GVECTORF  _vector1,
GVECTORF  _vector2,
GVECTORF _outVector 
)
pure virtual

Add two vectors.

Adds the two specified vectors and stores the result in the output vector.

Parameters
[in]_vector1The first vector
[in]_vector2The second vecotr
[out]_outVectorThe result of addition
Return values
SUCCESSThe calculation succeed

◆ CrossVector2D()

virtual GReturn GW::MATH::GVector::CrossVector2D ( GVECTORD  _vector1,
GVECTORD  _vector2,
double &  _outValue 
)
pure virtual

Calculates the Cross product of the two vectors which are treated as 2 elements vector.

Calculates the cross product of two specified vectors which are treated as 2 elements vectors and stores the result in the output value. The input vectors' z and w value will be ignored.

Parameters
[in]_vector1The first vector
[in]_vector2The second vecotr
[out]_outValueThe value of 2D vecotrs' cross product
Return values
SUCCESSThe calculation succeed

◆ CrossVector2F()

virtual GReturn GW::MATH::GVector::CrossVector2F ( GVECTORF  _vector1,
GVECTORF  _vector2,
float &  _outValue 
)
pure virtual

Calculates the Cross product of the two vectors which are treated as 2 elements vector.

Calculates the cross product of two specified vectors which are treated as 2 elements vectors and stores the result in the output value. The input vectors' z and w value will be ignored.

Parameters
[in]_vector1The first vector
[in]_vector2The second vecotr
[out]_outValueThe value of 2D vecotrs' cross product
Return values
SUCCESSThe calculation succeed

◆ CrossVector3D()

virtual GReturn GW::MATH::GVector::CrossVector3D ( GVECTORD  _vector1,
GVECTORD  _vector2,
GVECTORD _outVector 
)
pure virtual

multiply the specified vector by the specified matrix.

Multiplies the specified vector by the specified matrix and stores the result in the output vector. The input vectors' w value will be returned with 0.

Parameters
[in]_vectorThe input vector
[in]_matrixThe input matrix
[out]_outVectorThe result of multiplicataion
Return values
SUCCESSThe calculation succeed

◆ CrossVector3F()

virtual GReturn GW::MATH::GVector::CrossVector3F ( GVECTORF  _vector1,
GVECTORF  _vector2,
GVECTORF _outVector 
)
pure virtual

Calculates the cross product of the two vectors which are treated as 3 elements vectors.

Calculates the cross product of two specified vectors which are treated as 2 elements vector and stores the result in the output vector. The input vectors' w value will be returned with 0.

Parameters
[in]_vector1The first vector
[in]_vector2The second vecotr
[out]_outVectorThe vector of 3D vectors' cross product
Return values
SUCCESSThe calculation succeed

◆ DotD()

virtual GReturn GW::MATH::GVector::DotD ( GVECTORD  _vector1,
GVECTORD  _vector2,
double &  _outValue 
)
pure virtual

Calculates the dot product of the two vectors.

Calculates the dot product of two specified vectors and stores the result in the output Value.

Parameters
[in]_vector1The first vector
[in]_vector2The second vecotr
[out]_outValueThe value of the dot product
Return values
SUCCESSThe calculation succeed

◆ DotF()

virtual GReturn GW::MATH::GVector::DotF ( GVECTORF  _vector1,
GVECTORF  _vector2,
float &  _outValue 
)
pure virtual

Calculates the dot product of the two vectors.

Calculates the dot product of two specified vectors and stores the result in the output Value.

Parameters
[in]_vector1The first vector
[in]_vector2The second vecotr
[out]_outValueThe value of the dot product
Return values
SUCCESSThe calculation succeed

◆ LerpD()

virtual GReturn GW::MATH::GVector::LerpD ( GVECTORD  _vector1,
GVECTORD  _vector2,
double  _ratio,
GVECTORD _outVector 
)
pure virtual

Spherical linear interpolates between two specified vectors.

Spherical linear interpolates between two specified vectors and stores the result in the output quaternion.

Parameters
[in]_vector1The start vector
[in]_vector2The end vector
[in]_ratioThe interpolation coefficient
[out]_outVectorThe result of the lerp
Return values
SUCCESSThe calculation succeed

◆ LerpF()

virtual GReturn GW::MATH::GVector::LerpF ( GVECTORF  _vector1,
GVECTORF  _vector2,
float  _ratio,
GVECTORF _outVector 
)
pure virtual

Linear interpolates between two specified vectors.

Linear interpolates between two specified vectors and stores the result in the output quaternion.

Parameters
[in]_vector1The start vector
[in]_vector2The end vector
[in]_ratioThe interpolation coefficient
[out]_outVectorThe result of the lerp
Return values
SUCCESSThe calculation succeed

◆ MagnitudeD()

virtual GReturn GW::MATH::GVector::MagnitudeD ( GVECTORD  _vector,
double &  _outMagnitude 
)
pure virtual

Computes the magnitude of the specified vector.

Computes the magnitude of the specified vector, and stores the result in the output value.

Parameters
[in]_vectorThe specified vector
[out]_outValueThe magnitude of the vector
Return values
SUCCESSThe calculation succeed
FAILUREThe calculation failed

◆ MagnitudeF()

virtual GReturn GW::MATH::GVector::MagnitudeF ( GVECTORF  _vector,
float &  _outMagnitude 
)
pure virtual

Computes the magnitude of the specified vector.

Computes the magnitude of the specified vector, and stores the result in the output value.

Parameters
[in]_vectorThe specified vector
[out]_outValueThe magnitude of the vector
Return values
SUCCESSThe calculation succeed
FAILUREThe calculation failed

◆ NormalizeD()

virtual GReturn GW::MATH::GVector::NormalizeD ( GVECTORD  _vector,
GVECTORD _outVector 
)
pure virtual

Normalizes the specified vector.

Normalizes the specified vector, and stores the result in the output vector.

Parameters
[in]_vectorThe specified vector
[out]_outVectorThe result of the normalization.
Return values
SUCCESSThe calculation succeed
FAILUREThe calculation failed

◆ NormalizeF()

virtual GReturn GW::MATH::GVector::NormalizeF ( GVECTORF  _vector,
GVECTORF _outVector 
)
pure virtual

Normalizes the specified vector.

Normalizes the specified vector, and stores the result in the output vector.

Parameters
[in]_vectorThe specified vector
[out]_outVectorThe result of the normalization.
Return values
SUCCESSThe calculation succeed
FAILUREThe calculation failed

◆ ScaleD()

virtual GReturn GW::MATH::GVector::ScaleD ( GVECTORD  _vector,
double  _scalar,
GVECTORD _outVector 
)
pure virtual

Scale the vector.

Scales all elements of the input vector by the specified value and stores the result in the output vector.

Parameters
[in]_vector1The first vector
[in]_scalarThe specified value to scale
[out]_outVectorThe vector for store the result
Return values
SUCCESSThe calculation succeed

◆ ScaleF()

virtual GReturn GW::MATH::GVector::ScaleF ( GVECTORF  _vector,
float  _scalar,
GVECTORF _outVector 
)
pure virtual

Scale the vector.

Scales all elements of the input vector by the specified value and stores the result in the output vector.

Parameters
[in]_vector1The first vector
[in]_scalarThe specified value to scale
[out]_outVectorThe vector for store the result
Return values
SUCCESSThe calculation succeed

◆ SplineD()

virtual GReturn GW::MATH::GVector::SplineD ( GVECTORD  _vector1,
GVECTORD  _vector2,
GVECTORD  _vector3,
GVECTORD  _vector4,
double  _ratio,
GVECTORD _outVector 
)
pure virtual

Calculate the interpolation between two specified 3D vectors.

Calculate the interpolation between two specified 3D vectors and stores the result in the output quaternion. The component of w will return 0. The interpolation will happen between the second point and thrid point.

Parameters
[in]_vector1The first control point
[in]_vector1The second control point
[in]_vector1The thrid control point
[in]_vector2The fourth control point
[in]_ratioThe interpolation coefficient
[out]_outVectorThe result of the spline
Return values
SUCCESSThe calculation succeed

◆ SplineF()

virtual GReturn GW::MATH::GVector::SplineF ( GVECTORF  _vector1,
GVECTORF  _vector2,
GVECTORF  _vector3,
GVECTORF  _vector4,
float  _ratio,
GVECTORF _outVector 
)
pure virtual

Calculate the interpolation on a cuvre which connects two specified 3D vectors.

Calculate the interpolation on a cuvre which connects two specified 3D vectors and stores the result in the output quaternion. The component of w will return 0. The interpolation will happen between the second point and thrid point.

Parameters
[in]_vector1The first control point
[in]_vector1The second control point
[in]_vector1The thrid control point
[in]_vector2The fourth control point
[in]_ratioThe interpolation coefficient
[out]_outVectorThe result of the spline
Return values
SUCCESSThe calculation succeed

◆ SubtractVectorD()

virtual GReturn GW::MATH::GVector::SubtractVectorD ( GVECTORD  _vector1,
GVECTORD  _vector2,
GVECTORD _outVector 
)
pure virtual

Subtract two vector.

Subtracts the two specified vectors and stores the result in the output vector.

Parameters
[in]_vector1The first vector
[in]_vector2The second vecotr
[out]_outVectorThe vector for store the result
Return values
SUCCESSThe calculation succeed

◆ SubtractVectorF()

virtual GReturn GW::MATH::GVector::SubtractVectorF ( GVECTORF  _vector1,
GVECTORF  _vector2,
GVECTORF _outVector 
)
pure virtual

Subtract two vector.

Subtracts the two specified vectors and stores the result in the output vector.

Parameters
[in]_vector1The first vector
[in]_vector2The second vecotr
[out]_outVectorThe vector for store the result
Return values
SUCCESSThe calculation succeed

◆ TransformD()

virtual GReturn GW::MATH::GVector::TransformD ( GVECTORD  _vector,
GMATRIXD  _matrix,
GVECTORD _outVector 
)
pure virtual

Transform specified specified vector by specified matrix.

Transforms the specified vector by the specified matrix by treating the fourth row as (0, 0, 0, 1), and the w component of result vector will return 1.The result will store in the output vector.

Parameters
[in]_vectorThe specified vector
[in]_matrixThe transform matrix
[out]_outVectorThe result of the transformation
Return values
SUCCESSThe calculation succeed

◆ TransformF()

virtual GReturn GW::MATH::GVector::TransformF ( GVECTORF  _vector,
GMATRIXF  _matrix,
GVECTORF _outVector 
)
pure virtual

Transform specified specified vector by specified matrix.

Transforms the specified vector by the specified matrix by treating the fourth row as (0, 0, 0, 1), and the w component of result vector will return 1.The result will store in the output vector.

Parameters
[in]_vectorThe specified vector
[in]_matrixThe transform matrix
[out]_outVectorThe result of the transformation
Return values
SUCCESSThe calculation succeed

◆ VectorXMatrixD()

virtual GReturn GW::MATH::GVector::VectorXMatrixD ( GVECTORD  _vector,
GMATRIXD  _matrix,
GVECTORD _outVector 
)
pure virtual

multiply the specified vector by the specified matrix.

Multiplies the specified vector by the specified matrix and stores the result in the output vector. The input vectors' w value will be returned with 0.

Parameters
[in]_vectorThe input vector
[in]_matrixThe input matrix
[out]_outVectorThe result of multiplicataion
Return values
SUCCESSThe calculation succeed

◆ VectorXMatrixF()

virtual GReturn GW::MATH::GVector::VectorXMatrixF ( GVECTORF  _vector,
GMATRIXF  _matrix,
GVECTORF _outVector 
)
pure virtual

multiply the specified vector by the specified matrix.

Multiplies the specified vector by the specified matrix and stores the result in the output vector. The input vectors' w value will be returned with 0.

Parameters
[in]_vectorThe input vector
[in]_matrixThe input matrix
[out]_outVectorThe result of multiplicataion
Return values
SUCCESSThe calculation succeed

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