Free Electron
SurfaceAccessibleAbc.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __alembic_SurfaceAccessibleAbc_h__
8 #define __alembic_SurfaceAccessibleAbc_h__
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 /**************************************************************************//**
15  @brief Alembic Surface Binding
16 
17  @ingroup alembic
18 *//***************************************************************************/
19 class FE_DL_EXPORT SurfaceAccessibleAbc:
21 {
22  public:
23  SurfaceAccessibleAbc(void) {}
24 virtual ~SurfaceAccessibleAbc(void) {}
25 
26  //* as SurfaceAccessibleI
27 
29 
30 virtual BWORD load(String a_filename,
31  sp<Catalog> a_spSettings);
32 
33 static String scopeClass(Alembic::AbcGeom::GeometryScope
34  a_geometryScope);
35 static String scopeRate(Alembic::AbcGeom::GeometryScope
36  a_geometryScope);
37 
38  private:
39 
40  class FileContext: public Component
41  {
42  public:
43  FileContext(void);
44  virtual ~FileContext(void);
45 
46  Alembic::AbcGeom::IArchive m_archive;
47  };
48 
49  enum Mode
50  {
51  e_scan,
52  e_points,
53  e_meshes,
54  e_curves,
55  e_joints
56  };
57 
58  BWORD setContext(String a_filename);
59 
60  void visit(Alembic::AbcGeom::IObject a_iObj);
61 
62  void visitProperty(
63  Alembic::AbcGeom::IScalarProperty
64  a_properties,
65  String a_indent,
66  String a_parentPath,String a_path,
67  Alembic::AbcGeom::GeometryScope
68  a_geometryScope);
69  void visitProperty(
70  Alembic::AbcGeom::IArrayProperty
71  a_properties,
72  String a_indent,
73  String a_parentPath,String a_path,
74  Alembic::AbcGeom::GeometryScope
75  a_geometryScope);
76  void visitProperty(
77  Alembic::AbcGeom::ICompoundProperty
78  a_properties,
79  String& a_rIndent,
80  String a_parentPath,String a_path);
81  void visitProperties(
82  Alembic::AbcGeom::ICompoundProperty
83  a_properties,
84  String& a_rIndent,
85  String a_parentPath,String a_path);
86 
87  void outlineProperty(String a_indent,
88  String a_propName,
89  String a_interpretation,
90  String a_dataType,
91  String a_rate,
92  I32 a_arrayCount,
93  I32 a_sampleCount);
94 
95 static String basenameOf(String a_path);
96 
97  BWORD m_refMode;
98  Real m_fps;
99  Real m_minStep;
100  Mode m_mode;
101  I32 m_xformCount;
102  I32 m_meshCount;
103  I32 m_curveCount;
104  I32 m_instanceCount;
105 
106  sp<FileContext> m_spContext;
107 
108  String m_filename;
109  SpatialTransform m_refWorld;
110  SpatialTransform m_currentXform;
111 
112  Array<String> m_pathArray;
113  Array<String> m_matchArray;
114  Array<SpatialVector> m_pointArray;
115  Array<SpatialVector> m_pointRefArray;
116  Array<SpatialVector> m_colorArray;
117  Array<SpatialVector> m_normalArray;
118  Array<SpatialVector> m_uvArray;
119  Array<I32> m_uvLookupArray;
120  Array<I32> m_vertCountArray;
121  Array<I32> m_vertIndexArray;
122  Array<Real> m_radiusArray;
123  Array< Array<I32> > m_primVerts;
124 
125  std::map<String, Alembic::AbcGeom::GeometryScope > m_scopeMap;
126  std::map<String, Array<String> > m_stringArrayMap;
127  std::map<String, Array<I32> > m_integerArrayMap;
128  std::map<String, Array<Real> > m_realArrayMap;
129  std::map<String, Array<SpatialVector> > m_vectorArrayMap;
130 
131  std::map<String,I32> m_firstFaceMap;
132 
133  Alembic::AbcGeom::GeometryScope m_normalScope;
134  Alembic::AbcGeom::GeometryScope m_colorScope;
135  Alembic::AbcGeom::GeometryScope m_uvScope;
136 };
137 
138 } /* namespace ext */
139 } /* namespace fe */
140 
141 #endif /* __alembic_SurfaceAccessibleAbc_h__ */
Alembic Surface Binding.
Definition: SurfaceAccessibleAbc.h:19
kernel
Definition: namespace.dox:3
virtual BWORD load(String a_filename, sp< Catalog > a_spSettings)
load model data with settings
Definition: SurfaceAccessibleJoint.h:32
Automatically reference-counted string container.
Definition: String.h:128
Wrapper for std::vector.
Definition: Array.h:21
Base for all interfacable components.
Definition: Component.h:20
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
Joint Surface Binding.
Definition: SurfaceAccessibleJoint.h:20