fbxgeometryweightedmap.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 fbxgeometryweightedmap.h
  9. #ifndef _FBXSDK_SCENE_GEOMETRY_WEIGHTED_MAP_H_
  10. #define _FBXSDK_SCENE_GEOMETRY_WEIGHTED_MAP_H_
  11. #include <fbxsdk/fbxsdk_def.h>
  12. #include <fbxsdk/core/fbxobject.h>
  13. #include <fbxsdk/scene/geometry/fbxweightedmapping.h>
  14. #include <fbxsdk/fbxsdk_nsbegin.h>
  15. class FbxGeometry;
  16. /** \brief This class provides the structure to build a correspondence between 2 geometries.
  17. *
  18. * This correspondence is done at the vertex level. Which means that for each vertex in the
  19. * source geometry, you can have from 0 to N corresponding vertices in the destination
  20. * geometry. Each corresponding vertex is weighted.
  21. *
  22. * For example, if the source geometry is a NURB and the destination geometry is a mesh,
  23. * the correspondence object will express the correspondence between the NURB's control vertices
  24. * and the mesh's vertices.
  25. *
  26. * If the mesh corresponds to a tesselation of the NURB, the correspondence object can be used
  27. * to transfer any deformation that affect the NURB's control vertices to the mesh's vertices.
  28. *
  29. * See FbxWeightedMapping for more details.
  30. */
  31. class FBXSDK_DLL FbxGeometryWeightedMap : public FbxObject
  32. {
  33. FBXSDK_OBJECT_DECLARE(FbxGeometryWeightedMap, FbxObject);
  34. public:
  35. /** Set correspondence values.
  36. * \param pWeightedMappingTable Pointer to the table containing values
  37. * \remark \e pWeightedMappingTable becomes owned by this object and will be destroyed by it
  38. * when the object goes out of scope or on the next call to SetValues(). The deletion
  39. * uses FbxDelete() so the content of the pointer must have been allocated with FbxNew<>()
  40. */
  41. void SetValues(const FbxWeightedMapping* pWeightedMappingTable);
  42. /** Return correspondence values.
  43. * \return Pointer to the correspondence values table.
  44. */
  45. FbxWeightedMapping* GetValues() const;
  46. /** Return source geometry.
  47. * \return Pointer to the source geometry, or \c NULL if there is no connected source geometry
  48. */
  49. FbxGeometry* GetSourceGeometry();
  50. /** Return destination geometry.
  51. * \return Pointer to the destination geometry, or \c NULL if there is no connected destination geometry
  52. */
  53. FbxGeometry* GetDestinationGeometry();
  54. /*****************************************************************************************************************************
  55. ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
  56. *****************************************************************************************************************************/
  57. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  58. virtual FbxObject& Copy(const FbxObject& pObject);
  59. protected:
  60. virtual void Construct(const FbxObject* pFrom);
  61. virtual void Destruct(bool pRecursive);
  62. // Real weigths table
  63. FbxWeightedMapping* mWeightedMapping;
  64. #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
  65. };
  66. #include <fbxsdk/fbxsdk_nsend.h>
  67. #endif /* _FBXSDK_SCENE_GEOMETRY_WEIGHTED_MAP_H_ */