CVector4f Class Reference

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

#include <xsi_vector4f.h>

List of all members.

Public Member Functions

__forceinline  CVector4f ()
__forceinline  CVector4f (float in_fX, float in_fY, float in_fZ, float in_fW)
__forceinline  CVector4f (const CVector4f &in_vector4)
__forceinline  ~CVector4f ()
__forceinline CVector4f operator= (const CVector4f &in_vector4)
__forceinline bool  operator== (const CVector4f &in_vector4) const
__forceinline bool  operator!= (const CVector4f &in_vector4) const
__forceinline bool  operator< (const CVector4f &in_vector4) const
__forceinline CVector4f operator~ ()
__forceinline CVector4f operator+= (const CVector4f &in_vector4)
__forceinline CVector4f operator-= (const CVector4f &in_vector4)
__forceinline CVector4f operator *= (const CMatrix4f &in_matrix4)
__forceinline CVector4f operator *= (const float &in_fAlpha)
__forceinline float  operator[] (const short &in_sIndex)
__forceinline CVector4f MulByMatrix4InPlace (const CMatrix4f &in_matrix4)
__forceinline CVector4f MulByMatrix4 (const CVector4f &in_vector4, const CMatrix4f &in_matrix4)
__forceinline CVector4f SetNull ()
float  GetLength () const
float  GetLengthSquared () const
__forceinline CStatus  NormalizeInPlace ()
__forceinline CStatus  Normalize (const CVector4f &in_vector4)
__forceinline float  Dot (const CVector4f &in_vector4) const
__forceinline 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
__forceinline bool  Equals (const CVector4f &in_vector4) const
__forceinline CVector4f ScaleAddInPlace (float in_fS, const CVector4f &in_vector4)
__forceinline CVector4f ScaleAdd (float in_fS, const CVector4f &in_vector4A, const CVector4f &in_vector4B)
__forceinline CVector4f ScaleInPlace (float in_fAlpha)
__forceinline CVector4f Scale (float in_fAlpha, const CVector4f &in_vector4)
__forceinline CVector4f NegateInPlace ()
__forceinline CVector4f Negate (const CVector4f &in_vector4)
__forceinline CVector4f SubInPlace (const CVector4f &in_vector4)
__forceinline CVector4f Sub (const CVector4f &in_vector4A, const CVector4f &in_vector4B)
__forceinline CVector4f AddInPlace (const CVector4f &in_vector4)
__forceinline CVector4f Add (const CVector4f &in_vector4A, const CVector4f &in_vector4B)
__forceinline void  Get (float &out_fX, float &out_fY, float &out_fZ, float &out_fW) const
__forceinline CVector4f Set (float in_fX, float in_fY, float in_fZ, float in_fW)
__forceinline float  GetW () const
__forceinline CVector4f PutW (float in_fW)
__forceinline float  GetZ () const
__forceinline CVector4f PutZ (float in_fZ)
__forceinline float  GetY () const
__forceinline CVector4f PutY (float in_fY)
__forceinline float  GetX () const
__forceinline CVector4f PutX (float in_fX)


Detailed Description

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.

See also:
CVector3f, CMatrix4f


Constructor & Destructor Documentation

__forceinline CVector4f (  ) 

Default constructor.

__forceinline CVector4f ( float  in_fX,
float  in_fY,
float  in_fZ,
float  in_fW  
)

Constructor.

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

__forceinline CVector4f ( const CVector4f in_vector4  ) 

Copy constructor.

Parameters:
in_vector4  constant class object.

__forceinline ~CVector4f (  ) 

Default destructor.


Member Function Documentation

__forceinline CVector4f & operator= ( const CVector4f in_vector4  ) 

Assignment operator.

Parameters:
in_vector4  constant class object.
Returns:
A reference to this quaternion.

__forceinline bool operator== ( const CVector4f in_vector4  )  const

Equality operator tests the strict equality of this vector with the specified vector.

Parameters:
in_vector4  Operand vector.
Returns:
true if equal else false.
See also:
CVector4f::Equals

__forceinline bool operator!= ( const CVector4f in_vector4  )  const

Inequality operator tests the strict inequality of this vector with the specified vector.

Parameters:
in_vector4  Operand vector.
Returns:
true if equal else false.
See also:
CVector4f::Equals

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

Parameters:
in_vector4  CVector4f to compare.
Returns:
true if this CVector4f is less than the specified CVector4f, false otherwise.
Since:
7.5

__forceinline CVector4f & operator~ (  ) 

Negates this vector (this = - this).

Returns:
A reference to this vector.
See also:
CVector4f::NegateInPlace

__forceinline CVector4f & operator+= ( const CVector4f in_vector4  ) 

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

Parameters:
in_vector4  Operand vector.
Returns:
A reference to this vector.
See also:
CVector4f::AddInPlace

__forceinline CVector4f & operator-= ( const CVector4f in_vector4  ) 

Subtracts the input vector4 (in_vector4) from this one (this = this - in_vector4).

Parameters:
in_vector4  Operand vector.
Returns:
A reference to this vector.
See also:
CVector4f::SubInPlace

__forceinline CVector4f & operator *= ( const CMatrix4f in_matrix4  ) 

Right-multiplies this vector by the matrix m in place. (this = this * m )

Parameters:
in_matrix4  Operand matrix.
Returns:
A reference to this vector.
See also:
CVector4f::MulByMatrix4InPlace

__forceinline CVector4f & operator *= ( const float &  in_fAlpha  ) 

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

Parameters:
in_fAlpha  Scalar multiplicator.
Returns:
A reference to this vector.
See also:
CVector4f::ScaleInPlace

__forceinline float operator[] ( const short &  in_sIndex  ) 

Read-only accessors to the X,Y,Z,W components.

Parameters:
in_sIndex  0,1,2,3 for X,Y,Z and W values.
Returns:
The value of the specified component. If the index supplied is out of range the function returns DBL_MAX.
See also:
CVector4f::GetX(), CVector4f::GetY(), CVector4f::GetZ(), CVector4f::GetW()

__forceinline CVector4f & MulByMatrix4InPlace ( const CMatrix4f in_matrix4  ) 

Right-multiplies this vector by the matrix m in place (this = this * m ).

Parameters:
in_matrix4  Operand matrix.
Returns:
A reference to this vector.

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

Parameters:
in_vector4  Operand vector
in_matrix4  Operand matrix.
Returns:
A reference to this vector.

__forceinline CVector4f & 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 CStatus NormalizeInPlace (  ) 

Normalizes this vector in place.

Returns:
CStatus::OK if the normalization has been computed,

__forceinline CStatus Normalize ( const CVector4f in_vector4  ) 

Sets the value of this vector to the normalization of inputed vector.

Parameters:
in_vector4  vector operand.
Returns:
CStatus::OK if the normalization has been computed.

__forceinline float Dot ( const CVector4f in_vector4  )  const

Returns the dot product of this vector and the input vector.

Parameters:
in_vector4  vector operand.
Returns:
Dot product of this vector and vector in_vector4.

__forceinline CVector4f& Cross ( const CVector4f in_vector4A,
const CVector4f in_vector4B  
)

Sets this vector to the vector cross product of vectors A and B.

Parameters:
in_vector4A  vector operand.
in_vector4B  vector operand.
Returns:
A reference to this vector.

__forceinline CVector4f & AbsoluteInPlace (  ) 

Sets each component of this vector to its absolute value.

Returns:
A reference to this vector.

__forceinline CVector4f & Absolute ( const CVector4f in_vector4  ) 

Sets each component of the specified vector to its absolute value and places the modified values into this vector

Parameters:
in_vector4  Vector to make absolute
Returns:
A reference to this vector.

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

Parameters:
in_vector4  Operand vector.
in_fEpsilon  Error margin Possible Values: [0, +INF[ should be a positive value
Returns:
true if equal else false.

__forceinline bool Equals ( const CVector4f in_vector4  )  const

Tests the strict equality of this vector with the vector in_vector3.

Parameters:
in_vector4  Operand vector.
Returns:
true if equal else false.

__forceinline CVector4f & ScaleAddInPlace ( float  in_fS,
const CVector4f in_vector4  
)

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

Parameters:
in_fS  Scalar multiplicator.
in_vector4  Operand vector.
Returns:
A reference to this vector.

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

Parameters:
in_fS  Scalar multiplicator.
in_vector4A  Operand vector.
in_vector4B  Operand vector.
Returns:
A reference to this vector.

__forceinline CVector4f & ScaleInPlace ( float  in_fAlpha  ) 

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

Parameters:
in_fAlpha  Scalar multiplicator.
Returns:
A reference to this vector.

__forceinline CVector4f & Scale ( float  in_fAlpha,
const CVector4f in_vector4  
)

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

Parameters:
in_fAlpha  Scalar multiplicator.
in_vector4  Operand vector.
Returns:
A reference to this vector.

__forceinline CVector4f & NegateInPlace (  ) 

Negates this vector (this = - this).

Returns:
A reference to this vector.

__forceinline CVector4f & Negate ( const CVector4f in_vector4  ) 

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

Parameters:
in_vector4  Operand vector.
Returns:
A reference to this vector.

__forceinline CVector4f & SubInPlace ( const CVector4f in_vector4  ) 

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

Parameters:
in_vector4  Operand vector.
Returns:
A reference to this vector.

__forceinline CVector4f & Sub ( const CVector4f in_vector4A,
const CVector4f in_vector4B  
)

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

Parameters:
in_vector4A  Operand vector.
in_vector4B  Operand vector.
Returns:
A reference to this vector.

__forceinline CVector4f & AddInPlace ( const CVector4f in_vector4  ) 

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

Parameters:
in_vector4  Operand vector.
Returns:
A reference to this vector.

__forceinline CVector4f & Add ( const CVector4f in_vector4A,
const CVector4f in_vector4B  
)

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

Parameters:
in_vector4A  Operand vector.
in_vector4B  Operand vector.
Returns:
A reference to this vector.

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

Return values:
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.

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

Parameters:
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.
Returns:
A reference to the vector.

__forceinline float GetW (  )  const

Returns the W value of this vector.

Returns:
W value of this vector.

__forceinline CVector4f & PutW ( float  in_fW  ) 

Sets the W value of this vector.

Parameters:
in_fW  z value.
Returns:
A reference to this vector.

__forceinline float GetZ (  )  const

Returns the Z value of this vector.

Returns:
Z value of this vector.

__forceinline CVector4f & PutZ ( float  in_fZ  ) 

Sets the Z value of this vector.

Parameters:
in_fZ  z value.
Returns:
A reference to this vector.

__forceinline float GetY (  )  const

Returns the Y value of this vector.

Returns:
Y value of this vector.

__forceinline CVector4f & PutY ( float  in_fY  ) 

Sets the Y value of this vector.

Parameters:
in_fY  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 CVector4f & PutX ( float  in_fX  ) 

Sets the X value of this vector.

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


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