CVector2f Class Reference
 
 
 
CVector2f Class Reference

#include <xsi_vector2f.h>


Class Description

A 2-element vector represented by single floating point x,y coordinates. This class is typically used for implementing custom ICE nodes.

See also:
CVector3f, CVector4f

List of all members.

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)

Constructor & Destructor Documentation

SICPPSDK_INLINE CVector2f ( )

Default constructor.

SICPPSDK_INLINE CVector2f ( float  in_X,
float  in_Y 
)

Constructor.

Parameters:
in_X Value of the x component
in_Y Value of the y component
SICPPSDK_INLINE CVector2f ( const CVector2f in_vector2 )

Copy constructor.

Parameters:
in_vector2 constant class object.
~CVector2f ( ) [inline]

Default destructor.


Member Function Documentation

SICPPSDK_INLINE CVector2f & operator= ( const CVector2f in_vector2 )

Assignment operator.

Parameters:
in_vector2 constant class object.
Returns:
A reference to this vector.
SICPPSDK_INLINE bool operator== ( const CVector2f in_vector2 ) const

Equality operator tests the strict equality of this CVector2f with the specified vector2.

Parameters:
in_vector2 Operand vector.
Returns:
true if equal else false.
See also:
CVector2f::Equals
SICPPSDK_INLINE bool operator!= ( const CVector2f in_vector2 ) const

Inequality operator tests the strict inequality of this CVector2f with the specified vector2.

Parameters:
in_vector2 Operand vector.
Returns:
true if equal else false.
See also:
CVector2f::Equals
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.

Parameters:
in_vector2 CVector2f to compare.
Returns:
true if this CVector2f is less than the specified CVector2f, false otherwise.
Since:
7.5
SICPPSDK_INLINE CVector2f & operator~ ( )

Negates this vector (this = - this).

Returns:
A reference to this vector.
See also:
CVector2f::NegateInPlace
SICPPSDK_INLINE CVector2f & operator+= ( const CVector2f in_vector2 )

Adds the input vector to this one (this = this + in_vector2)

Parameters:
in_vector2 Operand vector..
Returns:
A reference to this vector.
See also:
CVector2f::AddInPlace
SICPPSDK_INLINE CVector2f & operator-= ( const CVector2f in_vector2 )

Subtracts the input vector (in_vector2) from this one (this = this - in_vector2).

Parameters:
in_vector2 Operand vector.
Returns:
A reference to this vector.
See also:
CVector2f::SubInPlace
SICPPSDK_INLINE CVector2f & operator*= ( const float &  in_dAlpha )

Scales this vector by the input scalar (alpha) (this = alpha * this).

Parameters:
in_dAlpha Scalar multiplicator.
Returns:
A reference to this vector.
See also:
CVector2f::ScaleInPlace
SICPPSDK_INLINE CVector2f & SetNull ( )

Sets this vector to a null vector.

Returns:
A reference to this vector.
SICPPSDK_INLINE float GetLength ( ) const

Returns the length of this vector.

Returns:
Length of this vector.
SICPPSDK_INLINE float GetLengthSquared ( ) const

Returns the squared length of this vector.

Returns:
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.

Parameters:
in_vector2 Operand vector.
Returns:
true if equal else false.
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.

Parameters:
in_vector Operand vector.
in_fEpsilon Error margin
Possible Values: [0, +INF[ should be a positive value
Returns:
true if equal else false.
SICPPSDK_INLINE CVector2f & ScaleAddInPlace ( float  in_dS,
const CVector2f in_vector2 
)

Sets the value of this vector to the scalar multiplication of itself by s and then adds vector2 v. (this = s*this + v)

Parameters:
in_dS Scalar multiplicator.
in_vector2 Operand vector.
Returns:
A reference to this 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).

Parameters:
in_dS Scalar multiplicator.
in_vector3A Operand vector.
in_vector3B Operand vector.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector2f & ScaleInPlace ( float  in_dAlpha )

Scales this vector by the input scalar (alpha) (this = alpha * this).

Parameters:
in_dAlpha Scalar multiplicator.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector2f & Scale ( float  in_Alpha,
const CVector2f in_vector2 
)

Scales the input vector (v) by (alpha) store the result into this one (this = alpha * v).

Parameters:
in_Alpha Scalar multiplicator.
in_vector2 Operand vector.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector2f & NegateInPlace ( )

Negates this vector (this = - this).

Returns:
A reference to this vector.
SICPPSDK_INLINE CVector2f & Negate ( const CVector2f in_vector2 )

Negates the input vector (v) store the result into this one (this = - v).

Parameters:
in_vector2 Operand vector.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector2f & SubInPlace ( const CVector2f in_vector2 )

Subtracts the input vector2 (v) from this one (this = this - v).

Parameters:
in_vector2 Operand vector.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector2f & Sub ( const CVector2f in_vector3A,
const CVector2f in_vector3B 
)

Subtracts the input vector2 (in_vector3B) from the input vector2 (in_vector3A) and stores the result in this one (this = A - B).

Parameters:
in_vector3A Operand vector.
in_vector3B Operand vector.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector2f & AddInPlace ( const CVector2f in_vector2 )

Adds the input vector to this one (this = this + in_vector2).

Parameters:
in_vector2 Operand vector.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector2f & Add ( const CVector2f in_vector3A,
const CVector2f in_vector3B 
)

Adds both input vectors and stores the result in this one. (this = A + B)

Parameters:
in_vector3A Operand vector.
in_vector3B Operand vector.
Returns:
A reference to this vector.
SICPPSDK_INLINE float GetY ( ) const

Returns the Y value of this vector.

Returns:
Y value of this vector.
SICPPSDK_INLINE CVector2f & PutY ( float  in_X )

Sets the Y value of this vector.

Parameters:
in_X y value.
Returns:
A reference to this vector.
SICPPSDK_INLINE float GetX ( ) const

Returns the X value of this vector.

Returns:
X value of this vector.
SICPPSDK_INLINE CVector2f & PutX ( float  in_X )

Sets the X value of this vector.

Parameters:
in_X x value.
Returns:
A reference to this vector.

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