Alembic Version 1.1

Loading...
Searching...
No Matches
ILight.h
Go to the documentation of this file.
1//-*****************************************************************************
2//
3// Copyright (c) 2009-2012,
4// Sony Pictures Imageworks, Inc. and
5// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
6//
7// All rights reserved.
8//
9// Redistribution and use in source and binary forms, with or without
10// modification, are permitted provided that the following conditions are
11// met:
12// * Redistributions of source code must retain the above copyright
13// notice, this list of conditions and the following disclaimer.
14// * Redistributions in binary form must reproduce the above
15// copyright notice, this list of conditions and the following disclaimer
16// in the documentation and/or other materials provided with the
17// distribution.
18// * Neither the name of Sony Pictures Imageworks, nor
19// Industrial Light & Magic nor the names of their contributors may be used
20// to endorse or promote products derived from this software without specific
21// prior written permission.
22//
23// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34//
35//-*****************************************************************************
36
37#ifndef Alembic_AbcGeom_ILight_h
38#define Alembic_AbcGeom_ILight_h
39
40#include <Alembic/Util/Export.h>
41#include <Alembic/AbcGeom/ICamera.h>
42#include <Alembic/AbcGeom/Foundation.h>
43#include <Alembic/AbcGeom/SchemaInfoDeclarations.h>
44
45 namespace Alembic {
46 namespace AbcGeom {
47 namespace ALEMBIC_VERSION_NS {
48
49//-*****************************************************************************
50 class ALEMBIC_EXPORT ILightSchema : public Abc::ISchema<LightSchemaInfo>
51{
52 //-*************************************************************************
53 // LIGHT SCHEMA (container schema which has a camera schema)
54 //-*************************************************************************
55 public:
58 typedef ILightSchema this_type;
59
60 //-*************************************************************************
61 // CONSTRUCTION, DESTRUCTION, ASSIGNMENT
62 //-*************************************************************************
63
66 ILightSchema() {}
67
74 ILightSchema( const ICompoundProperty &iParent,
75 const std::string &iName,
76 const Abc::Argument &iArg0 = Abc::Argument(),
77 const Abc::Argument &iArg1 = Abc::Argument() )
78 : Abc::ISchema<LightSchemaInfo>( iParent, iName, iArg0, iArg1 )
79 {
80 init( iArg0, iArg1 );
81 }
82
87 explicit ILightSchema( const ICompoundProperty &iProp,
88 const Abc::Argument &iArg0 = Abc::Argument(),
89 const Abc::Argument &iArg1 = Abc::Argument() )
90 : Abc::ISchema<LightSchemaInfo>( iProp, iArg0, iArg1 )
91 {
92 init( iArg0, iArg1 );
93 }
94
96 ILightSchema(const ILightSchema& iCopy)
97 : Abc::ISchema<LightSchemaInfo>()
98 {
99 *this = iCopy;
100 }
101
103 ICameraSchema getCameraSchema() const { return m_cameraSchema; }
104
106 Abc::IBox3dProperty getChildBoundsProperty() const
107 {
108 return m_childBoundsProperty;
109 }
110
111 AbcA::TimeSamplingPtr getTimeSampling() const;
112
113 bool isConstant() const;
114
115 size_t getNumSamples() const;
116
117 // compound property to use as parent for any arbitrary GeomParams
118 // underneath it
119 ICompoundProperty getArbGeomParams() const { return m_arbGeomParams; }
120 ICompoundProperty getUserProperties() const { return m_userProperties; }
121
124 void reset()
125 {
126 m_childBoundsProperty.reset();
127 m_arbGeomParams.reset();
128 m_userProperties.reset();
129 m_cameraSchema.reset();
130 Abc::ISchema<LightSchemaInfo>::reset();
131 }
132
134 bool valid() const
135 {
136 return ( Abc::ISchema<LightSchemaInfo>::valid() );
137 }
138
141 ALEMBIC_OVERRIDE_OPERATOR_BOOL( ILightSchema::valid() );
142
143 protected:
144 void init( const Abc::Argument& iArg0,
145 const Abc::Argument& iArg1 );
146
147 Abc::IBox3dProperty m_childBoundsProperty;
148 Abc::ICompoundProperty m_arbGeomParams;
149 Abc::ICompoundProperty m_userProperties;
150
151 Alembic::AbcGeom::ICameraSchema m_cameraSchema;
152};
153
154//-*****************************************************************************
155// SCHEMA OBJECT
156//-*****************************************************************************
157 typedef Abc::ISchemaObject< ILightSchema > ILight;
158
159 typedef Util::shared_ptr< ILight > ILightPtr;
160
161} // End namespace ALEMBIC_VERSION_NS
162
163 using namespace ALEMBIC_VERSION_NS;
164
165} // End namespace AbcGeom
166} // End namespace Alembic
167
168#endif
Foundation.h
SchemaInfoDeclarations.h
Export.h
ALEMBIC_EXPORT
#define ALEMBIC_EXPORT
Definition Export.h:51
ICamera.h
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ICameraSchema
Definition ICamera.h:51
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::getCameraSchema
ICameraSchema getCameraSchema() const
Access to the camera schema.
Definition ILight.h:103
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::getTimeSampling
AbcA::TimeSamplingPtr getTimeSampling() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::this_type
ILightSchema this_type
Definition ILight.h:58
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::m_cameraSchema
Alembic::AbcGeom::ICameraSchema m_cameraSchema
Definition ILight.h:151
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::ALEMBIC_OVERRIDE_OPERATOR_BOOL
ALEMBIC_OVERRIDE_OPERATOR_BOOL(ILightSchema::valid())
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::ILightSchema
ILightSchema(const ICompoundProperty &iProp, const Abc::Argument &iArg0=Abc::Argument(), const Abc::Argument &iArg1=Abc::Argument())
Definition ILight.h:87
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::m_childBoundsProperty
Abc::IBox3dProperty m_childBoundsProperty
Definition ILight.h:147
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::getNumSamples
size_t getNumSamples() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::getChildBoundsProperty
Abc::IBox3dProperty getChildBoundsProperty() const
Access to the child bounds property.
Definition ILight.h:106
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::isConstant
bool isConstant() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::valid
bool valid() const
Returns whether this function set is valid.
Definition ILight.h:134
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::ILightSchema
ILightSchema()
Definition ILight.h:66
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::ILightSchema
ILightSchema(const ILightSchema &iCopy)
Copy constructor.
Definition ILight.h:96
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::m_arbGeomParams
Abc::ICompoundProperty m_arbGeomParams
Definition ILight.h:148
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::ILightSchema
ILightSchema(const ICompoundProperty &iParent, const std::string &iName, const Abc::Argument &iArg0=Abc::Argument(), const Abc::Argument &iArg1=Abc::Argument())
Definition ILight.h:74
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::m_userProperties
Abc::ICompoundProperty m_userProperties
Definition ILight.h:149
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::init
void init(const Abc::Argument &iArg0, const Abc::Argument &iArg1)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::getArbGeomParams
ICompoundProperty getArbGeomParams() const
Definition ILight.h:119
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::reset
void reset()
Definition ILight.h:124
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightSchema::getUserProperties
ICompoundProperty getUserProperties() const
Definition ILight.h:120
Alembic::Abc::ALEMBIC_VERSION_NS::Argument
Definition Argument.h:120
Alembic::Abc::ALEMBIC_VERSION_NS::ICompoundProperty
Definition ICompoundProperty.h:53
Alembic::Abc::ALEMBIC_VERSION_NS::ISchemaObject< ILightSchema >
Alembic::Abc::ALEMBIC_VERSION_NS::ISchema
Definition ISchema.h:58
Alembic::Abc::ALEMBIC_VERSION_NS::ISchema< LightSchemaInfo >::ISchema
ISchema()
Definition ISchema.h:112
Alembic::AbcGeom::ALEMBIC_VERSION_NS
Definition ArchiveBounds.h:45
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILightPtr
Util::shared_ptr< ILight > ILightPtr
Definition ILight.h:159
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ILight
Abc::ISchemaObject< ILightSchema > ILight
Definition ILight.h:157
Alembic::AbcGeom
Definition ArchiveBounds.h:44
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