Loading...
Searching...
No Matches
GeometryScope.h
Go to the documentation of this file.
//-*****************************************************************************
//
// Copyright (c) 2009-2012,
// Sony Pictures Imageworks, Inc. and
// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Sony Pictures Imageworks, nor
// Industrial Light & Magic nor the names of their contributors may be used
// to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//-*****************************************************************************
#ifndef Alembic_AbcGeom_GeometryScope_h
#define Alembic_AbcGeom_GeometryScope_h
#include <Alembic/Util/Export.h>
#include <Alembic/AbcGeom/Foundation.h>
namespace Alembic {
namespace AbcGeom {
namespace ALEMBIC_VERSION_NS {
//-*****************************************************************************
//-*****************************************************************************
//-*****************************************************************************
//-*****************************************************************************
enum GeometryScope
{
kConstantScope = 0,
kUniformScope = 1,
kVaryingScope = 2,
kVertexScope = 3,
kFacevaryingScope = 4,
kUnknownScope = 127
};
//-*****************************************************************************
//-*****************************************************************************
//-*****************************************************************************
inline void SetGeometryScope( AbcA::MetaData &ioMetaData, GeometryScope iScope )
{
switch ( iScope )
{
case kConstantScope: ioMetaData.set( "geoScope", "con" ); return;
case kUniformScope: ioMetaData.set( "geoScope", "uni" ); return;
case kVaryingScope: ioMetaData.set( "geoScope", "var" ); return;
case kVertexScope: ioMetaData.set( "geoScope", "vtx" ); return;
case kFacevaryingScope: ioMetaData.set( "geoScope", "fvr" ); return;
case kUnknownScope: return;
default: return;
}
}
//-*****************************************************************************
inline GeometryScope GetGeometryScope( const AbcA::MetaData &iMetaData )
{
const std::string val = iMetaData.get( "geoScope" );
if ( val == "con" || val == "" ) { return kConstantScope; }
else if ( val == "uni" ) { return kUniformScope; }
else if ( val == "var" ) { return kVaryingScope; }
else if ( val == "vtx" ) { return kVertexScope; }
else if ( val == "fvr" ) { return kFacevaryingScope; }
else { return kUnknownScope; }
}
//-*****************************************************************************
//-*****************************************************************************
ALEMBIC_EXPORT size_t
GeometryScopeNumValuesQuadrics( GeometryScope iScope );
ALEMBIC_EXPORT size_t
GeometryScopeNumValuesPolygon( GeometryScope iScope, size_t iNumVerts );
ALEMBIC_EXPORT size_t
GeometryScopeNumValuesPointsPolygons( GeometryScope iScope,
size_t iNumPolys,
size_t iNumVerts,
size_t iSumOfCounts );
ALEMBIC_EXPORT size_t
GeometryScopeNumValuesPoints( GeometryScope iScope,
size_t iNumPoints );
ALEMBIC_EXPORT size_t
GeometryScopeNumValuesSubdivisionMesh( GeometryScope iScope,
size_t iNumFaces,
size_t iNumVerts,
size_t iSumOfCounts );
ALEMBIC_EXPORT size_t
GeometryScopeNumValuesBilinearPatch( GeometryScope iScope );
ALEMBIC_EXPORT size_t
GeometryScopeNumValuesBicubicPatch( 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
GeometryScopeNumValuesNuPatch( GeometryScope iScope,
size_t iNu, size_t iUorder,
size_t iNv, size_t iVorder );
ALEMBIC_EXPORT size_t
GeometryScopeNumValuesLinearCurves( GeometryScope iScope,
size_t iNumCurves, bool iNoWrap,
size_t iSumOfCounts );
ALEMBIC_EXPORT size_t
GeometryScopeNumValuesCubicCurves( GeometryScope iScope,
size_t iNumCurves, bool iNoWrap,
size_t iSumOfCounts );
//-*****************************************************************************
//-*****************************************************************************
ALEMBIC_EXPORT void SetIsUV( AbcA::MetaData &ioMetaData, bool isUV );
ALEMBIC_EXPORT bool isUV( const AbcA::PropertyHeader & iHeader );
} // End namespace ALEMBIC_VERSION_NS
using namespace ALEMBIC_VERSION_NS;
} // End namespace AbcGeom
} // End namespace Alembic
#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