37#ifndef Alembic_AbcGeom_IGeometrySchema_h
38#define Alembic_AbcGeom_IGeometrySchema_h
40#include <Alembic/Abc/ISchema.h>
41#include <Alembic/AbcGeom/Foundation.h>
42#include <Alembic/AbcGeom/IGeomParam.h>
43#include <Alembic/AbcGeom/SchemaInfoDeclarations.h>
47namespace ALEMBIC_VERSION_NS {
67 typedef INFO info_type;
81 const std::string &iName,
84 : Abc::
ISchema<info_type>( iParent, iName, iArg0, iArg1 )
93 : Abc::
ISchema<info_type>( iProp, iArg0, iArg1 )
100 Abc::WrapExistingFlag iFlag,
103 : Abc::
ISchema<info_type>( iProp, iArg0, iArg1 )
105 init( iArg0, iArg1 );
110 ALEMBIC_ABC_SAFE_CALL_BEGIN(
"IGeomBaseSchema::init()" );
113 iArg0.setInto( args );
114 iArg1.setInto( args );
116 AbcA::CompoundPropertyReaderPtr _this = this->
getPtr();
118 m_selfBoundsProperty = Abc::IBox3dProperty( _this,
".selfBnds",
122 m_childBoundsProperty = Abc::IBox3dProperty( _this,
123 ".childBnds", iArg0, iArg1 );
129 args.getErrorHandlerPolicy() );
133 m_userProperties = Abc::ICompoundProperty( _this,
".userProperties",
134 args.getErrorHandlerPolicy() );
137 ALEMBIC_ABC_SAFE_CALL_END();
140 virtual void reset ()
142 m_selfBoundsProperty.reset();
143 m_childBoundsProperty.reset();
144 m_arbGeomParams.reset();
145 m_userProperties.reset();
146 Abc::ISchema<info_type>::reset();
149 virtual bool valid()
const
152 return ( Abc::ISchema<info_type>::valid() &&
153 m_selfBoundsProperty.valid() );
156 Abc::IBox3dProperty getSelfBoundsProperty()
const
158 return m_selfBoundsProperty;
161 Abc::IBox3dProperty getChildBoundsProperty()
const
163 return m_childBoundsProperty;
176 Abc::IBox3dProperty m_selfBoundsProperty;
177 Abc::IBox3dProperty m_childBoundsProperty;
179 Abc::ICompoundProperty m_arbGeomParams;
180 Abc::ICompoundProperty m_userProperties;
207 typedef Sample this_type;
210 Sample() {
reset(); }
212 Abc::Box3d getSelfBounds()
const {
return m_selfBounds; }
216 m_selfBounds.makeEmpty();
220 friend class IGeomBase;
221 Abc::Box3d m_selfBounds;
236 const std::string &iName,
244 init( iArg0, iArg1 );
254 init( iArg0, iArg1 );
258 Abc::WrapExistingFlag iFlag,
263 init( iArg0, iArg1 );
277 {
return m_selfBoundsProperty.getNumSamples(); }
282 {
return m_selfBoundsProperty.isConstant(); }
288 if ( m_selfBoundsProperty.valid() )
290 return m_selfBoundsProperty.getTimeSampling();
299 void get( Sample &oSample,
302 ALEMBIC_ABC_SAFE_CALL_BEGIN(
"IGeomBase::get()" );
304 m_selfBoundsProperty.
get( oSample.m_selfBounds, iSS );
306 ALEMBIC_ABC_SAFE_CALL_END();
321 Abc::ICompoundProperty getUserProperties()
const {
return m_userProperties; }
336 return ( IGeomBaseSchema<GeomBaseSchemaInfo>::valid() );
348 static bool matches(
const AbcA::MetaData &iMetaData,
349 SchemaInterpMatching iMatching = kStrictMatching )
351 if ( iMatching == kNoMatching )
354 if ( iMatching == kStrictMatching || iMatching == kSchemaTitleMatching )
356 return iMetaData.get(
"schemaBaseType" ) ==
357 GeomBaseSchemaInfo::title();
367 static bool matches(
const AbcA::PropertyHeader &iHeader,
368 SchemaInterpMatching iMatching = kStrictMatching )
370 return matches( iHeader.getMetaData(), iMatching );
380using namespace ALEMBIC_VERSION_NS;
Definition Argument.h:120
AbcA::TimeSamplingPtr getTimeSampling(uint32_t iIndex)
Returns the TimeSampling at a given index.
Definition IArchive.cpp:93
IObject getObject() const
Definition IBaseProperty.h:207
void reset()
Definition IBaseProperty.h:160
bool valid() const
Definition IBaseProperty.h:164
AbcA::CompoundPropertyReaderPtr getPtr() const
Definition IBaseProperty.h:156
Definition ICompoundProperty.h:53
ICompoundProperty()
Definition ICompoundProperty.h:65
const AbcA::PropertyHeader & getPropertyHeader(size_t i) const
Definition ICompoundProperty.cpp:111
IArchive getArchive() const
Definition IObject.cpp:106
Definition ISampleSelector.h:49
ISchema()
Definition ISchema.h:112
Definition ISchemaObject.h:56
void get(value_type &iVal, const ISampleSelector &iSS=ISampleSelector()) const
Definition ITypedScalarProperty.h:194
size_t getNumSamples() const
Default assignment and copy operator used.
Definition IGeomBase.h:276
ALEMBIC_OVERRIDE_OPERATOR_BOOL(IGeomBase::valid())
IGeomBase()
The default constructor creates an empty GeomBase.
Definition IGeomBase.h:233
static bool matches(const AbcA::MetaData &iMetaData, SchemaInterpMatching iMatching=kStrictMatching)
Definition IGeomBase.h:348
static bool matches(const AbcA::PropertyHeader &iHeader, SchemaInterpMatching iMatching=kStrictMatching)
Definition IGeomBase.h:367
bool valid() const
Definition IGeomBase.h:334
AbcA::TimeSamplingPtr getTimeSampling() const
Definition IGeomBase.h:286
void reset()
Definition IGeomBase.h:326
bool isConstant() const
Definition IGeomBase.h:281
Definition IGeomBase.h:61
IGeomBaseSchema(const ICompoundProperty &iParent, const std::string &iName, const Argument &iArg0=Argument(), const Argument &iArg1=Argument())
Definition IGeomBase.h:80
IGeomBaseSchema(const ICompoundProperty &iProp, const Abc::Argument &iArg0=Abc::Argument(), const Abc::Argument &iArg1=Abc::Argument())
Wrap an existing schema object.
Definition IGeomBase.h:90
IGeomBaseSchema()
Definition IGeomBase.h:76
Alembic namespace ...
Definition ArchiveInfo.cpp:39