37 #ifndef Alembic_AbcGeom_IGeomParam_h
38 #define Alembic_AbcGeom_IGeomParam_h
48 template <
class TRAITS>
59 typedef Alembic::Util::shared_ptr< Abc::TypedArraySample<TRAITS> >
samp_ptr_type;
95 return TRAITS::interpretation();
121 template <
class CPROP>
127 template <
class PROP>
162 if ( e ==
"" ) {
return 1; }
163 else {
return atoi( e.c_str() ); }
220 template <
class TRAITS>
221 template <
class CPROP>
238 "NULL CompoundPropertyReader passed into "
239 <<
"ITypedGeomParam ctor" );
242 parent->getPropertyHeader( iName );
244 "Nonexistent GeomParam: " << iName );
266 ABCA_ASSERT(
false,
"Invalid ITypedGeomParam: " << iName );
273 template <
class TRAITS>
274 template <
class PROP>
292 "Property " << ph.
getName() <<
" is not an "
293 <<
"ITypedGeomParam" );
296 <<
" cannot be an ITypedGeomParam" );
320 template <
class TRAITS>
325 m_valProp.get( oSamp.
m_vals, iSS );
326 if ( m_indicesProperty ) { m_indicesProperty.get( oSamp.
m_indices, iSS ); }
329 uint32_t
size =
static_cast< uint32_t
> ( oSamp.
m_vals->size() );
331 uint32_t *
v =
new uint32_t[
size];
333 for ( uint32_t i = 0 ; i <
size ; ++i )
344 oSamp.
m_scope = this->getScope();
350 template <
class TRAITS>
355 oSamp.
m_scope = this->getScope();
358 if ( ! m_indicesProperty )
360 m_valProp.get( oSamp.
m_vals, iSS );
366 size_t size = idxPtr->size();
371 m_valProp.get( oSamp.
m_vals, iSS );
375 Alembic::Util::shared_ptr< Abc::TypedArraySample<TRAITS> > valPtr = \
376 m_valProp.getValue( iSS );
380 for (
size_t i = 0 ; i <
size ; ++i )
382 v[i] = (*valPtr)[ (*idxPtr)[i] ];
401 template <
class TRAITS>
408 return std::max( m_indicesProperty.getNumSamples(),
409 m_valProp.getNumSamples() );
413 if ( m_valProp ) {
return m_valProp.getNumSamples(); }
423 template <
class TRAITS>
430 return m_valProp.isConstant() && m_indicesProperty.isConstant();
434 return m_valProp.isConstant();
446 template <
class TRAITS>
451 if ( m_isIndexed ) {
return m_cprop.getName(); }
452 else {
return m_valProp.getName(); }
460 template <
class TRAITS>
463 if ( m_isIndexed ) {
return m_cprop.
getParent(); }
468 template <
class TRAITS>
471 if ( m_isIndexed ) {
return m_cprop.getHeader(); }
472 else {
return m_valProp.getHeader(); }
476 template <
class TRAITS>
479 if ( m_isIndexed ) {
return m_cprop.getMetaData(); }
480 else {
return m_valProp.getMetaData(); }
484 template <
class TRAITS>
489 return m_valProp.getTimeSampling();
491 else if ( m_indicesProperty )
493 return m_indicesProperty.getTimeSampling();
ITypedGeomParam< Uint32TPTraits > IUInt32GeomParam
Alembic::Util::shared_ptr< UInt32ArraySample > UInt32ArraySamplePtr
sample_type getExpandedValue(const Abc::ISampleSelector &iSS=Abc::ISampleSelector()) const
ITypedGeomParam< V3iTPTraits > IV3iGeomParam
size_t getNumSamples() const
sample_type getIndexedValue(const Abc::ISampleSelector &iSS=Abc::ISampleSelector()) const
ITypedGeomParam< N2dTPTraits > IN2dGeomParam
ITypedGeomParam< Box2fTPTraits > IBox2fGeomParam
AbcA::TimeSamplingPtr getTimeSampling() const
const AbcA::MetaData & getMetaData() const
ITypedGeomParam< N2fTPTraits > IN2fGeomParam
ITypedGeomParam< V2fTPTraits > IV2fGeomParam
GeometryScope GetGeometryScope(const AbcA::MetaData &iMetaData)
Abc::ICompoundProperty m_cprop
ITypedGeomParam< Int32TPTraits > IInt32GeomParam
GLsizei const GLchar *const * string
ITypedGeomParam< TRAITS > this_type
ITypedGeomParam< QuatdTPTraits > IQuatdGeomParam
ITypedGeomParam< C4cTPTraits > IC4cGeomParam
Abc::UInt32ArraySamplePtr getIndices() const
ITypedGeomParam< Box3iTPTraits > IBox3iGeomParam
ITypedArrayProperty< Uint32TPTraits > IUInt32ArrayProperty
void setInto(Arguments &iArgs) const
ICompoundProperty getParent() const
ITypedGeomParam< Box3dTPTraits > IBox3dGeomParam
void getExpanded(sample_type &oSamp, const Abc::ISampleSelector &iSS=Abc::ISampleSelector()) const
Abc::UInt32ArraySamplePtr m_indices
ITypedGeomParam< V3dTPTraits > IV3dGeomParam
ITypedGeomParam< N3fTPTraits > IN3fGeomParam
prop_type getValueProperty()
ITypedGeomParam< P2sTPTraits > IP2sGeomParam
ITypedGeomParam< M33fTPTraits > IM33fGeomParam
ITypedGeomParam< C3cTPTraits > IC3cGeomParam
ITypedGeomParam< Uint64TPTraits > IUInt64GeomParam
ITypedGeomParam< N3dTPTraits > IN3dGeomParam
ITypedGeomParam< P2iTPTraits > IP2iGeomParam
ITypedGeomParam< V2iTPTraits > IV2iGeomParam
ITypedGeomParam< P2fTPTraits > IP2fGeomParam
Alembic::Util::shared_ptr< TimeSampling > TimeSamplingPtr
ITypedGeomParam< V2dTPTraits > IV2dGeomParam
Abc::IUInt32ArrayProperty m_indicesProperty
ITypedGeomParam< V2sTPTraits > IV2sGeomParam
ITypedGeomParam< Box3fTPTraits > IBox3fGeomParam
Alembic::Util::shared_ptr< CompoundPropertyReader > CompoundPropertyReaderPtr
ITypedGeomParam< Box3sTPTraits > IBox3sGeomParam
ITypedGeomParam< Int8TPTraits > ICharGeomParam
ITypedGeomParam< V3sTPTraits > IV3sGeomParam
ITypedGeomParam< M44fTPTraits > IM44fGeomParam
const AbcA::PropertyHeader & getHeader() const
ITypedGeomParam< P3sTPTraits > IP3sGeomParam
ErrorHandler::Policy getErrorHandlerPolicy() const
#define ALEMBIC_ABC_SAFE_CALL_END_RESET()
Abc::ITypedArrayProperty< TRAITS > prop_type
ErrorHandler::Policy GetErrorHandlerPolicy(SOMETHING iSomething, const Argument &iArg0, const Argument &iArg1=Argument(), const Argument &iArg2=Argument(), const Argument &iArg3=Argument())
ITypedGeomParam< Box2sTPTraits > IBox2sGeomParam
ITypedGeomParam< P3dTPTraits > IP3dGeomParam
ITypedGeomParam< P3iTPTraits > IP3iGeomParam
SchemaInterpMatching GetSchemaInterpMatching(const Argument &iArg0, const Argument &iArg1=Argument(), const Argument &iArg2=Argument(), const Argument &iArg3=Argument())
ITypedGeomParam< WstringTPTraits > IWstringGeomParam
ITypedGeomParam< BooleanTPTraits > IBoolGeomParam
ITypedGeomParam< V3fTPTraits > IV3fGeomParam
ITypedGeomParam< C3hTPTraits > IC3hGeomParam
ITypedGeomParam< Uint16TPTraits > IUInt16GeomParam
size_t getArrayExtent() const
#define ALEMBIC_ABC_SAFE_CALL_BEGIN(CONTEXT)
samp_ptr_type getVals() const
Abc::IUInt32ArrayProperty getIndexProperty()
const std::string & getName() const
const char * PODName(PlainOldDataType pod)
ALEMBIC_OPERATOR_BOOL(valid())
ITypedGeomParam< P2dTPTraits > IP2dGeomParam
ITypedGeomParam< QuatfTPTraits > IQuatfGeomParam
ErrorHandler & getErrorHandler() const
Abc::ICompoundProperty getParent() const
this_type::Sample sample_type
ITypedGeomParam< P3fTPTraits > IP3fGeomParam
GeometryScope getScope() const
ITypedGeomParam< Int64TPTraits > IInt64GeomParam
ITypedGeomParam< Int16TPTraits > IInt16GeomParam
void getIndexed(sample_type &oSamp, const Abc::ISampleSelector &iSS=Abc::ISampleSelector()) const
ITypedGeomParam< Box2dTPTraits > IBox2dGeomParam
ITypedGeomParam< C4fTPTraits > IC4fGeomParam
#define ALEMBIC_ABC_SAFE_CALL_END()
ITypedGeomParam< Float64TPTraits > IDoubleGeomParam
AbcA::CompoundPropertyReaderPtr GetCompoundPropertyReaderPtr(AbcA::CompoundPropertyReaderPtr iPtr)
AbcA::DataType getDataType() const
TRAITS::value_type value_type
const AbcA::MetaData & getMetaData() const
ITypedGeomParam< C4hTPTraits > IC4hGeomParam
Alembic::Util::shared_ptr< Abc::TypedArraySample< TRAITS > > samp_ptr_type
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
**If you just want to fire and args
ITypedGeomParam< Uint8TPTraits > IUcharGeomParam
ITypedGeomParam< M44dTPTraits > IM44dGeomParam
static bool matches(const AbcA::MetaData &iMetaData, SchemaInterpMatching iMatching=kStrictMatching)
ITypedGeomParam< M33dTPTraits > IM33dGeomParam
static const char * getInterpretation()
ITypedGeomParam< C3fTPTraits > IC3fGeomParam
ALEMBIC_OPERATOR_BOOL(this_type::valid())
ITypedGeomParam< Box2iTPTraits > IBox2iGeomParam
static bool matches(const AbcA::PropertyHeader &iHeader, SchemaInterpMatching iMatching=kStrictMatching)
HUSD_API const char * dataType()
ITypedGeomParam< Float32TPTraits > IFloatGeomParam
#define ABCA_ASSERT(COND, TEXT)
ITypedGeomParam< Float16TPTraits > IHalfGeomParam
GeometryScope getScope() const
#define ALEMBIC_VERSION_NS
ITypedGeomParam< StringTPTraits > IStringGeomParam