FBX C++ API Reference
fbxscenecheckutility.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2016 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_CHECK_UTILITY_H_
14 #define _FBXSDK_SCENE_CHECK_UTILITY_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
19 #include <fbxsdk/fbxsdk_nsbegin.h>
20 
21 class FbxScene;
22 class FbxStatus;
23 
29 {
30 public:
31  enum ECheckMode {
32  eCheckCycles = 1,
33  eCheckAnimationEmptyLayers = 2,
34  eCheckAnimatioCurveData = 4,
35  eCheckAnimationData = 6,
36  eCheckGeometryData = 8,
37  eCheckOtherData = 16,
38  eCkeckData = 30 // includes Geometry,Animation&Other
39  };
40 
48  FbxSceneCheckUtility(const FbxScene* pScene, FbxStatus* pStatus=NULL, FbxArray<FbxString*>* pDetails = NULL);
50 
57  bool Validate(ECheckMode pCheckMode=eCheckCycles);
58 
59 /*****************************************************************************************************************************
60 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
61 *****************************************************************************************************************************/
62 #ifndef DOXYGEN_SHOULD_SKIP_THIS
63 protected:
64  bool HaveCycles();
65  bool HaveInvalidData(int pCheckMode);
66 
67 private:
70 
71  // Check functions return true if valid, false otherwise
72  bool CheckMappingMode(FbxLayerElement::EMappingMode pMappingMode, const FbxString& pPrefix);
73  bool CheckReferenceMode(FbxLayerElement::EReferenceMode pReferenceMode, const FbxString& pPrefix);
74  bool CheckSurfaceMode(FbxGeometry::ESurfaceMode pSurfaceMode, const FbxString& pPrefix);
75  bool CheckSurfaceType(FbxNurbs::EType pSurfaceType, const FbxString& pPrefix, const char* pDir);
76 
77  int MaxCountLimit(FbxLayerElement::EMappingMode pMappingMode,
78  int pCtrlPointsCount,
79  int pVerticesCount,
80  int pPolygonsCount,
81  int pEdgesCount,
82  int pElseCount);
83 
84  enum {
85  eNoRestriction,
86  eDirectOnly,
87  eIndexOnly,
88  };
89 
90  template <class T>
91  bool CheckLayerElement(FbxLayerElementTemplate<T>* pLET,
92  int pMaxCount,
93  const char* pId,
94  const FbxString& pPrefix,
95  int pRestriction = eNoRestriction);
96 
97  bool MeshHaveInvalidData(FbxGeometry* pGeom, const FbxString& pName);
98  bool NurbsHaveInvalidData(FbxGeometry* pGeom, const FbxString& pName);
99  bool GeometryHaveInvalidData(FbxGeometry* pGeom, const FbxString& pBase);
100 
101  bool GlobalSettingsHaveInvalidData();
102 
103  bool AnimationHaveInvalidData(int pCheckMode);
104  bool AnimationHaveEmptyLayers();
105  bool AnimationHaveInvalidCurveData();
106 
107  const FbxScene* mScene;
108 
109  FbxStatus* mStatus;
110  FbxArray<FbxString*>* mDetails;
111  FbxString mBuffer;
112 
113 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
114 };
115 
116 #include <fbxsdk/fbxsdk_nsend.h>
117 
118 #endif /* _FBXSDK_UTILS_ROOT_NODE_UTILITY_H_ */
FBX SDK environment definition.
EReferenceMode
Determines how the mapping information is stored in the array of coordinates.
Definition: fbxlayer.h:163
#define NULL
Definition: fbxarch.h:210
Utility class to manipulate strings.
Definition: fbxstring.h:66
EType
NURBS types.
Definition: fbxnurbs.h:59
ESurfaceMode
NURBS and Patches surface modes.
Definition: fbxgeometry.h:200
This class facilitates the testing/reporting of errors.
Definition: fbxstatus.h:26
This class complements the FbxLayerElement class.
Definition: fbxlayer.h:1022
EMappingMode
Determines how the element is mapped to a surface.
Definition: fbxlayer.h:140
This class contains the description of a 3D scene.
Definition: fbxscene.h:61
This class defines functions to check the received scene graph for issues.
#define FBXSDK_DLL
Definition: fbxarch.h:173
The base class of geometric objects that support control point deformations (e.g. ...
Definition: fbxgeometry.h:45
Class for array of basic elements such as pointers and basic types.
Definition: fbxarray.h:23