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>
42
43namespace Alembic {
44namespace AbcGeom {
45namespace ALEMBIC_VERSION_NS {
46
47//-*****************************************************************************
55//-*****************************************************************************
56
57//-*****************************************************************************
94
95//-*****************************************************************************
106
107//-*****************************************************************************
110//-*****************************************************************************
111
112//-*****************************************************************************
113inline 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//-*****************************************************************************
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
146ALEMBIC_EXPORT size_t
148
151ALEMBIC_EXPORT size_t
153
156ALEMBIC_EXPORT size_t
158 size_t iNumPolys,
159 size_t iNumVerts,
160 size_t iSumOfCounts );
161
164ALEMBIC_EXPORT size_t
166 size_t iNumPoints );
167
170ALEMBIC_EXPORT size_t
172 size_t iNumFaces,
173 size_t iNumVerts,
174 size_t iSumOfCounts );
175
178ALEMBIC_EXPORT size_t
180
183ALEMBIC_EXPORT size_t
185
188ALEMBIC_EXPORT size_t
190 size_t iNu, bool iUNoWrap,
191 size_t iNv, bool iVNoWrap );
192
196ALEMBIC_EXPORT size_t
198 size_t iNu, bool iUNoWrap,
199 size_t iNv, bool iVNoWrap );
200
203ALEMBIC_EXPORT size_t
205 size_t iNu, size_t iUorder,
206 size_t iNv, size_t iVorder );
207
210ALEMBIC_EXPORT size_t
212 size_t iNumCurves, bool iNoWrap,
213 size_t iSumOfCounts );
216ALEMBIC_EXPORT size_t
218 size_t iNumCurves, bool iNoWrap,
219 size_t iSumOfCounts );
220
221//-*****************************************************************************
224//-*****************************************************************************
225
226ALEMBIC_EXPORT void SetIsUV( AbcA::MetaData &ioMetaData, bool isUV );
227
229
230} // End namespace ALEMBIC_VERSION_NS
231
232using namespace ALEMBIC_VERSION_NS;
233
234} // End namespace AbcGeom
235} // End namespace Alembic
236
237
238
239#endif
#define ALEMBIC_EXPORT
Definition Export.h:51
#define ALEMBIC_VERSION_NS
Definition Foundation.h:105
std::string get(const std::string &iKey) const
Definition MetaData.h:192
void set(const std::string &iKey, const std::string &iData)
Definition MetaData.h:168
ALEMBIC_EXPORT size_t GeometryScopeNumValuesPointsPolygons(GeometryScope iScope, size_t iNumPolys, size_t iNumVerts, size_t iSumOfCounts)
ALEMBIC_EXPORT size_t GeometryScopeNumValuesBicubicPatch(GeometryScope iScope)
GeometryScope GetGeometryScope(const AbcA::MetaData &iMetaData)
ALEMBIC_EXPORT size_t GeometryScopeNumValuesPoints(GeometryScope iScope, size_t iNumPoints)
ALEMBIC_EXPORT size_t GeometryScopeNumValuesBilinearPatch(GeometryScope iScope)
ALEMBIC_EXPORT size_t GeometryScopeNumValuesBilinearPatchMesh(GeometryScope iScope, size_t iNu, bool iUNoWrap, size_t iNv, bool iVNoWrap)
ALEMBIC_EXPORT size_t GeometryScopeNumValuesBicubicPatchMesh(GeometryScope iScope, size_t iNu, bool iUNoWrap, size_t iNv, bool iVNoWrap)
ALEMBIC_EXPORT size_t GeometryScopeNumValuesQuadrics(GeometryScope iScope)
ALEMBIC_EXPORT size_t GeometryScopeNumValuesNuPatch(GeometryScope iScope, size_t iNu, size_t iUorder, size_t iNv, size_t iVorder)
ALEMBIC_EXPORT size_t GeometryScopeNumValuesSubdivisionMesh(GeometryScope iScope, size_t iNumFaces, size_t iNumVerts, size_t iSumOfCounts)
ALEMBIC_EXPORT void SetIsUV(AbcA::MetaData &ioMetaData, bool isUV)
ALEMBIC_EXPORT bool isUV(const AbcA::PropertyHeader &iHeader)
ALEMBIC_EXPORT size_t GeometryScopeNumValuesCubicCurves(GeometryScope iScope, size_t iNumCurves, bool iNoWrap, size_t iSumOfCounts)
ALEMBIC_EXPORT size_t GeometryScopeNumValuesPolygon(GeometryScope iScope, size_t iNumVerts)
void SetGeometryScope(AbcA::MetaData &ioMetaData, GeometryScope iScope)
ALEMBIC_EXPORT size_t GeometryScopeNumValuesLinearCurves(GeometryScope iScope, size_t iNumCurves, bool iNoWrap, size_t iSumOfCounts)
Alembic namespace ...
Definition ArchiveInfo.h:46