fbxsubdeformer.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 fbxsubdeformer.h
  9. #ifndef _FBXSDK_SCENE_GEOMETRY_SUB_DEFORMER_H_
  10. #define _FBXSDK_SCENE_GEOMETRY_SUB_DEFORMER_H_
  11. #include <fbxsdk/fbxsdk_def.h>
  12. #include <fbxsdk/core/fbxobject.h>
  13. #include <fbxsdk/fbxsdk_nsbegin.h>
  14. /** Base class for cluster sub-deformer( FbxCluster) and blend shape channel sub-deformer( FbxBlendShapeChannel)
  15. *
  16. * The corresponding sub-deformer types are FbxSubDeformer::eCluster and FbxSubDeformer::eBlendShapeChannel.
  17. *
  18. * A cluster, or link, is an entity acting on a geometry (FbxGeometry).
  19. * More precisely, the cluster acts on a subset of the geometry's control points.
  20. * For each control point that the cluster acts on, the intensity of the cluster's
  21. * action is modulated by a weight. The link mode (ELinkMode) specifies how
  22. * the weights are taken into account.
  23. * The cluster's link node specifies the node (FbxNode) that influences the
  24. * control points of the cluster. If the node is animated, the control points
  25. * will move accordingly.
  26. * A cluster is usually part of a skin (see FbxDeformer, FbxSkin). For example,
  27. * imagine a mesh representing a humanoid, and imagine a skeleton made of bones.
  28. * Each bone is represented by a node in FBX.
  29. * To bind the geometry to the nodes,
  30. * we create a skin (FbxSkin). The skin has many clusters, each one corresponding
  31. * to a bone.
  32. * Each node influences some control
  33. * points of the mesh. A node has a high influence on some of the points (high weight)
  34. * and lower influence on some other points (low weight). Some points of the mesh
  35. * are not affected at all by the bone, so they would not be part of the corresponding
  36. * cluster.
  37. *
  38. * A blend shape channel is a sub-deformer to help blend shape deformer to organize the target shapes.
  39. * One blend shape deformer can have multiple blend shape channels in parallel, and each of them can
  40. * control one or multiple target shapes. If there are multiple target shapes connected to one channel,
  41. * and each target shape could have its own full deformation percentage, for example, one channel could have 3 target shapes,
  42. * whose full deform percentage are 30, to 80 to 100, then when the percent change from 0 to 100, the base geometry will
  43. * deform from the first target shape to the last one, this is called In-Between blend-shapes.
  44. * The blend shape channel also control the deform percent of each target shape or In-Between blend shape on it.
  45. * \nosubgrouping
  46. */
  47. class FBXSDK_DLL FbxSubDeformer : public FbxObject
  48. {
  49. FBXSDK_OBJECT_DECLARE(FbxSubDeformer, FbxObject);
  50. public:
  51. /** Set multi layer state flag.
  52. * \param pMultiLayer If \c true, multi-layering is enabled.
  53. */
  54. void SetMultiLayer(bool pMultiLayer);
  55. /** Get multilayer state.
  56. * \return The state of the multi-layer flag.
  57. */
  58. bool GetMultiLayer() const;
  59. /** \enum EType Sub-deformer type
  60. */
  61. enum EType
  62. {
  63. eUnknown, //!< Untyped sub-deformer
  64. eCluster, //!< Type FbxCluster
  65. eBlendShapeChannel //!< Type FbxBlendShapeChannel
  66. };
  67. /** Get the type of the sub-deformer.
  68. * \return SubDeformer type identifier.
  69. */
  70. virtual EType GetSubDeformerType() const { return eUnknown; }
  71. /*****************************************************************************************************************************
  72. ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
  73. *****************************************************************************************************************************/
  74. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  75. protected:
  76. virtual void Construct(const FbxObject* pFrom);
  77. virtual FbxStringList GetTypeFlags() const { return FbxStringList(); }
  78. // Local
  79. bool mMultiLayer;
  80. #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
  81. };
  82. #include <fbxsdk/fbxsdk_nsend.h>
  83. #endif /* _FBXSDK_SCENE_GEOMETRY_SUB_DEFORMER_H_ */