37 #ifndef Alembic_AbcGeom_Foundation_h
38 #define Alembic_AbcGeom_Foundation_h
95 template <
class PROP,
class SAMP>
101 assert( iProp.isArray() );
103 if ( iSamp ) { iProp.set( iSamp ); }
104 else { iProp.setFromPrevious(); }
109 inline void SetPropUsePrevIfNull<Abc::OStringProperty, std::string>(
112 if ( ! iProp ) {
return; }
113 if ( iSamp !=
"" ) { iProp.set( iSamp ); }
114 else { iProp.setFromPrevious(); }
118 inline void SetPropUsePrevIfNull<Abc::OWstringProperty, Alembic::Util::wstring>(
121 if ( ! iProp ) {
return; }
122 if ( iSamp != L
"" ) { iProp.set( iSamp ); }
123 else { iProp.setFromPrevious(); }
127 inline void SetPropUsePrevIfNull<Abc::OBox3dProperty, Abc::Box3d>(
130 if ( ! iProp ) {
return; }
131 if ( iSamp.hasVolume() ) { iProp.set( iSamp ); }
132 else { iProp.setFromPrevious(); }
138 template <
class ARRAYSAMP>
139 static Abc::Box3d ComputeBoundsFromPositions(
const ARRAYSAMP &iSamp )
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 );
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 V size() const IMATH_NOEXCEPT
GLsizei const GLchar *const * string
double RadiansToDegrees(double iRadians)
void SetPropUsePrevIfNull(PROP iProp, SAMP iSamp)
XformOperationType
Enum that indicates the type of transformational operation. This enum is used when encoding and decod...
double DegreesToRadians(double iDegrees)
used in xform rotation conversion
FilmBackXformOperationType
Enum that indicates the type of 2d operation for cameras. This enum is used when encoding and decodin...
Box< V3d > Box3d
3D box of base type double.
#define ALEMBIC_VERSION_NS
bool IsGeomParam(const AbcA::PropertyHeader &iHeader)
A couple simple tests for if something is a GeomParam.