fbxsdk/core/math/fbxvector2.h Source File
 
 
 
fbxsdk/core/math/fbxvector2.h
Go to the documentation of this file.
00001 /****************************************************************************************
00002  
00003    Copyright (C) 2013 Autodesk, Inc.
00004    All rights reserved.
00005  
00006    Use of this software is subject to the terms of the Autodesk license agreement
00007    provided at the time of installation or download, or which otherwise accompanies
00008    this software in either electronic or hard copy form.
00009  
00010 ****************************************************************************************/
00011 
00013 #ifndef _FBXSDK_CORE_MATH_VECTOR_2_H_
00014 #define _FBXSDK_CORE_MATH_VECTOR_2_H_
00015 
00016 #include <fbxsdk/fbxsdk_def.h>
00017 
00018 #include <fbxsdk/fbxsdk_nsbegin.h>
00019 
00023 class FBXSDK_DLL FbxVector2 : public FbxDouble2
00024 {
00025 public:
00030 
00031                 FbxVector2();
00032 
00036                 FbxVector2(const FbxVector2& pVector2);
00037 
00042                 FbxVector2(double pX, double pY);
00044 
00053                 FbxVector2& operator=(const FbxVector2& pVector2);
00054 
00059                 void Set(double pX, double pY);
00061 
00071                 FbxVector2 operator+(double pValue) const;
00072 
00078                 FbxVector2 operator-(double pValue) const;
00079 
00085                 FbxVector2 operator*(double pValue) const;
00086 
00092                 FbxVector2 operator/(double pValue) const;
00093 
00099                 FbxVector2& operator+=(double pValue);
00100 
00106                 FbxVector2& operator-=(double pValue);
00107 
00113                 FbxVector2& operator*=(double pValue);
00114 
00120                 FbxVector2& operator/=(double pValue);
00122 
00130                 FbxVector2 operator-() const;
00131 
00137                 FbxVector2 operator+(const FbxVector2& pVector) const;
00138 
00144                 FbxVector2 operator-(const FbxVector2& pVector) const;
00145 
00151                 FbxVector2 operator*(const FbxVector2& pVector) const;
00152 
00158                 FbxVector2 operator/(const FbxVector2& pVector) const;
00159 
00165                 FbxVector2& operator+=(const FbxVector2& pVector);
00166 
00172                 FbxVector2& operator-=(const FbxVector2& pVector);
00173 
00179                 FbxVector2& operator*=(const FbxVector2& pVector);
00180 
00187                 FbxVector2& operator/=(const FbxVector2& pVector);
00188 
00194                 double DotProduct(const FbxVector2& pVector) const;
00196 
00205                 bool operator==(const FbxVector2 & pVector) const;
00206 
00211                 bool operator!=(const FbxVector2 & pVector) const;
00213 
00221                 double Length() const;
00222 
00226                 double SquareLength() const;
00227 
00232                 double Distance(const FbxVector2& pVector) const;
00233 
00235                 void Normalize();
00237 
00242 
00243                 operator double* ();
00244 
00246                 operator const double* () const;
00248 
00252         bool IsZero(int pSize=2) const;
00253 
00254         // Fix value like 1.#IND, 1.#INF, nan, and inf
00255         void FixIncorrectValue();
00256 };
00257 
00258 #include <fbxsdk/fbxsdk_nsend.h>
00259 
00260 #endif /* _FBXSDK_CORE_MATH_VECTOR_2_H_ */