FBX C++ API Reference
FbxVector2 Class Reference

#include <fbxvector2.h>

Class Description

+ Inheritance diagram for FbxVector2:

Public Member Functions

bool IsZero (int pSize=2) const
 Find out if the vector is equal to zero. More...
 
void FixIncorrectValue ()
 
- Public Member Functions inherited from FbxVectorTemplate2< T >
 FbxVectorTemplate2 ()
 
 FbxVectorTemplate2 (T pValue)
 
 FbxVectorTemplate2 (T pData0, T pData1)
 
 ~FbxVectorTemplate2 ()
 
T & operator[] (int pIndex)
 
const T & operator[] (int pIndex) const
 
FbxVectorTemplate2< T > & operator= (const T &pValue)
 
FbxVectorTemplate2< T > & operator= (const FbxVectorTemplate2< T > &pVector)
 
bool operator== (const FbxVectorTemplate2< T > &pVector) const
 
bool operator!= (const FbxVectorTemplate2< T > &pVector) const
 
T * Buffer ()
 
const T * Buffer () const
 

Constructors and Destructor

 FbxVector2 ()
 Constructor. More...
 
 FbxVector2 (const FbxVector2 &pVector2)
 Copy constructor. More...
 
 FbxVector2 (double pX, double pY)
 Constructor. More...
 

Access

FbxVector2operator= (const FbxVector2 &pVector2)
 Assignment operation. More...
 
void Set (double pX, double pY)
 Set vector. More...
 

Scalar Operations

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

Vector Operations

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

Boolean Operations

bool operator== (const FbxVector2 &pVector) const
 Equivalence operator. More...
 
bool operator!= (const FbxVector2 &pVector) const
 Non-equivalence operator. More...
 

Length

double Length () const
 Get the vector's length. More...
 
double SquareLength () const
 Get the vector's length squared. More...
 
double Distance (const FbxVector2 &pVector) const
 Find the distance between 2 vectors. More...
 
void Normalize ()
 Normalize the vector, length set to 1. More...
 

Casting

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

Additional Inherited Members

- Public Attributes inherited from FbxVectorTemplate2< T >
mData [2]
 

Constructor & Destructor Documentation

◆ FbxVector2() [1/3]

Constructor.

◆ FbxVector2() [2/3]

FbxVector2 ( const FbxVector2 pVector2)

Copy constructor.

Parameters
pVector2The vector copied to this one.

◆ FbxVector2() [3/3]

FbxVector2 ( double  pX,
double  pY 
)

Constructor.

Parameters
pXX component.
pYY component.

Member Function Documentation

◆ operator=()

FbxVector2& operator= ( const FbxVector2 pVector2)

Assignment operation.

Parameters
pVector2The vector assigned to this one.
Returns
This vector after assignment.

◆ Set()

void Set ( double  pX,
double  pY 
)

Set vector.

Parameters
pXThe X component value.
pYThe Y component value.

◆ operator+() [1/2]

FbxVector2 operator+ ( double  pValue) const

Add a value to all vector components.

Parameters
pValueThe 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.

◆ operator-() [1/3]

FbxVector2 operator- ( double  pValue) const

Subtract a value from all vector components.

Parameters
pValueThe 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.

◆ operator*() [1/2]

FbxVector2 operator* ( double  pValue) const

Multiply a value to all vector components.

Parameters
pValueThe 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.

◆ operator/() [1/2]

FbxVector2 operator/ ( double  pValue) const

Divide all vector components by a value.

Parameters
pValueThe 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.

◆ operator+=() [1/2]

FbxVector2& operator+= ( double  pValue)

Add a value to all vector components.

Parameters
pValueThe 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.

◆ operator-=() [1/2]

FbxVector2& operator-= ( double  pValue)

Subtract a value from all vector components.

Parameters
pValueThe 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.

◆ operator*=() [1/2]

FbxVector2& operator*= ( double  pValue)

Multiply a value to all vector elements.

Parameters
pValueThe 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.

◆ operator/=() [1/2]

FbxVector2& operator/= ( double  pValue)

Divide all vector elements by a value.

Parameters
pValueThe 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.

◆ operator-() [2/3]

FbxVector2 operator- ( ) const

Unary minus operator.

Returns
The vector that is the negation of this.

◆ operator+() [2/2]

FbxVector2 operator+ ( const FbxVector2 pVector) const

Add two vectors together.

Parameters
pVectorVector to add.
Returns
The result of this vector + pVector.
Remarks
The values in pVector are not checked.

◆ operator-() [3/3]

FbxVector2 operator- ( const FbxVector2 pVector) const

Subtract a vector from another vector.

Parameters
pVectorVector to subtract.
Returns
The result of this vector - pVector.
Remarks
The values in pVector are not checked.

◆ operator*() [2/2]

FbxVector2 operator* ( const FbxVector2 pVector) const

Memberwise multiplication of two vectors.

Parameters
pVectorMultiplying vector.
Returns
The result of this vector * pVector.
Remarks
The values in pVector are not checked.

◆ operator/() [2/2]

FbxVector2 operator/ ( const FbxVector2 pVector) const

Memberwise division of a vector with another vector.

Parameters
pVectorDividing vector.
Returns
The result of this vector / pVector.
Remarks
The values in pVector are not checked.

◆ operator+=() [2/2]

FbxVector2& operator+= ( const FbxVector2 pVector)

Add two vectors together.

Parameters
pVectorVector to add.
Returns
The result of this vector + pVector, replacing this vector.
Remarks
The values in pVector are not checked.

◆ operator-=() [2/2]

FbxVector2& operator-= ( const FbxVector2 pVector)

Subtract a vector from another vector.

Parameters
pVectorVector to subtract.
Returns
The result of this vector - pVector, replacing this vector.
Remarks
The values in pVector are not checked.

◆ operator*=() [2/2]

FbxVector2& operator*= ( const FbxVector2 pVector)

Memberwise multiplication of two vectors.

Parameters
pVectorMultiplying vector.
Returns
The result of this vector * pVector, replacing this vector.
Remarks
The values in pVector are not checked.

◆ operator/=() [2/2]

FbxVector2& operator/= ( const FbxVector2 pVector)

Memberwise division of a vector with another vector.

Parameters
pVectorDividing 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.

◆ DotProduct()

double DotProduct ( const FbxVector2 pVector) const

Calculate the dot product of two vectors.

Parameters
pVectorThe second vector.
Returns
The dot product value.

◆ operator==()

bool operator== ( const FbxVector2 pVector) const

Equivalence operator.

Parameters
pVectorThe vector to be compared to this.
Returns
true if the two vectors are equal (each element is within a FBXSDK_TOLERANCE tolerance), false otherwise.

◆ operator!=()

bool operator!= ( const FbxVector2 pVector) const

Non-equivalence operator.

Parameters
pVectorThe vector to be compared to this.
Returns
false if the two vectors are equal (each element is within a FBXSDK_TOLERANCE tolerance), true otherwise.

◆ Length()

double Length ( ) const

Get the vector's length.

Returns
The mathematical length of the vector.

◆ SquareLength()

double SquareLength ( ) const

Get the vector's length squared.

Returns
The mathematical square length of the vector.

◆ Distance()

double Distance ( const FbxVector2 pVector) const

Find the distance between 2 vectors.

Parameters
pVectorThe second vector.
Returns
The mathematical distance between the two vectors.

◆ Normalize()

void Normalize ( )

Normalize the vector, length set to 1.

◆ operator double *()

operator double * ( )

Cast the vector in a double pointer.

◆ operator const double *()

operator const double * ( ) const

Cast the vector in a const double pointer.

◆ IsZero()

bool IsZero ( int  pSize = 2) const

Find out if the vector is equal to zero.

Parameters
pSizeThe number of element to test, starting at beginning. Value must range between [1, 2].
Returns
true if all elements of the vector are zero, false otherwise.

◆ FixIncorrectValue()

void FixIncorrectValue ( )

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