HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FBX_SceneProxy.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: FBX_SceneProxy.h (FBX Library, C++)
7  *
8  * COMMENTS:
9  *
10  */
11 
12 #ifndef __FBX_SCENEPROXY_H_INCLUDED__
13 #define __FBX_SCENEPROXY_H_INCLUDED__
14 
15 #include "FBX_API.h"
16 #include "FBX_SceneProxySupport.h"
17 #include <UT/UT_UniquePtr.h>
18 #include <UT/UT_StringArray.h>
19 #include <SYS/SYS_Types.h>
20 
21 
22 class FBX_ErrorManager;
23 class GU_Detail;
24 
25 FBX_SCENEPROXY_DECLARE_ID(FBX_NodeID);
26 FBX_SCENEPROXY_DECLARE_ID(FBX_GeometryID);
27 FBX_SCENEPROXY_DECLARE_ID(FBX_ClipID);
28 
30 {
31 public:
33  ~FBX_SceneProxy();
34 
35  bool load(const char* path, bool convert_units,
36  FBX_ErrorManager& errors);
37 
38  fpreal globalFrameRate() const;
39  void getGlobalTimeRange(fpreal& start, fpreal &stop) const;
40 
41  const char* nodeName(FBX_NodeID node) const;
42  FBX_NodeID findNode(const char* name) const;
43 
44  int nodeCount() const;
45  FBX_NodeID node(int i) const;
46 
47  FBX_NodeID rootNode() const;
48  FBX_NodeID parentNode(FBX_NodeID node) const;
49  int childNodeCount(FBX_NodeID node) const;
50  FBX_NodeID childNode(FBX_NodeID node, int i) const;
51 
52  enum NodeType
53  {
54  eUnknown, // Unknown
55  eNull, // Null object
56  eMarker, // Mocap marker OR IK/FK effector
57  eSkeleton, // Bone/Joint
58  eMesh, // Geometry
59  eNurbs, // Geometry
60  ePatch, // Geometry
61  eCamera, // Camera
62  eCameraStereo, // Stereo camera
63  eCameraSwitcher, // Switch between child cameras
64  eLight, // Light
65  eOpticalReference, // Mocap marker
66  eOpticalMarker, // Mocap marker OR IK/FK effector
67  eNurbsCurve, // Geometry
68  eTrimNurbsSurface, // Geometry
69  eBoundary, // Geometry
70  eNurbsSurface, // Geometry
71  eShape, // Blendshape
72  eLODGroup, // Group of objects with different levels of detail
73  eSubDiv, // Geometry
74  eCachedEffect, // Particles, fluids, hair, etc. cache
75  eLine // Geometry
76  };
77  NodeType nodeType(FBX_NodeID node) const;
78 
79  bool visibility(FBX_NodeID node) const;
80 
81  FBX_GeometryID geometry(FBX_NodeID node) const;
82  int geometrySkinDeformerCount(FBX_GeometryID geometry) const;
83  bool convertGeometry(
84  GU_Detail& detail,
85  FBX_GeometryID geometry,
86  FBX_ErrorManager& errors) const;
87 
89  {
93  eBlend
94  };
95  /// Returns the skinning type for the i'th skin deformer in the geometry.
96  SkinningType geometrySkinDeformerType(FBX_GeometryID geometry, int i) const;
97 
98  UT_Matrix4D nodeGlobalTransform(
99  FBX_NodeID node, fpreal time_seconds) const;
100 
101  int clipCount() const;
102  FBX_ClipID clip(int i) const;
103  const char* clipName(int i) const;
104  void setActiveClip(FBX_ClipID clip);
105 
106  // Returns the *inclusive* time range for the given clip
107  void getClipTimeRange(
108  FBX_ClipID clip, fpreal& start, fpreal &stop) const;
109 
110  /// Iterates over a node's user properties.
112  {
113  public:
114  PropertyIterator(FBX_NodeID node);
115  ~PropertyIterator();
116 
117  bool isValid();
118  void advance();
119 
120  const char *getName() const;
121  fpreal evalFloat(fpreal time_seconds) const;
122 
123  enum DataType
124  {
148  eDateTime
149  };
150 
151  DataType getDataType() const;
152 
153  private:
154  struct Impl;
155  UT_UniquePtr<Impl> myImpl;
156  };
157 
158 private:
159  template <typename FBX_T, typename ID_T>
160  static inline FBX_T * castID(ID_T id);
161 
162 private:
163  struct Impl;
164  UT_UniquePtr<Impl> myImpl;
165 };
166 
167 #endif // __FBX_SCENEPROXY_H_INCLUDED__
GLuint start
Definition: glcorearb.h:474
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
png_uint_32 i
Definition: png.h:2877
#define FBX_API
Definition: FBX_API.h:10
GLuint const GLchar * name
Definition: glcorearb.h:785
double fpreal
Definition: SYS_Types.h:270
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER T clip(const T &p, const Box< T > &box)
Definition: ImathBoxAlgo.h:89
Iterates over a node's user properties.
FBX_SCENEPROXY_DECLARE_ID(FBX_NodeID)