OLight.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_OLight_h
#define Alembic_AbcGeom_OLight_h
#include <Alembic/Util/Export.h>
#include <Alembic/AbcGeom/OCamera.h>
#include <Alembic/AbcGeom/Foundation.h>
#include <Alembic/AbcGeom/SchemaInfoDeclarations.h>
namespace Alembic {
namespace AbcGeom {
namespace ALEMBIC_VERSION_NS {
//-*****************************************************************************
class ALEMBIC_EXPORT OLightSchema : public Abc::OSchema<LightSchemaInfo>
{
//-*************************************************************************
// LIGHT SCHEMA (just a container schema which has a camera schema)
//-*************************************************************************
public:
typedef OLightSchema this_type;
//-*************************************************************************
// CONSTRUCTION, DESTRUCTION, ASSIGNMENT
//-*************************************************************************
OLightSchema() {}
OLightSchema( AbcA::CompoundPropertyWriterPtr iParent,
const std::string &iName,
const Abc::Argument &iArg0 = Abc::Argument(),
const Abc::Argument &iArg1 = Abc::Argument(),
const Abc::Argument &iArg2 = Abc::Argument(),
const Abc::Argument &iArg3 = Abc::Argument() );
OLightSchema( Abc::OCompoundProperty iParent,
const std::string &iName,
const Abc::Argument &iArg0 = Abc::Argument(),
const Abc::Argument &iArg1 = Abc::Argument(),
const Abc::Argument &iArg2 = Abc::Argument() );
OLightSchema(const OLightSchema& iCopy)
: Abc::OSchema<LightSchemaInfo>()
{
*this = iCopy;
}
//-*************************************************************************
// SCHEMA STUFF
//-*************************************************************************
AbcA::TimeSamplingPtr getTimeSampling() const { return m_tsPtr; }
//-*************************************************************************
// SAMPLE STUFF
//-*************************************************************************
size_t getNumSamples();
void setCameraSample( const CameraSample &iSamp );
void setFromPrevious();
void setTimeSampling( uint32_t iIndex );
void setTimeSampling( AbcA::TimeSamplingPtr iTime );
Abc::OCompoundProperty getUserProperties();
Abc::OCompoundProperty getArbGeomParams();
Abc::OBox3dProperty getChildBoundsProperty();
//-*************************************************************************
// ABC BASE MECHANISMS
// These functions are used by Abc to deal with errors, validity,
// and so on.
//-*************************************************************************
void reset()
{
m_userProperties.reset();
m_arbGeomParams.reset();
m_cameraSchema.reset();
m_childBoundsProperty.reset();
Abc::OSchema<LightSchemaInfo>::reset();
}
bool valid() const
{
return ( Abc::OSchema<LightSchemaInfo>::valid() );
}
ALEMBIC_OVERRIDE_OPERATOR_BOOL( OLightSchema::valid() );
protected:
void init( AbcA::CompoundPropertyWriterPtr iParent,
const Abc::Argument &iArg0,
const Abc::Argument &iArg1,
const Abc::Argument &iArg2,
const Abc::Argument &iArg3 );
AbcA::TimeSamplingPtr m_tsPtr;
Abc::OBox3dProperty m_childBoundsProperty;
Abc::OCompoundProperty m_userProperties;
Abc::OCompoundProperty m_arbGeomParams;
AbcGeom::OCameraSchema m_cameraSchema;
};
//-*****************************************************************************
// SCHEMA OBJECT
//-*****************************************************************************
typedef Abc::OSchemaObject<OLightSchema> OLight;
typedef Util::shared_ptr< OLight > OLightPtr;
} // 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
OCamera.h
ALEMBIC_VERSION_NS
#define ALEMBIC_VERSION_NS
Definition: Foundation.h:105
Alembic::AbcGeom::ALEMBIC_VERSION_NS::CameraSample
Definition: CameraSample.h:50
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OCameraSchema
Definition: OCamera.h:51
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema
Definition: OLight.h:52
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::m_cameraSchema
AbcGeom::OCameraSchema m_cameraSchema
Definition: OLight.h:172
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::init
void init(AbcA::CompoundPropertyWriterPtr iParent, const Abc::Argument &iArg0, const Abc::Argument &iArg1, const Abc::Argument &iArg2, const Abc::Argument &iArg3)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::setTimeSampling
void setTimeSampling(AbcA::TimeSamplingPtr iTime)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::setCameraSample
void setCameraSample(const CameraSample &iSamp)
Set a sample.
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::OLightSchema
OLightSchema()
Definition: OLight.h:67
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::setTimeSampling
void setTimeSampling(uint32_t iIndex)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::m_tsPtr
AbcA::TimeSamplingPtr m_tsPtr
Definition: OLight.h:165
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::ALEMBIC_OVERRIDE_OPERATOR_BOOL
ALEMBIC_OVERRIDE_OPERATOR_BOOL(OLightSchema::valid())
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::getNumSamples
size_t getNumSamples()
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::getArbGeomParams
Abc::OCompoundProperty getArbGeomParams()
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::OLightSchema
OLightSchema(const OLightSchema &iCopy)
Copy constructor.
Definition: OLight.h:95
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::getUserProperties
Abc::OCompoundProperty getUserProperties()
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::this_type
OLightSchema this_type
Definition: OLight.h:59
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::OLightSchema
OLightSchema(Abc::OCompoundProperty iParent, const std::string &iName, const Abc::Argument &iArg0=Abc::Argument(), const Abc::Argument &iArg1=Abc::Argument(), const Abc::Argument &iArg2=Abc::Argument())
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::reset
void reset()
Definition: OLight.h:138
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::setFromPrevious
void setFromPrevious()
Set from previous sample.
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::m_userProperties
Abc::OCompoundProperty m_userProperties
Definition: OLight.h:169
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::valid
bool valid() const
Returns whether this function set is valid.
Definition: OLight.h:148
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::m_childBoundsProperty
Abc::OBox3dProperty m_childBoundsProperty
Definition: OLight.h:167
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::getTimeSampling
AbcA::TimeSamplingPtr getTimeSampling() const
Default assignment operator used.
Definition: OLight.h:108
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::getChildBoundsProperty
Abc::OBox3dProperty getChildBoundsProperty()
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::OLightSchema
OLightSchema(AbcA::CompoundPropertyWriterPtr iParent, const std::string &iName, const Abc::Argument &iArg0=Abc::Argument(), const Abc::Argument &iArg1=Abc::Argument(), const Abc::Argument &iArg2=Abc::Argument(), const Abc::Argument &iArg3=Abc::Argument())
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightSchema::m_arbGeomParams
Abc::OCompoundProperty m_arbGeomParams
Definition: OLight.h:170
Alembic::Abc::ALEMBIC_VERSION_NS::Argument
Definition: Argument.h:120
Alembic::Abc::ALEMBIC_VERSION_NS::OBasePropertyT< AbcA::CompoundPropertyWriterPtr >::reset
void reset()
Definition: OBaseProperty.h:166
Alembic::Abc::ALEMBIC_VERSION_NS::OCompoundProperty
Definition: OCompoundProperty.h:53
Alembic::Abc::ALEMBIC_VERSION_NS::OSchemaObject
Definition: OSchemaObject.h:54
Alembic::Abc::ALEMBIC_VERSION_NS::OSchema
Definition: OSchema.h:119
Alembic::Abc::ALEMBIC_VERSION_NS::OTypedScalarProperty< Box3dTPTraits >
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::CompoundPropertyWriterPtr
Alembic::Util::shared_ptr< CompoundPropertyWriter > CompoundPropertyWriterPtr
Definition: ForwardDeclarations.h:83
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::TimeSamplingPtr
Alembic::Util::shared_ptr< TimeSampling > TimeSamplingPtr
Definition: TimeSampling.h:137
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLightPtr
Util::shared_ptr< OLight > OLightPtr
Definition: OLight.h:180
Alembic::AbcGeom::ALEMBIC_VERSION_NS::OLight
Abc::OSchemaObject< OLightSchema > OLight
Definition: OLight.h:178
Alembic::Abc::ALEMBIC_VERSION_NS
Definition: ArchiveInfo.h:48
Alembic
Alembic namespace ...
Definition: ArchiveInfo.h:46