HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 
88  UT_Matrix4D nodeGlobalTransform(
89  FBX_NodeID node, fpreal time_seconds) const;
90 
91  int clipCount() const;
92  FBX_ClipID clip(int i) const;
93  const char* clipName(int i) const;
94  void setActiveClip(FBX_ClipID clip);
95 
96  // Returns the *inclusive* time range for the given clip
97  void getClipTimeRange(
98  FBX_ClipID clip, fpreal& start, fpreal &stop) const;
99 
100  /// Iterates over a node's user properties.
102  {
103  public:
104  PropertyIterator(FBX_NodeID node);
105  ~PropertyIterator();
106 
107  bool isValid();
108  void advance();
109 
110  const char *getName() const;
111  fpreal evalFloat(fpreal time_seconds) const;
112 
113  enum DataType
114  {
138  eDateTime
139  };
140 
141  DataType getDataType() const;
142 
143  private:
144  struct Impl;
145  UT_UniquePtr<Impl> myImpl;
146  };
147 
148 private:
149  template <typename FBX_T, typename ID_T>
150  static inline FBX_T * castID(ID_T id);
151 
152 private:
153  struct Impl;
154  UT_UniquePtr<Impl> myImpl;
155 };
156 
157 #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:269
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)