Public Member Functions

KFbxVector2 Class Reference

This reference page is linked to from the following overview topics: List of Python FBX classes.


Search for all occurrences

Detailed Description

FBX SDK 2-elements vector class.

Examples:

ExportDocument/main.cxx, ExportScene03/main.cxx, ImportScene/DisplayCommon.cxx, ImportScene/DisplayMaterial.cxx, Instances/main.cxx, Layers/main.cxx, ProceduralTexture/main.cxx, Transformations/DisplayCommon.cxx, UIExamples/CubeCreator/SDK_Utility.cxx, UVSample/main.cxx, and ViewScene/GlFunctions.cxx.

Definition at line 52 of file kfbxvector2.h.

#include <kfbxvector2.h>

Inheritance diagram for KFbxVector2:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void  FixWeirdValue ()

Constructors and Destructor

  KFbxVector2 ()
  Constructor.
  KFbxVector2 (const KFbxVector2 &pVector2)
  Copy constructor.
  KFbxVector2 (double pX, double pY)
  Constructor.
  ~KFbxVector2 ()
  Destructor.

Access

KFbxVector2 operator= (const KFbxVector2 &pVector2)
  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)
  Set vector.

Scalar Operations

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

Vector Operations

KFbxVector2  operator- () const
  Unary minus operator.
KFbxVector2  operator+ (const KFbxVector2 &pVector) const
  Add two vectors together.
KFbxVector2  operator- (const KFbxVector2 &pVector) const
  Subtract a vector from another vector.
KFbxVector2  operator* (const KFbxVector2 &pVector) const
  Memberwise multiplication of two vectors.
KFbxVector2  operator/ (const KFbxVector2 &pVector) const
  Memberwise division of a vector with another vector.
KFbxVector2 operator+= (const KFbxVector2 &pVector)
  Add two vectors together.
KFbxVector2 operator-= (const KFbxVector2 &pVector)
  Subtract a vector from another vector.
KFbxVector2 operator*= (const KFbxVector2 &pVector)
  Memberwise multiplication of two vectors.
KFbxVector2 operator/= (const KFbxVector2 &pVector)
  Memberwise division of a vector with another vector.
double  DotProduct (const KFbxVector2 &pVector) const
  Calculate the dot product of two vectors.

Boolean Operations

bool  operator== (const KFbxVector2 &pVector) const
  Equivalence operator.
bool  operator!= (const KFbxVector2 &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 KFbxVector2 &pVector) const
  Find the distance between 2 vectors.
void  Normalize ()
  Normalize the vector, length set to 1.

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

Constructor.

KFbxVector2 ( const KFbxVector2 pVector2 )

Copy constructor.

Parameters:
pVector2 The vector copied to this one.
KFbxVector2 ( double  pX,
double  pY 
)

Constructor.

Parameters:
pX X component.
pY Y component.

Destructor.


Member Function Documentation

KFbxVector2& operator= ( const KFbxVector2 pVector2 )

Assignment operation.

Parameters:
pVector2 The vector assigned to this one.
Returns:
This vector after assignment.
double& operator[] ( int  pIndex )

Accessor.

Parameters:
pIndex The index of the component to access.
Returns:
The reference to the indexed component.
Remarks:
The pIndex parameter is not checked for values out of bounds. The valid values are 0 and 1.

Reimplemented from fbxVectorTemplate2< T >.

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 pIndex parameter is not checked for values out of bounds. The valid values are 0 and 1.

Reimplemented from fbxVectorTemplate2< T >.

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 pIndex parameter is not checked for values out of bounds. The valid values are 0 and 1.
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 pIndex parameter is not checked for values out of bounds. The valid values are 0 and 1.
void Set ( double  pX,
double  pY 
)

Set vector.

Parameters:
pX The X component value.
pY The Y component value.
KFbxVector2 operator+ ( double  pValue ) const

Add a value to all vector components.

Parameters:
pValue The value to add to each component of the vector.
Returns:
A new vector with the result of adding pValue to each component of this vector.
Remarks:
The pValue parameter is not checked.
KFbxVector2 operator- ( double  pValue ) const

Subtract a value from all vector components.

Parameters:
pValue The value to subtract from each component of the vector.
Returns:
A new vector with the result of subtracting pValue from each component of this vector.
Remarks:
The pValue parameter is not checked.
KFbxVector2 operator* ( double  pValue ) const

Multiply a value to all vector components.

Parameters:
pValue The value multiplying each component of the vector.
Returns:
A new vector with the result of multiplying each component of this vector by pValue.
Remarks:
The pValue parameter is not checked.
KFbxVector2 operator/ ( double  pValue ) const

Divide all vector components by a value.

Parameters:
pValue The value dividing each component of the vector.
Returns:
A new vector with the result of dividing each component of this vector by pValue.
Remarks:
The pValue parameter is not checked.
KFbxVector2& operator+= ( double  pValue )

Add a value to all vector components.

Parameters:
pValue The value to add to each component of the vector.
Returns:
The result of adding pValue to each component of this vector, replacing this vector.
Remarks:
The pValue parameter is not checked.
KFbxVector2& operator-= ( double  pValue )

Subtract a value from all vector components.

Parameters:
pValue The value to subtract from each component of the vector.
Returns:
The result of subtracting pValue from each component of this vector, replacing this vector.
Remarks:
The pValue parameter is not checked.
KFbxVector2& operator*= ( double  pValue )

Multiply a value to all vector elements.

Parameters:
pValue The value multiplying each component of the vector.
Returns:
The result of multiplying each component of this vector by pValue, replacing this vector.
Remarks:
The pValue parameter is not checked.
KFbxVector2& operator/= ( double  pValue )

Divide all vector elements by a value.

Parameters:
pValue The value dividing each component of the vector.
Returns:
The result of multiplying each component of this vector by pValue, replacing this vector.
Remarks:
The pValue parameter is not checked.
KFbxVector2 operator- ( ) const

Unary minus operator.

Returns:
The vector that is the negation of this.
KFbxVector2 operator+ ( const KFbxVector2 pVector ) const

Add two vectors together.

Parameters:
pVector Vector to add.
Returns:
The result of this vector + pVector.
Remarks:
The values in pVector are not checked.
KFbxVector2 operator- ( const KFbxVector2 pVector ) const

Subtract a vector from another vector.

Parameters:
pVector Vector to subtract.
Returns:
The result of this vector - pVector.
Remarks:
The values in pVector are not checked.
KFbxVector2 operator* ( const KFbxVector2 pVector ) const

Memberwise multiplication of two vectors.

Parameters:
pVector Multiplying vector.
Returns:
The result of this vector * pVector.
Remarks:
The values in pVector are not checked.
KFbxVector2 operator/ ( const KFbxVector2 pVector ) const

Memberwise division of a vector with another vector.

Parameters:
pVector Dividing vector.
Returns:
The result of this vector / pVector.
Remarks:
The values in pVector are not checked.
KFbxVector2& operator+= ( const KFbxVector2 pVector )

Add two vectors together.

Parameters:
pVector Vector to add.
Returns:
The result of this vector + pVector, replacing this vector.
Remarks:
The values in pVector are not checked.
KFbxVector2& operator-= ( const KFbxVector2 pVector )

Subtract a vector from another vector.

Parameters:
pVector Vector to subtract.
Returns:
The result of this vector - pVector, replacing this vector.
Remarks:
The values in pVector are not checked.
KFbxVector2& operator*= ( const KFbxVector2 pVector )

Memberwise multiplication of two vectors.

Parameters:
pVector Multiplying vector.
Returns:
The result of this vector * pVector, replacing this vector.
Remarks:
The values in pVector are not checked.
KFbxVector2& operator/= ( const KFbxVector2 pVector )

Memberwise division of a vector with another vector.

Parameters:
pVector Dividing vector.
Remarks:
The values in pVector are not checked.
Returns:
The result of this vector / pVector, replacing this vector.
Remarks:
The values in pVector are not checked.
double DotProduct ( const KFbxVector2 pVector ) const

Calculate the dot product of two vectors.

Parameters:
pVector The second vector.
Returns:
The dot product value.
Remarks:
pVector is considered a XYZ vector with fourth weight element, so only the first 3 elements are considered.
bool operator== ( const KFbxVector2 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), false otherwise.
bool operator!= ( const KFbxVector2 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), true otherwise.
double Length ( ) const

Get the vector's length.

Returns:
The mathematical length of the vector.
double SquareLength ( ) const

Get the vector's length squared.

Returns:
The mathematical square length of the vector.
double Distance ( const KFbxVector2 pVector ) const

Find the distance between 2 vectors.

Parameters:
pVector The second vector.
Returns:
The mathematical distance between the two vectors.
void Normalize ( )

Normalize the vector, length set to 1.

operator double * ( )

Cast the vector in a double pointer.

operator const double * ( ) const

Cast the vector in a const double pointer.

void FixWeirdValue ( )

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

KFbxVector2 KFbxVector2 KFbxVector2 KFbxVector2 KFbxVector2 KFbxVector2 KFbxVector2 KFbxVector2 KFbxVector2 KFbxVector2
KFbxVector2 KFbxVector2 KFbxVector2 KFbxVector2 KFbxVector2 KFbxVector2 KFbxVector2 KFbxVector2 KFbxVector2 KFbxVector2