37#ifndef Alembic_AbcGeom_Foundation_h
38#define Alembic_AbcGeom_Foundation_h
42#include <ImathMatrixAlgo.h>
43#include <ImathEuler.h>
50namespace Abc = ::Alembic::Abc::ALEMBIC_VERSION_NS;
95template <
class PROP,
class SAMP>
101 assert( iProp.isArray() );
103 if ( iSamp ) { iProp.set( iSamp ); }
104 else { iProp.setFromPrevious(); }
112 if ( ! iProp ) {
return; }
113 if ( iSamp !=
"" ) { iProp.
set( iSamp ); }
121 if ( ! iProp ) {
return; }
122 if ( iSamp != L
"" ) { iProp.
set( iSamp ); }
130 if ( ! iProp ) {
return; }
131 if ( iSamp.hasVolume() ) { iProp.
set( iSamp ); }
138template <
class ARRAYSAMP>
142 size_t size = iSamp.size();
143 for (
size_t i = 0 ; i < size ; ++i )
145 ret.extendBy( iSamp[i] );
155 return ( iDegrees * M_PI ) / 180.0;
160 return iRadians * ( 180.0 / M_PI );
168 return iHeader.isArray() || ( iHeader.isCompound() &&
169 iHeader.getMetaData().get(
"podName" ) !=
"" &&
170 iHeader.getMetaData().get(
"podExtent" ) !=
"" );
#define ALEMBIC_VERSION_NS
void set(const value_type &iVal)
double DegreesToRadians(double iDegrees)
used in xform rotation conversion
XformOperationType
Enum that indicates the type of transformational operation. This enum is used when encoding and decod...
FilmBackXformOperationType
Enum that indicates the type of 2d operation for cameras. This enum is used when encoding and decodin...
@ kScaleFilmBackOperation
@ kTranslateFilmBackOperation
@ kMatrixFilmBackOperation
double RadiansToDegrees(double iRadians)
bool IsGeomParam(const AbcA::PropertyHeader &iHeader)
A couple simple tests for if something is a GeomParam.
void SetPropUsePrevIfNull< Abc::OWstringProperty, Alembic::Util::wstring >(Abc::OWstringProperty iProp, Alembic::Util::wstring iSamp)
void SetPropUsePrevIfNull< Abc::OBox3dProperty, Abc::Box3d >(Abc::OBox3dProperty iProp, Abc::Box3d iSamp)
static Abc::Box3d ComputeBoundsFromPositions(const ARRAYSAMP &iSamp)
void SetPropUsePrevIfNull(PROP iProp, SAMP iSamp)
OTypedScalarProperty< Box3dTPTraits > OBox3dProperty
OTypedScalarProperty< WstringTPTraits > OWstringProperty
OTypedScalarProperty< StringTPTraits > OStringProperty