Alembic Version 1.1

Loading...
Searching...
No Matches
GeometryScope.h
Go to the documentation of this file.
1//-*****************************************************************************
2//
3// Copyright (c) 2009-2012,
4// Sony Pictures Imageworks, Inc. and
5// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
6//
7// All rights reserved.
8//
9// Redistribution and use in source and binary forms, with or without
10// modification, are permitted provided that the following conditions are
11// met:
12// * Redistributions of source code must retain the above copyright
13// notice, this list of conditions and the following disclaimer.
14// * Redistributions in binary form must reproduce the above
15// copyright notice, this list of conditions and the following disclaimer
16// in the documentation and/or other materials provided with the
17// distribution.
18// * Neither the name of Sony Pictures Imageworks, nor
19// Industrial Light & Magic nor the names of their contributors may be used
20// to endorse or promote products derived from this software without specific
21// prior written permission.
22//
23// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34//
35//-*****************************************************************************
36
37#ifndef Alembic_AbcGeom_GeometryScope_h
38#define Alembic_AbcGeom_GeometryScope_h
39
40#include <Alembic/Util/Export.h>
41#include <Alembic/AbcGeom/Foundation.h>
42
43 namespace Alembic {
44 namespace AbcGeom {
45 namespace ALEMBIC_VERSION_NS {
46
47//-*****************************************************************************
55//-*****************************************************************************
56
57//-*****************************************************************************
94
95//-*****************************************************************************
96 enum GeometryScope
97{
98 kConstantScope = 0,
99 kUniformScope = 1,
100 kVaryingScope = 2,
101 kVertexScope = 3,
102 kFacevaryingScope = 4,
103
104 kUnknownScope = 127
105};
106
107//-*****************************************************************************
110//-*****************************************************************************
111
112//-*****************************************************************************
113 inline void SetGeometryScope( AbcA::MetaData &ioMetaData, GeometryScope iScope )
114{
115 switch ( iScope )
116 {
117 case kConstantScope: ioMetaData.set( "geoScope", "con" ); return;
118 case kUniformScope: ioMetaData.set( "geoScope", "uni" ); return;
119 case kVaryingScope: ioMetaData.set( "geoScope", "var" ); return;
120 case kVertexScope: ioMetaData.set( "geoScope", "vtx" ); return;
121 case kFacevaryingScope: ioMetaData.set( "geoScope", "fvr" ); return;
122 case kUnknownScope: return;
123 default: return;
124 }
125}
126
127//-*****************************************************************************
128 inline GeometryScope GetGeometryScope( const AbcA::MetaData &iMetaData )
129{
130 const std::string val = iMetaData.get( "geoScope" );
131 if ( val == "con" || val == "" ) { return kConstantScope; }
132 else if ( val == "uni" ) { return kUniformScope; }
133 else if ( val == "var" ) { return kVaryingScope; }
134 else if ( val == "vtx" ) { return kVertexScope; }
135 else if ( val == "fvr" ) { return kFacevaryingScope; }
136 else { return kUnknownScope; }
137}
138
139//-*****************************************************************************
142//-*****************************************************************************
143
146 ALEMBIC_EXPORT size_t
147 GeometryScopeNumValuesQuadrics( GeometryScope iScope );
148
151 ALEMBIC_EXPORT size_t
152 GeometryScopeNumValuesPolygon( GeometryScope iScope, size_t iNumVerts );
153
156 ALEMBIC_EXPORT size_t
157 GeometryScopeNumValuesPointsPolygons( GeometryScope iScope,
158 size_t iNumPolys,
159 size_t iNumVerts,
160 size_t iSumOfCounts );
161
164 ALEMBIC_EXPORT size_t
165 GeometryScopeNumValuesPoints( GeometryScope iScope,
166 size_t iNumPoints );
167
170 ALEMBIC_EXPORT size_t
171 GeometryScopeNumValuesSubdivisionMesh( GeometryScope iScope,
172 size_t iNumFaces,
173 size_t iNumVerts,
174 size_t iSumOfCounts );
175
178 ALEMBIC_EXPORT size_t
179 GeometryScopeNumValuesBilinearPatch( GeometryScope iScope );
180
183 ALEMBIC_EXPORT size_t
184 GeometryScopeNumValuesBicubicPatch( GeometryScope iScope );
185
188 ALEMBIC_EXPORT size_t
189 GeometryScopeNumValuesBilinearPatchMesh( GeometryScope iScope,
190 size_t iNu, bool iUNoWrap,
191 size_t iNv, bool iVNoWrap );
192
196 ALEMBIC_EXPORT size_t
197 GeometryScopeNumValuesBicubicPatchMesh( GeometryScope iScope,
198 size_t iNu, bool iUNoWrap,
199 size_t iNv, bool iVNoWrap );
200
203 ALEMBIC_EXPORT size_t
204 GeometryScopeNumValuesNuPatch( GeometryScope iScope,
205 size_t iNu, size_t iUorder,
206 size_t iNv, size_t iVorder );
207
210 ALEMBIC_EXPORT size_t
211 GeometryScopeNumValuesLinearCurves( GeometryScope iScope,
212 size_t iNumCurves, bool iNoWrap,
213 size_t iSumOfCounts );
216 ALEMBIC_EXPORT size_t
217 GeometryScopeNumValuesCubicCurves( GeometryScope iScope,
218 size_t iNumCurves, bool iNoWrap,
219 size_t iSumOfCounts );
220
221//-*****************************************************************************
224//-*****************************************************************************
225
226 ALEMBIC_EXPORT void SetIsUV( AbcA::MetaData &ioMetaData, bool isUV );
227
228 ALEMBIC_EXPORT bool isUV( const AbcA::PropertyHeader & iHeader );
229
230} // End namespace ALEMBIC_VERSION_NS
231
232 using namespace ALEMBIC_VERSION_NS;
233
234} // End namespace AbcGeom
235} // End namespace Alembic
236
237
238
239#endif
Foundation.h
Export.h
ALEMBIC_EXPORT
#define ALEMBIC_EXPORT
Definition Export.h:51
Alembic::AbcGeom::ALEMBIC_VERSION_NS
Definition ArchiveBounds.h:45
Alembic::AbcGeom::ALEMBIC_VERSION_NS::GeometryScopeNumValuesPointsPolygons
ALEMBIC_EXPORT size_t GeometryScopeNumValuesPointsPolygons(GeometryScope iScope, size_t iNumPolys, size_t iNumVerts, size_t iSumOfCounts)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::GeometryScopeNumValuesBicubicPatch
ALEMBIC_EXPORT size_t GeometryScopeNumValuesBicubicPatch(GeometryScope iScope)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::GetGeometryScope
GeometryScope GetGeometryScope(const AbcA::MetaData &iMetaData)
Definition GeometryScope.h:128
Alembic::AbcGeom::ALEMBIC_VERSION_NS::GeometryScopeNumValuesPoints
ALEMBIC_EXPORT size_t GeometryScopeNumValuesPoints(GeometryScope iScope, size_t iNumPoints)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::GeometryScope
GeometryScope
Definition GeometryScope.h:97
Alembic::AbcGeom::ALEMBIC_VERSION_NS::kVaryingScope
@ kVaryingScope
Definition GeometryScope.h:100
Alembic::AbcGeom::ALEMBIC_VERSION_NS::kUnknownScope
@ kUnknownScope
Definition GeometryScope.h:104
Alembic::AbcGeom::ALEMBIC_VERSION_NS::kVertexScope
@ kVertexScope
Definition GeometryScope.h:101
Alembic::AbcGeom::ALEMBIC_VERSION_NS::kConstantScope
@ kConstantScope
Definition GeometryScope.h:98
Alembic::AbcGeom::ALEMBIC_VERSION_NS::kUniformScope
@ kUniformScope
Definition GeometryScope.h:99
Alembic::AbcGeom::ALEMBIC_VERSION_NS::kFacevaryingScope
@ kFacevaryingScope
Definition GeometryScope.h:102
Alembic::AbcGeom::ALEMBIC_VERSION_NS::GeometryScopeNumValuesBilinearPatch
ALEMBIC_EXPORT size_t GeometryScopeNumValuesBilinearPatch(GeometryScope iScope)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::GeometryScopeNumValuesBilinearPatchMesh
ALEMBIC_EXPORT size_t GeometryScopeNumValuesBilinearPatchMesh(GeometryScope iScope, size_t iNu, bool iUNoWrap, size_t iNv, bool iVNoWrap)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::GeometryScopeNumValuesBicubicPatchMesh
ALEMBIC_EXPORT size_t GeometryScopeNumValuesBicubicPatchMesh(GeometryScope iScope, size_t iNu, bool iUNoWrap, size_t iNv, bool iVNoWrap)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::GeometryScopeNumValuesQuadrics
ALEMBIC_EXPORT size_t GeometryScopeNumValuesQuadrics(GeometryScope iScope)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::GeometryScopeNumValuesNuPatch
ALEMBIC_EXPORT size_t GeometryScopeNumValuesNuPatch(GeometryScope iScope, size_t iNu, size_t iUorder, size_t iNv, size_t iVorder)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::GeometryScopeNumValuesSubdivisionMesh
ALEMBIC_EXPORT size_t GeometryScopeNumValuesSubdivisionMesh(GeometryScope iScope, size_t iNumFaces, size_t iNumVerts, size_t iSumOfCounts)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::SetIsUV
ALEMBIC_EXPORT void SetIsUV(AbcA::MetaData &ioMetaData, bool isUV)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::isUV
ALEMBIC_EXPORT bool isUV(const AbcA::PropertyHeader &iHeader)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::GeometryScopeNumValuesCubicCurves
ALEMBIC_EXPORT size_t GeometryScopeNumValuesCubicCurves(GeometryScope iScope, size_t iNumCurves, bool iNoWrap, size_t iSumOfCounts)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::GeometryScopeNumValuesPolygon
ALEMBIC_EXPORT size_t GeometryScopeNumValuesPolygon(GeometryScope iScope, size_t iNumVerts)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::SetGeometryScope
void SetGeometryScope(AbcA::MetaData &ioMetaData, GeometryScope iScope)
Definition GeometryScope.h:113
Alembic::AbcGeom::ALEMBIC_VERSION_NS::GeometryScopeNumValuesLinearCurves
ALEMBIC_EXPORT size_t GeometryScopeNumValuesLinearCurves(GeometryScope iScope, size_t iNumCurves, bool iNoWrap, size_t iSumOfCounts)
Alembic::AbcGeom
Definition ArchiveBounds.h:44
Alembic
Alembic namespace ...
Definition ArchiveInfo.h:46