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 | |
12 | //! \file fbxrootnodeutility.h |
13 | #ifndef _FBXSDK_UTILS_ROOT_NODE_UTILITY_H_ |
14 | #define _FBXSDK_UTILS_ROOT_NODE_UTILITY_H_ |
15 | |
16 | #include <fbxsdk/fbxsdk_def.h> |
17 | |
18 | #include <fbxsdk/core/fbxsystemunit.h> |
19 | |
20 | #include <fbxsdk/fbxsdk_nsbegin.h> |
21 | |
22 | class FbxScene; |
23 | class FbxAxisSystem; |
24 | class FbxNode; |
25 | |
26 | /** \brief This class collects static functions for manipulating Fbx_Root nodes. |
27 | * Fbx_Root nodes were used to orient and scale scenes from other graphics applications. They have been replaced by the |
28 | * conversion routines in FbxAxisSystem and FbxSystemUnit. These methods are provided for backward compatibility only |
29 | * and will eventually be removed. Use the conversion routines in FbxSystemUnit and FbxAxisSystem when possible. |
30 | */ |
31 | class FBXSDK_DLL FbxRootNodeUtility |
32 | { |
33 | public: |
34 | |
35 | static const char* sFbxRootNodePrefix; |
36 | |
37 | /** This method strips the scene of all Fbx_Root nodes. |
38 | * \param pScene The scene to convert |
39 | * \return \c true if successful, \c false otherwise. |
40 | * \remarks Converts the children of any Fbx_Roots to the orientation |
41 | * and units that the Fbx_Root transformation represented. |
42 | * The scene should look unchanged. |
43 | */ |
44 | static bool RemoveAllFbxRoots( FbxScene* pScene ); |
45 | |
46 | /** Inserts an Fbx_Root node into the scene to orient the |
47 | * scene from its axis and unit systems to the specified ones. |
48 | * \param pScene The scene to convert |
49 | * \param pDstAxis Destination axis. |
50 | * \param pDstUnit Destination unit |
51 | * \param pUnitOptions Unit conversion options |
52 | * |
53 | */ |
54 | static bool InsertFbxRoot( FbxScene* pScene, |
55 | const FbxAxisSystem& pDstAxis, |
56 | const FbxSystemUnit& pDstUnit, |
57 | const FbxSystemUnit::ConversionOptions& pUnitOptions = FbxSystemUnit::DefaultConversionOptions ); |
58 | |
59 | /** Check if a node is an Fbx_Root node |
60 | * \param pNode The node to query |
61 | * \return \c true if pNode is a Fbx_Root node, false otherwise |
62 | */ |
63 | static bool IsFbxRootNode(FbxNode* pNode); |
64 | |
65 | /***************************************************************************************************************************** |
66 | ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! ** |
67 | *****************************************************************************************************************************/ |
68 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
69 | protected: |
70 | FbxRootNodeUtility(); |
71 | FbxRootNodeUtility(const FbxRootNodeUtility& pOther); |
72 | ~FbxRootNodeUtility(); |
73 | #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/ |
74 | }; |
75 | |
76 | #include <fbxsdk/fbxsdk_nsend.h> |
77 | |
78 | #endif /* _FBXSDK_UTILS_ROOT_NODE_UTILITY_H_ */ |
79 | |