A 2-element vector represented by single floating point x,y coordinates. This class is typically used for implementing custom ICE nodes.
#include <xsi_vector2f.h>
Public Member Functions | |
SICPPSDK_INLINE | CVector2f () |
SICPPSDK_INLINE | CVector2f (float in_X, float in_Y) |
SICPPSDK_INLINE | CVector2f (const CVector2f &in_vector2) |
~CVector2f () | |
SICPPSDK_INLINE CVector2f & | operator= (const CVector2f &in_vector2) |
SICPPSDK_INLINE bool | operator== (const CVector2f &in_vector2) const |
SICPPSDK_INLINE bool | operator!= (const CVector2f &in_vector2) const |
SICPPSDK_INLINE bool | operator< (const CVector2f &in_vector2) const |
SICPPSDK_INLINE CVector2f & | operator~ () |
SICPPSDK_INLINE CVector2f & | operator+= (const CVector2f &in_vector2) |
SICPPSDK_INLINE CVector2f & | operator-= (const CVector2f &in_vector2) |
SICPPSDK_INLINE CVector2f & | operator*= (const float &in_dAlpha) |
SICPPSDK_INLINE CVector2f & | SetNull () |
SICPPSDK_INLINE float | GetLength () const |
SICPPSDK_INLINE float | GetLengthSquared () const |
SICPPSDK_INLINE bool | Equals (const CVector2f &in_vector2) const |
SICPPSDK_INLINE bool | EpsilonEquals (const CVector2f &in_vector, const float in_fEpsilon) const |
SICPPSDK_INLINE CVector2f & | ScaleAddInPlace (float in_dS, const CVector2f &in_vector2) |
SICPPSDK_INLINE CVector2f & | ScaleAdd (float in_dS, const CVector2f &in_vector3A, const CVector2f &in_vector3B) |
SICPPSDK_INLINE CVector2f & | ScaleInPlace (float in_dAlpha) |
SICPPSDK_INLINE CVector2f & | Scale (float in_Alpha, const CVector2f &in_vector2) |
SICPPSDK_INLINE CVector2f & | NegateInPlace () |
SICPPSDK_INLINE CVector2f & | Negate (const CVector2f &in_vector2) |
SICPPSDK_INLINE CVector2f & | SubInPlace (const CVector2f &in_vector2) |
SICPPSDK_INLINE CVector2f & | Sub (const CVector2f &in_vector3A, const CVector2f &in_vector3B) |
SICPPSDK_INLINE CVector2f & | AddInPlace (const CVector2f &in_vector2) |
SICPPSDK_INLINE CVector2f & | Add (const CVector2f &in_vector3A, const CVector2f &in_vector3B) |
SICPPSDK_INLINE float | GetY () const |
SICPPSDK_INLINE CVector2f & | PutY (float in_X) |
SICPPSDK_INLINE float | GetX () const |
SICPPSDK_INLINE CVector2f & | PutX (float in_X) |
SICPPSDK_INLINE CVector2f | ( | ) |
Default constructor.
SICPPSDK_INLINE CVector2f | ( | float | in_X, |
float | in_Y | ||
) |
Constructor.
in_X | Value of the x component |
in_Y | Value of the y component |
Copy constructor.
in_vector2 | constant class object. |
~CVector2f | ( | ) | [inline] |
Default destructor.
Assignment operator.
in_vector2 | constant class object. |
SICPPSDK_INLINE bool operator== | ( | const CVector2f & | in_vector2 | ) | const |
Equality operator tests the strict equality of this CVector2f with the specified vector2.
in_vector2 | Operand vector. |
SICPPSDK_INLINE bool operator!= | ( | const CVector2f & | in_vector2 | ) | const |
Inequality operator tests the strict inequality of this CVector2f with the specified vector2.
in_vector2 | Operand vector. |
SICPPSDK_INLINE bool operator< | ( | const CVector2f & | in_vector2 | ) | const |
Less than operator. Performs a comparison with a specified CVector2f to determine if this CVector2f is less than the specified CVector2f. The comparison is arbitrary and not geometrically meaningful, it's only purpose is to make CVector2f compliant with stl for sorting operations.
in_vector2 | CVector2f to compare. |
SICPPSDK_INLINE CVector2f & operator~ | ( | ) |
Negates this vector (this = - this).
Adds the input vector to this one (this = this + in_vector2)
in_vector2 | Operand vector.. |
Subtracts the input vector (in_vector2) from this one (this = this - in_vector2).
in_vector2 | Operand vector. |
SICPPSDK_INLINE CVector2f & operator*= | ( | const float & | in_dAlpha | ) |
Scales this vector by the input scalar (alpha) (this = alpha * this).
in_dAlpha | Scalar multiplicator. |
SICPPSDK_INLINE CVector2f & 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 bool Equals | ( | const CVector2f & | in_vector2 | ) | const |
Tests the strict equality of this vector2 with the specified vector2.
in_vector2 | Operand vector. |
SICPPSDK_INLINE bool EpsilonEquals | ( | const CVector2f & | in_vector, |
const float | in_fEpsilon | ||
) | const |
Tests the equality of this vector with in_vector, with a tolerance of Epsilon.
in_vector | Operand vector. |
in_fEpsilon | Error margin Possible Values: [0, +INF[ should be a positive value |
Sets the value of this vector to the scalar multiplication of itself by s and then adds vector2 v. (this = s*this + v)
in_dS | Scalar multiplicator. |
in_vector2 | Operand vector. |
SICPPSDK_INLINE CVector2f & ScaleAdd | ( | float | in_dS, |
const CVector2f & | in_vector3A, | ||
const CVector2f & | in_vector3B | ||
) |
Sets the value of this vector2 to the scalar multiplication of vector2 A by s and then adds vector2 B. (this = s*v1 + v2).
in_dS | Scalar multiplicator. |
in_vector3A | Operand vector. |
in_vector3B | Operand vector. |
SICPPSDK_INLINE CVector2f & ScaleInPlace | ( | float | in_dAlpha | ) |
Scales this vector by the input scalar (alpha) (this = alpha * this).
in_dAlpha | Scalar multiplicator. |
Scales the input vector (v) by (alpha) store the result into this one (this = alpha * v).
in_Alpha | Scalar multiplicator. |
in_vector2 | Operand vector. |
SICPPSDK_INLINE CVector2f & NegateInPlace | ( | ) |
Negates this vector (this = - this).
Negates the input vector (v) store the result into this one (this = - v).
in_vector2 | Operand vector. |
Subtracts the input vector2 (v) from this one (this = this - v).
in_vector2 | Operand vector. |
Subtracts the input vector2 (in_vector3B
) from the input vector2 (in_vector3A
) and stores the result in this one (this = A - B
).
in_vector3A | Operand vector. |
in_vector3B | Operand vector. |
Adds the input vector to this one (this = this + in_vector2).
in_vector2 | Operand vector. |
Adds both input vectors and stores the result in this one. (this = A + B)
in_vector3A | Operand vector. |
in_vector3B | Operand vector. |
SICPPSDK_INLINE float GetY | ( | ) | const |
Returns the Y value of this vector.
SICPPSDK_INLINE CVector2f & PutY | ( | float | in_X | ) |
Sets the Y value of this vector.
in_X | y value. |
SICPPSDK_INLINE float GetX | ( | ) | const |
Returns the X value of this vector.
SICPPSDK_INLINE CVector2f & PutX | ( | float | in_X | ) |
Sets the X value of this vector.
in_X | x value. |