fbxtakeinfo.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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 fbxtakeinfo.h
  9. #ifndef _FBXSDK_SCENE_TAKEINFO_H_
  10. #define _FBXSDK_SCENE_TAKEINFO_H_
  11. #include <fbxsdk/fbxsdk_def.h>
  12. #include <fbxsdk/core/base/fbxarray.h>
  13. #include <fbxsdk/core/base/fbxstring.h>
  14. #include <fbxsdk/core/base/fbxtime.h>
  15. #include <fbxsdk/fbxsdk_nsbegin.h>
  16. class FbxThumbnail;
  17. /** This FbxTakeLayerInfo structure is used to identify a layer by name and id number.
  18. */
  19. struct FbxTakeLayerInfo
  20. {
  21. FbxString mName;
  22. int mId;
  23. };
  24. /** This class contains take information from an imported file
  25. * or exported to an output file.
  26. *
  27. * A "take" is in fact a group of animation data grouped by name, so
  28. * the FBX file format can support many "animation takes" in an FBX file to mimic
  29. * how a movie is produced by making many takes of the same scene.
  30. *
  31. * The most used data is the "take name", other data are rarely used.
  32. * Example of use: to get the list of all
  33. * animation take names of FBX file without loading all the scene content.
  34. * When a FbxImporter is initialized, the take information can be read and can be available
  35. * before the long Import() step, this way, we can get the take info data very fast
  36. * since we don't need to load all the animation scene data.
  37. * \code
  38. * // Ex: to get all take names in a FBX file
  39. * for(int lAnimStackCount=0; lAnimStackCount < lImporter->GetAnimStackCount(); lAnimStackCount++)
  40. * {
  41. * FbxTakeInfo* lTakeInfo = lImporter->GetTakeInfo(lAnimStackCount);
  42. * FbxString lTakeName = lTakeInfo->mName;
  43. * }
  44. * \endcode
  45. */
  46. class FBXSDK_DLL FbxTakeInfo
  47. {
  48. public:
  49. /** Default constructor.
  50. */
  51. FbxTakeInfo();
  52. /** Destructor.
  53. */
  54. virtual ~FbxTakeInfo();
  55. /** Copy Constructor.
  56. * \param pTakeInfo The take information to be copied.
  57. */
  58. FbxTakeInfo(const FbxTakeInfo& pTakeInfo);
  59. /** Assignment operator.
  60. * \param pTakeInfo The take information to be assigned. .
  61. */
  62. FbxTakeInfo& operator=(const FbxTakeInfo& pTakeInfo);
  63. //! Take name.
  64. FbxString mName;
  65. /** The take name once it is imported in a scene.
  66. * You can modify it if it must be different from the take name in the imported file.
  67. * \remarks This field is only used when importing a scene.
  68. */
  69. FbxString mImportName;
  70. //! Take description.
  71. FbxString mDescription;
  72. /** Import/export flag.
  73. * Set to \c true by default, set to \c false if the take must not be imported or exported.
  74. */
  75. bool mSelect;
  76. //! Local time span, set to animation interval if it is left at the default value.
  77. FbxTimeSpan mLocalTimeSpan;
  78. //! Reference time span, set to animation interval if it is left at the default value.
  79. FbxTimeSpan mReferenceTimeSpan;
  80. /** Time value for offsetting the animation keys once they are imported in a scene.
  81. * You can modify it if you need the animation of a take to be offset.
  82. * The effect depends on the state of \c mImportOffsetType.
  83. * \remarks This field is only used when importing a scene.
  84. */
  85. FbxTime mImportOffset;
  86. /** \enum EImportOffsetType Import offset types.
  87. * - \e eAbsolute
  88. * - \e eRelative
  89. */
  90. enum EImportOffsetType
  91. {
  92. eAbsolute,
  93. eRelative
  94. };
  95. /** Import offset type.
  96. * If set to \c eAbsolute, \c mImportOffset gives the absolute time of
  97. * the first animation key and the appropriate time shift is applied
  98. * to all of the other animation keys.
  99. * If set to \c eRelative, \c mImportOffset gives the relative time
  100. * shift applied to all animation keys.
  101. */
  102. EImportOffsetType mImportOffsetType;
  103. /** Copies the layer information from the take information.
  104. * \param pTakeInfo The take information to be copied.
  105. */
  106. void CopyLayers(const FbxTakeInfo& pTakeInfo);
  107. //! List of each layer's information.
  108. FbxArray<FbxTakeLayerInfo*> mLayerInfoList;
  109. //! Current Layer.
  110. int mCurrentLayer;
  111. };
  112. #include <fbxsdk/fbxsdk_nsend.h>
  113. #endif /* _FBXSDK_SCENE_TAKEINFO_H_ */