# CVector2f Class Reference

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

`#include <xsi_vector2f.h>`

List of all members.

## Public Member Functions
__forceinline | CVector2f ()
__forceinline | CVector2f (float in_X, float in_Y)
__forceinline | CVector2f (const CVector2f &in_vector2)
| ~CVector2f ()
__forceinline CVector2f & | operator= (const CVector2f &in_vector2)
__forceinline bool | operator== (const CVector2f &in_vector2) const
__forceinline bool | operator!= (const CVector2f &in_vector2) const
__forceinline bool | operator< (const CVector2f &in_vector2) const
__forceinline CVector2f & | operator~ ()
__forceinline CVector2f & | operator+= (const CVector2f &in_vector2)
__forceinline CVector2f & | operator-= (const CVector2f &in_vector2)
__forceinline CVector2f & | operator *= (const float &in_dAlpha)
__forceinline CVector2f & | SetNull ()
__forceinline float | GetLength () const
__forceinline float | GetLengthSquared () const
__forceinline bool | Equals (const CVector2f &in_vector2) const
__forceinline bool | EpsilonEquals (const CVector2f &in_vector, const float in_fEpsilon) const
__forceinline CVector2f & | ScaleAddInPlace (float in_dS, const CVector2f &in_vector2)
__forceinline CVector2f & | ScaleAdd (float in_dS, const CVector2f &in_vector3A, const CVector2f &in_vector3B)
__forceinline CVector2f & | ScaleInPlace (float in_dAlpha)
__forceinline CVector2f & | Scale (float in_Alpha, const CVector2f &in_vector2)
__forceinline CVector2f & | NegateInPlace ()
__forceinline CVector2f & | Negate (const CVector2f &in_vector2)
__forceinline CVector2f & | SubInPlace (const CVector2f &in_vector2)
__forceinline CVector2f & | Sub (const CVector2f &in_vector3A, const CVector2f &in_vector3B)
__forceinline CVector2f & | AddInPlace (const CVector2f &in_vector2)
__forceinline CVector2f & | Add (const CVector2f &in_vector3A, const CVector2f &in_vector3B)
__forceinline float | GetY () const
__forceinline CVector2f & | PutY (float in_X)
__forceinline float | GetX () const
__forceinline CVector2f & | PutX (float in_X)

## Detailed 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

## Constructor & Destructor Documentation

__forceinline CVector2f | ( |  | ) |

Default constructor.

__forceinline CVector2f | ( | float | in_X,
|  | float | in_Y |
| ) |  |  |

Constructor.

Parameters:

  | in_X | Value of the x component
  | in_Y | Value of the y component

__forceinline CVector2f | ( | const CVector2f & | in_vector2 | ) |

Copy constructor.

Parameters:

  | in_vector2 | constant class object.

~CVector2f | ( |  | ) | `[inline]`

Default destructor.

## Member Function Documentation

__forceinline CVector2f & operator= | ( | const CVector2f & | in_vector2 | ) |

Assignment operator.

Parameters:

  | in_vector2 | constant class object.

Returns:
  A reference to this vector.

__forceinline 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

__forceinline 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

__forceinline 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

__forceinline CVector2f & operator~ | ( |  | ) |

Negates this vector (this = - this).

Returns:
  A reference to this vector.

See also:
  CVector2f::NegateInPlace

__forceinline 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

__forceinline 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

__forceinline 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

__forceinline CVector2f & SetNull | ( |  | ) |

Sets this vector to a null vector.

Returns:
  A reference to this vector.

__forceinline float GetLength | ( |  | ) | const

Returns the length of this vector.

Returns:
  Length of this vector.

__forceinline float GetLengthSquared | ( |  | ) | const

Returns the squared length of this vector.

Returns:
  Squared length of this vector.

__forceinline 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.

__forceinline 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.

__forceinline 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.

__forceinline 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.

__forceinline 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.

__forceinline 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.

__forceinline CVector2f & NegateInPlace | ( |  | ) |

Negates this vector (this = - this).

Returns:
  A reference to this vector.

__forceinline 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.

__forceinline 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.

__forceinline CVector2f & Sub | ( | const CVector2f & | in_vector3A,
|  | const CVector2f & | in_vector3B |
| ) |  |  |

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

Parameters:

  | in_vector3A | Operand vector.
  | in_vector3B | Operand vector.

Returns:
  A reference to this vector.

__forceinline 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.

__forceinline 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.

__forceinline float GetY | ( |  | ) | const

Returns the Y value of this vector.

Returns:
  Y value of this vector.

__forceinline CVector2f & PutY | ( | float | in_X | ) |

Sets the Y value of this vector.

Parameters:

  | in_X | y value.

Returns:
  A reference to this vector.

__forceinline float GetX | ( |  | ) | const

Returns the X value of this vector.

Returns:
  X value of this vector.

__forceinline 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:

- xsi_vector2f.h