Public Member Functions
CVector4 Class Reference

Detailed Description

A 4-element vector that is represented by double precision floating point x,y,z,w coordinates.

See also:
MATH::CMatrix4, MATH::CVector4Array

#include <xsi_vector4.h>

List of all members.

Public Member Functions

SICPPSDK_INLINE CVector4 ()
SICPPSDK_INLINE CVector4 (double in_dX, double in_dY, double in_dZ, double in_dW)
SICPPSDK_INLINE CVector4 (const CVector4 &in_vector4)
SICPPSDK_INLINE ~CVector4 ()
SICPPSDK_INLINE CVector4operator= (const CVector4 &in_vector4)
SICPPSDK_INLINE bool operator== (const CVector4 &in_vector4) const
SICPPSDK_INLINE bool operator!= (const CVector4 &in_vector4) const
SICPPSDK_INLINE CVector4operator~ ()
SICPPSDK_INLINE CVector4operator+= (const CVector4 &in_vector4)
SICPPSDK_INLINE CVector4operator-= (const CVector4 &in_vector4)
SICPPSDK_INLINE CVector4operator*= (const CMatrix4 &in_matrix4)
SICPPSDK_INLINE CVector4operator*= (const CTransformation &in_transformation)
SICPPSDK_INLINE CVector4operator*= (const double &in_dAlpha)
double operator[] (const short &in_sIndex)
SICPPSDK_INLINE CVector4MulByMatrix4InPlace (const CMatrix4 &in_matrix4)
SICPPSDK_INLINE CVector4MulByMatrix4 (const CVector4 &in_vector4, const CMatrix4 &in_matrix4)
SICPPSDK_INLINE CVector4MulByTransformationInPlace (const CTransformation &in_transformation)
SICPPSDK_INLINE CVector4MulByTransformation (const CVector4 &in_vector4, const CTransformation &in_transformation)
SICPPSDK_INLINE CVector4PutNull ()
double GetLength () const
double GetLengthSquared () const
CStatus NormalizeInPlace ()
CStatus Normalize (const CVector4 &in_vector4)
SICPPSDK_INLINE double Dot (const CVector4 &in_vector4) const
SICPPSDK_INLINE CVector4Cross (const CVector4 &in_vector4A, const CVector4 &in_vector4B)
CVector4AbsoluteInPlace ()
CVector4Absolute (const CVector4 &in_vector4)
bool EpsilonEquals (const CVector4 &in_vector4, double in_dEpsilon) const
SICPPSDK_INLINE bool Equals (const CVector4 &in_vector4) const
SICPPSDK_INLINE CVector4ScaleAddInPlace (double in_dS, const CVector4 &in_vector4)
SICPPSDK_INLINE CVector4ScaleAdd (double in_dS, const CVector4 &in_vector4A, const CVector4 &in_vector4B)
SICPPSDK_INLINE CVector4ScaleInPlace (double in_dAlpha)
SICPPSDK_INLINE CVector4Scale (double in_dAlpha, const CVector4 &in_vector4)
SICPPSDK_INLINE CVector4NegateInPlace ()
SICPPSDK_INLINE CVector4Negate (const CVector4 &in_vector4)
SICPPSDK_INLINE CVector4SubInPlace (const CVector4 &in_vector4)
SICPPSDK_INLINE CVector4Sub (const CVector4 &in_vector4A, const CVector4 &in_vector4B)
SICPPSDK_INLINE CVector4AddInPlace (const CVector4 &in_vector4)
SICPPSDK_INLINE CVector4Add (const CVector4 &in_vector4A, const CVector4 &in_vector4B)
SICPPSDK_INLINE void Get (double &out_dX, double &out_dY, double &out_dZ, double &out_dW) const
SICPPSDK_INLINE CVector4Set (double in_dX, double in_dY, double in_dZ, double in_dW)
SICPPSDK_INLINE double GetW () const
SICPPSDK_INLINE CVector4PutW (double in_dW)
SICPPSDK_INLINE double GetZ () const
SICPPSDK_INLINE CVector4PutZ (double in_dZ)
SICPPSDK_INLINE double GetY () const
SICPPSDK_INLINE CVector4PutY (double in_dY)
SICPPSDK_INLINE double GetX () const
SICPPSDK_INLINE CVector4PutX (double in_dX)

Constructor & Destructor Documentation

SICPPSDK_INLINE CVector4 ( )

Default constructor.

SICPPSDK_INLINE CVector4 ( double  in_dX,
double  in_dY,
double  in_dZ,
double  in_dW 
)

Constructor.

Parameters:
in_dXValue of the x component
in_dYValue of the y component
in_dZValue of the z component
in_dWValue of the w component
SICPPSDK_INLINE CVector4 ( const CVector4 in_vector4)

Copy constructor.

Parameters:
in_vector4constant class object.
SICPPSDK_INLINE ~CVector4 ( )

Default destructor.


Member Function Documentation

SICPPSDK_INLINE CVector4 & operator= ( const CVector4 in_vector4)

Assignment operator.

Parameters:
in_vector4constant class object.
Returns:
A reference to this quaternion.
SICPPSDK_INLINE bool operator== ( const CVector4 in_vector4) const

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

Parameters:
in_vector4Operand vector.
Returns:
true if equal else false.
See also:
CVector4::Equals
SICPPSDK_INLINE bool operator!= ( const CVector4 in_vector4) const

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

Parameters:
in_vector4Operand vector.
Returns:
true if equal else false.
See also:
CVector4::Equals
SICPPSDK_INLINE CVector4 & operator~ ( )

Negates this vector (this = - this).

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

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

Parameters:
in_vector4Operand vector.
Returns:
A reference to this vector.
See also:
CVector4::AddInPlace
SICPPSDK_INLINE CVector4 & operator-= ( const CVector4 in_vector4)

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

Parameters:
in_vector4Operand vector.
Returns:
A reference to this vector.
See also:
CVector4::SubInPlace
SICPPSDK_INLINE CVector4 & operator*= ( const CMatrix4 in_matrix4)

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

Parameters:
in_matrix4Operand matrix.
Returns:
A reference to this vector.
See also:
CVector4::MulByMatrix4InPlace
SICPPSDK_INLINE CVector4 & operator*= ( const CTransformation in_transformation)

Right-multiplies this vector by the transformation t in place (this = this . t).

Parameters:
in_transformationtransformation operand.
Returns:
A reference to this vector.
See also:
CVector4::MulByTransformationInPlace
SICPPSDK_INLINE CVector4 & operator*= ( const double &  in_dAlpha)

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

Parameters:
in_dAlphaScalar multiplicator.
Returns:
A reference to this vector.
See also:
CVector4::ScaleInPlace
double operator[] ( const short &  in_sIndex)

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

Parameters:
in_sIndex0,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:
CVector4::GetX(), CVector4::GetY(), CVector4::GetZ(), CVector4::GetW()
SICPPSDK_INLINE CVector4 & MulByMatrix4InPlace ( const CMatrix4 in_matrix4)

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

Parameters:
in_matrix4Operand matrix.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector4 & MulByMatrix4 ( const CVector4 in_vector4,
const CMatrix4 in_matrix4 
)

Right-multiplies the vector v by the matrix m and store the result in this vector (this = v . m ).

Parameters:
in_vector4Operand vector
in_matrix4Operand matrix.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector4 & MulByTransformationInPlace ( const CTransformation in_transformation)

Right-multiplies this vector by the transformation t in place (this = this . t).

Parameters:
in_transformationtransformation operand.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector4 & MulByTransformation ( const CVector4 in_vector4,
const CTransformation in_transformation 
)

Right-multiplies the vector v by the transformation t and store the result in this vector (this = v . t ).

Parameters:
in_vector4transformation operand.
in_transformationtransformation operand.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector4 & PutNull ( )

Sets this vector to a null vector.

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

Returns the length of this vector.

Returns:
Length of this vector.
double GetLengthSquared ( ) const

Returns the squared length of this vector.

Returns:
Squared length of this vector.
CStatus NormalizeInPlace ( )

Normalizes this vector in place.

Returns:
CStatus::OK if the normalization has been computed,
CStatus Normalize ( const CVector4 in_vector4)

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

Parameters:
in_vector4vector operand.
Returns:
CStatus::OK if the normalization has been computed.
SICPPSDK_INLINE double Dot ( const CVector4 in_vector4) const

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

Parameters:
in_vector4vector operand.
Returns:
Dot product of this vector and vector in_vector4.
SICPPSDK_INLINE CVector4& Cross ( const CVector4 in_vector4A,
const CVector4 in_vector4B 
)

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

Parameters:
in_vector4Avector operand.
in_vector4Bvector operand.
Returns:
A reference to this vector.
CVector4& AbsoluteInPlace ( )

Sets each component of this vector to its absolute value.

Returns:
A reference to this vector.
CVector4& Absolute ( const CVector4 in_vector4)

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

Parameters:
in_vector4Vector to make absolute
Returns:
A reference to this vector.
bool EpsilonEquals ( const CVector4 in_vector4,
double  in_dEpsilon 
) const

Tests the equality of this vector with the vector in_vector3, with a tolerance of Epsilon.

Parameters:
in_vector4Operand vector.
in_dEpsilonError margin Possible Values: [0, +INF[ should be a positive value
Returns:
true if equal else false.
SICPPSDK_INLINE bool Equals ( const CVector4 in_vector4) const

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

Parameters:
in_vector4Operand vector.
Returns:
true if equal else false.
SICPPSDK_INLINE CVector4 & ScaleAddInPlace ( double  in_dS,
const CVector4 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_dSScalar multiplicator.
in_vector4Operand vector.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector4 & ScaleAdd ( double  in_dS,
const CVector4 in_vector4A,
const CVector4 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_dSScalar multiplicator.
in_vector4AOperand vector.
in_vector4BOperand vector.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector4 & ScaleInPlace ( double  in_dAlpha)

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

Parameters:
in_dAlphaScalar multiplicator.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector4 & Scale ( double  in_dAlpha,
const CVector4 in_vector4 
)

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

Parameters:
in_dAlphaScalar multiplicator.
in_vector4Operand vector.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector4 & NegateInPlace ( )

Negates this vector (this = - this).

Returns:
A reference to this vector.
SICPPSDK_INLINE CVector4 & Negate ( const CVector4 in_vector4)

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

Parameters:
in_vector4Operand vector.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector4 & SubInPlace ( const CVector4 in_vector4)

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

Parameters:
in_vector4Operand vector.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector4 & Sub ( const CVector4 in_vector4A,
const CVector4 in_vector4B 
)

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

Parameters:
in_vector4AOperand vector.
in_vector4BOperand vector.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector4 & AddInPlace ( const CVector4 in_vector4)

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

Parameters:
in_vector4Operand vector.
Returns:
A reference to this vector.
SICPPSDK_INLINE CVector4 & Add ( const CVector4 in_vector4A,
const CVector4 in_vector4B 
)

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

Parameters:
in_vector4AOperand vector.
in_vector4BOperand vector.
Returns:
A reference to this vector.
SICPPSDK_INLINE void Get ( double &  out_dX,
double &  out_dY,
double &  out_dZ,
double &  out_dW 
) const

Returns the X, Y, Z and W values of the vector.

Return values:
out_dXX value to get in the vector.
out_dYY value to get in the vector.
out_dZZ value to get in the vector.
out_dWW value to get in the vector.
SICPPSDK_INLINE CVector4 & Set ( double  in_dX,
double  in_dY,
double  in_dZ,
double  in_dW 
)

Sets the X, Y, Z and W values of the vector.

Parameters:
in_dXX value to set in the vector.
in_dYY value to set in the vector.
in_dZZ value to set in the vector.
in_dWW value to set in the vector.
Returns:
A reference to the vector.
SICPPSDK_INLINE double GetW ( ) const

Returns the W value of this vector.

Returns:
W value of this vector.
SICPPSDK_INLINE CVector4 & PutW ( double  in_dW)

Sets the W value of this vector.

Parameters:
in_dWz value.
Returns:
A reference to this vector.
SICPPSDK_INLINE double GetZ ( ) const

Returns the Z value of this vector.

Returns:
Z value of this vector.
SICPPSDK_INLINE CVector4 & PutZ ( double  in_dZ)

Sets the Z value of this vector.

Parameters:
in_dZz value.
Returns:
A reference to this vector.
SICPPSDK_INLINE double GetY ( ) const

Returns the Y value of this vector.

Returns:
Y value of this vector.
SICPPSDK_INLINE CVector4 & PutY ( double  in_dY)

Sets the Y value of this vector.

Parameters:
in_dYy value.
Returns:
A reference to this vector.
SICPPSDK_INLINE double GetX ( ) const

Returns the X value of this vector.

Returns:
X value of this vector.
SICPPSDK_INLINE CVector4 & PutX ( double  in_dX)

Sets the X value of this vector.

Parameters:
in_dXx value.
Returns:
A reference to this vector.

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