fbxsdk/scene/geometry/fbxgeometry.h Source File

fbxgeometry.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_H_
14 #define _FBXSDK_SCENE_GEOMETRY_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
23 
24 #include <fbxsdk/fbxsdk_nsbegin.h>
25 
26 class FbxStatus;
28 
46 {
48 
49 public:
57 
62 
68  int AddDeformer(FbxDeformer* pDeformer);
69 
75  FbxDeformer* RemoveDeformer(int pIndex, FbxStatus* pStatus = NULL);
76 
80  int GetDeformerCount() const;
81 
87  FbxDeformer* GetDeformer(int pIndex, FbxStatus* pStatus = NULL) const;
88 
93  int GetDeformerCount(FbxDeformer::EDeformerType pType) const;
94 
101  FbxDeformer* GetDeformer(int pIndex, FbxDeformer::EDeformerType pType, FbxStatus* pStatus = NULL) const;
102 
104 
109 
113  FbxGeometryWeightedMap* GetSourceGeometryWeightedMap();
114 
118  int GetDestinationGeometryWeightedMapCount() const;
119 
124  FbxGeometryWeightedMap* GetDestinationGeometryWeightedMap(int pIndex);
125 
127 
132 
141  bool AddShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, FbxShape* pShape, double pPercent = 100, FbxStatus* pStatus = NULL);
142 
147  void ClearShape();
148 
152  int GetShapeCount() const;
153 
160  int GetShapeCount(int pBlendShapeIndex, int pBlendShapeChannelIndex, FbxStatus* pStatus = NULL) const;
161 
169  FbxShape* GetShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, int pShapeIndex, FbxStatus* pStatus = NULL);
170 
178  const FbxShape* GetShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, int pShapeIndex, FbxStatus* pStatus = NULL) const;
179 
191  FbxAnimCurve* GetShapeChannel(int pBlendShapeIndex, int pBlendShapeChannelIndex, FbxAnimLayer* pLayer, bool pCreateAsNeeded = false, FbxStatus* pStatus = NULL);
193 
201  {
206  eHigh
207  };
208 
216 
221  FbxAMatrix& GetPivot(FbxAMatrix& pXMatrix) const;
222 
226  void SetPivot(FbxAMatrix& pXMatrix);
227 
230  void ApplyPivot();
231 
233 
240 
249  void SetDefaultShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, double pPercent);
250 
258  void SetDefaultShape(FbxBlendShapeChannel* pBlendShapeChannel, double pPercent);
259 
267  double GetDefaultShape(int pBlendShapeIndex, int pBlendShapeChannelIndex) const;
268 
275  double GetDefaultShape(FbxBlendShapeChannel* pBlendShapeChannel) const;
276 
278 
279 /*****************************************************************************************************************************
280 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
281 *****************************************************************************************************************************/
282 #ifndef DOXYGEN_SHOULD_SKIP_THIS
283  virtual FbxObject& Copy(const FbxObject& pObject);
284  virtual FbxObject* Clone(FbxObject::ECloneType pCloneType=eDeepClone, FbxObject* pContainer=NULL, void* pSet = NULL) const;
285 
286  void CleanShapeChannels(FbxAnimLayer* pAnimLayer);
287  void CleanShapeChannel(FbxAnimLayer* pAnimLayer, int pShapeIndex);
288  void CreateShapeChannelProperties(FbxString& pShapeName);
289  void ConvertShapeNamesToV5Format(FbxString pTakeNodeName);
290  void ConvertShapeNamesToV5Format(FbxString pTakeNodeName, int pShapeIndex);
291  void RevertShapeNamesToV6Format(FbxString pTakeNodeName);
292  void RevertShapeNamesToV6Format(FbxString pTakeNodeName, int pShapeIndex);
293  void ClearTemporaryShapeNames();
294 
295 protected:
296  virtual void Construct(const FbxObject* pFrom);
297  virtual void Destruct(bool pRecursive);
298  virtual void SetDocument(FbxDocument* pDocument);
299 
300  FbxString CreateShapeChannelName(int pShapeIndex);
301  FbxString CreateShapeChannelName(FbxString pShapeName);
302 
303  void CopyDeformers(const FbxGeometry* pGeometry);
304  void CopyPivot(const FbxGeometry* pSource);
305 
306  // Used during FBX v5 file store
307  FbxArray<FbxString*> mShapeNameArrayV6;
308  FbxArray<FbxString*> mShapeNameArrayV5;
309  FbxArray<FbxString*> mShapeChannelNameArrayV5;
310 
311  FbxAMatrix* mPivot;
312 
313 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
314 };
315 
316 #include <fbxsdk/fbxsdk_nsend.h>
317 
318 #endif /* _FBXSDK_SCENE_GEOMETRY_H_ */
The animation layer is a collection of animation curve nodes.
Definition: fbxanimlayer.h:30
#define FBXSDK_OBJECT_DECLARE(Class, Parent)
Macro used to declare a new class derived from FbxObject.
Definition: fbxobject.h:61
FBX SDK environment definition.
#define NULL
Definition: fbxarch.h:210
virtual FbxObject & Copy(const FbxObject &pObject)
Copy an object content into this object.
ECloneType
Types of clones that can be created for FbxObject.
Definition: fbxobject.h:245
Utility class to manipulate strings.
Definition: fbxstring.h:66
FbxDocument is a base class for FbxScene and FbxLibrary classes.
Definition: fbxdocument.h:46
ESurfaceMode
NURBS and Patches surface modes.
Definition: fbxgeometry.h:200
This class facilitates the testing/reporting of errors.
Definition: fbxstatus.h:26
EType
Node attribute types.
The base class of most FBX objects.
Definition: fbxobject.h:157
EDeformerType
Deformer types.
Definition: fbxdeformer.h:67
This class is the base class for geometric object such as meshes, NURBS and patches.
virtual void Construct(const FbxObject *pFrom)
Optional constructor override, automatically called by default constructor.
virtual FbxNodeAttribute::EType GetAttributeType() const
Returns the type of node attribute.
A shape describes the deformation on a set of control points, which is similar to the cluster deforme...
Definition: fbxshape.h:32
Base class for skin deformer (FbxSkin) and vertex cache deformer (FbxVertexCacheDeformer).
Definition: fbxdeformer.h:38
Class for blend shape channels.
FBX SDK affine matrix class.
An animation curve, defined by a collection of keys (FbxAnimCurveKey), and indicating how a value cha...
Definition: fbxanimcurve.h:779
virtual FbxObject * Clone(FbxObject::ECloneType pCloneType=eDeepClone, FbxObject *pContainer=((void *) 0), void *pSet=((void *) 0)) const
Creates a clone of this object.
#define FBXSDK_DLL
Definition: fbxarch.h:173
This class provides the structure to build a correspondence between 2 geometries. ...
The base class of geometric objects that support control point deformations (e.g. ...
Definition: fbxgeometry.h:45
virtual void Destruct(bool pRecursive)
Optional destructor override, automatically called by default destructor.
Low and no normals.
Definition: fbxgeometry.h:204