fbxsdk/scene/fbxaxissystem.h Source File

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 
172  virtual ~FbxAxisSystem();
174 
179 
184  bool operator==(const FbxAxisSystem& pAxisSystem)const;
185 
190  bool operator!=(const FbxAxisSystem& pAxisSystem)const;
192 
196  FbxAxisSystem& operator=(const FbxAxisSystem& pAxisSystem);
197 
203 
205  static const FbxAxisSystem MayaZUp;
206 
208  static const FbxAxisSystem MayaYUp;
209 
211  static const FbxAxisSystem Max;
212 
215 
217  static const FbxAxisSystem OpenGL;
218 
220  static const FbxAxisSystem DirectX;
221 
223  static const FbxAxisSystem Lightwave;
225 
229  void ConvertScene(FbxScene* pScene) const;
230 
237  void ConvertScene(FbxScene* pScene, FbxNode* pFbxRoot) const;
238 
243  EFrontVector GetFrontVector( int & pSign ) const;
244 
249  EUpVector GetUpVector( int & pSign ) const;
250 
254  ECoordSystem GetCoorSystem() const;
255 
263  void ConvertChildren(FbxNode* pRoot, const FbxAxisSystem& pSrcSystem) const;
264 
265 /*****************************************************************************************************************************
266 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
267 *****************************************************************************************************************************/
268 #ifndef DOXYGEN_SHOULD_SKIP_THIS
269 protected:
270  class AxisDef
271  {
272  public:
273  enum EAxis {eXAxis, eYAxis, eZAxis};
274  bool operator==(const AxisDef& pAxis) const { return (mAxis == pAxis.mAxis) && (mSign == pAxis.mSign); }
275  EAxis mAxis;
276  int mSign;
277  };
278 
279  AxisDef mUpVector;
280  AxisDef mFrontVector;
281  AxisDef mCoorSystem;
282 
283  void ConvertTProperty(FbxArray<FbxNode*>& pNodes, const FbxAxisSystem& pFrom) const;
284  void ConvertCurveNodes(FbxArray<FbxAnimCurveNode*>& pCurveNodes, const FbxAxisSystem& pFrom) const;
285  void AdjustPreRotation(FbxNode* pNode, const FbxMatrix& pConversionRM) const;
286  void AdjustPivots(FbxNode* pNode, const FbxMatrix& pConversionRM) const;
287  void GetConversionMatrix(const FbxAxisSystem& pFrom, FbxMatrix& pConversionRM) const;
288  void AdjustLimits(FbxNode* pNode, const FbxMatrix& pConversionRM) const;
289  void AdjustPoses(FbxScene* pScene, const FbxMatrix& pConversionRM) const;
290  void AdjustCamera(FbxNode* pNode, const FbxMatrix& pConversionRM ) const;
291  void AdjustCluster(FbxNode* pNode, const FbxMatrix& pConversionRM) const;
292  void ConvertChildren(FbxNode* pRoot, const FbxAxisSystem& pSrcSystem, bool pSubChildrenOnly) const;
293 
294  friend class FbxGlobalSettings;
295 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
296 };
297 
298 #include <fbxsdk/fbxsdk_nsend.h>
299 
300 #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.
#define FBXSDK_DLL
Definition: fbxarch.h:173
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...