KFbxVector4 Class Reference

#include <kfbxvector4.h>
Inheritance diagram for KFbxVector4:
Inheritance graph
[legend]

List of all members.


Detailed Description

FBX SDK 4-elements vector class.

Definition at line 52 of file kfbxvector4.h.


Constructors and Destructor

  KFbxVector4 ()
  Constructor.
  KFbxVector4 (const KFbxVector4 &pVector4)
  Copy constructor.
  KFbxVector4 (double pX, double pY, double pZ, double pW=1.0)
  Constructor.
  KFbxVector4 (const double pValue[4])
  Constructor.
  KFbxVector4 (const fbxDouble3 &pValue)
  Constructor.
  ~KFbxVector4 ()
  Destructor.

Access

KFbxVector4 operator= (const KFbxVector4 &pVector4)
  Assignment operation.
KFbxVector4 operator= (const double *pValue)
  Assignment operation.
KFbxVector4 operator= (const fbxDouble3 &pValue)
  Assignment operation.
double operator[] (int pIndex)
  Accessor.
const double operator[] (int pIndex) const
  Accessor.
double  GetAt (int pIndex) const
  Get a vector element.
void  SetAt (int pIndex, double pValue)
  Set a vector element.
void  Set (double pX, double pY, double pZ, double pW=1.0)
  Set vector.

Scalar Operations

KFbxVector4  operator+ (double pValue) const
  Add a value to all vector components.
KFbxVector4  operator- (double pValue) const
  Subtract a value from all vector components.
KFbxVector4  operator* (double pValue) const
  Multiply a value to all vector components.
KFbxVector4  operator/ (double pValue) const
  Divide all vector components by a value.
KFbxVector4 operator+= (double pValue)
  Add a value to all vector components.
KFbxVector4 operator-= (double pValue)
  Subtract a value from all vector components.
KFbxVector4 operator*= (double pValue)
  Multiply a value to all vector elements.
KFbxVector4 operator/= (double pValue)
  Divide all vector elements by a value.

Vector Operations

KFbxVector4  operator- () const
  Unary minus operator.
KFbxVector4  operator+ (const KFbxVector4 &pVector) const
  Add two vectors together.
KFbxVector4  operator- (const KFbxVector4 &pVector) const
  Subtract a vector from another vector.
KFbxVector4  operator* (const KFbxVector4 &pVector) const
  Memberwise multiplication of two vectors.
KFbxVector4  operator/ (const KFbxVector4 &pVector) const
  Memberwise division of a vector with another vector.
KFbxVector4 operator+= (const KFbxVector4 &pVector)
  Add two vectors together.
KFbxVector4 operator-= (const KFbxVector4 &pVector)
  Subtract a vector from another vector.
KFbxVector4 operator*= (const KFbxVector4 &pVector)
  Memberwise multiplication of two vectors.
KFbxVector4 operator/= (const KFbxVector4 &pVector)
  Memberwise division of a vector with another vector.
double  DotProduct (const KFbxVector4 &pVector) const
  Calculate the dot product of two vectors.
KFbxVector4  CrossProduct (const KFbxVector4 &pVector) const
  Calculate the cross product of two vectors.
static bool  AxisAlignmentInEulerAngle (const KFbxVector4 &pAB, const KFbxVector4 &pA, const KFbxVector4 &pB, KFbxVector4 &pAngles)
  Calculate the Euler rotation required to align axis pAB-pA on pAB-pB.

Boolean Operations

bool  operator== (const KFbxVector4 &pVector) const
  Equivalence operator.
bool  operator!= (const KFbxVector4 &pVector) const
  Non equivalence operator.

Length

double  Length () const
  Get the vector's length.
double  SquareLength () const
  Get the vector's length squared.
double  Distance (const KFbxVector4 &pVector) const
  Find the distance between 2 vectors.
void  Normalize ()
  Normalize the vector, length set to 1.
void  SetXYZ (const KFbxQuaternion pQuat)
  Set the Euler XYZ from a Quaternion.

Casting

  operator double * ()
  Cast the vector in a double pointer.
  operator const double * () const
  Cast the vector in a const double pointer.

Constructor & Destructor Documentation

KFbxVector4 (  ) 

Constructor.

KFbxVector4 ( const KFbxVector4 pVector4  ) 

Copy constructor.

Parameters:
pVector4  The vector copied to this one.

KFbxVector4 ( double  pX,
double  pY,
double  pZ,
double  pW = 1.0  
)

Constructor.

Parameters:
pX  X component.
pY  Y component.
pZ  Z component.
pW  W component.

KFbxVector4 ( const double  pValue[4]  ) 

Constructor.

Parameters:
pValue  X,Y,Z,W components.

KFbxVector4 ( const fbxDouble3 pValue  ) 

Constructor.

Parameters:
pValue  X,Y,Z components.
Remarks:
The fourth component of this object is assigned 1.

~KFbxVector4 (  ) 

Destructor.


Member Function Documentation

KFbxVector4& operator= ( const KFbxVector4 pVector4  ) 

Assignment operation.

Parameters:
pVector4  The vector assigned to this one.
Returns:
This vector after assignment.

KFbxVector4& operator= ( const double pValue  ) 

Assignment operation.

Parameters:
pValue  The pointer to an array whose elements are assigned to this vector.
Returns:
This vector after assignment.

KFbxVector4& operator= ( const fbxDouble3 pValue  ) 

Assignment operation.

Parameters:
pValue  The vector with 3 elements assigned to this vector.
Returns:
This vector after assignment.
Remarks:
The first three elements are assigned with pValue. The fourth element is set as 1.0

double& operator[] ( int  pIndex  ) 

Accessor.

Parameters:
pIndex  The index of the component to access.
Returns:
The reference to the indexed component.
Remarks:
The parameter is not checked for values out of bounds. The valid range is [0,3].

Reimplemented from fbxVectorTemplate4< double >.

const double& operator[] ( int  pIndex  )  const

Accessor.

Parameters:
pIndex  The index of the component to access.
Returns:
The const reference to the indexed component.
Remarks:
The parameter is not checked for values out of bounds. The valid range is [0,3].

Reimplemented from fbxVectorTemplate4< double >.

double GetAt ( int  pIndex  )  const

Get a vector element.

Parameters:
pIndex  The index of the component to access.
Returns:
The value of the indexed component.
Remarks:
The parameter is not checked for values out of bounds. The valid range is [0,3].

void SetAt ( int  pIndex,
double  pValue  
)

Set a vector element.

Parameters:
pIndex  The index of the component to set.
pValue  The new value to set the component.
Remarks:
The index parameter is not checked for values out of bounds. The valid range is [0,3].

void Set ( double  pX,
double  pY,
double  pZ,
double  pW = 1.0  
)

Set vector.

Parameters:
pX  The X component value.
pY  The Y component value.
pZ  The Z component value.
pW  The W component value.

KFbxVector4 operator+ ( double  pValue  )  const

Add a value to all vector components.

Parameters:
pValue  The value to add to each component of the vector.
Returns:
New vector.
Remarks:
The passed value is not checked.

KFbxVector4 operator- ( double  pValue  )  const

Subtract a value from all vector components.

Parameters:
pValue  The value to subtract from each component of the vector.
Returns:
New vector.
Remarks:
The passed value is not checked.

KFbxVector4 operator* ( double  pValue  )  const

Multiply a value to all vector components.

Parameters:
pValue  The value multiplying each component of the vector.
Returns:
New vector.
Remarks:
The passed value is not checked.

KFbxVector4 operator/ ( double  pValue  )  const

Divide all vector components by a value.

Parameters:
pValue  The value dividing each component of the vector.
Returns:
New vector.
Remarks:
The passed value is not checked.

KFbxVector4& operator+= ( double  pValue  ) 

Add a value to all vector components.

Parameters:
pValue  The value to add to each component of the vector.
Returns:
this updated with the operation result.
Remarks:
The passed value is not checked.

KFbxVector4& operator-= ( double  pValue  ) 

Subtract a value from all vector components.

Parameters:
pValue  The value to subtract from each component of the vector.
Returns:
this updated with the operation result.
Remarks:
The passed value is not checked.

KFbxVector4& operator*= ( double  pValue  ) 

Multiply a value to all vector elements.

Parameters:
pValue  The value multiplying each component of the vector.
Returns:
this updated with the operation result.
Remarks:
The passed value is not checked.

KFbxVector4& operator/= ( double  pValue  ) 

Divide all vector elements by a value.

Parameters:
pValue  The value dividing each component of the vector.
Returns:
this updated with the operation result.
Remarks:
The passed value is not checked.

KFbxVector4 operator- (  )  const

Unary minus operator.

Returns:
The vector that is the negation of this.

KFbxVector4 operator+ ( const KFbxVector4 pVector  )  const

Add two vectors together.

Parameters:
pVector  Vector to add.
Returns:
The vector v' = this + pVector.
Remarks:
The values in pVector are not checked.

KFbxVector4 operator- ( const KFbxVector4 pVector  )  const

Subtract a vector from another vector.

Parameters:
pVector  Vector to subtract.
Returns:
The vector v' = this - pVector.
Remarks:
The values in pVector are not checked.

KFbxVector4 operator* ( const KFbxVector4 pVector  )  const

Memberwise multiplication of two vectors.

Parameters:
pVector  Multiplying vector.
Returns:
The vector v' = this * pVector.
Remarks:
The values in pVector are not checked.

KFbxVector4 operator/ ( const KFbxVector4 pVector  )  const

Memberwise division of a vector with another vector.

Parameters:
pVector  Dividing vector.
Returns:
The vector v[i]' = this[i] / pVector[i].
Remarks:
The values in pVector are not checked.

KFbxVector4& operator+= ( const KFbxVector4 pVector  ) 

Add two vectors together.

Parameters:
pVector  Vector to add.
Returns:
this updated with the operation result.
Remarks:
The values in pVector are not checked.

KFbxVector4& operator-= ( const KFbxVector4 pVector  ) 

Subtract a vector from another vector.

Parameters:
pVector  Vector to subtract.
Returns:
this updated with the operation result.
Remarks:
The values in pVector are not checked.

KFbxVector4& operator*= ( const KFbxVector4 pVector  ) 

Memberwise multiplication of two vectors.

Parameters:
pVector  Multiplying vector.
Returns:
this updated with the operation result.
Remarks:
The values in pVector are not checked.

KFbxVector4& operator/= ( const KFbxVector4 pVector  ) 

Memberwise division of a vector with another vector.

Parameters:
pVector  Dividing vector.
Returns:
this updated with the operation result.
Remarks:
The values in pVector are not checked.

double DotProduct ( const KFbxVector4 pVector  )  const

Calculate the dot product of two vectors.

Parameters:
pVector  The second vector.
Returns:
The dot product value.
Remarks:
Being considered as a XYZ vector with a weight, only the 3 first elements are considered in this operation.

KFbxVector4 CrossProduct ( const KFbxVector4 pVector  )  const

Calculate the cross product of two vectors.

Parameters:
pVector  The second vector.
Returns:
The cross product vector.
Remarks:
Being considered as a XYZ vector with a weight, only the first 3 elements are considered in this operation.

static bool AxisAlignmentInEulerAngle ( const KFbxVector4 pAB,
const KFbxVector4 pA,
const KFbxVector4 pB,
KFbxVector4 pAngles  
) [static]

Calculate the Euler rotation required to align axis pAB-pA on pAB-pB.

Parameters:
pAB  The intersection of the 2 axis.
pA  A point on axis to be aligned.
pB  A point on reference axis.
pAngles  Resulting euler angles.
Returns:
true on success.
Remarks:
Being considered as a XYZ vector with a weight, only the first 3 elements are considered in this operation.

bool operator== ( const KFbxVector4 pVector  )  const

Equivalence operator.

Parameters:
pVector  The vector to be compared to this.
Returns:
true if the two vectors are equal (each element is within a 1.0e-6 tolerance) and false otherwise.

bool operator!= ( const KFbxVector4 pVector  )  const

Non equivalence operator.

Parameters:
pVector  The vector to be compared to this.
Returns:
false if the two vectors are equal (each element is within a 1.0e-6 tolerance) and true otherwise.

double Length (  )  const

Get the vector's length.

Returns:
The mathematical length of the vector.
Remarks:
Being considered as a XYZ vector with a weight, only the first 3 elements are considered in this operation.

double SquareLength (  )  const

Get the vector's length squared.

Returns:
The mathematical square length of the vector.
Remarks:
Being considered as a XYZ vector with a weight, only the first 3 elements are considered in this operation.

double Distance ( const KFbxVector4 pVector  )  const

Find the distance between 2 vectors.

Parameters:
pVector  The second vector.
Returns:
The mathematical distance between the two vectors.
Remarks:
Being considered as a XYZ vector with a weight, only the 3 first elements are considered in this operation.

void Normalize (  ) 

Normalize the vector, length set to 1.

Remarks:
Being considered as a XYZ vector with a weight, only the first 3 elements are considered in this operation.

void SetXYZ ( const KFbxQuaternion  pQuat  ) 

Set the Euler XYZ from a Quaternion.

Parameters:
pQuat  Quaternion from which Euler XYZ information is got.

operator double * (  ) 

Cast the vector in a double pointer.

operator const double * (  )  const

Cast the vector in a const double pointer.

KFbxVector4 KFbxVector4 KFbxVector4 KFbxVector4 KFbxVector4 KFbxVector4 KFbxVector4 KFbxVector4 KFbxVector4 KFbxVector4
KFbxVector4 KFbxVector4 KFbxVector4 KFbxVector4 KFbxVector4 KFbxVector4 KFbxVector4 KFbxVector4 KFbxVector4 KFbxVector4