|
Gateware Libraries
6.3.A
Beta Build
|
Vector functions. More...
#include <GVector.h>
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... | |
Vector functions.
Include float vector and double vector's functions
|
pure virtual |
Add two vectors.
Adds the two specified vectors and stores the result in the output vector.
| [in] | _vector1 | The first vector |
| [in] | _vector2 | The second vecotr |
| [out] | _outVector | The result of addition |
| SUCCESS | The calculation succeed |
|
pure virtual |
Add two vectors.
Adds the two specified vectors and stores the result in the output vector.
| [in] | _vector1 | The first vector |
| [in] | _vector2 | The second vecotr |
| [out] | _outVector | The result of addition |
| SUCCESS | The calculation succeed |
|
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.
| [in] | _vector1 | The first vector |
| [in] | _vector2 | The second vecotr |
| [out] | _outValue | The value of 2D vecotrs' cross product |
| SUCCESS | The calculation succeed |
|
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.
| [in] | _vector1 | The first vector |
| [in] | _vector2 | The second vecotr |
| [out] | _outValue | The value of 2D vecotrs' cross product |
| SUCCESS | The calculation succeed |
|
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.
| [in] | _vector | The input vector |
| [in] | _matrix | The input matrix |
| [out] | _outVector | The result of multiplicataion |
| SUCCESS | The calculation succeed |
|
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.
| [in] | _vector1 | The first vector |
| [in] | _vector2 | The second vecotr |
| [out] | _outVector | The vector of 3D vectors' cross product |
| SUCCESS | The calculation succeed |
|
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.
| [in] | _vector1 | The first vector |
| [in] | _vector2 | The second vecotr |
| [out] | _outValue | The value of the dot product |
| SUCCESS | The calculation succeed |
|
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.
| [in] | _vector1 | The first vector |
| [in] | _vector2 | The second vecotr |
| [out] | _outValue | The value of the dot product |
| SUCCESS | The calculation succeed |
|
pure virtual |
Spherical linear interpolates between two specified vectors.
Spherical linear interpolates between two specified vectors and stores the result in the output quaternion.
| [in] | _vector1 | The start vector |
| [in] | _vector2 | The end vector |
| [in] | _ratio | The interpolation coefficient |
| [out] | _outVector | The result of the lerp |
| SUCCESS | The calculation succeed |
|
pure virtual |
Linear interpolates between two specified vectors.
Linear interpolates between two specified vectors and stores the result in the output quaternion.
| [in] | _vector1 | The start vector |
| [in] | _vector2 | The end vector |
| [in] | _ratio | The interpolation coefficient |
| [out] | _outVector | The result of the lerp |
| SUCCESS | The calculation succeed |
|
pure virtual |
Computes the magnitude of the specified vector.
Computes the magnitude of the specified vector, and stores the result in the output value.
| [in] | _vector | The specified vector |
| [out] | _outValue | The magnitude of the vector |
| SUCCESS | The calculation succeed |
| FAILURE | The calculation failed |
|
pure virtual |
Computes the magnitude of the specified vector.
Computes the magnitude of the specified vector, and stores the result in the output value.
| [in] | _vector | The specified vector |
| [out] | _outValue | The magnitude of the vector |
| SUCCESS | The calculation succeed |
| FAILURE | The calculation failed |
|
pure virtual |
Normalizes the specified vector.
Normalizes the specified vector, and stores the result in the output vector.
| [in] | _vector | The specified vector |
| [out] | _outVector | The result of the normalization. |
| SUCCESS | The calculation succeed |
| FAILURE | The calculation failed |
|
pure virtual |
Normalizes the specified vector.
Normalizes the specified vector, and stores the result in the output vector.
| [in] | _vector | The specified vector |
| [out] | _outVector | The result of the normalization. |
| SUCCESS | The calculation succeed |
| FAILURE | The calculation failed |
|
pure virtual |
Scale the vector.
Scales all elements of the input vector by the specified value and stores the result in the output vector.
| [in] | _vector1 | The first vector |
| [in] | _scalar | The specified value to scale |
| [out] | _outVector | The vector for store the result |
| SUCCESS | The calculation succeed |
|
pure virtual |
Scale the vector.
Scales all elements of the input vector by the specified value and stores the result in the output vector.
| [in] | _vector1 | The first vector |
| [in] | _scalar | The specified value to scale |
| [out] | _outVector | The vector for store the result |
| SUCCESS | The calculation succeed |
|
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.
| [in] | _vector1 | The first control point |
| [in] | _vector1 | The second control point |
| [in] | _vector1 | The thrid control point |
| [in] | _vector2 | The fourth control point |
| [in] | _ratio | The interpolation coefficient |
| [out] | _outVector | The result of the spline |
| SUCCESS | The calculation succeed |
|
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.
| [in] | _vector1 | The first control point |
| [in] | _vector1 | The second control point |
| [in] | _vector1 | The thrid control point |
| [in] | _vector2 | The fourth control point |
| [in] | _ratio | The interpolation coefficient |
| [out] | _outVector | The result of the spline |
| SUCCESS | The calculation succeed |
|
pure virtual |
Subtract two vector.
Subtracts the two specified vectors and stores the result in the output vector.
| [in] | _vector1 | The first vector |
| [in] | _vector2 | The second vecotr |
| [out] | _outVector | The vector for store the result |
| SUCCESS | The calculation succeed |
|
pure virtual |
Subtract two vector.
Subtracts the two specified vectors and stores the result in the output vector.
| [in] | _vector1 | The first vector |
| [in] | _vector2 | The second vecotr |
| [out] | _outVector | The vector for store the result |
| SUCCESS | The calculation succeed |
|
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.
| [in] | _vector | The specified vector |
| [in] | _matrix | The transform matrix |
| [out] | _outVector | The result of the transformation |
| SUCCESS | The calculation succeed |
|
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.
| [in] | _vector | The specified vector |
| [in] | _matrix | The transform matrix |
| [out] | _outVector | The result of the transformation |
| SUCCESS | The calculation succeed |
|
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.
| [in] | _vector | The input vector |
| [in] | _matrix | The input matrix |
| [out] | _outVector | The result of multiplicataion |
| SUCCESS | The calculation succeed |
|
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.
| [in] | _vector | The input vector |
| [in] | _matrix | The input matrix |
| [out] | _outVector | The result of multiplicataion |
| SUCCESS | The calculation succeed |