Public Member Functions

FbxVector2 Class Reference

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


Search for all occurrences

Detailed Description

A two double mathematic vector class.

Definition at line 23 of file fbxvector2.h.

#include <fbxvector2.h>

Inheritance diagram for FbxVector2:
Inheritance graph
[legend]

List of all members.

Public Member Functions

bool IsZero (int pSize=2) const
 Find out if the vector is equal to zero.
void FixIncorrectValue ()

Constructors and Destructor

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

Access

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

Scalar Operations

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

Vector Operations

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

Boolean Operations

bool operator== (const FbxVector2 &pVector) const
 Equivalence operator.
bool operator!= (const FbxVector2 &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 FbxVector2 &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.

FbxVector2 ( const FbxVector2 pVector2)

Copy constructor.

Parameters:
pVector2The vector copied to this one.
FbxVector2 ( double  pX,
double  pY 
)

Constructor.

Parameters:
pXX component.
pYY component.

Member Function Documentation

FbxVector2& operator= ( const FbxVector2 pVector2)

Assignment operation.

Parameters:
pVector2The vector assigned to this one.
Returns:
This vector after assignment.
void Set ( double  pX,
double  pY 
)

Set vector.

Parameters:
pXThe X component value.
pYThe Y component value.
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.
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.
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.
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.
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.
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.
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.
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.
FbxVector2 operator- ( ) const

Unary minus operator.

Returns:
The vector that is the negation of this.
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.
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.
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.
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.
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.
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.
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.
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.
double DotProduct ( const FbxVector2 pVector) const

Calculate the dot product of two vectors.

Parameters:
pVectorThe 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 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.
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.
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 FbxVector2 pVector) const

Find the distance between 2 vectors.

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

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.
void FixIncorrectValue ( )

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

FbxVector2 FbxVector2 FbxVector2 FbxVector2 FbxVector2 FbxVector2 FbxVector2 FbxVector2 FbxVector2 FbxVector2
FbxVector2 FbxVector2 FbxVector2 FbxVector2 FbxVector2 FbxVector2 FbxVector2 FbxVector2 FbxVector2 FbxVector2