FBX C++ API Reference
fbxaxissystem.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2015 Autodesk, Inc.
4  All rights reserved.
5 
6  Use of this software is subject to the terms of the Autodesk license agreement
7  provided at the time of installation or download, or which otherwise accompanies
8  this software in either electronic or hard copy form.
9 
10 ****************************************************************************************/
11 
13 #ifndef _FBXSDK_SCENE_AXIS_SYSTEM_H_
14 #define _FBXSDK_SCENE_AXIS_SYSTEM_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
20 
21 #include <fbxsdk/fbxsdk_nsbegin.h>
22 
98 {
99 public:
100 
104  {
105  eXAxis = 1,
106  eYAxis = 2,
107  eZAxis = 3
108  };
109 
118  {
119  eParityEven = 1,
120  eParityOdd = 2
121  };
122 
129  {
131  eLeftHanded
132  };
133 
138  {
145  eLightwave
146  };
147 
152  FbxAxisSystem();
153 
159  FbxAxisSystem(EUpVector pUpVector, EFrontVector pFrontVector, ECoordSystem pCoorSystem);
160 
164  FbxAxisSystem(const FbxAxisSystem& pAxisSystem);
165 
169  FbxAxisSystem(const EPreDefinedAxisSystem pAxisSystem);
170 
193  static bool ParseAxisSystem(const char * pAxes, FbxAxisSystem& pOutput);
194 
196  virtual ~FbxAxisSystem();
198 
203 
208  bool operator==(const FbxAxisSystem& pAxisSystem)const;
209 
214  bool operator!=(const FbxAxisSystem& pAxisSystem)const;
216 
220  FbxAxisSystem& operator=(const FbxAxisSystem& pAxisSystem);
221 
227 
229  static const FbxAxisSystem MayaZUp;
230 
232  static const FbxAxisSystem MayaYUp;
233 
235  static const FbxAxisSystem Max;
236 
239 
241  static const FbxAxisSystem OpenGL;
242 
244  static const FbxAxisSystem DirectX;
245 
247  static const FbxAxisSystem Lightwave;
249 
259  void DeepConvertScene(FbxScene* pScene) const;
260 
270  void ConvertScene(FbxScene* pScene) const;
271 
278  void ConvertScene(FbxScene* pScene, FbxNode* pFbxRoot) const;
279 
284  EFrontVector GetFrontVector( int & pSign ) const;
285 
290  EUpVector GetUpVector( int & pSign ) const;
291 
295  ECoordSystem GetCoorSystem() const;
296 
300  void GetMatrix(FbxAMatrix& pMatrix);
301 
309  void ConvertChildren(FbxNode* pRoot, const FbxAxisSystem& pSrcSystem) const;
310 
311 /*****************************************************************************************************************************
312 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
313 *****************************************************************************************************************************/
314 #ifndef DOXYGEN_SHOULD_SKIP_THIS
315 protected:
316  class AxisDef
317  {
318  public:
319  enum EAxis {eXAxis, eYAxis, eZAxis};
320  bool operator==(const AxisDef& pAxis) const { return (mAxis == pAxis.mAxis) && (mSign == pAxis.mSign); }
321  EAxis mAxis;
322  int mSign;
323  };
324 
325  friend class FbxConversionMatrix;
326 
327  AxisDef mUpVector;
328  AxisDef mFrontVector;
329  AxisDef mCoorSystem;
330 
331  void ConvertTProperty(FbxArray<FbxNode*>& pNodes, const FbxAxisSystem& pFrom) const;
332  void ConvertCurveNodes(FbxArray<FbxAnimCurveNode*>& pCurveNodes, const FbxAxisSystem& pFrom) const;
333  void AdjustPreRotation(FbxNode* pNode, const FbxMatrix& pConversionRM) const;
334  void AdjustPivots(FbxNode* pNode, const FbxMatrix& pConversionRM) const;
335  void GetConversionMatrix(const FbxAxisSystem& pFrom, FbxMatrix& pConversionRM) const;
336  void AdjustLimits(FbxNode* pNode, const FbxMatrix& pConversionRM) const;
337  void AdjustPoses(FbxScene* pScene, const FbxMatrix& pConversionRM) const;
338  void AdjustCamera(FbxNode* pNode, const FbxMatrix& pConversionRM ) const;
339  void AdjustCluster(FbxNode* pNode, const FbxMatrix& pConversionRM) const;
340  void ConvertChildren(FbxNode* pRoot, const FbxAxisSystem& pSrcSystem, bool pSubChildrenOnly) const;
341 
342  friend class FbxGlobalSettings;
343 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
344 };
345 
346 #include <fbxsdk/fbxsdk_nsend.h>
347 
348 #endif /* _FBXSDK_SCENE_AXIS_SYSTEM_H_ */
FBX SDK environment definition.
static const FbxAxisSystem DirectX
Predefined axis system: DirectX (UpVector = +Y, FrontVector = +Z, CoordSystem = -X (LeftHanded)) ...
EUpVector
Specifies which canonical axis represents up in the system (typically Y or Z).
This class represents the coordinate system of the scene and can convert scenes to other coordinate s...
Definition: fbxaxissystem.h:97
UpVector = YAxis, FrontVector = ParityOdd, CoordSystem = RightHanded.
ECoordSystem
Specifies the third vector of the system.
EPreDefinedAxisSystem
Enumeration that can be used to initialize a new instance of this class with predefined configuration...
UpVector = ZAxis, FrontVector = -ParityOdd, CoordSystem = RightHanded.
This class contains functions for accessing global settings.
static const FbxAxisSystem OpenGL
Predefined axis system: OpenGL (UpVector = +Y, FrontVector = +Z, CoordSystem = +X (RightHanded)) ...
UpVector = YAxis, FrontVector = ParityOdd, CoordSystem = RightHanded.
UpVector = YAxis, FrontVector = ParityOdd, CoordSystem = RightHanded.
static const FbxAxisSystem Max
Predefined axis system: Max (UpVector = +Z, FrontVector = -Y, CoordSystem = +X (RightHanded)) ...
EFrontVector
Vector with origin at the screen pointing toward the camera.
static const FbxAxisSystem Lightwave
Predefined axis system: Lightwave (UpVector = +Y, FrontVector = +Z, CoordSystem = -X (LeftHanded)) ...
static const FbxAxisSystem MayaZUp
Predefined axis system: MayaZUp (UpVector = +Z, FrontVector = -Y, CoordSystem = +X (RightHanded)) ...
Represents an element in the scene graph.
Definition: fbxnode.h:72
This class contains the description of a 3D scene.
Definition: fbxscene.h:61
UpVector = ZAxis, FrontVector = -ParityOdd, CoordSystem = RightHanded.
FBX SDK affine matrix class.
#define FBXSDK_DLL
Definition: fbxarch.h:176
UpVector = YAxis, FrontVector = ParityOdd, CoordSystem = LeftHanded.
static const FbxAxisSystem MayaYUp
Predefined axis system: MayaYUp (UpVector = +Y, FrontVector = +Z, CoordSystem = +X (RightHanded)) ...
FBX SDK basic 4x4 double matrix class.
Definition: fbxmatrix.h:27
static const FbxAxisSystem Motionbuilder
Predefined axis system: Motionbuilder (UpVector = +Y, FrontVector = +Z, CoordSystem = +X (RightHanded...