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