A 4-element vector that is represented by single floating point x,y,z coordinates. The class is used used for implementing custom ICE nodes.
#include <xsi_vector4f.h>
Public Member Functions |
|
SICPPSDK_INLINE | CVector4f () |
SICPPSDK_INLINE | CVector4f (float in_fX, float in_fY, float in_fZ, float in_fW) |
SICPPSDK_INLINE | CVector4f (const CVector4f &in_vector4) |
SICPPSDK_INLINE | ~CVector4f () |
SICPPSDK_INLINE CVector4f & | operator= (const CVector4f &in_vector4) |
SICPPSDK_INLINE bool | operator== (const CVector4f &in_vector4) const |
SICPPSDK_INLINE bool | operator!= (const CVector4f &in_vector4) const |
SICPPSDK_INLINE bool | operator< (const CVector4f &in_vector4) const |
SICPPSDK_INLINE CVector4f & | operator~ () |
SICPPSDK_INLINE CVector4f & | operator+= (const CVector4f &in_vector4) |
SICPPSDK_INLINE CVector4f & | operator-= (const CVector4f &in_vector4) |
SICPPSDK_INLINE CVector4f & | operator*= (const CMatrix4f &in_matrix4) |
SICPPSDK_INLINE CVector4f & | operator*= (const float &in_fAlpha) |
SICPPSDK_INLINE float | operator[] (const short &in_sIndex) |
SICPPSDK_INLINE CVector4f & | MulByMatrix4InPlace (const CMatrix4f &in_matrix4) |
SICPPSDK_INLINE CVector4f & | MulByMatrix4 (const CVector4f &in_vector4, const CMatrix4f &in_matrix4) |
SICPPSDK_INLINE CVector4f & | SetNull () |
float | GetLength () const |
float | GetLengthSquared () const |
SICPPSDK_INLINE CStatus | NormalizeInPlace () |
SICPPSDK_INLINE CStatus | Normalize (const CVector4f &in_vector4) |
SICPPSDK_INLINE float | Dot (const CVector4f &in_vector4) const |
SICPPSDK_INLINE CVector4f & | Cross (const CVector4f &in_vector4A, const CVector4f &in_vector4B) |
CVector4f & | AbsoluteInPlace () |
CVector4f & | Absolute (const CVector4f &in_vector4) |
bool | EpsilonEquals (const CVector4f &in_vector4, float in_fEpsilon) const |
SICPPSDK_INLINE bool | Equals (const CVector4f &in_vector4) const |
SICPPSDK_INLINE CVector4f & | ScaleAddInPlace (float in_fS, const CVector4f &in_vector4) |
SICPPSDK_INLINE CVector4f & | ScaleAdd (float in_fS, const CVector4f &in_vector4A, const CVector4f &in_vector4B) |
SICPPSDK_INLINE CVector4f & | ScaleInPlace (float in_fAlpha) |
SICPPSDK_INLINE CVector4f & | Scale (float in_fAlpha, const CVector4f &in_vector4) |
SICPPSDK_INLINE CVector4f & | NegateInPlace () |
SICPPSDK_INLINE CVector4f & | Negate (const CVector4f &in_vector4) |
SICPPSDK_INLINE CVector4f & | SubInPlace (const CVector4f &in_vector4) |
SICPPSDK_INLINE CVector4f & | Sub (const CVector4f &in_vector4A, const CVector4f &in_vector4B) |
SICPPSDK_INLINE CVector4f & | AddInPlace (const CVector4f &in_vector4) |
SICPPSDK_INLINE CVector4f & | Add (const CVector4f &in_vector4A, const CVector4f &in_vector4B) |
SICPPSDK_INLINE void | Get (float &out_fX, float &out_fY, float &out_fZ, float &out_fW) const |
SICPPSDK_INLINE CVector4f & | Set (float in_fX, float in_fY, float in_fZ, float in_fW) |
SICPPSDK_INLINE float | GetW () const |
SICPPSDK_INLINE CVector4f & | PutW (float in_fW) |
SICPPSDK_INLINE float | GetZ () const |
SICPPSDK_INLINE CVector4f & | PutZ (float in_fZ) |
SICPPSDK_INLINE float | GetY () const |
SICPPSDK_INLINE CVector4f & | PutY (float in_fY) |
SICPPSDK_INLINE float | GetX () const |
SICPPSDK_INLINE CVector4f & | PutX (float in_fX) |
SICPPSDK_INLINE CVector4f | ( | ) |
Default constructor.
SICPPSDK_INLINE CVector4f | ( | float | in_fX, |
float | in_fY, | ||
float | in_fZ, | ||
float | in_fW | ||
) |
Constructor.
in_fX | Value of the x component |
in_fY | Value of the y component |
in_fZ | Value of the z component |
in_fW | Value of the w component |
Copy constructor.
in_vector4 | constant class object. |
SICPPSDK_INLINE ~CVector4f | ( | ) |
Default destructor.
Assignment operator.
in_vector4 | constant class object. |
SICPPSDK_INLINE bool operator== | ( | const CVector4f & | in_vector4 | ) | const |
Equality operator tests the strict equality of this vector with the specified vector.
in_vector4 | Operand vector. |
SICPPSDK_INLINE bool operator!= | ( | const CVector4f & | in_vector4 | ) | const |
Inequality operator tests the strict inequality of this vector with the specified vector.
in_vector4 | Operand vector. |
SICPPSDK_INLINE bool operator< | ( | const CVector4f & | in_vector4 | ) | const |
Less than operator. Performs a comparison with a specified CVector4f to determine if this CVector4f is less than the specified CVector4f. The comparison is arbitrary and not geometrically meaningful, it's only purpose is to make CVector4f compliant with stl for sorting operations.
in_vector4 | CVector4f to compare. |
SICPPSDK_INLINE CVector4f & operator~ | ( | ) |
Negates this vector (this = - this).
Adds the input vector to this one (this = this + in_vector4).
in_vector4 | Operand vector. |
Subtracts the input vector4 (in_vector4) from this one (this = this - in_vector4).
in_vector4 | Operand vector. |
Right-multiplies this vector by the matrix m in place. (this = this * m )
in_matrix4 | Operand matrix. |
SICPPSDK_INLINE CVector4f & operator*= | ( | const float & | in_fAlpha | ) |
Scales this vector by the input scalar (alpha) (this = alpha * this).
in_fAlpha | Scalar multiplicator. |
SICPPSDK_INLINE float operator[] | ( | const short & | in_sIndex | ) |
Read-only accessors to the X,Y,Z,W components.
in_sIndex | 0,1,2,3 for X,Y,Z and W values. |
Right-multiplies this vector by the matrix m in place (this = this * m ).
in_matrix4 | Operand matrix. |
SICPPSDK_INLINE CVector4f & MulByMatrix4 | ( | const CVector4f & | in_vector4, |
const CMatrix4f & | in_matrix4 | ||
) |
Right-multiplies the vector v by the matrix m and store the result in this vector (this = v * m ).
in_vector4 | Operand vector |
in_matrix4 | Operand matrix. |
SICPPSDK_INLINE CVector4f & SetNull | ( | ) |
Sets this vector to a null vector.
SICPPSDK_INLINE float GetLength | ( | ) | const |
Returns the length of this vector.
SICPPSDK_INLINE float GetLengthSquared | ( | ) | const |
Returns the squared length of this vector.
SICPPSDK_INLINE CStatus NormalizeInPlace | ( | ) |
Normalizes this vector in place.
Sets the value of this vector to the normalization of inputed vector.
in_vector4 | vector operand. |
SICPPSDK_INLINE float Dot | ( | const CVector4f & | in_vector4 | ) | const |
Returns the dot product of this vector and the input vector.
in_vector4 | vector operand. |
Sets this vector to the vector cross product of vectors A and B.
in_vector4A | vector operand. |
in_vector4B | vector operand. |
SICPPSDK_INLINE CVector4f & AbsoluteInPlace | ( | ) |
Sets each component of this vector to its absolute value.
Sets each component of the specified vector to its absolute value and places the modified values into this vector
in_vector4 | Vector to make absolute |
SICPPSDK_INLINE bool EpsilonEquals | ( | const CVector4f & | in_vector4, |
float | in_fEpsilon | ||
) | const |
Tests the equality of this vector with the vector in_vector3, with a tolerance of Epsilon.
in_vector4 | Operand vector. |
in_fEpsilon | Error margin Possible Values: [0, +INF[ should be a positive value |
SICPPSDK_INLINE bool Equals | ( | const CVector4f & | in_vector4 | ) | const |
Tests the strict equality of this vector with the vector in_vector3.
in_vector4 | Operand vector. |
Sets the value of this vector to the scalar multiplication of itself by s and then adds vector v (this = s*this + v).
in_fS | Scalar multiplicator. |
in_vector4 | Operand vector. |
SICPPSDK_INLINE CVector4f & ScaleAdd | ( | float | in_fS, |
const CVector4f & | in_vector4A, | ||
const CVector4f & | in_vector4B | ||
) |
Sets the value of this vector to the scalar multiplication of vector A by s and then adds vector B (this = s*v1 + v2).
in_fS | Scalar multiplicator. |
in_vector4A | Operand vector. |
in_vector4B | Operand vector. |
SICPPSDK_INLINE CVector4f & ScaleInPlace | ( | float | in_fAlpha | ) |
Scales this vector by the input scalar (alpha) (this = alpha * this).
in_fAlpha | Scalar multiplicator. |
Scales the input vector (v) by (alpha) store the result into this one (this = alpha * v).
in_fAlpha | Scalar multiplicator. |
in_vector4 | Operand vector. |
SICPPSDK_INLINE CVector4f & NegateInPlace | ( | ) |
Negates this vector (this = - this).
Negates the input vector (v) store the result into this one (this = - v).
in_vector4 | Operand vector. |
Subtracts the input vector (v) from this one (this = this - v).
in_vector4 | Operand vector. |
Subtracts the input vector (in_vector4B
) from the
input vector (in_vector4A
) and stores the result into
this one (this = in_vector4A - in_vector4B
).
in_vector4A | Operand vector. |
in_vector4B | Operand vector. |
Adds the input vector to this one (this = this + in_vector3).
in_vector4 | Operand vector. |
Adds both input vectors and store the result in this one (this = A + B).
in_vector4A | Operand vector. |
in_vector4B | Operand vector. |
SICPPSDK_INLINE void Get | ( | float & | out_fX, |
float & | out_fY, | ||
float & | out_fZ, | ||
float & | out_fW | ||
) | const |
Returns the X, Y, Z and W values of the vector.
out_fX | X value to get in the vector. |
out_fY | Y value to get in the vector. |
out_fZ | Z value to get in the vector. |
out_fW | W value to get in the vector. |
SICPPSDK_INLINE CVector4f & Set | ( | float | in_fX, |
float | in_fY, | ||
float | in_fZ, | ||
float | in_fW | ||
) |
Sets the X, Y, Z and W values of the vector.
in_fX | X value to set in the vector. |
in_fY | Y value to set in the vector. |
in_fZ | Z value to set in the vector. |
in_fW | W value to set in the vector. |
SICPPSDK_INLINE float GetW | ( | ) | const |
Returns the W value of this vector.
SICPPSDK_INLINE CVector4f & PutW | ( | float | in_fW | ) |
Sets the W value of this vector.
in_fW | z value. |
SICPPSDK_INLINE float GetZ | ( | ) | const |
Returns the Z value of this vector.
SICPPSDK_INLINE CVector4f & PutZ | ( | float | in_fZ | ) |
Sets the Z value of this vector.
in_fZ | z value. |
SICPPSDK_INLINE float GetY | ( | ) | const |
Returns the Y value of this vector.
SICPPSDK_INLINE CVector4f & PutY | ( | float | in_fY | ) |
Sets the Y value of this vector.
in_fY | y value. |
SICPPSDK_INLINE float GetX | ( | ) | const |
Returns the X value of this vector.
SICPPSDK_INLINE CVector4f & PutX | ( | float | in_fX | ) |
Sets the X value of this vector.
in_fX | x value. |