FBX C++ API Reference
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fbxweightedmapping.h
Go to the documentation of this file.
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 
13 #ifndef _FBXSDK_SCENE_GEOMETRY_WEIGHTED_MAPPING_H_
14 #define _FBXSDK_SCENE_GEOMETRY_WEIGHTED_MAPPING_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
19 
20 #include <fbxsdk/fbxsdk_nsbegin.h>
21 
29 {
30 public:
33  enum ESet
34  {
36  eDestination
37  };
38 
40  struct Element
41  {
43  int mIndex;
45  double mWeight;
46  };
47 
52 
58  FbxWeightedMapping(int pSourceSize, int pDestinationSize);
59 
63 
64 
69  void Reset(int pSourceSize, int pDestinationSize);
70 
76  void Add(int pSourceIndex, int pDestinationIndex, double pWeight);
77 
81  int GetElementCount(ESet pSet) const;
82 
89  int GetRelationCount(ESet pSet, int pElement) const;
90 
97  Element& GetRelation(ESet pSet, int pElement, int pIndex);
98 
106  int GetRelationIndex(ESet pSet, int pElementInSet, int pElementInOtherSet) const;
107 
114  double GetRelationSum(ESet pSet, int pElement, bool pAbsoluteValue) const;
115 
116 
121  void Normalize(ESet pSet, bool pAbsoluteValue);
122 
123  FbxWeightedMapping& operator=(const FbxWeightedMapping& pWMap);
124 
125 private:
126 
128  void Clear();
129 
130  FbxArray<FbxArray<Element>*> mElements[2];
131 
132 };
133 
135 typedef class FbxArray<FbxArray<FbxWeightedMapping::Element>*> FbxArrayTemplateArrayTemplateElement;
136 
137 #include <fbxsdk/fbxsdk_nsend.h>
138 
139 #endif /* _FBXSDK_SCENE_GEOMETRY_WEIGHTED_MAPPING_H_ */
class FbxArray< FbxWeightedMapping::Element > FbxArrayTemplateElement
FBX SDK environment definition.
int mIndex
The index of another object in the mapping in the another ESet array.
double mWeight
Weight of the mapping.
Record one mapping from one object.
ESet
Object set type in the mapping relation.
#define FBXSDK_DLL
Definition: fbxarch.h:173
Define a weighted bidirectional mapping relation on objects.
class FbxArray< FbxArray< FbxWeightedMapping::Element > *> FbxArrayTemplateArrayTemplateElement
Class for array of basic elements such as pointers and basic types.
Definition: fbxarray.h:23