Alembic Version 1.1

Foundation.h
Go to the documentation of this file.
1//-*****************************************************************************
2//
3// Copyright (c) 2009-2016,
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_Abc_Foundation_h
38#define Alembic_Abc_Foundation_h
39
40#include <Alembic/AbcCoreAbstract/All.h>
41#include <Alembic/Util/All.h>
42
43#include <ImathVec.h>
44#include <ImathBox.h>
45#include <ImathMatrix.h>
46#include <ImathQuat.h>
47#include <ImathColor.h>
48
49#include <iostream>
50#include <string>
51#include <exception>
52
53#include <stdlib.h>
54#include <stdio.h>
55#include <string.h>
56#include <assert.h>
57
58 namespace Alembic {
59 namespace Abc {
60 namespace ALEMBIC_VERSION_NS {
61
62//-*****************************************************************************
63// Bring 'em ALL in.
64 namespace AbcA = ::Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS;
65 using namespace AbcA;
66
67//-*****************************************************************************
75//-*****************************************************************************
76 enum SchemaInterpMatching
77{
78 kStrictMatching,
79 kNoMatching,
80 kSchemaTitleMatching
81};
82
83//-*****************************************************************************
92//-*****************************************************************************
93 enum WrapExistingFlag
94{
95 kWrapExisting
96};
97
98//-*****************************************************************************
102//-*****************************************************************************
103 enum TopFlag
104{
105 kTop
106};
107
108//-*****************************************************************************
111//-*****************************************************************************
112 enum SparseFlag
113{
114 kFull,
115 kSparse
116};
117
118//-*****************************************************************************
119//-*****************************************************************************
120//-*****************************************************************************
121//-*****************************************************************************
122// IMPORTED IMATH TYPES
123//-*****************************************************************************
124//-*****************************************************************************
125//-*****************************************************************************
126 using Imath::V2s;
127 using Imath::V2i;
128 using Imath::V2f;
129 using Imath::V2d;
130
131 using Imath::V3s;
132 using Imath::V3i;
133 using Imath::V3f;
134 using Imath::V3d;
135
136 using Imath::Box2s;
137 using Imath::Box2i;
138 using Imath::Box2f;
139 using Imath::Box2d;
140
141 using Imath::Box3s;
142 using Imath::Box3i;
143 using Imath::Box3f;
144 using Imath::Box3d;
145
146 using Imath::M33f;
147 using Imath::M33d;
148 using Imath::M44f;
149 using Imath::M44d;
150
151 using Imath::Quatf;
152 using Imath::Quatd;
153
154 using Imath::C3h;
155 using Imath::C3f;
156 using Imath::C3c;
157
158 using Imath::C4h;
159 using Imath::C4f;
160 using Imath::C4c;
161
162 typedef V3f N3f;
163 typedef V3d N3d;
164
165//-*****************************************************************************
166//-*****************************************************************************
167// OBJECT EXTRACTION FUNCTIONS
168// These are intrusive methods used by the Abc constructors.
169//-*****************************************************************************
170//-*****************************************************************************
171
172//-*****************************************************************************
173 inline AbcA::CompoundPropertyWriterPtr
174 GetCompoundPropertyWriterPtr( AbcA::CompoundPropertyWriterPtr iPtr )
175{
176 return iPtr;
177}
178
179//-*****************************************************************************
180 inline AbcA::CompoundPropertyReaderPtr
181 GetCompoundPropertyReaderPtr( AbcA::CompoundPropertyReaderPtr iPtr )
182{
183 return iPtr;
184}
185
186//-*****************************************************************************
187//-*****************************************************************************
188// OBJECT EXTRACTION FUNCTIONS
189// These are intrusive methods used by the templated Abc constructors.
190//-*****************************************************************************
191//-*****************************************************************************
192
193//-*****************************************************************************
194 inline AbcA::ObjectWriterPtr GetObjectWriterPtr( AbcA::ObjectWriterPtr iPtr )
195{
196 return iPtr;
197}
198
199//-*****************************************************************************
200 inline AbcA::ObjectReaderPtr GetObjectReaderPtr( AbcA::ObjectReaderPtr iPtr )
201{
202 return iPtr;
203}
204
205//-*****************************************************************************
206//-*****************************************************************************
207// ARCHIVE EXTRACTION FUNCTIONS
208// These are intrusive methods used by the templated Abc constructors.
209//-*****************************************************************************
210//-*****************************************************************************
211
212//-*****************************************************************************
213 inline AbcA::ArchiveWriterPtr GetArchiveWriterPtr( AbcA::ArchiveWriterPtr iPtr )
214{
215 return iPtr;
216}
217
218//-*****************************************************************************
219 inline AbcA::ArchiveReaderPtr GetArchiveReaderPtr( AbcA::ArchiveReaderPtr iPtr )
220{
221 return iPtr;
222}
223
224} // End namespace ALEMBIC_VERSION_NS
225
226 using namespace ALEMBIC_VERSION_NS;
227
228} // End namespace Abc
229} // End namespace Alembic
230
231#endif
All.h
All.h
ALEMBIC_VERSION_NS
#define ALEMBIC_VERSION_NS
Definition: Foundation.h:105
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS
Definition: ArchiveReader.h:47
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ArchiveWriterPtr
Alembic::Util::shared_ptr< ArchiveWriter > ArchiveWriterPtr
Smart Ptrs to Writers.
Definition: ForwardDeclarations.h:81
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::CompoundPropertyWriterPtr
Alembic::Util::shared_ptr< CompoundPropertyWriter > CompoundPropertyWriterPtr
Definition: ForwardDeclarations.h:83
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ObjectWriterPtr
Alembic::Util::shared_ptr< ObjectWriter > ObjectWriterPtr
Definition: ForwardDeclarations.h:82
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ObjectReaderPtr
Alembic::Util::shared_ptr< ObjectReader > ObjectReaderPtr
Definition: ForwardDeclarations.h:91
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::CompoundPropertyReaderPtr
Alembic::Util::shared_ptr< CompoundPropertyReader > CompoundPropertyReaderPtr
Definition: ForwardDeclarations.h:92
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ArchiveReaderPtr
Alembic::Util::shared_ptr< ArchiveReader > ArchiveReaderPtr
Smart Ptrs to Readers.
Definition: ForwardDeclarations.h:90
Alembic::Abc::ALEMBIC_VERSION_NS
Definition: ArchiveInfo.h:48
Alembic::Abc::ALEMBIC_VERSION_NS::N3d
V3d N3d
Definition: Foundation.h:163
Alembic::Abc::ALEMBIC_VERSION_NS::GetObjectWriterPtr
AbcA::ObjectWriterPtr GetObjectWriterPtr(AbcA::ObjectWriterPtr iPtr)
Definition: Foundation.h:194
Alembic::Abc::ALEMBIC_VERSION_NS::SchemaInterpMatching
SchemaInterpMatching
Definition: Foundation.h:77
Alembic::Abc::ALEMBIC_VERSION_NS::kSchemaTitleMatching
@ kSchemaTitleMatching
Definition: Foundation.h:80
Alembic::Abc::ALEMBIC_VERSION_NS::kNoMatching
@ kNoMatching
Definition: Foundation.h:79
Alembic::Abc::ALEMBIC_VERSION_NS::kStrictMatching
@ kStrictMatching
Definition: Foundation.h:78
Alembic::Abc::ALEMBIC_VERSION_NS::GetArchiveReaderPtr
AbcA::ArchiveReaderPtr GetArchiveReaderPtr(AbcA::ArchiveReaderPtr iPtr)
Definition: Foundation.h:219
Alembic::Abc::ALEMBIC_VERSION_NS::GetArchiveWriterPtr
AbcA::ArchiveWriterPtr GetArchiveWriterPtr(AbcA::ArchiveWriterPtr iPtr)
Definition: Foundation.h:213
Alembic::Abc::ALEMBIC_VERSION_NS::GetCompoundPropertyWriterPtr
AbcA::CompoundPropertyWriterPtr GetCompoundPropertyWriterPtr(AbcA::CompoundPropertyWriterPtr iPtr)
Definition: Foundation.h:174
Alembic::Abc::ALEMBIC_VERSION_NS::SparseFlag
SparseFlag
Definition: Foundation.h:113
Alembic::Abc::ALEMBIC_VERSION_NS::kSparse
@ kSparse
Definition: Foundation.h:115
Alembic::Abc::ALEMBIC_VERSION_NS::kFull
@ kFull
Definition: Foundation.h:114
Alembic::Abc::ALEMBIC_VERSION_NS::WrapExistingFlag
WrapExistingFlag
Definition: Foundation.h:94
Alembic::Abc::ALEMBIC_VERSION_NS::kWrapExisting
@ kWrapExisting
Definition: Foundation.h:95
Alembic::Abc::ALEMBIC_VERSION_NS::GetCompoundPropertyReaderPtr
AbcA::CompoundPropertyReaderPtr GetCompoundPropertyReaderPtr(AbcA::CompoundPropertyReaderPtr iPtr)
Definition: Foundation.h:181
Alembic::Abc::ALEMBIC_VERSION_NS::TopFlag
TopFlag
Definition: Foundation.h:104
Alembic::Abc::ALEMBIC_VERSION_NS::kTop
@ kTop
Definition: Foundation.h:105
Alembic::Abc::ALEMBIC_VERSION_NS::GetObjectReaderPtr
AbcA::ObjectReaderPtr GetObjectReaderPtr(AbcA::ObjectReaderPtr iPtr)
Definition: Foundation.h:200
Alembic::Abc::ALEMBIC_VERSION_NS::N3f
V3f N3f
Definition: Foundation.h:162
Alembic
Alembic namespace ...
Definition: ArchiveInfo.h:46