Loading...
Searching...
No Matches
IXform.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_IXform_h
#define Alembic_AbcGeom_IXform_h
#include <Alembic/Util/Export.h>
#include <Alembic/AbcGeom/Foundation.h>
#include <Alembic/AbcGeom/SchemaInfoDeclarations.h>
#include <Alembic/AbcGeom/XformSample.h>
namespace Alembic {
namespace AbcGeom {
namespace ALEMBIC_VERSION_NS {
//-*****************************************************************************
class ALEMBIC_EXPORT IXformSchema : public Abc::ISchema<XformSchemaInfo>
{
//-*************************************************************************
// XFORM SCHEMA
//-*************************************************************************
public:
typedef Abc::ISchema<XformSchemaInfo> super_type;
typedef IXformSchema this_type;
typedef XformSample sample_type;
//-*************************************************************************
// CONSTRUCTION, DESTRUCTION, ASSIGNMENT
//-*************************************************************************
IXformSchema()
{
m_useArrayProp = false;
m_isConstant = true;
m_isConstantIdentity = true;
}
IXformSchema( const ICompoundProperty &iParent,
const std::string &iName,
const Abc::Argument &iArg0 = Abc::Argument(),
const Abc::Argument &iArg1 = Abc::Argument() )
: Abc::ISchema<XformSchemaInfo>( iParent, iName, iArg0, iArg1 )
{
// Meta data and error handling are eaten up by
// the super type, so all that's left is SchemaInterpMatching.
init( iArg0, iArg1 );
}
IXformSchema( const ICompoundProperty &iProp,
const Abc::Argument &iArg0 = Abc::Argument(),
const Abc::Argument &iArg1 = Abc::Argument() )
: Abc::ISchema<XformSchemaInfo>( iProp, iArg0, iArg1 )
{
init( iArg0, iArg1 );
}
IXformSchema( const IXformSchema &iCopy )
: Abc::ISchema<XformSchemaInfo>()
{
*this = iCopy;
}
AbcA::TimeSamplingPtr getTimeSampling() const;
bool isConstant() const { return m_isConstant; }
bool isConstantIdentity() const { return m_isConstantIdentity; }
size_t getNumSamples() const;
void get( XformSample &oSamp,
const Abc::ISampleSelector &iSS = Abc::ISampleSelector() ) const;
XformSample getValue( const Abc::ISampleSelector &iSS =
Abc::ISampleSelector() ) const;
Abc::IBox3dProperty getChildBoundsProperty() const
{
return m_childBoundsProperty;
}
// lightweight get to avoid constructing a sample
// see XformSample.h for explanation of this property
bool getInheritsXforms( const Abc::ISampleSelector &iSS =
Abc::ISampleSelector() ) const;
size_t getNumOps() const { return m_sample.getNumOps(); }
void reset()
{
m_childBoundsProperty.reset();
m_sample = XformSample();
m_inheritsProperty.reset();
m_isConstant = true;
m_isConstantIdentity = true;
m_arbGeomParams.reset();
m_userProperties.reset();
super_type::reset();
}
bool valid() const
{
return ( super_type::valid() );
}
ICompoundProperty getArbGeomParams() const { return m_arbGeomParams; }
ICompoundProperty getUserProperties() const { return m_userProperties; }
ALEMBIC_OVERRIDE_OPERATOR_BOOL( this_type::valid() );
protected:
Abc::IBox3dProperty m_childBoundsProperty;
AbcA::BasePropertyReaderPtr m_valsProperty;
Abc::IBoolProperty m_inheritsProperty;
Abc::ICompoundProperty m_arbGeomParams;
Abc::ICompoundProperty m_userProperties;
bool m_isConstant;
bool m_isConstantIdentity;
XformSample m_sample;
private:
void init( const Abc::Argument &iArg0, const Abc::Argument &iArg1 );
// is m_vals an ArrayProperty, or a ScalarProperty?
bool m_useArrayProp;
// fills m_valVec with data
void getChannelValues( const AbcA::index_t iSampleIndex,
XformSample & oSamp ) const;
};
//-*****************************************************************************
// SCHEMA OBJECT
//-*****************************************************************************
typedef Abc::ISchemaObject<IXformSchema> IXform;
typedef Util::shared_ptr< IXform > IXformPtr;
} // End namespace ALEMBIC_VERSION_NS
using namespace ALEMBIC_VERSION_NS;
} // End namespace AbcGeom
} // End namespace Alembic
#endif
Foundation.h
SchemaInfoDeclarations.h
Export.h
ALEMBIC_EXPORT
#define ALEMBIC_EXPORT
Definition Export.h:51
XformSample.h
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::m_arbGeomParams
Abc::ICompoundProperty m_arbGeomParams
Definition IXform.h:179
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::ALEMBIC_OVERRIDE_OPERATOR_BOOL
ALEMBIC_OVERRIDE_OPERATOR_BOOL(this_type::valid())
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::isConstantIdentity
bool isConstantIdentity() const
is this xform both constant and identity?
Definition IXform.h:118
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::IXformSchema
IXformSchema(const ICompoundProperty &iParent, const std::string &iName, const Abc::Argument &iArg0=Abc::Argument(), const Abc::Argument &iArg1=Abc::Argument())
Definition IXform.h:83
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::sample_type
XformSample sample_type
Definition IXform.h:62
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::valid
bool valid() const
Valid returns whether this function set is valid.
Definition IXform.h:158
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::IXformSchema
IXformSchema(const IXformSchema &iCopy)
explicit copy constructor to work around Windows compiler bug
Definition IXform.h:107
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::isConstant
bool isConstant() const
Definition IXform.h:115
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::super_type
Abc::ISchema< XformSchemaInfo > super_type
Definition IXform.h:60
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::IXformSchema
IXformSchema(const ICompoundProperty &iProp, const Abc::Argument &iArg0=Abc::Argument(), const Abc::Argument &iArg1=Abc::Argument())
Definition IXform.h:98
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::get
void get(XformSample &oSamp, const Abc::ISampleSelector &iSS=Abc::ISampleSelector()) const
fill the supplied sample reference with values
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::IXformSchema
IXformSchema()
Definition IXform.h:70
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::getValue
XformSample getValue(const Abc::ISampleSelector &iSS=Abc::ISampleSelector()) const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::getInheritsXforms
bool getInheritsXforms(const Abc::ISampleSelector &iSS=Abc::ISampleSelector()) const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::getChildBoundsProperty
Abc::IBox3dProperty getChildBoundsProperty() const
Definition IXform.h:129
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::getNumOps
size_t getNumOps() const
Definition IXform.h:139
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::getArbGeomParams
ICompoundProperty getArbGeomParams() const
Definition IXform.h:163
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::m_valsProperty
AbcA::BasePropertyReaderPtr m_valsProperty
Definition IXform.h:175
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::m_isConstantIdentity
bool m_isConstantIdentity
Definition IXform.h:184
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::getTimeSampling
AbcA::TimeSamplingPtr getTimeSampling() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::m_isConstant
bool m_isConstant
Definition IXform.h:182
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::getNumSamples
size_t getNumSamples() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::this_type
IXformSchema this_type
Definition IXform.h:61
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::m_childBoundsProperty
Abc::IBox3dProperty m_childBoundsProperty
Definition IXform.h:173
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::reset
void reset()
Definition IXform.h:143
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::m_userProperties
Abc::ICompoundProperty m_userProperties
Definition IXform.h:180
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::m_inheritsProperty
Abc::IBoolProperty m_inheritsProperty
Definition IXform.h:177
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::m_sample
XformSample m_sample
Definition IXform.h:186
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema::getUserProperties
ICompoundProperty getUserProperties() const
Definition IXform.h:165
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformSample
Definition XformSample.h:51
Alembic::Abc::ALEMBIC_VERSION_NS::Argument
Definition Argument.h:120
Alembic::Abc::ALEMBIC_VERSION_NS::Base::valid
bool valid() const
Definition Base.h:65
Alembic::Abc::ALEMBIC_VERSION_NS::Base::reset
void reset()
Definition Base.h:70
Alembic::Abc::ALEMBIC_VERSION_NS::ICompoundProperty
Definition ICompoundProperty.h:53
Alembic::Abc::ALEMBIC_VERSION_NS::ISampleSelector
Definition ISampleSelector.h:49
Alembic::Abc::ALEMBIC_VERSION_NS::ISchemaObject
Definition ISchemaObject.h:56
Alembic::Abc::ALEMBIC_VERSION_NS::ISchema
Definition ISchema.h:58
Alembic::Abc::ALEMBIC_VERSION_NS::ISchema< XformSchemaInfo >::ISchema
ISchema()
Definition ISchema.h:112
Alembic::AbcGeom::ALEMBIC_VERSION_NS
Definition ArchiveBounds.h:45
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXform
Abc::ISchemaObject< IXformSchema > IXform
Definition IXform.h:202
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformPtr
Util::shared_ptr< IXform > IXformPtr
Definition IXform.h:204
Alembic::AbcGeom
Definition ArchiveBounds.h:44
Alembic::Abc::ALEMBIC_VERSION_NS::IBoolProperty
ITypedScalarProperty< BooleanTPTraits > IBoolProperty
Definition ITypedScalarProperty.h:214
Alembic::Abc::ALEMBIC_VERSION_NS::IBox3dProperty
ITypedScalarProperty< Box3dTPTraits > IBox3dProperty
Definition ITypedScalarProperty.h:257
Alembic::Abc
Definition ArchiveInfo.h:47
Alembic
Alembic namespace ...
Definition ArchiveInfo.h:46