fbxrootnodeutility.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /****************************************************************************************
  2. Copyright (C) 2015 Autodesk, Inc.
  3. All rights reserved.
  4. Use of this software is subject to the terms of the Autodesk license agreement
  5. provided at the time of installation or download, or which otherwise accompanies
  6. this software in either electronic or hard copy form.
  7. ****************************************************************************************/
  8. //! \file fbxrootnodeutility.h
  9. #ifndef _FBXSDK_UTILS_ROOT_NODE_UTILITY_H_
  10. #define _FBXSDK_UTILS_ROOT_NODE_UTILITY_H_
  11. #include <fbxsdk/fbxsdk_def.h>
  12. #include <fbxsdk/core/fbxsystemunit.h>
  13. #include <fbxsdk/fbxsdk_nsbegin.h>
  14. class FbxScene;
  15. class FbxAxisSystem;
  16. class FbxNode;
  17. /** \brief This class collects static functions for manipulating Fbx_Root nodes.
  18. * Fbx_Root nodes were used to orient and scale scenes from other graphics applications. They have been replaced by the
  19. * conversion routines in FbxAxisSystem and FbxSystemUnit. These methods are provided for backward compatibility only
  20. * and will eventually be removed. Use the conversion routines in FbxSystemUnit and FbxAxisSystem when possible.
  21. */
  22. class FBXSDK_DLL FbxRootNodeUtility
  23. {
  24. public:
  25. static const char* sFbxRootNodePrefix;
  26. /** This method strips the scene of all Fbx_Root nodes.
  27. * \param pScene The scene to convert
  28. * \return \c true if successful, \c false otherwise.
  29. * \remarks Converts the children of any Fbx_Roots to the orientation
  30. * and units that the Fbx_Root transformation represented.
  31. * The scene should look unchanged.
  32. */
  33. static bool RemoveAllFbxRoots( FbxScene* pScene );
  34. /** Inserts an Fbx_Root node into the scene to orient the
  35. * scene from its axis and unit systems to the specified ones.
  36. * \param pScene The scene to convert
  37. * \param pDstAxis Destination axis.
  38. * \param pDstUnit Destination unit
  39. * \param pUnitOptions Unit conversion options
  40. *
  41. */
  42. static bool InsertFbxRoot( FbxScene* pScene,
  43. const FbxAxisSystem& pDstAxis,
  44. const FbxSystemUnit& pDstUnit,
  45. const FbxSystemUnit::ConversionOptions& pUnitOptions = FbxSystemUnit::DefaultConversionOptions );
  46. /** Check if a node is an Fbx_Root node
  47. * \param pNode The node to query
  48. * \return \c true if pNode is a Fbx_Root node, false otherwise
  49. */
  50. static bool IsFbxRootNode(FbxNode* pNode);
  51. /*****************************************************************************************************************************
  52. ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
  53. *****************************************************************************************************************************/
  54. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  55. protected:
  56. FbxRootNodeUtility();
  57. FbxRootNodeUtility(const FbxRootNodeUtility& pOther);
  58. ~FbxRootNodeUtility();
  59. #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
  60. };
  61. #include <fbxsdk/fbxsdk_nsend.h>
  62. #endif /* _FBXSDK_UTILS_ROOT_NODE_UTILITY_H_ */