├── .gitignore ├── LICENSE.txt ├── README.md ├── addon_config.mk ├── example-read ├── .gitignore ├── addons.make ├── bin │ └── data │ │ ├── .gitignore │ │ ├── alembic_test.abc │ │ ├── sample.abc │ │ ├── sample.c4d │ │ └── sample_ogawa.abc └── src │ ├── main.cpp │ ├── testApp.cpp │ └── testApp.h ├── example-shader ├── .gitignore ├── addons.make ├── bin │ └── data │ │ ├── .gitignore │ │ ├── shader.frag │ │ └── shader.vert └── src │ ├── main.cpp │ ├── testApp.cpp │ └── testApp.h ├── example-write ├── .gitignore ├── addons.make ├── bin │ └── data │ │ ├── .gitignore │ │ └── sample.abc └── src │ ├── main.cpp │ ├── testApp.cpp │ └── testApp.h ├── libs ├── HDF5-COPYING.txt ├── OpenEXR-LICENSE.txt ├── alembic-LICENSE.txt └── alembic │ ├── include │ ├── Alembic │ │ ├── Abc │ │ │ ├── All.h │ │ │ ├── ArchiveInfo.h │ │ │ ├── Argument.h │ │ │ ├── Base.h │ │ │ ├── ErrorHandler.h │ │ │ ├── Foundation.h │ │ │ ├── IArchive.h │ │ │ ├── IArrayProperty.h │ │ │ ├── IBaseProperty.h │ │ │ ├── ICompoundProperty.h │ │ │ ├── IObject.h │ │ │ ├── ISampleSelector.h │ │ │ ├── IScalarProperty.h │ │ │ ├── ISchema.h │ │ │ ├── ISchemaObject.h │ │ │ ├── ITypedArrayProperty.h │ │ │ ├── ITypedScalarProperty.h │ │ │ ├── OArchive.h │ │ │ ├── OArrayProperty.h │ │ │ ├── OBaseProperty.h │ │ │ ├── OCompoundProperty.h │ │ │ ├── OObject.h │ │ │ ├── OScalarProperty.h │ │ │ ├── OSchema.h │ │ │ ├── OSchemaObject.h │ │ │ ├── OTypedArrayProperty.h │ │ │ ├── OTypedScalarProperty.h │ │ │ ├── Reference.h │ │ │ ├── SourceName.h │ │ │ ├── TypedArraySample.h │ │ │ └── TypedPropertyTraits.h │ │ ├── AbcCollection │ │ │ ├── All.h │ │ │ ├── ICollections.h │ │ │ ├── OCollections.h │ │ │ └── SchemaInfoDeclarations.h │ │ ├── AbcCoreAbstract │ │ │ ├── All.h │ │ │ ├── ArchiveReader.h │ │ │ ├── ArchiveWriter.h │ │ │ ├── ArrayPropertyReader.h │ │ │ ├── ArrayPropertyWriter.h │ │ │ ├── ArraySample.h │ │ │ ├── ArraySampleKey.h │ │ │ ├── BasePropertyReader.h │ │ │ ├── BasePropertyWriter.h │ │ │ ├── CompoundPropertyReader.h │ │ │ ├── CompoundPropertyWriter.h │ │ │ ├── DataType.h │ │ │ ├── ForwardDeclarations.h │ │ │ ├── Foundation.h │ │ │ ├── MetaData.h │ │ │ ├── ObjectHeader.h │ │ │ ├── ObjectReader.h │ │ │ ├── ObjectWriter.h │ │ │ ├── PropertyHeader.h │ │ │ ├── ReadArraySampleCache.h │ │ │ ├── ScalarPropertyReader.h │ │ │ ├── ScalarPropertyWriter.h │ │ │ ├── ScalarSample.h │ │ │ ├── TimeSampling.h │ │ │ └── TimeSamplingType.h │ │ ├── AbcCoreFactory │ │ │ ├── All.h │ │ │ └── IFactory.h │ │ ├── AbcCoreOgawa │ │ │ ├── All.h │ │ │ └── ReadWrite.h │ │ ├── AbcGeom │ │ │ ├── All.h │ │ │ ├── ArchiveBounds.h │ │ │ ├── Basis.h │ │ │ ├── CameraSample.h │ │ │ ├── CurveType.h │ │ │ ├── FaceSetExclusivity.h │ │ │ ├── FilmBackXformOp.h │ │ │ ├── Foundation.h │ │ │ ├── GeometryScope.h │ │ │ ├── ICamera.h │ │ │ ├── ICurves.h │ │ │ ├── IFaceSet.h │ │ │ ├── IGeomBase.h │ │ │ ├── IGeomParam.h │ │ │ ├── ILight.h │ │ │ ├── INuPatch.h │ │ │ ├── IPoints.h │ │ │ ├── IPolyMesh.h │ │ │ ├── ISubD.h │ │ │ ├── IXform.h │ │ │ ├── OCamera.h │ │ │ ├── OCurves.h │ │ │ ├── OFaceSet.h │ │ │ ├── OGeomBase.h │ │ │ ├── OGeomParam.h │ │ │ ├── OLight.h │ │ │ ├── ONuPatch.h │ │ │ ├── OPoints.h │ │ │ ├── OPolyMesh.h │ │ │ ├── OSubD.h │ │ │ ├── OXform.h │ │ │ ├── SchemaInfoDeclarations.h │ │ │ ├── Visibility.h │ │ │ ├── XformOp.h │ │ │ └── XformSample.h │ │ ├── AbcMaterial │ │ │ ├── All.h │ │ │ ├── IMaterial.h │ │ │ ├── MaterialAssignment.h │ │ │ ├── MaterialFlatten.h │ │ │ ├── OMaterial.h │ │ │ └── SchemaInfoDeclarations.h │ │ └── Util │ │ │ ├── All.h │ │ │ ├── Config.h │ │ │ ├── Digest.h │ │ │ ├── Dimensions.h │ │ │ ├── Exception.h │ │ │ ├── Export.h │ │ │ ├── Foundation.h │ │ │ ├── Murmur3.h │ │ │ ├── Naming.h │ │ │ ├── OperatorBool.h │ │ │ ├── PlainOldDataType.h │ │ │ ├── SpookyV2.h │ │ │ └── TokenMap.h │ └── OpenEXR │ │ ├── Iex.h │ │ ├── IexBaseExc.h │ │ ├── IexErrnoExc.h │ │ ├── IexExport.h │ │ ├── IexForward.h │ │ ├── IexMacros.h │ │ ├── IexMathExc.h │ │ ├── IexMathFloatExc.h │ │ ├── IexMathFpu.h │ │ ├── IexMathIeeeExc.h │ │ ├── IexNamespace.h │ │ ├── IexThrowErrnoExc.h │ │ ├── IlmBaseConfig.h │ │ ├── IlmThread.h │ │ ├── IlmThreadExport.h │ │ ├── IlmThreadForward.h │ │ ├── IlmThreadMutex.h │ │ ├── IlmThreadNamespace.h │ │ ├── IlmThreadPool.h │ │ ├── IlmThreadSemaphore.h │ │ ├── ImathBox.h │ │ ├── ImathBoxAlgo.h │ │ ├── ImathColor.h │ │ ├── ImathColorAlgo.h │ │ ├── ImathEuler.h │ │ ├── ImathExc.h │ │ ├── ImathExport.h │ │ ├── ImathForward.h │ │ ├── ImathFrame.h │ │ ├── ImathFrustum.h │ │ ├── ImathFrustumTest.h │ │ ├── ImathFun.h │ │ ├── ImathGL.h │ │ ├── ImathGLU.h │ │ ├── ImathHalfLimits.h │ │ ├── ImathInt64.h │ │ ├── ImathInterval.h │ │ ├── ImathLimits.h │ │ ├── ImathLine.h │ │ ├── ImathLineAlgo.h │ │ ├── ImathMath.h │ │ ├── ImathMatrix.h │ │ ├── ImathMatrixAlgo.h │ │ ├── ImathNamespace.h │ │ ├── ImathPlane.h │ │ ├── ImathPlatform.h │ │ ├── ImathQuat.h │ │ ├── ImathRandom.h │ │ ├── ImathRoots.h │ │ ├── ImathShear.h │ │ ├── ImathSphere.h │ │ ├── ImathVec.h │ │ ├── ImathVecAlgo.h │ │ ├── half.h │ │ ├── halfExport.h │ │ ├── halfFunction.h │ │ └── halfLimits.h │ └── lib │ └── osx │ └── libAlembic.a └── src ├── ofxAlembic.h ├── ofxAlembicReader.cpp ├── ofxAlembicReader.h ├── ofxAlembicType.cpp ├── ofxAlembicType.h ├── ofxAlembicUtil.cpp ├── ofxAlembicUtil.h ├── ofxAlembicWriter.cpp └── ofxAlembicWriter.h /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Perfume Dev Team 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ofxAlembic 2 | 3 | Alembic wrapper addon for macOS + OF 0.10.0. 4 | 5 | - macOS + OF 0.10.0 : use master branch 6 | - macOS + OF 0.9.8 : use [this commit](https://github.com/perfume-dev/ofxAlembic/tree/9f6ad898491f3b5ab10982c44b5ec32fce4f9f77) 7 | - Windows + OF 0.10.0 : use [this fork by P-A-N](https://github.com/P-A-N/ofxAlembic) 8 | - Windows + OF 0.9.8 use [this fork by hanasaan](https://github.com/hanasaan/ofxAlembic/tree/vs_of098) 9 | 10 | ## Issues 11 | Example porting is working in progress. -------------------------------------------------------------------------------- /addon_config.mk: -------------------------------------------------------------------------------- 1 | # All variables and this file are optional, if they are not present the PG and the 2 | # makefiles will try to parse the correct values from the file system. 3 | # 4 | # Variables that specify exclusions can use % as a wildcard to specify that anything in 5 | # that position will match. A partial path can also be specified to, for example, exclude 6 | # a whole folder from the parsed paths from the file system 7 | # 8 | # Variables can be specified using = or += 9 | # = will clear the contents of that variable both specified from the file or the ones parsed 10 | # from the file system 11 | # += will add the values to the previous ones in the file or the ones parsed from the file 12 | # system 13 | # 14 | # The PG can be used to detect errors in this file, just create a new project with this addon 15 | # and the PG will write to the console the kind of error and in which line it is 16 | 17 | meta: 18 | ADDON_NAME = ofxAlembic 19 | ADDON_DESCRIPTION = Alembic wrapper for openFrameworks 20 | ADDON_AUTHOR = perfume-dev 21 | 22 | common: 23 | # dependencies with other addons, a list of them separated by spaces 24 | # or use += in several lines 25 | # ADDON_DEPENDENCIES = 26 | 27 | # include search paths, this will be usually parsed from the file system 28 | # but if the addon or addon libraries need special search paths they can be 29 | # specified here separated by spaces or one per line using += 30 | ADDON_INCLUDES = 31 | ADDON_INCLUDES += src 32 | ADDON_INCLUDES += libs/alembic/include 33 | ADDON_INCLUDES += libs/alembic/include/OpenEXR 34 | 35 | 36 | # any special flag that should be passed to the compiler when using this 37 | # addon 38 | # ADDON_CFLAGS = 39 | 40 | # any special flag that should be passed to the linker when using this 41 | # addon, also used for system libraries with -lname 42 | # ADDON_LDFLAGS = 43 | 44 | # linux only, any library that should be included in the project using 45 | # pkg-config 46 | # ADDON_PKG_CONFIG_LIBRARIES = 47 | 48 | # osx/iOS only, any framework that should be included in the project 49 | # ADDON_FRAMEWORKS = 50 | 51 | # source files, these will be usually parsed from the file system looking 52 | # in the src folders in libs and the root of the addon. if your addon needs 53 | # to include files in different places or a different set of files per platform 54 | # they can be specified here 55 | # ADDON_SOURCES = 56 | 57 | # some addons need resources to be copied to the bin/data folder of the project 58 | # specify here any files that need to be copied, you can use wildcards like * and ? 59 | # ADDON_DATA = 60 | 61 | # when parsing the file system looking for libraries exclude this for all or 62 | # a specific platform 63 | # ADDON_LIBS_EXCLUDE = 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /example-read/.gitignore: -------------------------------------------------------------------------------- 1 | .svn 2 | .hg 3 | .cvs 4 | 5 | # osx 6 | *.app 7 | *.mode1v3 8 | *.pbxuser 9 | .DS_Store 10 | build/ 11 | xcuserdata/ 12 | DerivedData/ 13 | project.xcworkspace 14 | 15 | # vs2010 16 | ipch/ 17 | obj/ 18 | *.sdf 19 | -------------------------------------------------------------------------------- /example-read/addons.make: -------------------------------------------------------------------------------- 1 | ofxAlembic 2 | -------------------------------------------------------------------------------- /example-read/bin/data/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in here apart from the .gitignore file 2 | * 3 | !.gitignore -------------------------------------------------------------------------------- /example-read/bin/data/alembic_test.abc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perfume-dev/ofxAlembic/b29dbd5e5ccc823f585599d6a41734c111bbf88b/example-read/bin/data/alembic_test.abc -------------------------------------------------------------------------------- /example-read/bin/data/sample.abc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perfume-dev/ofxAlembic/b29dbd5e5ccc823f585599d6a41734c111bbf88b/example-read/bin/data/sample.abc -------------------------------------------------------------------------------- /example-read/bin/data/sample.c4d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perfume-dev/ofxAlembic/b29dbd5e5ccc823f585599d6a41734c111bbf88b/example-read/bin/data/sample.c4d -------------------------------------------------------------------------------- /example-read/bin/data/sample_ogawa.abc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perfume-dev/ofxAlembic/b29dbd5e5ccc823f585599d6a41734c111bbf88b/example-read/bin/data/sample_ogawa.abc -------------------------------------------------------------------------------- /example-read/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "testApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | int main() 5 | { 6 | ofSetupOpenGL(1024, 768, OF_WINDOW); // <-------- setup the GL context 7 | ofRunApp(new testApp()); // start the app 8 | } 9 | -------------------------------------------------------------------------------- /example-read/src/testApp.cpp: -------------------------------------------------------------------------------- 1 | #include "testApp.h" 2 | 3 | #include "ofxAlembic.h" 4 | 5 | ofEasyCam cam; 6 | 7 | ofxAlembic::Reader abc; 8 | 9 | //-------------------------------------------------------------- 10 | void testApp::setup() 11 | { 12 | ofSetVerticalSync(true); 13 | ofSetFrameRate(60); 14 | ofBackground(0); 15 | 16 | string path = "sample_ogawa.abc"; 17 | 18 | // load allembic file 19 | abc.open(path); 20 | 21 | // show all drawable names 22 | abc.dumpNames(); 23 | } 24 | 25 | void testApp::exit() 26 | { 27 | abc.close(); 28 | } 29 | 30 | //-------------------------------------------------------------- 31 | void testApp::update() 32 | { 33 | float t = fmodf(ofGetElapsedTimef(), abc.getMaxTime()); 34 | 35 | // update alemblic reader with time in sec 36 | abc.setTime(t); 37 | } 38 | 39 | //-------------------------------------------------------------- 40 | void testApp::draw() 41 | { 42 | cam.begin(); 43 | 44 | glPointSize(4); 45 | 46 | // get meshes and draw 47 | 48 | { 49 | ofMesh mesh; 50 | abc.get("/Cloner/ClonerShape", mesh); 51 | 52 | ofSetColor(255, 0, 0); 53 | mesh.draw(); 54 | } 55 | 56 | { 57 | std::vector points; 58 | abc.get("/Emitter/EmitterCloud", points); 59 | 60 | ofSetColor(0, 255, 0); 61 | glBegin(GL_POINTS); 62 | for (int i = 0; i < points.size(); i++) 63 | glVertex3fv(&points[i].x); 64 | glEnd(); 65 | } 66 | 67 | { 68 | vector curves; 69 | abc.get("/Tracer/TracerSpline", curves); 70 | 71 | ofSetColor(0, 0, 255); 72 | for (int i = 0; i < curves.size(); i++) 73 | curves[i].draw(); 74 | } 75 | 76 | // or simply, abc.draw(); 77 | 78 | cam.end(); 79 | 80 | ofSetColor(255); 81 | 82 | ofDrawBitmapString(ofToString(abc.getTime()) + "/" + ofToString(abc.getMaxTime()), 10, 20); 83 | } 84 | 85 | //-------------------------------------------------------------- 86 | void testApp::keyPressed(int key) 87 | { 88 | 89 | } 90 | 91 | //-------------------------------------------------------------- 92 | void testApp::keyReleased(int key) 93 | { 94 | 95 | } 96 | 97 | //-------------------------------------------------------------- 98 | void testApp::mouseMoved(int x, int y) 99 | { 100 | 101 | } 102 | 103 | //-------------------------------------------------------------- 104 | void testApp::mouseDragged(int x, int y, int button) 105 | { 106 | 107 | } 108 | 109 | //-------------------------------------------------------------- 110 | void testApp::mousePressed(int x, int y, int button) 111 | { 112 | 113 | } 114 | 115 | //-------------------------------------------------------------- 116 | void testApp::mouseReleased(int x, int y, int button) 117 | { 118 | 119 | } 120 | 121 | //-------------------------------------------------------------- 122 | void testApp::windowResized(int w, int h) 123 | { 124 | 125 | } 126 | 127 | //-------------------------------------------------------------- 128 | void testApp::gotMessage(ofMessage msg) 129 | { 130 | 131 | } 132 | 133 | //-------------------------------------------------------------- 134 | void testApp::dragEvent(ofDragInfo dragInfo) 135 | { 136 | 137 | } 138 | -------------------------------------------------------------------------------- /example-read/src/testApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | class testApp : public ofBaseApp 6 | { 7 | public: 8 | 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | void exit(); 13 | 14 | void keyPressed(int key); 15 | void keyReleased(int key); 16 | void mouseMoved(int x, int y); 17 | void mouseDragged(int x, int y, int button); 18 | void mousePressed(int x, int y, int button); 19 | void mouseReleased(int x, int y, int button); 20 | void windowResized(int w, int h); 21 | void dragEvent(ofDragInfo dragInfo); 22 | void gotMessage(ofMessage msg); 23 | 24 | }; -------------------------------------------------------------------------------- /example-shader/.gitignore: -------------------------------------------------------------------------------- 1 | .svn 2 | .hg 3 | .cvs 4 | 5 | # osx 6 | *.app 7 | *.mode1v3 8 | *.pbxuser 9 | .DS_Store 10 | build/ 11 | xcuserdata/ 12 | DerivedData/ 13 | project.xcworkspace 14 | 15 | # vs2010 16 | ipch/ 17 | obj/ 18 | *.sdf 19 | -------------------------------------------------------------------------------- /example-shader/addons.make: -------------------------------------------------------------------------------- 1 | ofxAlembic 2 | -------------------------------------------------------------------------------- /example-shader/bin/data/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in here apart from the .gitignore file 2 | * 3 | !.gitignore -------------------------------------------------------------------------------- /example-shader/bin/data/shader.frag: -------------------------------------------------------------------------------- 1 | #define PI (3.1415926536) 2 | #define TWO_PI (6.2831853072) 3 | 4 | #ifdef GL_ES 5 | precision mediump float; 6 | #endif 7 | 8 | uniform float elapsedTime; 9 | varying vec3 position, normal; 10 | varying float randomOffset; 11 | 12 | float time = elapsedTime; 13 | uniform vec2 mouse; 14 | uniform vec2 resolution; 15 | 16 | 17 | const vec4 on = vec4(1.); 18 | const vec4 g = vec4(0,1,0,1); 19 | const vec4 off = vec4(vec3(0.), 1.); 20 | 21 | void main() { 22 | float stages = 7.; 23 | float stage = mod(elapsedTime * .6, stages); 24 | 25 | if(stage < 1.) { 26 | float angle = atan(position.y,position.x)/(2.*3.14159265359); 27 | angle -= floor(angle); 28 | float rad = length(position); 29 | 30 | float color = 0.0; 31 | for (int i = 0; i < 100; i++) { 32 | float angleFract = fract(angle*32.); 33 | float angleRnd = floor(angle*32.)+1.; 34 | float angleRnd1 = fract(angleRnd*fract(angleRnd*.7235)*45.1); 35 | float angleRnd2 = fract(angleRnd*fract(angleRnd*.82657)*13.724); 36 | float t = time+angleRnd1*10.; 37 | float radDist = sqrt(angleRnd2+float(i)+2.); 38 | 39 | float adist = radDist/rad*.1; 40 | float dist = (t*.1+adist); 41 | dist = abs(fract(dist)-.5); 42 | float xdist = dist*5./adist; 43 | float ydist = abs(angleFract-.5); 44 | 45 | color += max(0.,.5-(xdist*xdist+ydist*ydist)*(adist*adist*radDist*radDist)*20.)*randomOffset; 46 | 47 | angle = fract(angle+.61); 48 | } 49 | gl_FragColor = vec4(0,color,color,color)*.3; 50 | 51 | } else if(stage < 2.) { 52 | vec2 position = ( 20.0 * gl_FragCoord.xy / resolution.xy ) / 4.0; 53 | 54 | float color = 0.0; 55 | color += sin( position.x * cos( time / 20.0 ) * 80.0 ) + cos( position.y * cos( time / 15.0 ) * 10.0 ); 56 | color += sin( position.y * sin( time / 30.0 ) * 40.0 ) + cos( position.x * sin( time / 25.0 ) * 40.0 ); 57 | color += sin( position.x * sin( time / 10.0 ) * 10.0 ) + sin( position.y * sin( time / 35.0 ) * 80.0 ); 58 | color *= sin( time / 10.0 ) * 0.5; 59 | 60 | vec4 tempColor = vec4( vec3( color, color * 0.5, sin( color + time / 10.0 ) * 0.75 ), 1.0 ); 61 | 62 | gl_FragColor = tempColor; 63 | 64 | } else if(stage < 3.) { 65 | gl_FragColor = vec4(sin(mod(position.x + elapsedTime*2., PI)), 66 | sin(mod(-randomOffset + elapsedTime*2., TWO_PI)), 67 | 0, 68 | 1); 69 | } else if(stage < 4.) { 70 | // crazy triangles, grid lines 71 | float speed = 30.; 72 | float scale = 20.0; 73 | float cutoff = .9; 74 | vec3 cur = mod(position + speed * elapsedTime, scale) / scale; 75 | cur *= 1. - abs(normal); 76 | gl_FragColor = (max(max(cur.x, cur.y), cur.z) < cutoff) ? off : vec4(sin(mod(position.x + elapsedTime*2., PI)), 77 | sin(mod(-randomOffset + elapsedTime*2., TWO_PI)), 78 | sin(mod(elapsedTime,PI)), 79 | 1);; 80 | } else if(stage < 5.) { 81 | 82 | float sum = 0.0; 83 | float size = resolution.x / 1000.0; 84 | for (int i = 0; i < 20; ++i) { 85 | vec2 position = resolution / 2.0; 86 | float t = (float(i) + elapsedTime) / 5.0; 87 | float c = float(i) * 4.0; 88 | position.x += tan(8.0 * t + c) * resolution.x * 0.2; 89 | position.y += sin(t) * resolution.y * 0.8; 90 | 91 | sum += size / length(gl_FragCoord.xy - position); 92 | } 93 | gl_FragColor = vec4(sum * 0.5, sum, sum * 3.1, 1); 94 | } else if (stage < 6.) { 95 | gl_FragColor = vec4(normal * 0.5 + 0.5, 1); 96 | } else if (stage < 7.) { 97 | float t = mod(elapsedTime * 30., 20.) + 5.; 98 | float d = mod(position.y * 1., t) / t; 99 | float a = sin(d * TWO_PI) * 0.5 + 0.5; 100 | 101 | if (a > 0.5) gl_FragColor = vec4(1, 0, 0, 0.5); 102 | else discard; 103 | } 104 | 105 | } 106 | -------------------------------------------------------------------------------- /example-shader/bin/data/shader.vert: -------------------------------------------------------------------------------- 1 | varying vec3 position, normal; 2 | varying float randomOffset; 3 | 4 | float rand(vec2 co){ 5 | return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); 6 | } 7 | 8 | void main() { 9 | gl_FrontColor = gl_Color; 10 | gl_TexCoord[0] = gl_MultiTexCoord0; 11 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 12 | position = gl_Vertex.xyz; 13 | normal = gl_Normal.xyz; 14 | randomOffset = rand(gl_Vertex.xy + gl_Vertex.yz); 15 | } 16 | -------------------------------------------------------------------------------- /example-shader/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "testApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | int main() 5 | { 6 | ofSetupOpenGL(1024, 768, OF_WINDOW); 7 | ofRunApp(new testApp()); // start the app 8 | } 9 | -------------------------------------------------------------------------------- /example-shader/src/testApp.cpp: -------------------------------------------------------------------------------- 1 | #include "testApp.h" 2 | 3 | #include "ofxAlembic.h" 4 | 5 | ofEasyCam cam; 6 | ofxAlembic::Reader abc; 7 | 8 | ofShader shader; 9 | 10 | //-------------------------------------------------------------- 11 | void testApp::setup() 12 | { 13 | ofSetVerticalSync(true); 14 | ofSetFrameRate(60); 15 | ofBackground(0); 16 | 17 | string path = "alembic_test_ogawa.abc"; 18 | 19 | abc.open(path); 20 | 21 | shader.load("shader.vert", "shader.frag"); 22 | } 23 | 24 | //-------------------------------------------------------------- 25 | void testApp::update() 26 | { 27 | float t = fmodf(ofGetElapsedTimef(), abc.getMaxTime()); 28 | abc.setTime(t); 29 | } 30 | 31 | //-------------------------------------------------------------- 32 | void testApp::draw() 33 | { 34 | shader.begin(); 35 | shader.setUniform1f("elapsedTime", ofGetElapsedTimef()); 36 | shader.setUniform2f("mouse", mouseX, mouseY); 37 | shader.setUniform2f("resolution", ofGetWindowWidth(), ofGetWindowHeight()); 38 | shader.end(); 39 | 40 | glEnable(GL_DEPTH_TEST); 41 | glEnable(GL_CULL_FACE); 42 | glCullFace(GL_BACK); 43 | 44 | ofEnableAlphaBlending(); 45 | 46 | cam.begin(); 47 | 48 | shader.begin(); 49 | 50 | for (int i = 0; i < abc.size(); i++) 51 | { 52 | ofMesh mesh; 53 | if (abc.get(i, mesh)) 54 | { 55 | ofSetColor(255); 56 | mesh.draw(); 57 | // mesh.drawWireframe(); 58 | } 59 | } 60 | 61 | shader.end(); 62 | 63 | cam.end(); 64 | 65 | glDisable(GL_DEPTH_TEST); 66 | } 67 | 68 | //-------------------------------------------------------------- 69 | void testApp::keyPressed(int key) 70 | { 71 | 72 | } 73 | 74 | //-------------------------------------------------------------- 75 | void testApp::keyReleased(int key) 76 | { 77 | 78 | } 79 | 80 | //-------------------------------------------------------------- 81 | void testApp::mouseMoved(int x, int y) 82 | { 83 | 84 | } 85 | 86 | //-------------------------------------------------------------- 87 | void testApp::mouseDragged(int x, int y, int button) 88 | { 89 | 90 | } 91 | 92 | //-------------------------------------------------------------- 93 | void testApp::mousePressed(int x, int y, int button) 94 | { 95 | 96 | } 97 | 98 | //-------------------------------------------------------------- 99 | void testApp::mouseReleased(int x, int y, int button) 100 | { 101 | 102 | } 103 | 104 | //-------------------------------------------------------------- 105 | void testApp::windowResized(int w, int h) 106 | { 107 | 108 | } 109 | 110 | //-------------------------------------------------------------- 111 | void testApp::gotMessage(ofMessage msg) 112 | { 113 | 114 | } 115 | 116 | //-------------------------------------------------------------- 117 | void testApp::dragEvent(ofDragInfo dragInfo) 118 | { 119 | 120 | } 121 | -------------------------------------------------------------------------------- /example-shader/src/testApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | class testApp : public ofBaseApp 6 | { 7 | public: 8 | 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void keyPressed(int key); 14 | void keyReleased(int key); 15 | void mouseMoved(int x, int y); 16 | void mouseDragged(int x, int y, int button); 17 | void mousePressed(int x, int y, int button); 18 | void mouseReleased(int x, int y, int button); 19 | void windowResized(int w, int h); 20 | void dragEvent(ofDragInfo dragInfo); 21 | void gotMessage(ofMessage msg); 22 | 23 | }; -------------------------------------------------------------------------------- /example-write/.gitignore: -------------------------------------------------------------------------------- 1 | .svn 2 | .hg 3 | .cvs 4 | 5 | # osx 6 | *.app 7 | *.mode1v3 8 | *.pbxuser 9 | .DS_Store 10 | build/ 11 | xcuserdata/ 12 | DerivedData/ 13 | project.xcworkspace 14 | 15 | # vs2010 16 | ipch/ 17 | obj/ 18 | *.sdf 19 | -------------------------------------------------------------------------------- /example-write/addons.make: -------------------------------------------------------------------------------- 1 | ofxAlembic 2 | -------------------------------------------------------------------------------- /example-write/bin/data/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in here apart from the .gitignore file 2 | * 3 | !.gitignore -------------------------------------------------------------------------------- /example-write/bin/data/sample.abc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perfume-dev/ofxAlembic/b29dbd5e5ccc823f585599d6a41734c111bbf88b/example-write/bin/data/sample.abc -------------------------------------------------------------------------------- /example-write/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "testApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | int main() 5 | { 6 | ofSetupOpenGL(1024, 768, OF_WINDOW); // <-------- setup the GL context 7 | ofRunApp(new testApp()); // start the app 8 | } 9 | -------------------------------------------------------------------------------- /example-write/src/testApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | class testApp : public ofBaseApp 6 | { 7 | public: 8 | 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | void exit(); 13 | 14 | void keyPressed(int key); 15 | void keyReleased(int key); 16 | void mouseMoved(int x, int y); 17 | void mouseDragged(int x, int y, int button); 18 | void mousePressed(int x, int y, int button); 19 | void mouseReleased(int x, int y, int button); 20 | void windowResized(int w, int h); 21 | void dragEvent(ofDragInfo dragInfo); 22 | void gotMessage(ofMessage msg); 23 | 24 | }; -------------------------------------------------------------------------------- /libs/HDF5-COPYING.txt: -------------------------------------------------------------------------------- 1 | 2 | Copyright Notice and License Terms for 3 | HDF5 (Hierarchical Data Format 5) Software Library and Utilities 4 | ----------------------------------------------------------------------------- 5 | 6 | HDF5 (Hierarchical Data Format 5) Software Library and Utilities 7 | Copyright 2006-2013 by The HDF Group. 8 | 9 | NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities 10 | Copyright 1998-2006 by the Board of Trustees of the University of Illinois. 11 | 12 | All rights reserved. 13 | 14 | Redistribution and use in source and binary forms, with or without 15 | modification, are permitted for any purpose (including commercial purposes) 16 | provided that the following conditions are met: 17 | 18 | 1. Redistributions of source code must retain the above copyright notice, 19 | this list of conditions, and the following disclaimer. 20 | 21 | 2. Redistributions in binary form must reproduce the above copyright notice, 22 | this list of conditions, and the following disclaimer in the documentation 23 | and/or materials provided with the distribution. 24 | 25 | 3. In addition, redistributions of modified forms of the source or binary 26 | code must carry prominent notices stating that the original code was 27 | changed and the date of the change. 28 | 29 | 4. All publications or advertising materials mentioning features or use of 30 | this software are asked, but not required, to acknowledge that it was 31 | developed by The HDF Group and by the National Center for Supercomputing 32 | Applications at the University of Illinois at Urbana-Champaign and 33 | credit the contributors. 34 | 35 | 5. Neither the name of The HDF Group, the name of the University, nor the 36 | name of any Contributor may be used to endorse or promote products derived 37 | from this software without specific prior written permission from 38 | The HDF Group, the University, or the Contributor, respectively. 39 | 40 | DISCLAIMER: 41 | THIS SOFTWARE IS PROVIDED BY THE HDF GROUP AND THE CONTRIBUTORS 42 | "AS IS" WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. In no 43 | event shall The HDF Group or the Contributors be liable for any damages 44 | suffered by the users arising out of the use of this software, even if 45 | advised of the possibility of such damage. 46 | 47 | ----------------------------------------------------------------------------- 48 | ----------------------------------------------------------------------------- 49 | 50 | Contributors: National Center for Supercomputing Applications (NCSA) at 51 | the University of Illinois, Fortner Software, Unidata Program Center (netCDF), 52 | The Independent JPEG Group (JPEG), Jean-loup Gailly and Mark Adler (gzip), 53 | and Digital Equipment Corporation (DEC). 54 | 55 | ----------------------------------------------------------------------------- 56 | 57 | Portions of HDF5 were developed with support from the Lawrence Berkeley 58 | National Laboratory (LBNL) and the United States Department of Energy 59 | under Prime Contract No. DE-AC02-05CH11231. 60 | 61 | ----------------------------------------------------------------------------- 62 | 63 | Portions of HDF5 were developed with support from the University of 64 | California, Lawrence Livermore National Laboratory (UC LLNL). 65 | The following statement applies to those portions of the product and must 66 | be retained in any redistribution of source code, binaries, documentation, 67 | and/or accompanying materials: 68 | 69 | This work was partially produced at the University of California, 70 | Lawrence Livermore National Laboratory (UC LLNL) under contract 71 | no. W-7405-ENG-48 (Contract 48) between the U.S. Department of Energy 72 | (DOE) and The Regents of the University of California (University) 73 | for the operation of UC LLNL. 74 | 75 | DISCLAIMER: 76 | This work was prepared as an account of work sponsored by an agency of 77 | the United States Government. Neither the United States Government nor 78 | the University of California nor any of their employees, makes any 79 | warranty, express or implied, or assumes any liability or responsibility 80 | for the accuracy, completeness, or usefulness of any information, 81 | apparatus, product, or process disclosed, or represents that its use 82 | would not infringe privately- owned rights. Reference herein to any 83 | specific commercial products, process, or service by trade name, 84 | trademark, manufacturer, or otherwise, does not necessarily constitute 85 | or imply its endorsement, recommendation, or favoring by the United 86 | States Government or the University of California. The views and 87 | opinions of authors expressed herein do not necessarily state or reflect 88 | those of the United States Government or the University of California, 89 | and shall not be used for advertising or product endorsement purposes. 90 | ----------------------------------------------------------------------------- 91 | 92 | 93 | -------------------------------------------------------------------------------- /libs/OpenEXR-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006, Industrial Light & Magic, a division of Lucasfilm 2 | Entertainment Company Ltd. Portions contributed and copyright held by 3 | others as indicated. All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are 7 | met: 8 | 9 | * Redistributions of source code must retain the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above 14 | copyright notice, this list of conditions and the following 15 | disclaimer in the documentation and/or other materials provided with 16 | the distribution. 17 | 18 | * Neither the name of Industrial Light & Magic nor the names of 19 | any other contributors to this software may be used to endorse or 20 | promote products derived from this software without specific prior 21 | written permission. 22 | 23 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 24 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 25 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 26 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 28 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 29 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 30 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 31 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 32 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 33 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/Abc/All.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2013, 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_All_h_ 38 | #define _Alembic_Abc_All_h_ 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | #include 55 | #include 56 | #include 57 | #include 58 | 59 | #include 60 | #include 61 | #include 62 | #include 63 | #include 64 | #include 65 | #include 66 | #include 67 | #include 68 | #include 69 | 70 | #include 71 | #include 72 | 73 | #include 74 | #include 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/Abc/Base.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2011, 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_Base_h_ 38 | #define _Alembic_Abc_Base_h_ 39 | 40 | #include 41 | #include 42 | 43 | namespace Alembic { 44 | namespace Abc { 45 | namespace ALEMBIC_VERSION_NS { 46 | 47 | //-***************************************************************************** 48 | class Base 49 | { 50 | protected: 51 | Base() {} 52 | 53 | explicit Base( ErrorHandler::Policy iPolicy ) 54 | : m_errorHandler( iPolicy ) {} 55 | 56 | Base( const Base &iCopy ) 57 | : m_errorHandler( iCopy.m_errorHandler ) {} 58 | 59 | Base& operator=( const Base &iCopy ) 60 | { 61 | m_errorHandler = iCopy.m_errorHandler; 62 | return *this; 63 | } 64 | 65 | bool valid() const 66 | { 67 | return m_errorHandler.valid(); 68 | } 69 | 70 | void reset() 71 | { 72 | m_errorHandler.clear(); 73 | } 74 | 75 | public: 76 | ErrorHandler &getErrorHandler() const 77 | { 78 | return m_errorHandler; 79 | } 80 | 81 | ErrorHandler::Policy getErrorHandlerPolicy() const 82 | { 83 | return m_errorHandler.getPolicy(); 84 | } 85 | 86 | private: 87 | mutable ErrorHandler m_errorHandler; 88 | }; 89 | 90 | //-***************************************************************************** 91 | inline ErrorHandler::Policy GetErrorHandlerPolicy( const Base& iClass ) 92 | { 93 | return iClass.getErrorHandlerPolicy(); 94 | } 95 | 96 | 97 | } // End namespace ALEMBIC_VERSION_NS 98 | 99 | using namespace ALEMBIC_VERSION_NS; 100 | 101 | } // End namespace Abc 102 | } // End namespace Alembic 103 | 104 | #endif 105 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/Abc/ISampleSelector.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2011, 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_ISampleSelector_h_ 38 | #define _Alembic_Abc_ISampleSelector_h_ 39 | 40 | #include 41 | #include 42 | 43 | namespace Alembic { 44 | namespace Abc { 45 | namespace ALEMBIC_VERSION_NS { 46 | 47 | //-***************************************************************************** 48 | class ALEMBIC_EXPORT ISampleSelector 49 | { 50 | public: 51 | enum TimeIndexType 52 | { 53 | kFloorIndex, 54 | kCeilIndex, 55 | kNearIndex 56 | }; 57 | 58 | ISampleSelector() 59 | : m_requestedIndex( 0 ), 60 | m_requestedTime( 0.0 ), 61 | m_requestedTimeIndexType( kNearIndex ) {} 62 | 63 | ISampleSelector( index_t iReqIdx ) 64 | : m_requestedIndex( iReqIdx ), 65 | m_requestedTime( 0.0 ), 66 | m_requestedTimeIndexType( kNearIndex ) {} 67 | 68 | explicit ISampleSelector( chrono_t iReqTime, 69 | TimeIndexType iReqIdxType = kNearIndex ) 70 | : m_requestedIndex( -1 ), 71 | m_requestedTime( iReqTime ), 72 | m_requestedTimeIndexType( iReqIdxType ) {} 73 | 74 | index_t getRequestedIndex() const { return m_requestedIndex; } 75 | chrono_t getRequestedTime() const { return m_requestedTime; } 76 | TimeIndexType getRequestedTimeIndexType() const 77 | { return m_requestedTimeIndexType; } 78 | 79 | index_t getIndex( const AbcA::TimeSamplingPtr & iTsmp, index_t 80 | iNumSamples ) const; 81 | 82 | private: 83 | index_t m_requestedIndex; 84 | chrono_t m_requestedTime; 85 | TimeIndexType m_requestedTimeIndexType; 86 | }; 87 | 88 | } // End namespace ALEMBIC_VERSION_NS 89 | 90 | using namespace ALEMBIC_VERSION_NS; 91 | 92 | } // End namespace Abc 93 | } // End namespace Alembic 94 | 95 | #endif 96 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/Abc/Reference.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2013, 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_Reference_h_ 38 | #define _Alembic_Abc_Reference_h_ 39 | 40 | #include 41 | #include 42 | 43 | namespace Alembic { 44 | namespace Abc { 45 | namespace ALEMBIC_VERSION_NS { 46 | 47 | ALEMBIC_EXPORT void SetReference( AbcA::MetaData &ioMetaData ); 48 | ALEMBIC_EXPORT bool isReference( const AbcA::PropertyHeader &iHeader ); 49 | 50 | } // End namespace ALEMBIC_VERSION_NS 51 | 52 | using namespace ALEMBIC_VERSION_NS; 53 | 54 | } // End namespace Abc 55 | } // End namespace Alembic 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/Abc/SourceName.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2013, 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_SourceName_h_ 38 | #define _Alembic_Abc_SourceName_h_ 39 | 40 | #include 41 | #include 42 | 43 | namespace Alembic { 44 | namespace Abc { 45 | namespace ALEMBIC_VERSION_NS { 46 | 47 | ALEMBIC_EXPORT void SetSourceName( AbcA::MetaData &ioMetaData, const std::string & iName ); 48 | ALEMBIC_EXPORT std::string GetSourceName( const AbcA::MetaData &iMetaData ); 49 | 50 | } // End namespace ALEMBIC_VERSION_NS 51 | 52 | using namespace ALEMBIC_VERSION_NS; 53 | 54 | } // End namespace Abc 55 | } // End namespace Alembic 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcCollection/All.h: -------------------------------------------------------------------------------- 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_AbcCollection_All_h_ 38 | #define _Alembic_AbcCollection_All_h_ 39 | 40 | #include 41 | #include 42 | #include 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcCollection/SchemaInfoDeclarations.h: -------------------------------------------------------------------------------- 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_AbcCollection_SchemaInfoDeclarations_h_ 38 | #define _Alembic_AbcCollection_SchemaInfoDeclarations_h_ 39 | 40 | #include 41 | 42 | namespace Alembic { 43 | namespace AbcCollection { 44 | namespace ALEMBIC_VERSION_NS { 45 | 46 | ALEMBIC_ABC_DECLARE_SCHEMA_INFO( "AbcCollection_Collections_v1", 47 | "", 48 | ".collection", 49 | CollectionsSchemaInfo ); 50 | 51 | } 52 | 53 | using namespace ALEMBIC_VERSION_NS; 54 | 55 | } 56 | } 57 | 58 | #endif 59 | 60 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcCoreAbstract/All.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2011, 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_AbcCoreAbstract_All_h_ 38 | #define _Alembic_AbcCoreAbstract_All_h_ 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | #include 55 | #include 56 | #include 57 | #include 58 | #include 59 | #include 60 | #include 61 | #include 62 | #include 63 | #include 64 | 65 | #endif 66 | 67 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcCoreAbstract/ArrayPropertyWriter.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2011, 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_AbcCoreAbstract_ArrayPropertyWriter_h_ 38 | #define _Alembic_AbcCoreAbstract_ArrayPropertyWriter_h_ 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | namespace Alembic { 46 | namespace AbcCoreAbstract { 47 | namespace ALEMBIC_VERSION_NS { 48 | 49 | //-***************************************************************************** 50 | //! An Array Property is a Rank N (usually 1-3) property which has a 51 | //! multidimensional array of identically typed values for each 52 | //! sample. This is distinguished from a Simple Property, which has a 53 | //! single element per sample, and requires less sophisticated 54 | //! resource management. 55 | class ALEMBIC_EXPORT ArrayPropertyWriter 56 | : public BasePropertyWriter 57 | { 58 | public: 59 | //! Virtual destructor 60 | //! ... 61 | virtual ~ArrayPropertyWriter(); 62 | 63 | //-************************************************************************* 64 | // NEW FUNCTIONS 65 | //-************************************************************************* 66 | 67 | //! Sets a sample 68 | //! 69 | //! This takes a read-only ArraySample by const reference. The class 70 | //! will make an internal copy (or the functional equivalent of ), 71 | //! and will not use that memory block outside the scope of this 72 | //! function call. 73 | //! 74 | //! Arrays of std::string and std::wstring are assumed to be 75 | //! treated just like regular data elements. 76 | virtual void setSample( const ArraySample & iSamp ) = 0; 77 | 78 | //! Set the next sample to equal the previous sample. 79 | //! An important feature! 80 | virtual void setFromPreviousSample() = 0; 81 | 82 | //! Return the number of samples that have been written so far. 83 | //! This changes as samples are written. 84 | virtual size_t getNumSamples() = 0; 85 | 86 | //! Changes the TimeSampling used by this property. 87 | //! If the TimeSampling is changed to Acyclic and the number of samples 88 | //! currently set is more than the number of times provided in the Acyclic 89 | //! TimeSampling, an exception will be thrown. 90 | virtual void setTimeSamplingIndex( uint32_t iIndex ) = 0; 91 | }; 92 | 93 | } // End namespace ALEMBIC_VERSION_NS 94 | 95 | using namespace ALEMBIC_VERSION_NS; 96 | 97 | } // End namespace AbcCoreAbstract 98 | } // End namespace Alembic 99 | 100 | #endif 101 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcCoreAbstract/ForwardDeclarations.h: -------------------------------------------------------------------------------- 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_AbcCoreAbstract_ForwardDeclarations_h_ 38 | #define _Alembic_AbcCoreAbstract_ForwardDeclarations_h_ 39 | 40 | #include 41 | #include 42 | 43 | namespace Alembic { 44 | namespace AbcCoreAbstract { 45 | namespace ALEMBIC_VERSION_NS { 46 | 47 | //-***************************************************************************** 48 | //! Helper types forward declared. 49 | //! ... 50 | class TimeSampling; 51 | class ArraySample; 52 | 53 | //-***************************************************************************** 54 | //! Writer types forward declared. 55 | //! ... 56 | class ArchiveWriter; 57 | class ObjectWriter; 58 | class CompoundPropertyWriter; 59 | class ArrayPropertyWriter; 60 | class ScalarPropertyWriter; 61 | class BasePropertyWriter; 62 | 63 | //-***************************************************************************** 64 | //! Reader types forward declared. 65 | //! ... 66 | class ArchiveReader; 67 | class ObjectReader; 68 | class CompoundPropertyReader; 69 | class ArrayPropertyReader; 70 | class ScalarPropertyReader; 71 | class BasePropertyReader; 72 | 73 | //-***************************************************************************** 74 | //! Smart Ptrs to Helper types. 75 | //! The Ptr suffix in Alembic _ALWAYS_ refers to a shared_ptr of whatever 76 | //! class name precedes the Ptr suffix. 77 | typedef Alembic::Util::shared_ptr ArraySamplePtr; 78 | 79 | //-***************************************************************************** 80 | //! Smart Ptrs to Writers. 81 | typedef Alembic::Util::shared_ptr ArchiveWriterPtr; 82 | typedef Alembic::Util::shared_ptr ObjectWriterPtr; 83 | typedef Alembic::Util::shared_ptr CompoundPropertyWriterPtr; 84 | typedef Alembic::Util::shared_ptr ArrayPropertyWriterPtr; 85 | typedef Alembic::Util::shared_ptr ScalarPropertyWriterPtr; 86 | typedef Alembic::Util::shared_ptr BasePropertyWriterPtr; 87 | 88 | //-***************************************************************************** 89 | //! Smart Ptrs to Readers. 90 | typedef Alembic::Util::shared_ptr ArchiveReaderPtr; 91 | typedef Alembic::Util::shared_ptr ObjectReaderPtr; 92 | typedef Alembic::Util::shared_ptr CompoundPropertyReaderPtr; 93 | typedef Alembic::Util::shared_ptr ArrayPropertyReaderPtr; 94 | typedef Alembic::Util::shared_ptr ScalarPropertyReaderPtr; 95 | typedef Alembic::Util::shared_ptr BasePropertyReaderPtr; 96 | 97 | } // End namespace ALEMBIC_VERSION_NS 98 | 99 | using namespace ALEMBIC_VERSION_NS; 100 | 101 | } // End namespace AbcCoreAbstract 102 | } // End namespace Alembic 103 | 104 | #endif 105 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcCoreAbstract/Foundation.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2014, 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_AbcCoreAbstract_Foundation_h_ 38 | #define _Alembic_AbcCoreAbstract_Foundation_h_ 39 | 40 | #include 41 | #include 42 | 43 | #include 44 | #include 45 | #include 46 | 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | 53 | namespace Alembic { 54 | namespace AbcCoreAbstract { 55 | namespace ALEMBIC_VERSION_NS { 56 | 57 | // Just pull the whole Util namespace in. This is safe. 58 | using namespace ::Alembic::Util; 59 | 60 | //! Index type 61 | //! Just being pedantic. 62 | typedef int64_t index_t; 63 | 64 | //! Returned by (to match index_t) 65 | #define INDEX_UNKNOWN 0x7fffffffffffffffLL 66 | 67 | //! Chrono type. 68 | //! This is used whenever time values are needed in the library. They are 69 | //! generally assumed to be seconds, but this does not need to be explicitly 70 | //! enforced by the API. 71 | typedef float64_t chrono_t; 72 | // Util/PlainOldDataType.h defines the enum PlainOldDataType 73 | #define kChrono_TPOD kFloat64POD 74 | 75 | //-***************************************************************************** 76 | // Alembic version information: 77 | // 78 | // Version information is expressed in these locations: 79 | // - CMakeLists.txt as PROJECT_VERSION 80 | // . Names used in messages and for install directory 81 | // - lib/Alembic/Util/Config.h as ALEMBIC_LIBRARY_VERSION 82 | // . An easy to compare numeric value. 83 | // - lib/Alembic/AbcCoreAbstract/Foundation.cpp 84 | // . Implementation of handy functions for reporting version info. 85 | 86 | //! Helper function which returns the version and date built in a string 87 | //! e.g. "Alembic 1.0.0 (built Jul 6 2011)" 88 | ALEMBIC_EXPORT std::string GetLibraryVersion(); 89 | //! Returns just the version number, as a string, of the Alembic library. 90 | //! e.g. "1.0.0" 91 | ALEMBIC_EXPORT std::string GetLibraryVersionShort(); 92 | 93 | //-***************************************************************************** 94 | //! Exception types borrowed from Alembic::Util. We should probably eventually 95 | //! create specific exception types. 96 | #define ABCA_THROW( TEXT ) ABC_THROW( TEXT ) 97 | 98 | //-***************************************************************************** 99 | #define ABCA_ASSERT( COND, TEXT ) \ 100 | do \ 101 | { \ 102 | if ( !( COND ) ) \ 103 | { \ 104 | ABCA_THROW( TEXT ); \ 105 | } \ 106 | } \ 107 | while( 0 ) 108 | 109 | 110 | } // End namespace ALEMBIC_VERSION_NS 111 | 112 | using namespace ALEMBIC_VERSION_NS; 113 | 114 | } // End namespace AbcCoreAbstract 115 | } // End namespace Alembic 116 | 117 | #endif 118 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcCoreAbstract/ObjectHeader.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2011, 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_AbcCoreAbstract_ObjectHeader_h_ 38 | #define _Alembic_AbcCoreAbstract_ObjectHeader_h_ 39 | 40 | #include 41 | #include 42 | 43 | namespace Alembic { 44 | namespace AbcCoreAbstract { 45 | namespace ALEMBIC_VERSION_NS { 46 | 47 | //-***************************************************************************** 48 | //! The ObjectHeader is a collection of MetaData which helps define a 49 | //! Property. It also acts as a key for getting an instance of a property 50 | //! from a CompoundProperty. 51 | class ObjectHeader 52 | { 53 | public: 54 | //! Default constructor creates an unspecified object header. 55 | //! ... 56 | ObjectHeader() 57 | : m_name() 58 | , m_fullName() 59 | , m_metaData() {} 60 | 61 | //! Explicit constructor, ignoring full name. 62 | //! ... 63 | ObjectHeader( const std::string &iName, 64 | const MetaData &iMetaData ) 65 | : m_name( iName ) 66 | , m_fullName( "" ) 67 | , m_metaData( iMetaData ) {} 68 | 69 | //! Explicit constructor with full name. 70 | //! ... 71 | ObjectHeader( const std::string &iName, 72 | const std::string &iFullName, 73 | const MetaData &iMetaData ) 74 | : m_name( iName ) 75 | , m_fullName( iFullName ) 76 | , m_metaData( iMetaData ) {} 77 | 78 | //! Default Copy constructor 79 | //! Default Assignment operator 80 | 81 | //! All objects have a name, which is unique amongst its siblings. 82 | //! ... 83 | const std::string &getName() const { return m_name; } 84 | void setName ( const std::string &iName ) { m_name = iName; } 85 | 86 | //! All objects have a full name, which is unique in the whole file. 87 | //! ... 88 | const std::string &getFullName() const { return m_fullName; } 89 | void setFullName( const std::string &iFullName ) { m_fullName = iFullName; } 90 | 91 | //! All objects have metadata. 92 | //! It is manipulated directly. 93 | const MetaData &getMetaData() const { return m_metaData; } 94 | MetaData &getMetaData() { return m_metaData; } 95 | 96 | private: 97 | std::string m_name; 98 | std::string m_fullName; 99 | MetaData m_metaData; 100 | }; 101 | 102 | } // End namespace ALEMBIC_VERSION_NS 103 | 104 | using namespace ALEMBIC_VERSION_NS; 105 | 106 | } // End namespace AbcCoreAbstract 107 | } // End namespace Alembic 108 | 109 | #endif 110 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcCoreAbstract/ScalarPropertyWriter.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2011, 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_AbcCoreAbstract_ScalarPropertyWriter_h_ 38 | #define _Alembic_AbcCoreAbstract_ScalarPropertyWriter_h_ 39 | 40 | #include 41 | #include 42 | #include 43 | 44 | namespace Alembic { 45 | namespace AbcCoreAbstract { 46 | namespace ALEMBIC_VERSION_NS { 47 | 48 | //-***************************************************************************** 49 | //! A Scalar Property is a Rank 0 property which has a single value for each 50 | //! sample. This is distinguished from an Array Property, which has a 51 | //! variable number of elements per sample, and requires more sophisticated 52 | //! resource management. 53 | class ALEMBIC_EXPORT ScalarPropertyWriter 54 | : public BasePropertyWriter 55 | { 56 | public: 57 | //! Virtual destructor 58 | //! ... 59 | virtual ~ScalarPropertyWriter(); 60 | 61 | //-************************************************************************* 62 | // NEW FUNCTIONS 63 | //-************************************************************************* 64 | 65 | //! Sets a sample. 66 | //! 67 | //! For specifying the sample, this takes a void pointer which 68 | //! points to the beginning of the memory corresponding to the scalar. 69 | //! 70 | //! For String and Wstring, the const void *iSamp is assumed to be 71 | //! static_castable to const std::string * and const std::wstring *, 72 | //! respectively. 73 | //! 74 | //! The data passed into this function will be used or copied locally 75 | //! by this function, and need not live (in the calling context) 76 | //! outside the return scope of this function call. 77 | virtual void setSample( const void *iSamp ) = 0; 78 | 79 | //! Simply copies the previously written sample's value. 80 | //! This is an important feature. 81 | virtual void setFromPreviousSample() = 0; 82 | 83 | //! Return the number of samples that have been written so far. 84 | //! This changes as samples are written. 85 | virtual size_t getNumSamples() = 0; 86 | 87 | //! Changes the TimeSampling used by this property. 88 | //! If the TimeSampling is changed to Acyclic and the number of samples 89 | //! currently set is more than the number of times provided in the Acyclic 90 | //! TimeSampling, an exception will be thrown. 91 | virtual void setTimeSamplingIndex( uint32_t iIndex ) = 0; 92 | }; 93 | 94 | } // End namespace ALEMBIC_VERSION_NS 95 | 96 | using namespace ALEMBIC_VERSION_NS; 97 | 98 | } // End namespace AbcCoreAbstract 99 | } // End namespace Alembic 100 | 101 | #endif 102 | 103 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcCoreFactory/All.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2013-2015, 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_AbcCoreFactory_All_h_ 38 | #define _Alembic_AbcCoreFactory_All_h_ 39 | 40 | #include 41 | #include 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcCoreOgawa/All.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2013, 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_AbcCoreOgawa_All_h_ 38 | #define _Alembic_AbcCoreOgawa_All_h_ 39 | 40 | #include 41 | #include 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcCoreOgawa/ReadWrite.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2013-2015, 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_AbcCoreOgawa_ReadWrite_h_ 38 | #define _Alembic_AbcCoreOgawa_ReadWrite_h_ 39 | 40 | #include 41 | #include 42 | 43 | namespace Alembic { 44 | namespace AbcCoreOgawa { 45 | namespace ALEMBIC_VERSION_NS { 46 | 47 | //-***************************************************************************** 48 | //! Will return a shared pointer to the archive writer 49 | class ALEMBIC_EXPORT WriteArchive 50 | { 51 | public: 52 | WriteArchive(); 53 | 54 | ::Alembic::AbcCoreAbstract::ArchiveWriterPtr 55 | operator()( const std::string &iFileName, 56 | const ::Alembic::AbcCoreAbstract::MetaData &iMetaData ) const; 57 | 58 | ::Alembic::AbcCoreAbstract::ArchiveWriterPtr 59 | operator()( std::ostream * iStream, 60 | const ::Alembic::AbcCoreAbstract::MetaData &iMetaData ) const; 61 | }; 62 | 63 | //-***************************************************************************** 64 | //! Will return a shared pointer to the archive reader 65 | //! This version creates a cache associated with the archive. 66 | class ALEMBIC_EXPORT ReadArchive 67 | { 68 | public: 69 | ReadArchive(); 70 | 71 | // Open the file iNumStreams times and manage them internally 72 | ReadArchive( size_t iNumStreams ); 73 | 74 | // Read from the provided streams, we do not own these, expect them 75 | // to remain open and all have the same data in them, and do not try to 76 | // delete them 77 | ReadArchive( const std::vector< std::istream * > & iStreams ); 78 | 79 | // open the file 80 | ::Alembic::AbcCoreAbstract::ArchiveReaderPtr 81 | operator()( const std::string &iFileName ) const; 82 | 83 | // The given cache is ignored. 84 | ::Alembic::AbcCoreAbstract::ArchiveReaderPtr 85 | operator()( const std::string &iFileName, 86 | ::Alembic::AbcCoreAbstract::ReadArraySampleCachePtr iCache 87 | ) const; 88 | 89 | private: 90 | size_t m_numStreams; 91 | std::vector< std::istream * > m_streams; 92 | }; 93 | 94 | } // End namespace ALEMBIC_VERSION_NS 95 | 96 | using namespace ALEMBIC_VERSION_NS; 97 | 98 | } // End namespace AbcCoreOgawa 99 | } // End namespace Alembic 100 | 101 | #endif 102 | 103 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcGeom/All.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2013, 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_All_h_ 38 | #define _Alembic_AbcGeom_All_h_ 39 | 40 | #include 41 | 42 | #include 43 | 44 | #include 45 | #include 46 | #include 47 | #include 48 | 49 | #include 50 | #include 51 | 52 | #include 53 | #include 54 | 55 | #include 56 | #include 57 | 58 | #include 59 | #include 60 | #include 61 | #include 62 | 63 | #include 64 | #include 65 | 66 | #include 67 | #include 68 | 69 | #include 70 | #include 71 | 72 | #include 73 | #include 74 | 75 | #include 76 | #include 77 | 78 | #include 79 | #include 80 | #include 81 | #include 82 | 83 | #include 84 | 85 | #endif 86 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcGeom/ArchiveBounds.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2011, 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_ArchiveBounds_h_ 38 | #define _Alembic_AbcGeom_ArchiveBounds_h_ 39 | 40 | #include 41 | #include 42 | 43 | namespace Alembic { 44 | namespace AbcGeom { 45 | namespace ALEMBIC_VERSION_NS { 46 | 47 | //! Helper function that gets the bounds property off of the top object if 48 | //! it exists, if it doesn't exist an invalid IBox3dProperty is returned. 49 | //! Arguments can specify error handling policy or protocol matching policy. 50 | ALEMBIC_EXPORT Abc::IBox3dProperty 51 | GetIArchiveBounds( IArchive & iArchive, 52 | const Argument &iArg0 = Argument(), 53 | const Argument &iArg1 = Argument() ); 54 | 55 | //! Helper function that creates the bounds property off of the top object 56 | //! Arguments can specify metadata, timesampling, and error handling. 57 | ALEMBIC_EXPORT Abc::OBox3dProperty 58 | CreateOArchiveBounds( OArchive & iArchive, 59 | const Argument &iArg0 = Argument(), 60 | const Argument &iArg1 = Argument(), 61 | const Argument &iArg2 = Argument() ); 62 | 63 | } // End namespace ALEMBIC_VERSION_NS 64 | 65 | using namespace ALEMBIC_VERSION_NS; 66 | 67 | } // End namespace AbcGeom 68 | } // End namespace Alembic 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcGeom/Basis.h: -------------------------------------------------------------------------------- 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_Basis_h_ 38 | #define _Alembic_AbcGeom_Basis_h_ 39 | 40 | #include 41 | #include 42 | #include 43 | 44 | namespace Alembic { 45 | namespace AbcGeom { 46 | namespace ALEMBIC_VERSION_NS { 47 | 48 | enum BasisType { 49 | kNoBasis = 0, 50 | kBezierBasis = 1, 51 | kBsplineBasis = 2, 52 | kCatmullromBasis = 3, 53 | kHermiteBasis = 4, 54 | kPowerBasis = 5 55 | }; 56 | 57 | ALEMBIC_EXPORT std::string 58 | GetBasisNameFromBasisType( const BasisType basis ); 59 | 60 | ALEMBIC_EXPORT int 61 | GetStepFromBasisType(const BasisType basis ); 62 | 63 | } // End namespace ALEMBIC_VERSION_NS 64 | 65 | using namespace ALEMBIC_VERSION_NS; 66 | 67 | } // End namespace AbcGeom 68 | } // End namespace Alembic 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcGeom/CurveType.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2013, 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_CurveType_h_ 38 | #define _Alembic_AbcGeom_CurveType_h_ 39 | 40 | #include 41 | 42 | namespace Alembic { 43 | namespace AbcGeom { 44 | namespace ALEMBIC_VERSION_NS { 45 | 46 | enum CurvePeriodicity { 47 | kNonPeriodic = 0, 48 | kPeriodic = 1 49 | }; 50 | 51 | enum CurveType { 52 | kCubic = 0, 53 | kLinear = 1, 54 | kVariableOrder = 2 55 | }; 56 | 57 | } // End namespace ALEMBIC_VERSION_NS 58 | 59 | using namespace ALEMBIC_VERSION_NS; 60 | 61 | } // End namespace AbcGeom 62 | } // End namespace Alembic 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcGeom/FaceSetExclusivity.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2011, 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_Exclusivity_h_ 38 | #define _Alembic_AbcGeom_Exclusivity_h_ 39 | 40 | namespace Alembic { 41 | namespace AbcGeom { 42 | namespace ALEMBIC_VERSION_NS { 43 | 44 | //! \brief Hint to indicate face membership is mutally exclusive. 45 | //! Some structures that group faces only allow a face to belong 46 | //! in one FaceSet, while other times a face is allowed to belong 47 | //! to any number of FaceSets. By default FaceSets aren't exclusive. 48 | enum FaceSetExclusivity 49 | { 50 | kFaceSetNonExclusive, 51 | kFaceSetExclusive, 52 | }; // end OFaceSetSchema::FaceExlusivity 53 | 54 | 55 | } // End namespace ALEMBIC_VERSION_NS 56 | 57 | using namespace ALEMBIC_VERSION_NS; 58 | 59 | } // End namespace AbcGeom 60 | } // End namespace Alembic 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcGeom/FilmBackXformOp.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2011, 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_FilmBackXformOp_h_ 38 | #define _Alembic_AbcGeom_FilmBackXformOp_h_ 39 | 40 | #include 41 | #include 42 | 43 | namespace Alembic { 44 | namespace AbcGeom { 45 | namespace ALEMBIC_VERSION_NS { 46 | 47 | //! \brief FilmBack Xform Operation 48 | //! This class holds the data about a particular transform operation, but does 49 | //! not hold the actual data to calculate a 3x3 matrix. It holds the type of 50 | //! operation (Translate, Scale, Matrix), a hint about the type which 51 | //! can be interpreted by packages like Maya, and what particular parts of the 52 | //! operations can change over time. 53 | class ALEMBIC_EXPORT FilmBackXformOp 54 | { 55 | public: 56 | FilmBackXformOp(); 57 | 58 | FilmBackXformOp( const FilmBackXformOperationType iType, 59 | const std::string & iHint ); 60 | 61 | //! Get the type of transform operation. (Translate, Scale, Matrix) 62 | FilmBackXformOperationType getType() const; 63 | 64 | //! Get the hint to help disambiguate certain options that may have the 65 | //! same type. 66 | std::string getHint() const; 67 | 68 | //! Get the type and hint, where the first character is the type 69 | //! (t for translate, s for scale, m for matrix) and the rest of the 70 | //! returned string is the optional hint value. 71 | std::string getTypeAndHint() const; 72 | 73 | //! Get the number of components that this operation has based on the type. 74 | //! Translate and Scale have 2, and Matrix has 9. 75 | std::size_t getNumChannels() const; 76 | 77 | //! Get a single channel, 0 will be returned if iIndex is greater than 78 | //! numChannels - 1 79 | double getChannelValue( std::size_t iIndex ) const; 80 | 81 | //! Set a single channel; nothing will be set if iIndex is greater than 82 | //! numChannels - 1. 83 | void setChannelValue( std::size_t iIndex, double iVal ); 84 | 85 | void setTranslate( const Abc::V2d &iTrans ); 86 | void setScale( const Abc::V2d &iScale ); 87 | void setMatrix( const Abc::M33d &iMatrix ); 88 | 89 | // synthetic getters return by value 90 | Abc::V2d getTranslate() const; 91 | Abc::V2d getScale() const; 92 | Abc::M33d getMatrix() const; 93 | 94 | bool isTranslateOp() const; 95 | 96 | bool isScaleOp() const; 97 | 98 | bool isMatrixOp() const; 99 | 100 | private: 101 | 102 | // friend to have access to the private constructor 103 | friend class ICameraSchema; 104 | FilmBackXformOp( const std::string & iTypeAndHint ); 105 | 106 | FilmBackXformOperationType m_type; 107 | std::string m_hint; 108 | 109 | std::vector m_channels; 110 | 111 | }; 112 | 113 | } // End namespace ALEMBIC_VERSION_NS 114 | 115 | using namespace ALEMBIC_VERSION_NS; 116 | 117 | } // End namespace AbcGeom 118 | } // End namespace Alembic 119 | 120 | #endif 121 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcMaterial/All.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2015, 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_AbcMaterial_All_h_ 38 | #define _Alembic_AbcMaterial_All_h_ 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/AbcMaterial/SchemaInfoDeclarations.h: -------------------------------------------------------------------------------- 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_AbcMaterial_SchemaInfoDeclarations_h_ 38 | #define _Alembic_AbcMaterial_SchemaInfoDeclarations_h_ 39 | 40 | #include 41 | 42 | namespace Alembic { 43 | namespace AbcMaterial { 44 | namespace ALEMBIC_VERSION_NS { 45 | 46 | ALEMBIC_ABC_DECLARE_SCHEMA_INFO( "AbcMaterial_Material_v1", 47 | "", 48 | ".material", 49 | MaterialSchemaInfo ); 50 | 51 | } 52 | 53 | using namespace ALEMBIC_VERSION_NS; 54 | 55 | } 56 | } 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/Util/All.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2013, 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 Industrial Light & Magic nor the names of 19 | // its contributors may be used to endorse or promote products derived 20 | // from this software without specific prior written permission. 21 | // 22 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | // 34 | //-***************************************************************************** 35 | 36 | #ifndef _Alembic_Util_All_h_ 37 | #define _Alembic_Util_All_h_ 38 | 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/Util/Config.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2015, 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_Util_Config_h_ 38 | #define _Alembic_Util_Config_h_ 39 | 40 | // Reserve 2 digits for patch number, 2 digits for the minor number and the rest 41 | // for the major. 42 | #define ALEMBIC_LIBRARY_VERSION 1 * 10000 + 6 * 100 + 1 43 | 44 | #define ALEMBIC_WITH_HDF5 45 | 46 | /* #undef ALEMBIC_LIB_USES_BOOST */ 47 | 48 | /* #undef ALEMBIC_LIB_USES_TR1 */ 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/Util/Digest.h: -------------------------------------------------------------------------------- 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_Util_Digest_h_ 38 | #define _Alembic_Util_Digest_h_ 39 | 40 | #include 41 | #include 42 | 43 | namespace Alembic { 44 | namespace Util { 45 | namespace ALEMBIC_VERSION_NS { 46 | 47 | //-************************************************************************* 48 | // Digest class. This is a 128 bit hash key produced by our hashing algorithm. 49 | // It is totally ordered, by way of the totally_ordered operator template. 50 | struct Digest : public Alembic::Util::totally_ordered 51 | { 52 | union 53 | { 54 | uint8_t d[16]; 55 | uint64_t words[2]; 56 | }; 57 | 58 | Digest() { words[0] = words[1] = 0; } 59 | Digest( const Digest © ) 60 | { 61 | words[0] = copy.words[0]; 62 | words[1] = copy.words[1]; 63 | } 64 | 65 | Digest &operator=( const Digest © ) 66 | { 67 | words[0] = copy.words[0]; 68 | words[1] = copy.words[1]; 69 | return *this; 70 | } 71 | 72 | uint8_t& operator[]( size_t i ) { return d[i]; } 73 | uint8_t operator[]( size_t i ) const { return d[i]; } 74 | 75 | void print( std::ostream &ostr ) const 76 | { 77 | for ( int i = 0; i < 16; ++i ) 78 | { 79 | ostr << std::setfill( '0' ) << std::setw( 2 ) << 80 | std::hex << std::noshowbase << ( int ) d[i]; 81 | } 82 | } 83 | 84 | std::string str() const 85 | { 86 | std::stringstream sstr; 87 | print( sstr ); 88 | return sstr.str(); 89 | } 90 | 91 | //-************************************************************************* 92 | // ORDERING AND COMPARISON OPERATORS 93 | //-************************************************************************* 94 | bool operator==( const Digest &iRhs ) const 95 | { 96 | return ( ( words[0] == iRhs.words[0] ) && 97 | ( words[1] == iRhs.words[1] ) ); 98 | } 99 | 100 | bool operator<( const Digest &iRhs ) const 101 | { 102 | return ( words[0] < iRhs.words[0] ? true : 103 | ( words[0] > iRhs.words[0] ? false : 104 | ( words[1] < iRhs.words[1] ) ) ); 105 | } 106 | }; 107 | 108 | //-***************************************************************************** 109 | inline std::ostream &operator<<( std::ostream &ostr, const Digest &a ) 110 | { 111 | a.print( ostr ); 112 | return ostr; 113 | } 114 | 115 | } // End namespace ALEMBIC_VERSION_NS 116 | 117 | using namespace ALEMBIC_VERSION_NS; 118 | 119 | } // End namespace Util 120 | } // End namespace Alembic 121 | 122 | #endif 123 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/Util/Exception.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2011, 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 Industrial Light & Magic nor the names of 19 | // its contributors may be used to endorse or promote products derived 20 | // from this software without specific prior written permission. 21 | // 22 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | // 34 | //-***************************************************************************** 35 | 36 | //-***************************************************************************** 37 | //! \file Alembic/Util/Exception.h 38 | //! \brief Header file containing class definition for class 39 | //! \ref Alembic::Util::Exception 40 | //-***************************************************************************** 41 | 42 | #ifndef _Alembic_Util_Exception_h_ 43 | #define _Alembic_Util_Exception_h_ 44 | 45 | #include 46 | 47 | //! \brief Alembic namespace 48 | //! ... 49 | namespace Alembic { 50 | namespace Util { 51 | namespace ALEMBIC_VERSION_NS { 52 | 53 | //-***************************************************************************** 54 | //! \brief Base class for all exceptions in the Alembic libraries. Derived 55 | //! from both std::exception and std::string, publicly 56 | //! It is mostly commonly thrown using the macros 57 | class Exception : public std::string, public std::exception 58 | { 59 | public: 60 | //! \brief default constructor creates exception with 61 | //! empty message string 62 | Exception() throw() : std::string( "" ), std::exception() {} 63 | 64 | //! \brief Creates exception with an explicit message string. 65 | //! ... 66 | explicit Exception( const std::string &str ) throw() 67 | : std::string( str ), std::exception() {} 68 | 69 | //! \brief Copies exception. 70 | //! ... 71 | Exception( const Exception &exc ) throw() 72 | : std::string( exc.c_str() ), std::exception() {} 73 | 74 | //! \brief Destructor is empty, but virtual to support polymorphic 75 | //! destruction of data in any derived classes. 76 | virtual ~Exception() throw() {} 77 | 78 | //! \brief Inherited from std::exception, this returns a non-modifiable 79 | //! character string describing the nature of the exception 80 | virtual const char *what() const throw() { return c_str(); } 81 | }; 82 | 83 | //-***************************************************************************** 84 | //! \brief convenient macro which may be used with std::iostream syntax 85 | //! \details Same as \ref ALEMBIC_THROW 86 | 87 | #define ABC_THROW( TEXT ) \ 88 | do \ 89 | { \ 90 | std::stringstream sstr; \ 91 | sstr << TEXT; \ 92 | Alembic::Util::Exception exc( sstr.str() ); \ 93 | throw( exc ); \ 94 | } \ 95 | while( 0 ) 96 | 97 | //-***************************************************************************** 98 | //! \brief convenient macro which may be used with std::iostream syntax 99 | //! \details Same as \ref ABC_THROW 100 | #define ALEMBIC_THROW( TEXT ) ABC_THROW( TEXT ) 101 | 102 | } // End namespace ALEMBIC_VERSION_NS 103 | 104 | using namespace ALEMBIC_VERSION_NS; 105 | 106 | } // End namespace Util 107 | } // End namespace Alembic 108 | 109 | #endif 110 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/Util/Export.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2015, 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_Util_Export_h_ 38 | #define _Alembic_Util_Export_h_ 39 | 40 | #if defined(ALEMBIC_DLL) 41 | #if defined(ALEMBIC_EXPORTS) 42 | #define ALEMBIC_EXPORT __declspec(dllexport) 43 | #else 44 | #define ALEMBIC_EXPORT __declspec(dllimport) 45 | #endif 46 | #define ALEMBIC_EXPORT_CONST 47 | #else 48 | #if defined _WIN32 || defined _WIN64 49 | #define ALEMBIC_EXPORT 50 | #else 51 | #define ALEMBIC_EXPORT __attribute__ ((visibility ("default"))) 52 | #endif 53 | #define ALEMBIC_EXPORT_CONST const 54 | #endif 55 | 56 | #endif /* _Alembic_Util_Export_h_ */ 57 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/Util/Murmur3.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2015, 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 Industrial Light & Magic nor the names of 19 | // its contributors may be used to endorse or promote products derived 20 | // from this software without specific prior written permission. 21 | // 22 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | // 34 | //-***************************************************************************** 35 | 36 | // MurmurHash3 was written by Austin Appleby, and is placed in the public 37 | // domain. The author hereby disclaims copyright to this source code. 38 | 39 | #ifndef _Alembic_Util_Murmur3_h_ 40 | #define _Alembic_Util_Murmur3_h_ 41 | 42 | #include 43 | #include 44 | 45 | namespace Alembic { 46 | namespace Util { 47 | namespace ALEMBIC_VERSION_NS { 48 | 49 | ALEMBIC_EXPORT void 50 | MurmurHash3_x64_128 ( const void * key, const size_t len, 51 | const size_t podSize, void * out ); 52 | 53 | } // End namespace ALEMBIC_VERSION_NS 54 | 55 | using namespace ALEMBIC_VERSION_NS; 56 | 57 | } // End namespace Util 58 | } // End namespace Alembic 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/Util/Naming.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2015, 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 Industrial Light & Magic nor the names of 19 | // its contributors may be used to endorse or promote products derived 20 | // from this software without specific prior written permission. 21 | // 22 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | // 34 | //-***************************************************************************** 35 | 36 | // 37 | // Object and property names in Alembic can be any valid string, but 38 | // to support the largest number of packages, names can be run through 39 | // these functions before export. 40 | // 41 | 42 | #ifndef _Alembic_Util_Naming_h_ 43 | #define _Alembic_Util_Naming_h_ 44 | 45 | #include 46 | #include 47 | #include 48 | 49 | namespace Alembic { 50 | namespace Util { 51 | namespace ALEMBIC_VERSION_NS { 52 | 53 | ALEMBIC_EXPORT bool 54 | isStandardName( const std::string& name ); 55 | ALEMBIC_EXPORT void 56 | makeStandardName( std::string& name, const char fixChar = '_' ); 57 | 58 | } // End namespace ALEMBIC_VERSION_NS 59 | 60 | using namespace ALEMBIC_VERSION_NS; 61 | 62 | } // End namespace Util 63 | } // End namespace Alembic 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /libs/alembic/include/Alembic/Util/OperatorBool.h: -------------------------------------------------------------------------------- 1 | //-***************************************************************************** 2 | // 3 | // Copyright (c) 2009-2011, 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 Industrial Light & Magic nor the names of 19 | // its contributors may be used to endorse or promote products derived 20 | // from this software without specific prior written permission. 21 | // 22 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | // 34 | //-***************************************************************************** 35 | 36 | #ifndef _Alembic_Util_OperatorBool_h_ 37 | #define _Alembic_Util_OperatorBool_h_ 38 | 39 | #include 40 | 41 | //-***************************************************************************** 42 | #define ALEMBIC_OPERATOR_BOOL( PASS_COND ) \ 43 | void __unspecified_bool_type_fcn() const {} \ 44 | typedef void (this_type::*unspecified_bool_type)() const; \ 45 | operator unspecified_bool_type() const \ 46 | { \ 47 | return ( PASS_COND ) ? &this_type::__unspecified_bool_type_fcn : 0; \ 48 | } \ 49 | bool operator! () const \ 50 | { \ 51 | return !( PASS_COND ); \ 52 | } 53 | 54 | 55 | //-***************************************************************************** 56 | #define ALEMBIC_OVERRIDE_OPERATOR_BOOL( PASS_COND ) \ 57 | operator unspecified_bool_type() const \ 58 | { \ 59 | return ( PASS_COND ) ? \ 60 | &operator_bool_base_type::__unspecified_bool_type_fcn : 0; \ 61 | } \ 62 | bool operator! () const \ 63 | { \ 64 | return !( PASS_COND ); \ 65 | } 66 | 67 | 68 | #endif 69 | 70 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/Iex.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | 36 | 37 | #ifndef INCLUDED_IEX_H 38 | #define INCLUDED_IEX_H 39 | 40 | 41 | //-------------------------------- 42 | // 43 | // Exception handling 44 | // 45 | //-------------------------------- 46 | 47 | 48 | #include "IexMacros.h" 49 | #include "IexBaseExc.h" 50 | #include "IexMathExc.h" 51 | #include "IexThrowErrnoExc.h" 52 | 53 | // Note that we do not include file IexErrnoExc.h here. That file 54 | // defines over 150 classes and significantly slows down compilation. 55 | // If you throw ErrnoExc exceptions using the throwErrnoExc() function, 56 | // you don't need IexErrnoExc.h. You have to include IexErrnoExc.h 57 | // only if you want to catch specific subclasses of ErrnoExc. 58 | 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/IexExport.h: -------------------------------------------------------------------------------- 1 | #ifndef IEXEXPORT_H 2 | #define IEXEXPORT_H 3 | 4 | /////////////////////////////////////////////////////////////////////////// 5 | // 6 | // Copyright (c) 2012, Industrial Light & Magic, a division of Lucas 7 | // Digital Ltd. LLC 8 | // 9 | // All rights reserved. 10 | // 11 | // Redistribution and use in source and binary forms, with or without 12 | // modification, are permitted provided that the following conditions are 13 | // met: 14 | // * Redistributions of source code must retain the above copyright 15 | // notice, this list of conditions and the following disclaimer. 16 | // * Redistributions in binary form must reproduce the above 17 | // copyright notice, this list of conditions and the following disclaimer 18 | // in the documentation and/or other materials provided with the 19 | // distribution. 20 | // * Neither the name of Industrial Light & Magic nor the names of 21 | // its contributors may be used to endorse or promote products derived 22 | // from this software without specific prior written permission. 23 | // 24 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 25 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 26 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 27 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 28 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 29 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 30 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | // 36 | /////////////////////////////////////////////////////////////////////////// 37 | 38 | #if defined(OPENEXR_DLL) 39 | #if defined(IEX_EXPORTS) 40 | #define IEX_EXPORT __declspec(dllexport) 41 | #else 42 | #define IEX_EXPORT __declspec(dllimport) 43 | #endif 44 | #define IEX_EXPORT_CONST 45 | #else 46 | #define IEX_EXPORT 47 | #define IEX_EXPORT_CONST const 48 | #endif 49 | 50 | #endif // #ifndef IEXEXPORT_H 51 | 52 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/IexMathExc.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | 36 | 37 | #ifndef INCLUDED_IEXMATHEXC_H 38 | #define INCLUDED_IEXMATHEXC_H 39 | 40 | #include "IexBaseExc.h" 41 | 42 | IEX_INTERNAL_NAMESPACE_HEADER_ENTER 43 | 44 | //--------------------------------------------------------- 45 | // Exception classess which correspond to specific floating 46 | // point exceptions. 47 | //--------------------------------------------------------- 48 | 49 | DEFINE_EXC (OverflowExc, MathExc) // Overflow 50 | DEFINE_EXC (UnderflowExc, MathExc) // Underflow 51 | DEFINE_EXC (DivzeroExc, MathExc) // Division by zero 52 | DEFINE_EXC (InexactExc, MathExc) // Inexact result 53 | DEFINE_EXC (InvalidFpOpExc, MathExc) // Invalid operation 54 | 55 | IEX_INTERNAL_NAMESPACE_HEADER_EXIT 56 | 57 | #endif // INCLUDED_IEXMATHEXC_H 58 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/IexMathFpu.h: -------------------------------------------------------------------------------- 1 | #ifndef INCLUDED_IEXMATHFPU_H 2 | #define INCLUDED_IEXMATHFPU_H 3 | 4 | /////////////////////////////////////////////////////////////////////////// 5 | // 6 | // Copyright (c) 1997, Industrial Light & Magic, a division of Lucas 7 | // Digital Ltd. LLC 8 | // 9 | // All rights reserved. 10 | // 11 | // Redistribution and use in source and binary forms, with or without 12 | // modification, are permitted provided that the following conditions are 13 | // met: 14 | // * Redistributions of source code must retain the above copyright 15 | // notice, this list of conditions and the following disclaimer. 16 | // * Redistributions in binary form must reproduce the above 17 | // copyright notice, this list of conditions and the following disclaimer 18 | // in the documentation and/or other materials provided with the 19 | // distribution. 20 | // * Neither the name of Industrial Light & Magic nor the names of 21 | // its contributors may be used to endorse or promote products derived 22 | // from this software without specific prior written permission. 23 | // 24 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 25 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 26 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 27 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 28 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 29 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 30 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | // 36 | /////////////////////////////////////////////////////////////////////////// 37 | 38 | 39 | //------------------------------------------------------------------------ 40 | // 41 | // Functions to control floating point exceptions. 42 | // 43 | //------------------------------------------------------------------------ 44 | 45 | #include "IexMathIeeeExc.h" 46 | #include "IexNamespace.h" 47 | 48 | IEX_INTERNAL_NAMESPACE_HEADER_ENTER 49 | 50 | 51 | //----------------------------------------- 52 | // setFpExceptions() defines which floating 53 | // point exceptions cause SIGFPE signals. 54 | //----------------------------------------- 55 | 56 | void setFpExceptions (int when = (IEEE_OVERFLOW | IEEE_DIVZERO | IEEE_INVALID)); 57 | 58 | 59 | //---------------------------------------- 60 | // fpExceptions() tells you which floating 61 | // point exceptions cause SIGFPE signals. 62 | //---------------------------------------- 63 | 64 | int fpExceptions (); 65 | 66 | 67 | //------------------------------------------ 68 | // setFpExceptionHandler() defines a handler 69 | // that will be called when SIGFPE occurs. 70 | //------------------------------------------ 71 | 72 | extern "C" typedef void (* FpExceptionHandler) (int type, const char explanation[]); 73 | 74 | void setFpExceptionHandler (FpExceptionHandler handler); 75 | 76 | // ----------------------------------------- 77 | // handleExceptionsSetInRegisters() examines 78 | // the exception registers and calls the 79 | // floating point exception handler if the 80 | // bits are set. This function exists to 81 | // allow trapping of exception register states 82 | // that can get set though no SIGFPE occurs. 83 | // ----------------------------------------- 84 | 85 | void handleExceptionsSetInRegisters(); 86 | 87 | 88 | IEX_INTERNAL_NAMESPACE_HEADER_EXIT 89 | 90 | 91 | #endif 92 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/IexMathIeeeExc.h: -------------------------------------------------------------------------------- 1 | #ifndef INCLUDED_IEXMATHIEEE_EXC_H 2 | #define INCLUDED_IEXMATHIEEE_EXC_H 3 | 4 | /////////////////////////////////////////////////////////////////////////// 5 | // 6 | // Copyright (c) 1997, Industrial Light & Magic, a division of Lucas 7 | // Digital Ltd. LLC 8 | // 9 | // All rights reserved. 10 | // 11 | // Redistribution and use in source and binary forms, with or without 12 | // modification, are permitted provided that the following conditions are 13 | // met: 14 | // * Redistributions of source code must retain the above copyright 15 | // notice, this list of conditions and the following disclaimer. 16 | // * Redistributions in binary form must reproduce the above 17 | // copyright notice, this list of conditions and the following disclaimer 18 | // in the documentation and/or other materials provided with the 19 | // distribution. 20 | // * Neither the name of Industrial Light & Magic nor the names of 21 | // its contributors may be used to endorse or promote products derived 22 | // from this software without specific prior written permission. 23 | // 24 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 25 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 26 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 27 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 28 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 29 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 30 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | // 36 | /////////////////////////////////////////////////////////////////////////// 37 | 38 | 39 | //--------------------------------------------------------------------------- 40 | // 41 | // Names for the loating point exceptions defined by IEEE standard 754 42 | // 43 | //--------------------------------------------------------------------------- 44 | 45 | #include "IexNamespace.h" 46 | 47 | IEX_INTERNAL_NAMESPACE_HEADER_ENTER 48 | 49 | 50 | enum IeeeExcType 51 | { 52 | IEEE_OVERFLOW = 1, 53 | IEEE_UNDERFLOW = 2, 54 | IEEE_DIVZERO = 4, 55 | IEEE_INEXACT = 8, 56 | IEEE_INVALID = 16 57 | }; 58 | 59 | 60 | IEX_INTERNAL_NAMESPACE_HEADER_EXIT 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/IexNamespace.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2012, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | #ifndef INCLUDED_IEXNAMESPACE_H 36 | #define INCLUDED_IEXNAMESPACE_H 37 | 38 | // 39 | // The purpose of this file is to make it possible to specify an 40 | // IEX_INTERNAL_NAMESPACE as a preprocessor definition and have all of the 41 | // Iex symbols defined within that namespace rather than the standard 42 | // Iex namespace. Those symbols are made available to client code through 43 | // the IEX_NAMESPACE in addition to the IEX_INTERNAL_NAMESPACE. 44 | // 45 | // To ensure source code compatibility, the IEX_NAMESPACE defaults to Iex 46 | // and then "using namespace IEX_INTERNAL_NAMESPACE;" brings all of the 47 | // declarations from the IEX_INTERNAL_NAMESPACE into the IEX_NAMESPACE. This 48 | // means that client code can continue to use syntax like Iex::BaseExc, but 49 | // at link time it will resolve to a mangled symbol based on the 50 | // IEX_INTERNAL_NAMESPACE. 51 | // 52 | // As an example, if one needed to build against a newer version of Iex and 53 | // have it run alongside an older version in the same application, it is now 54 | // possible to use an internal namespace to prevent collisions between the 55 | // older versions of Iex symbols and the newer ones. To do this, the 56 | // following could be defined at build time: 57 | // 58 | // IEX_INTERNAL_NAMESPACE = Iex_v2 59 | // 60 | // This means that declarations inside Iex headers look like this (after the 61 | // preprocessor has done its work): 62 | // 63 | // namespace Iex_v2 { 64 | // ... 65 | // class declarations 66 | // ... 67 | // } 68 | // 69 | // namespace Iex { 70 | // using namespace Iex_v2; 71 | // } 72 | // 73 | 74 | // 75 | // Open Source version of this file pulls in the IlmBaseConfig.h file 76 | // for the configure time options. 77 | // 78 | #include "IlmBaseConfig.h" 79 | 80 | #ifndef IEX_NAMESPACE 81 | #define IEX_NAMESPACE Iex 82 | #endif 83 | 84 | #ifndef IEX_INTERNAL_NAMESPACE 85 | #define IEX_INTERNAL_NAMESPACE IEX_NAMESPACE 86 | #endif 87 | 88 | // 89 | // We need to be sure that we import the internal namespace into the public one. 90 | // To do this, we use the small bit of code below which initially defines 91 | // IEX_INTERNAL_NAMESPACE (so it can be referenced) and then defines 92 | // IEX_NAMESPACE and pulls the internal symbols into the public namespace. 93 | // 94 | 95 | namespace IEX_INTERNAL_NAMESPACE {} 96 | namespace IEX_NAMESPACE { 97 | using namespace IEX_INTERNAL_NAMESPACE; 98 | } 99 | 100 | // 101 | // There are identical pairs of HEADER/SOURCE ENTER/EXIT macros so that 102 | // future extension to the namespace mechanism is possible without changing 103 | // project source code. 104 | // 105 | 106 | #define IEX_INTERNAL_NAMESPACE_HEADER_ENTER namespace IEX_INTERNAL_NAMESPACE { 107 | #define IEX_INTERNAL_NAMESPACE_HEADER_EXIT } 108 | 109 | #define IEX_INTERNAL_NAMESPACE_SOURCE_ENTER namespace IEX_INTERNAL_NAMESPACE { 110 | #define IEX_INTERNAL_NAMESPACE_SOURCE_EXIT } 111 | 112 | #endif // INCLUDED_IEXNAMESPACE_H 113 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/IexThrowErrnoExc.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | 36 | 37 | #ifndef INCLUDED_IEXTHROWERRNOEXC_H 38 | #define INCLUDED_IEXTHROWERRNOEXC_H 39 | 40 | //---------------------------------------------------------- 41 | // 42 | // A function which throws ExcErrno exceptions 43 | // 44 | //---------------------------------------------------------- 45 | 46 | #include "IexBaseExc.h" 47 | #include "IexExport.h" 48 | 49 | IEX_INTERNAL_NAMESPACE_HEADER_ENTER 50 | 51 | 52 | //-------------------------------------------------------------------------- 53 | // 54 | // Function throwErrnoExc() throws an exception which corresponds to 55 | // error code errnum. The exception text is initialized with a copy 56 | // of the string passed to throwErrnoExc(), where all occurrences of 57 | // "%T" have been replaced with the output of strerror(oserror()). 58 | // 59 | // Example: 60 | // 61 | // If opening file /tmp/output failed with an ENOENT error code, 62 | // calling 63 | // 64 | // throwErrnoExc (); 65 | // 66 | // or 67 | // 68 | // throwErrnoExc ("%T."); 69 | // 70 | // will throw an EnoentExc whose text reads 71 | // 72 | // No such file or directory. 73 | // 74 | // More detailed messages can be assembled using stringstreams: 75 | // 76 | // std::stringstream s; 77 | // s << "Cannot open file " << name << " (%T)."; 78 | // throwErrnoExc (s); 79 | // 80 | // The resulting exception contains the following text: 81 | // 82 | // Cannot open file /tmp/output (No such file or directory). 83 | // 84 | // Alternatively, you may want to use the THROW_ERRNO macro defined 85 | // in IexMacros.h: 86 | // 87 | // THROW_ERRNO ("Cannot open file " << name << " (%T).") 88 | // 89 | //-------------------------------------------------------------------------- 90 | 91 | IEX_EXPORT void throwErrnoExc(const std::string &txt, int errnum); 92 | IEX_EXPORT void throwErrnoExc(const std::string &txt); 93 | IEX_EXPORT void throwErrnoExc(); 94 | 95 | IEX_INTERNAL_NAMESPACE_HEADER_EXIT 96 | 97 | #endif // INCLUDED_IEXTHROWERRNOEXC_H 98 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/IlmBaseConfig.h: -------------------------------------------------------------------------------- 1 | #define HAVE_PTHREAD 1 2 | #define ILMBASE_INTERNAL_NAMESPACE_CUSTOM 1 3 | #define IMATH_INTERNAL_NAMESPACE Imath_2_2 4 | #define IEX_INTERNAL_NAMESPACE Iex_2_2 5 | #define ILMTHREAD_INTERNAL_NAMESPACE IlmThread_2_2 6 | #define IMATH_NAMESPACE Imath 7 | #define IEX_NAMESPACE Iex 8 | #define ILMTHREAD_NAMESPACE IlmThread 9 | #define ILMBASE_VERSION_STRING "2.2.0" 10 | #define ILMBASE_PACKAGE_STRING "IlmBase 2.2.0" 11 | #define ILMBASE_VERSION_MAJOR 2 12 | #define ILMBASE_VERSION_MINOR 2 13 | #define ILMBASE_VERSION_PATCH 0 14 | 15 | // Version as a single hex number, e.g. 0x01000300 == 1.0.3 16 | #define ILMBASE_VERSION_HEX ((ILMBASE_VERSION_MAJOR << 24) | \ 17 | (ILMBASE_VERSION_MINOR << 16) | \ 18 | (ILMBASE_VERSION_PATCH << 8)) 19 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/IlmThreadExport.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2012, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | #if defined(OPENEXR_DLL) 36 | #if defined(ILMTHREAD_EXPORTS) 37 | #define ILMTHREAD_EXPORT __declspec(dllexport) 38 | #define ILMTHREAD_EXPORT_CONST extern __declspec(dllexport) 39 | #else 40 | #define ILMTHREAD_EXPORT __declspec(dllimport) 41 | #define ILMTHREAD_EXPORT_CONST extern __declspec(dllimport) 42 | #endif 43 | #else 44 | #define ILMTHREAD_EXPORT 45 | #define ILMTHREAD_EXPORT_CONST extern const 46 | #endif 47 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/IlmThreadForward.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2012, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | #ifndef INCLUDED_ILMTHREADFORWARD_H 36 | #define INCLUDED_ILMTHREADFORWARD_H 37 | 38 | #include "IlmThreadNamespace.h" 39 | 40 | ILMTHREAD_INTERNAL_NAMESPACE_HEADER_ENTER 41 | 42 | class Thread; 43 | class Mutex; 44 | class Lock; 45 | class ThreadPool; 46 | class Task; 47 | class TaskGroup; 48 | class Semaphore; 49 | 50 | ILMTHREAD_INTERNAL_NAMESPACE_HEADER_EXIT 51 | 52 | #endif // INCLUDED_ILMTHREADFORWARD_H 53 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/IlmThreadMutex.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | #ifndef INCLUDED_ILM_THREAD_MUTEX_H 36 | #define INCLUDED_ILM_THREAD_MUTEX_H 37 | 38 | //----------------------------------------------------------------------------- 39 | // 40 | // class Mutex, class Lock 41 | // 42 | // Class Mutex is a wrapper for a system-dependent mutual exclusion 43 | // mechanism. Actual locking and unlocking of a Mutex object must 44 | // be performed using an instance of a Lock (defined below). 45 | // 46 | // Class lock provides safe locking and unlocking of mutexes even in 47 | // the presence of C++ exceptions. Constructing a Lock object locks 48 | // the mutex; destroying the Lock unlocks the mutex. 49 | // 50 | // Lock objects are not themselves thread-safe. You should never 51 | // share a Lock object among multiple threads. 52 | // 53 | // Typical usage: 54 | // 55 | // Mutex mtx; // Create a Mutex object that is visible 56 | // //to multiple threads 57 | // 58 | // ... // create some threads 59 | // 60 | // // Then, within each thread, construct a critical section like so: 61 | // 62 | // { 63 | // Lock lock (mtx); // Lock constructor locks the mutex 64 | // ... // do some computation on shared data 65 | // } // leaving the block unlocks the mutex 66 | // 67 | //----------------------------------------------------------------------------- 68 | 69 | #include "IlmThreadExport.h" 70 | #include "IlmBaseConfig.h" 71 | #include "IlmThreadNamespace.h" 72 | 73 | #if defined _WIN32 || defined _WIN64 74 | #ifdef NOMINMAX 75 | #undef NOMINMAX 76 | #endif 77 | #define NOMINMAX 78 | #include 79 | #elif HAVE_PTHREAD 80 | #include 81 | #endif 82 | 83 | ILMTHREAD_INTERNAL_NAMESPACE_HEADER_ENTER 84 | 85 | class Lock; 86 | 87 | 88 | class ILMTHREAD_EXPORT Mutex 89 | { 90 | public: 91 | 92 | Mutex (); 93 | virtual ~Mutex (); 94 | 95 | private: 96 | 97 | void lock () const; 98 | void unlock () const; 99 | 100 | #if defined _WIN32 || defined _WIN64 101 | mutable CRITICAL_SECTION _mutex; 102 | #elif HAVE_PTHREAD 103 | mutable pthread_mutex_t _mutex; 104 | #endif 105 | 106 | void operator = (const Mutex& M); // not implemented 107 | Mutex (const Mutex& M); // not implemented 108 | 109 | friend class Lock; 110 | }; 111 | 112 | 113 | class ILMTHREAD_EXPORT Lock 114 | { 115 | public: 116 | 117 | Lock (const Mutex& m, bool autoLock = true): 118 | _mutex (m), 119 | _locked (false) 120 | { 121 | if (autoLock) 122 | { 123 | _mutex.lock(); 124 | _locked = true; 125 | } 126 | } 127 | 128 | ~Lock () 129 | { 130 | if (_locked) 131 | _mutex.unlock(); 132 | } 133 | 134 | void acquire () 135 | { 136 | _mutex.lock(); 137 | _locked = true; 138 | } 139 | 140 | void release () 141 | { 142 | _mutex.unlock(); 143 | _locked = false; 144 | } 145 | 146 | bool locked () 147 | { 148 | return _locked; 149 | } 150 | 151 | private: 152 | 153 | const Mutex & _mutex; 154 | bool _locked; 155 | }; 156 | 157 | 158 | ILMTHREAD_INTERNAL_NAMESPACE_HEADER_EXIT 159 | 160 | #endif // INCLUDED_ILM_THREAD_MUTEX_H 161 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/IlmThreadNamespace.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2012, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | #ifndef INCLUDED_ILMTHREADNAMESPACE_H 36 | #define INCLUDED_ILMTHREADNAMESPACE_H 37 | 38 | // 39 | // The purpose of this file is to make it possible to specify an 40 | // ILMTHREAD_INTERNAL_NAMESPACE as a preprocessor definition and have all of 41 | // the IlmThread symbols defined within that namespace rather than the 42 | // standard IlmThread namespace. Those symbols are made available to client 43 | // code through the ILMTHREAD_NAMESPACE in addition to the 44 | // ILMTHREAD_INTERNAL_NAMESPACE. 45 | // 46 | // To ensure source code compatibility, the ILMTHREAD_NAMESPACE defaults to 47 | // IlmThread and then "using namespace ILMTHREAD_INTERNAL_NAMESPACE;" brings 48 | // all of the declarations from the ILMTHREAD_INTERNAL_NAMESPACE into the 49 | // ILMTHREAD_NAMESPACE. This means that client code can continue to use 50 | // syntax like IlmThread::Thread, but at link time it will resolve to a 51 | // mangled symbol based on the ILMTHREAD_INTERNAL_NAMESPACE. 52 | // 53 | // As an example, if one needed to build against a newer version of IlmThread 54 | // and have it run alongside an older version in the same application, it is 55 | // now possible to use an internal namespace to prevent collisions between 56 | // the older versions of IlmThread symbols and the newer ones. To do this, 57 | // the following could be defined at build time: 58 | // 59 | // ILMTHREAD_INTERNAL_NAMESPACE = IlmThread_v2 60 | // 61 | // This means that declarations inside IlmThread headers look like this 62 | // (after the preprocessor has done its work): 63 | // 64 | // namespace IlmThread_v2 { 65 | // ... 66 | // class declarations 67 | // ... 68 | // } 69 | // 70 | // namespace IlmThread { 71 | // using namespace IlmThread_v2; 72 | // } 73 | // 74 | 75 | // 76 | // Open Source version of this file pulls in the IlmBaseConfig.h file 77 | // for the configure time options. 78 | // 79 | #include "IlmBaseConfig.h" 80 | 81 | #ifndef ILMTHREAD_NAMESPACE 82 | #define ILMTHREAD_NAMESPACE IlmThread 83 | #endif 84 | 85 | #ifndef ILMTHREAD_INTERNAL_NAMESPACE 86 | #define ILMTHREAD_INTERNAL_NAMESPACE ILMTHREAD_NAMESPACE 87 | #endif 88 | 89 | // 90 | // We need to be sure that we import the internal namespace into the public one. 91 | // To do this, we use the small bit of code below which initially defines 92 | // ILMTHREAD_INTERNAL_NAMESPACE (so it can be referenced) and then defines 93 | // ILMTHREAD_NAMESPACE and pulls the internal symbols into the public 94 | // namespace. 95 | // 96 | 97 | namespace ILMTHREAD_INTERNAL_NAMESPACE {} 98 | namespace ILMTHREAD_NAMESPACE { 99 | using namespace ILMTHREAD_INTERNAL_NAMESPACE; 100 | } 101 | 102 | // 103 | // There are identical pairs of HEADER/SOURCE ENTER/EXIT macros so that 104 | // future extension to the namespace mechanism is possible without changing 105 | // project source code. 106 | // 107 | 108 | #define ILMTHREAD_INTERNAL_NAMESPACE_HEADER_ENTER namespace ILMTHREAD_INTERNAL_NAMESPACE { 109 | #define ILMTHREAD_INTERNAL_NAMESPACE_HEADER_EXIT } 110 | 111 | #define ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_ENTER namespace ILMTHREAD_INTERNAL_NAMESPACE { 112 | #define ILMTHREAD_INTERNAL_NAMESPACE_SOURCE_EXIT } 113 | 114 | #endif // INCLUDED_ILMTHREADNAMESPACE_H 115 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/IlmThreadSemaphore.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | #ifndef INCLUDED_ILM_THREAD_SEMAPHORE_H 36 | #define INCLUDED_ILM_THREAD_SEMAPHORE_H 37 | 38 | //----------------------------------------------------------------------------- 39 | // 40 | // class Semaphore -- a wrapper class for 41 | // system-dependent counting semaphores 42 | // 43 | //----------------------------------------------------------------------------- 44 | 45 | #include "IlmBaseConfig.h" 46 | #include "IlmThreadExport.h" 47 | #include "IlmThreadNamespace.h" 48 | 49 | #if defined _WIN32 || defined _WIN64 50 | #ifdef NOMINMAX 51 | #undef NOMINMAX 52 | #endif 53 | #define NOMINMAX 54 | #include 55 | #elif HAVE_PTHREAD && !HAVE_POSIX_SEMAPHORES 56 | #include 57 | #elif HAVE_PTHREAD && HAVE_POSIX_SEMAPHORES 58 | #include 59 | #endif 60 | 61 | ILMTHREAD_INTERNAL_NAMESPACE_HEADER_ENTER 62 | 63 | 64 | class ILMTHREAD_EXPORT Semaphore 65 | { 66 | public: 67 | 68 | Semaphore (unsigned int value = 0); 69 | virtual ~Semaphore(); 70 | 71 | void wait(); 72 | bool tryWait(); 73 | void post(); 74 | int value() const; 75 | 76 | private: 77 | 78 | #if defined _WIN32 || defined _WIN64 79 | 80 | mutable HANDLE _semaphore; 81 | 82 | #elif HAVE_PTHREAD && !HAVE_POSIX_SEMAPHORES 83 | 84 | // 85 | // If the platform has Posix threads but no semapohores, 86 | // then we implement them ourselves using condition variables 87 | // 88 | 89 | struct sema_t 90 | { 91 | unsigned int count; 92 | unsigned long numWaiting; 93 | pthread_mutex_t mutex; 94 | pthread_cond_t nonZero; 95 | }; 96 | 97 | mutable sema_t _semaphore; 98 | 99 | #elif HAVE_PTHREAD && HAVE_POSIX_SEMAPHORES 100 | 101 | mutable sem_t _semaphore; 102 | 103 | #endif 104 | 105 | void operator = (const Semaphore& s); // not implemented 106 | Semaphore (const Semaphore& s); // not implemented 107 | }; 108 | 109 | 110 | ILMTHREAD_INTERNAL_NAMESPACE_HEADER_EXIT 111 | 112 | #endif // INCLUDED_ILM_THREAD_SEMAPHORE_H 113 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/ImathExc.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | 36 | #ifndef INCLUDED_IMATHEXC_H 37 | #define INCLUDED_IMATHEXC_H 38 | 39 | 40 | //----------------------------------------------- 41 | // 42 | // Imath library-specific exceptions 43 | // 44 | //----------------------------------------------- 45 | 46 | #include "ImathNamespace.h" 47 | #include "IexBaseExc.h" 48 | #include "ImathExport.h" 49 | 50 | IMATH_INTERNAL_NAMESPACE_HEADER_ENTER 51 | 52 | // Attempt to normalize null vector 53 | DEFINE_EXC_EXP (IMATH_EXPORT, NullVecExc, ::IEX_NAMESPACE::MathExc) 54 | 55 | // Attempt to normalize a point at infinity 56 | DEFINE_EXC_EXP (IMATH_EXPORT, InfPointExc, ::IEX_NAMESPACE::MathExc) 57 | 58 | // Attempt to normalize null quaternion 59 | DEFINE_EXC_EXP (IMATH_EXPORT, NullQuatExc, ::IEX_NAMESPACE::MathExc) 60 | 61 | // Attempt to invert singular matrix 62 | DEFINE_EXC_EXP (IMATH_EXPORT, SingMatrixExc, ::IEX_NAMESPACE::MathExc) 63 | 64 | // Attempt to remove zero scaling from matrix 65 | DEFINE_EXC_EXP (IMATH_EXPORT, ZeroScaleExc, ::IEX_NAMESPACE::MathExc) 66 | 67 | // Attempt to normalize a vector of whose elementsare an integer type 68 | DEFINE_EXC_EXP (IMATH_EXPORT, IntVecNormalizeExc, ::IEX_NAMESPACE::MathExc) 69 | 70 | 71 | IMATH_INTERNAL_NAMESPACE_HEADER_EXIT 72 | 73 | #endif // INCLUDED_IMATHEXC_H 74 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/ImathExport.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2012, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | #if defined(OPENEXR_DLL) 36 | #if defined(IMATH_EXPORTS) 37 | #define IMATH_EXPORT __declspec(dllexport) 38 | #define IMATH_EXPORT_CONST extern __declspec(dllexport) 39 | #else 40 | #define IMATH_EXPORT __declspec(dllimport) 41 | #define IMATH_EXPORT_CONST extern __declspec(dllimport) 42 | #endif 43 | #else 44 | #define IMATH_EXPORT 45 | #define IMATH_EXPORT_CONST extern const 46 | #endif 47 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/ImathForward.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2012, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | #ifndef INCLUDED_IMATHFORWARD_H 36 | #define INCLUDED_IMATHFORWARD_H 37 | 38 | #include "ImathNamespace.h" 39 | 40 | IMATH_INTERNAL_NAMESPACE_HEADER_ENTER 41 | 42 | // 43 | // Basic template type declarations. 44 | // 45 | 46 | template class Box; 47 | template class Color3; 48 | template class Color4; 49 | template class Euler; 50 | template class Frustum; 51 | template class FrustumTest; 52 | template class Interval; 53 | template class Line3; 54 | template class Matrix33; 55 | template class Matrix44; 56 | template class Plane3; 57 | template class Quat; 58 | template class Shear6; 59 | template class Sphere3; 60 | template class TMatrix; 61 | template class TMatrixBase; 62 | template class TMatrixData; 63 | template class Vec2; 64 | template class Vec3; 65 | template class Vec4; 66 | 67 | class Rand32; 68 | class Rand48; 69 | 70 | IMATH_INTERNAL_NAMESPACE_HEADER_EXIT 71 | 72 | #endif // INCLUDED_IMATHFORWARD_H 73 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/ImathGLU.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | 36 | 37 | #ifndef INCLUDED_IMATHGLU_H 38 | #define INCLUDED_IMATHGLU_H 39 | 40 | #include 41 | #include 42 | 43 | #include "ImathVec.h" 44 | 45 | inline 46 | void 47 | gluLookAt(const IMATH_INTERNAL_NAMESPACE::V3f &pos, const IMATH_INTERNAL_NAMESPACE::V3f &interest, const IMATH_INTERNAL_NAMESPACE::V3f &up) 48 | { 49 | gluLookAt(pos.x, pos.y, pos.z, 50 | interest.x, interest.y, interest.z, 51 | up.x, up.y, up.z); 52 | } 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/ImathHalfLimits.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | 36 | 37 | #ifndef INCLUDED_IMATHHALFLIMITS_H 38 | #define INCLUDED_IMATHHALFLIMITS_H 39 | 40 | //-------------------------------------------------- 41 | // 42 | // Imath-style limits for class half. 43 | // 44 | //-------------------------------------------------- 45 | 46 | #include "ImathLimits.h" 47 | #include "ImathNamespace.h" 48 | 49 | #include "half.h" 50 | 51 | IMATH_INTERNAL_NAMESPACE_HEADER_ENTER 52 | 53 | 54 | template <> 55 | struct limits 56 | { 57 | static float min() {return -HALF_MAX;} 58 | static float max() {return HALF_MAX;} 59 | static float smallest() {return HALF_MIN;} 60 | static float epsilon() {return HALF_EPSILON;} 61 | static bool isIntegral() {return false;} 62 | static bool isSigned() {return true;} 63 | }; 64 | 65 | 66 | IMATH_INTERNAL_NAMESPACE_HEADER_EXIT 67 | 68 | #endif // INCLUDED_IMATHHALFLIMITS_H 69 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/ImathInt64.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2006-2012, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | 36 | #ifndef INCLUDED_IMATH_INT64_H 37 | #define INCLUDED_IMATH_INT64_H 38 | 39 | //---------------------------------------------------------------------------- 40 | // 41 | // Int64 -- unsigned 64-bit integers 42 | // 43 | //---------------------------------------------------------------------------- 44 | 45 | #include "ImathNamespace.h" 46 | #include 47 | 48 | IMATH_INTERNAL_NAMESPACE_HEADER_ENTER 49 | 50 | 51 | #if (defined _WIN32 || defined _WIN64) && _MSC_VER >= 1300 52 | typedef unsigned __int64 Int64; 53 | #elif ULONG_MAX == 18446744073709551615LU 54 | typedef long unsigned int Int64; 55 | #else 56 | typedef long long unsigned int Int64; 57 | #endif 58 | 59 | 60 | IMATH_INTERNAL_NAMESPACE_HEADER_EXIT 61 | 62 | #endif // INCLUDED_IMATH_INT64_H 63 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/ImathNamespace.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2012, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | #ifndef INCLUDED_IMATHNAMESPACE_H 36 | #define INCLUDED_IMATHNAMESPACE_H 37 | 38 | // 39 | // The purpose of this file is to make it possible to specify an 40 | // IMATH_INTERNAL_NAMESPACE as a preprocessor definition and have all of the 41 | // Imath symbols defined within that namespace rather than the standard 42 | // Imath namespace. Those symbols are made available to client code through 43 | // the IMATH_NAMESPACE in addition to the IMATH_INTERNAL_NAMESPACE. 44 | // 45 | // To ensure source code compatibility, the IMATH_NAMESPACE defaults to Imath 46 | // and then "using namespace IMATH_INTERNAL_NAMESPACE;" brings all of the 47 | // declarations from the IMATH_INTERNAL_NAMESPACE into the IMATH_NAMESPACE. 48 | // This means that client code can continue to use syntax like Imath::V3f, 49 | // but at link time it will resolve to a mangled symbol based on the 50 | // IMATH_INTERNAL_NAMESPACE. 51 | // 52 | // As an example, if one needed to build against a newer version of Imath and 53 | // have it run alongside an older version in the same application, it is now 54 | // possible to use an internal namespace to prevent collisions between the 55 | // older versions of Imath symbols and the newer ones. To do this, the 56 | // following could be defined at build time: 57 | // 58 | // IMATH_INTERNAL_NAMESPACE = Imath_v2 59 | // 60 | // This means that declarations inside Imath headers look like this (after 61 | // the preprocessor has done its work): 62 | // 63 | // namespace Imath_v2 { 64 | // ... 65 | // class declarations 66 | // ... 67 | // } 68 | // 69 | // namespace Imath { 70 | // using namespace Imath_v2; 71 | // } 72 | // 73 | 74 | // 75 | // Open Source version of this file pulls in the IlmBaseConfig.h file 76 | // for the configure time options. 77 | // 78 | #include "IlmBaseConfig.h" 79 | 80 | 81 | #ifndef IMATH_NAMESPACE 82 | #define IMATH_NAMESPACE Imath 83 | #endif 84 | 85 | #ifndef IMATH_INTERNAL_NAMESPACE 86 | #define IMATH_INTERNAL_NAMESPACE IMATH_NAMESPACE 87 | #endif 88 | 89 | // 90 | // We need to be sure that we import the internal namespace into the public one. 91 | // To do this, we use the small bit of code below which initially defines 92 | // IMATH_INTERNAL_NAMESPACE (so it can be referenced) and then defines 93 | // IMATH_NAMESPACE and pulls the internal symbols into the public 94 | // namespace. 95 | // 96 | 97 | namespace IMATH_INTERNAL_NAMESPACE {} 98 | namespace IMATH_NAMESPACE { 99 | using namespace IMATH_INTERNAL_NAMESPACE; 100 | } 101 | 102 | // 103 | // There are identical pairs of HEADER/SOURCE ENTER/EXIT macros so that 104 | // future extension to the namespace mechanism is possible without changing 105 | // project source code. 106 | // 107 | 108 | #define IMATH_INTERNAL_NAMESPACE_HEADER_ENTER namespace IMATH_INTERNAL_NAMESPACE { 109 | #define IMATH_INTERNAL_NAMESPACE_HEADER_EXIT } 110 | 111 | #define IMATH_INTERNAL_NAMESPACE_SOURCE_ENTER namespace IMATH_INTERNAL_NAMESPACE { 112 | #define IMATH_INTERNAL_NAMESPACE_SOURCE_EXIT } 113 | 114 | 115 | #endif /* INCLUDED_IMATHNAMESPACE_H */ 116 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/ImathPlatform.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | #ifndef INCLUDED_IMATHPLATFORM_H 36 | #define INCLUDED_IMATHPLATFORM_H 37 | 38 | //---------------------------------------------------------------------------- 39 | // 40 | // ImathPlatform.h 41 | // 42 | // This file contains functions and constants which aren't 43 | // provided by the system libraries, compilers, or includes on 44 | // certain platforms. 45 | // 46 | //---------------------------------------------------------------------------- 47 | 48 | #include 49 | 50 | #ifndef M_PI 51 | #define M_PI 3.14159265358979323846 52 | #endif 53 | 54 | #ifndef M_PI_2 55 | #define M_PI_2 1.57079632679489661923 // pi/2 56 | #endif 57 | 58 | 59 | //----------------------------------------------------------------------------- 60 | // 61 | // Some, but not all, C++ compilers support the C99 restrict 62 | // keyword or some variant of it, for example, __restrict. 63 | // 64 | //----------------------------------------------------------------------------- 65 | 66 | #if defined __GNUC__ 67 | 68 | // 69 | // supports __restrict 70 | // 71 | 72 | #define IMATH_RESTRICT __restrict 73 | 74 | #elif defined (__INTEL_COMPILER) || \ 75 | defined(__ICL) || \ 76 | defined(__ICC) || \ 77 | defined(__ECC) 78 | 79 | // 80 | // supports restrict 81 | // 82 | 83 | #define IMATH_RESTRICT restrict 84 | 85 | #elif defined __sgi 86 | 87 | // 88 | // supports restrict 89 | // 90 | 91 | #define IMATH_RESTRICT restrict 92 | 93 | #elif defined _MSC_VER 94 | 95 | // 96 | // supports __restrict 97 | // 98 | 99 | // #define IMATH_RESTRICT __restrict 100 | #define IMATH_RESTRICT 101 | 102 | #else 103 | 104 | // 105 | // restrict / __restrict not supported 106 | // 107 | 108 | #define IMATH_RESTRICT 109 | 110 | #endif 111 | 112 | #endif // INCLUDED_IMATHPLATFORM_H 113 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/halfExport.h: -------------------------------------------------------------------------------- 1 | #ifndef HALFEXPORT_H 2 | #define HALFEXPORT_H 3 | 4 | // 5 | // Copyright (c) 2008 Lucasfilm Entertainment Company Ltd. 6 | // All rights reserved. Used under authorization. 7 | // This material contains the confidential and proprietary 8 | // information of Lucasfilm Entertainment Company and 9 | // may not be copied in whole or in part without the express 10 | // written permission of Lucasfilm Entertainment Company. 11 | // This copyright notice does not imply publication. 12 | // 13 | 14 | #if defined(OPENEXR_DLL) 15 | #if defined(HALF_EXPORTS) 16 | #define HALF_EXPORT __declspec(dllexport) 17 | #else 18 | #define HALF_EXPORT __declspec(dllimport) 19 | #endif 20 | #define HALF_EXPORT_CONST 21 | #else 22 | #define HALF_EXPORT 23 | #define HALF_EXPORT_CONST const 24 | #endif 25 | 26 | #endif // #ifndef HALFEXPORT_H 27 | 28 | -------------------------------------------------------------------------------- /libs/alembic/include/OpenEXR/halfLimits.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas 4 | // Digital Ltd. LLC 5 | // 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are 10 | // met: 11 | // * Redistributions of source code must retain the above copyright 12 | // notice, this list of conditions and the following disclaimer. 13 | // * Redistributions in binary form must reproduce the above 14 | // copyright notice, this list of conditions and the following disclaimer 15 | // in the documentation and/or other materials provided with the 16 | // distribution. 17 | // * Neither the name of Industrial Light & Magic nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | /////////////////////////////////////////////////////////////////////////// 34 | 35 | 36 | // Primary authors: 37 | // Florian Kainz 38 | // Rod Bogart 39 | 40 | 41 | #ifndef INCLUDED_HALF_LIMITS_H 42 | #define INCLUDED_HALF_LIMITS_H 43 | 44 | 45 | //------------------------------------------------------------------------ 46 | // 47 | // C++ standard library-style numeric_limits for class half 48 | // 49 | //------------------------------------------------------------------------ 50 | 51 | #include 52 | #include "half.h" 53 | 54 | namespace std { 55 | 56 | template <> 57 | class numeric_limits 58 | { 59 | public: 60 | 61 | static const bool is_specialized = true; 62 | 63 | static half min () throw () {return HALF_NRM_MIN;} 64 | static half max () throw () {return HALF_MAX;} 65 | 66 | static const int digits = HALF_MANT_DIG; 67 | static const int digits10 = HALF_DIG; 68 | static const bool is_signed = true; 69 | static const bool is_integer = false; 70 | static const bool is_exact = false; 71 | static const int radix = HALF_RADIX; 72 | static half epsilon () throw () {return HALF_EPSILON;} 73 | static half round_error () throw () {return HALF_EPSILON / 2;} 74 | 75 | static const int min_exponent = HALF_MIN_EXP; 76 | static const int min_exponent10 = HALF_MIN_10_EXP; 77 | static const int max_exponent = HALF_MAX_EXP; 78 | static const int max_exponent10 = HALF_MAX_10_EXP; 79 | 80 | static const bool has_infinity = true; 81 | static const bool has_quiet_NaN = true; 82 | static const bool has_signaling_NaN = true; 83 | static const float_denorm_style has_denorm = denorm_present; 84 | static const bool has_denorm_loss = false; 85 | static half infinity () throw () {return half::posInf();} 86 | static half quiet_NaN () throw () {return half::qNan();} 87 | static half signaling_NaN () throw () {return half::sNan();} 88 | static half denorm_min () throw () {return HALF_MIN;} 89 | 90 | static const bool is_iec559 = false; 91 | static const bool is_bounded = false; 92 | static const bool is_modulo = false; 93 | 94 | static const bool traps = true; 95 | static const bool tinyness_before = false; 96 | static const float_round_style round_style = round_to_nearest; 97 | }; 98 | 99 | 100 | } // namespace std 101 | 102 | #endif 103 | -------------------------------------------------------------------------------- /libs/alembic/lib/osx/libAlembic.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/perfume-dev/ofxAlembic/b29dbd5e5ccc823f585599d6a41734c111bbf88b/libs/alembic/lib/osx/libAlembic.a -------------------------------------------------------------------------------- /src/ofxAlembic.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofxAlembicType.h" 4 | #include "ofxAlembicUtil.h" 5 | #include "ofxAlembicReader.h" 6 | #include "ofxAlembicWriter.h" -------------------------------------------------------------------------------- /src/ofxAlembicType.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "ofMain.h" 7 | 8 | #include "ofxAlembicUtil.h" 9 | 10 | namespace ofxAlembic 11 | { 12 | class PolyMesh; 13 | class Points; 14 | class Curves; 15 | class Camera; 16 | class XForm; 17 | 18 | struct Point; 19 | 20 | enum Type 21 | { 22 | POINTS = 0, 23 | CURVES, 24 | POLYMESH, 25 | CAMERA, 26 | XFORM, 27 | UNKHOWN 28 | }; 29 | } 30 | 31 | class ofxAlembic::XForm 32 | { 33 | public: 34 | Imath::M44f mat; 35 | 36 | XForm() {} 37 | XForm(const glm::mat4& matrix); 38 | 39 | void draw(); 40 | 41 | void get(Alembic::AbcGeom::OXformSchema &schema) const; 42 | void set(Alembic::AbcGeom::IXformSchema &schema, float time); 43 | }; 44 | 45 | class ofxAlembic::PolyMesh 46 | { 47 | public: 48 | ofMesh mesh; 49 | 50 | PolyMesh() {} 51 | PolyMesh(const ofMesh& mesh) : mesh(mesh) {} 52 | 53 | void get(Alembic::AbcGeom::OPolyMeshSchema &schema) const; 54 | void set(Alembic::AbcGeom::IPolyMeshSchema &schema, float time); 55 | 56 | void draw(); 57 | }; 58 | 59 | struct ofxAlembic::Point 60 | { 61 | uint64_t id; 62 | glm::vec3 pos; 63 | 64 | Point() : id(-1) {} 65 | Point(const glm::vec3& pos) : id(-1), pos(pos) {} 66 | Point(uint64_t id, const glm::vec3& pos) : id(id), pos(pos) {} 67 | 68 | Point(float x, float y, float z) : id(-1), pos(x, y, z) {} 69 | Point(uint64_t id, float x, float y, float z) : id(id), pos(x, y, z) {} 70 | }; 71 | 72 | class ofxAlembic::Points 73 | { 74 | public: 75 | vector points; 76 | 77 | Points() {} 78 | Points(const vector& points); 79 | Points(const vector& points) : points(points) {} 80 | 81 | void get(Alembic::AbcGeom::OPointsSchema &schema) const; 82 | void set(Alembic::AbcGeom::IPointsSchema &schema, float time); 83 | 84 | void draw(); 85 | }; 86 | 87 | class ofxAlembic::Curves 88 | { 89 | public: 90 | vector curves; 91 | 92 | Curves() {} 93 | Curves(const vector &curves) : curves(curves) {} 94 | 95 | void get(Alembic::AbcGeom::OCurvesSchema &schema) const; 96 | void set(Alembic::AbcGeom::ICurvesSchema &schema, float time); 97 | 98 | void draw(); 99 | }; 100 | 101 | class ofxAlembic::Camera 102 | { 103 | public: 104 | 105 | Camera() : width(0), height(0) {} 106 | Camera(const ofCamera& camera) : width(0), height(0) {} 107 | 108 | void get(Alembic::AbcGeom::OCameraSchema &schema) const; 109 | void set(Alembic::AbcGeom::ICameraSchema &schema, float time); 110 | 111 | void setViewport(int width, int height) { this->width = width, this->height = height; } 112 | 113 | void updateParams(ofCamera &camera, ofMatrix4x4 xform); 114 | void updateSample(const ofCamera &camera); 115 | 116 | void draw(); 117 | 118 | protected: 119 | 120 | int width, height; 121 | Alembic::AbcGeom::CameraSample sample; 122 | }; 123 | -------------------------------------------------------------------------------- /src/ofxAlembicUtil.cpp: -------------------------------------------------------------------------------- 1 | #include "ofxAlembicUtil.h" 2 | 3 | 4 | static bool inited = false; 5 | 6 | void ofxAlembic::init() 7 | { 8 | if (inited) return; 9 | inited = true; 10 | 11 | ofLogVerbose("ofxAlembic") << "alembic version: " << Alembic::Abc::GetLibraryVersionShort(); 12 | } 13 | 14 | void ofxAlembic::transform(ofMesh &mesh, const glm::mat4 &m) 15 | { 16 | std::vector& vertices = mesh.getVertices(); 17 | 18 | for (int i = 0; i < vertices.size(); i++) 19 | { 20 | vertices[i] = glm::vec4(vertices[i], 1.f) * m; 21 | } 22 | 23 | if (mesh.hasNormals()) 24 | { 25 | std::vector& normals = mesh.getNormals(); 26 | 27 | for (int i = 0; i < normals.size(); i++) 28 | { 29 | const glm::vec3& v = normals[i]; 30 | normals[i] = glm::vec4(v.x, v.y, v.z, 0) * m; 31 | } 32 | } 33 | } 34 | 35 | std::vector toOf(const vector& v) 36 | { 37 | std::vector arr(v.size()); 38 | for (int i = 0; i < v.size(); i++) 39 | arr[i] = v[i].pos; 40 | 41 | return arr; 42 | } 43 | -------------------------------------------------------------------------------- /src/ofxAlembicUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | #include 6 | #include 7 | 8 | #include "ofxAlembicType.h" 9 | 10 | namespace ofxAlembic 11 | { 12 | struct Point; 13 | 14 | void init(); 15 | void transform(ofMesh &mesh, const glm::mat4 &m); 16 | } 17 | 18 | inline ofVec3f toOf(const Alembic::AbcGeom::V3f& v) 19 | { 20 | return ofVec3f(v.x, v.y, v.z); 21 | } 22 | 23 | inline Alembic::AbcGeom::V3f toAbc(const ofVec3f& v) 24 | { 25 | return Alembic::AbcGeom::V3f(v.x, v.y, v.z); 26 | } 27 | 28 | inline Alembic::AbcGeom::V3f toAbc(const glm::vec3& v) 29 | { 30 | return Alembic::AbcGeom::V3f(v.x, v.y, v.z); 31 | } 32 | 33 | inline ofVec2f toOf(const Alembic::AbcGeom::V2f& v) 34 | { 35 | return ofVec2f(v.x, v.y); 36 | } 37 | 38 | inline Alembic::AbcGeom::V2f toAbc(const ofVec2f& v) 39 | { 40 | return Alembic::AbcGeom::V2f(v.x, v.y); 41 | } 42 | 43 | inline Alembic::AbcGeom::V2f toAbc(const glm::vec2& v) 44 | { 45 | return Alembic::AbcGeom::V2f(v.x, v.y); 46 | } 47 | 48 | inline ofMatrix4x4 toOf(const Imath::M44f& v) 49 | { 50 | return ofMatrix4x4(v[0][0], v[0][1], v[0][2], v[0][3], 51 | v[1][0], v[1][1], v[1][2], v[1][3], 52 | v[2][0], v[2][1], v[2][2], v[2][3], 53 | v[3][0], v[3][1], v[3][2], v[3][3]); 54 | } 55 | 56 | inline Imath::M44f toAbc(const glm::mat4& v) 57 | { 58 | const float *p = glm::value_ptr(v); 59 | return Imath::M44f(p[0], p[1], p[2], p[3], 60 | p[4], p[5], p[6], p[7], 61 | p[8], p[9], p[10], p[11], 62 | p[12], p[13], p[14], p[15]); 63 | } 64 | 65 | std::vector toOf(const vector& v); 66 | -------------------------------------------------------------------------------- /src/ofxAlembicWriter.cpp: -------------------------------------------------------------------------------- 1 | #include "ofxAlembicWriter.h" 2 | 3 | using namespace ofxAlembic; 4 | using namespace Alembic::AbcGeom; 5 | 6 | bool Writer::open(const string& path, float fps, Alembic::AbcCoreFactory::IFactory::CoreType type) 7 | { 8 | ofxAlembic::init(); 9 | if ( type == Alembic::AbcCoreFactory::IFactory::kOgawa) { 10 | archive = OArchive(Alembic::AbcCoreOgawa::WriteArchive(), ofToDataPath(path)); 11 | } 12 | if (!archive.valid()) return false; 13 | 14 | archive.setCompressionHint(1); 15 | 16 | inv_fps = 1. / fps; 17 | rewind(); 18 | 19 | return true; 20 | } 21 | 22 | void Writer::close() 23 | { 24 | map::iterator it = object_map.begin(); 25 | while (it != object_map.end()) 26 | { 27 | delete it->second; 28 | it++; 29 | } 30 | 31 | object_map.clear(); 32 | 33 | if (archive.valid()) 34 | archive.reset(); 35 | } 36 | 37 | void Writer::addPoints(const string& path, const Points& points) 38 | { 39 | typedef OPoints Type; 40 | typedef Type::schema_type Schema; 41 | 42 | Type &object = getObject(path); 43 | Schema &schema = object.getSchema(); 44 | 45 | points.get(schema); 46 | } 47 | 48 | void Writer::addPolyMesh(const string& path, const PolyMesh& polymesh) 49 | { 50 | typedef OPolyMesh Type; 51 | typedef Type::schema_type Schema; 52 | 53 | Type &object = getObject(path); 54 | Schema &schema = object.getSchema(); 55 | 56 | polymesh.get(schema); 57 | } 58 | 59 | void Writer::addCurves(const string& path, const Curves& curves) 60 | { 61 | typedef OCurves Type; 62 | typedef Type::schema_type Schema; 63 | 64 | Type &object = getObject(path); 65 | Schema &schema = object.getSchema(); 66 | 67 | curves.get(schema); 68 | } 69 | 70 | void Writer::addXform(const string& path, const XForm& xform) 71 | { 72 | typedef OXform Type; 73 | typedef Type::schema_type Schema; 74 | 75 | Type &object = getObject(path); 76 | Schema &schema = object.getSchema(); 77 | 78 | xform.get(schema); 79 | } 80 | 81 | void Writer::addCamera(const string& path, const Camera& camera) 82 | { 83 | typedef OCamera Type; 84 | typedef Type::schema_type Schema; 85 | 86 | Type &object = getObject(path); 87 | Schema &schema = object.getSchema(); 88 | 89 | camera.get(schema); 90 | } 91 | 92 | void Writer::addCamera(const string& path, const ofCamera& ofcamera) 93 | { 94 | addXform(path, ofcamera.getGlobalTransformMatrix()); 95 | 96 | Camera camera(ofcamera); 97 | camera.updateSample(ofcamera); 98 | addCamera(path + "/cameraShape", camera); 99 | } 100 | 101 | // time 102 | 103 | void Writer::setTime(float time) 104 | { 105 | current_time = time; 106 | } 107 | 108 | void Writer::flashFrame() 109 | { 110 | setTime(getTime() + inv_fps); 111 | } 112 | 113 | void Writer::rewind() 114 | { 115 | setTime(0); 116 | } 117 | -------------------------------------------------------------------------------- /src/ofxAlembicWriter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | #include "ofxAlembicType.h" 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | namespace ofxAlembic 12 | { 13 | class Writer; 14 | } 15 | 16 | class ofxAlembic::Writer 17 | { 18 | public: 19 | 20 | ~Writer() { close(); } 21 | 22 | bool open(const string& path, float fps = 30, Alembic::AbcCoreFactory::IFactory::CoreType type = Alembic::AbcCoreFactory::IFactory::kOgawa); 23 | void close(); 24 | 25 | void addPoints(const string& path, const Points& points); 26 | void addPolyMesh(const string& path, const PolyMesh& polymesh); 27 | void addCurves(const string& path, const Curves& curves); 28 | void addXform(const string& path, const XForm& xform); 29 | void addCamera(const string& path, const Camera& camera); 30 | void addCamera(const string& path, const ofCamera& camera); 31 | 32 | void setTime(float time); 33 | float getTime() const { return current_time; } 34 | 35 | void rewind(); 36 | 37 | void flashFrame(); 38 | 39 | protected: 40 | 41 | map object_map; 42 | Alembic::AbcGeom::OArchive archive; 43 | 44 | float inv_fps; 45 | float current_time; 46 | 47 | template 48 | T& getObject(const string& path) 49 | { 50 | using namespace Alembic::AbcGeom; 51 | 52 | // validation 53 | if (path.empty() 54 | || path[0] != '/' 55 | || path[path.size() - 1] == '/') 56 | { 57 | ofLogError("ofxAlembic::Writer") << "invalid path: '" << path << "'"; 58 | throw; 59 | } 60 | 61 | map::iterator it = object_map.find(path); 62 | 63 | // return if already created 64 | if (it != object_map.end()) 65 | return *(T*)(it->second); 66 | 67 | vector e = ofSplitString(path, "/", true, true); 68 | string new_object_name = e.back(); 69 | 70 | TimeSampling Ts(inv_fps, current_time); 71 | Alembic::Util::uint32_t tsidx = archive.addTimeSampling(Ts); 72 | 73 | if (e.size() > 1) 74 | { 75 | // root object 76 | string parent_path = "/" + ofJoinString(vector(e.begin(), e.end() - 1), "/"); 77 | 78 | map::iterator parent_it = object_map.find(parent_path); 79 | if (parent_it == object_map.end()) 80 | { 81 | ofLogError("ofxAlembic::Writer") << "parent object not found: '" << path << "'"; 82 | throw; 83 | } 84 | 85 | OObject* parent_object = parent_it->second; 86 | 87 | T *t = new T(*parent_object, new_object_name); 88 | t->getSchema().setTimeSampling(tsidx); 89 | object_map[path] = t; 90 | 91 | return *t; 92 | } 93 | else 94 | { 95 | T *t = new T(archive.getTop(), new_object_name); 96 | t->getSchema().setTimeSampling(tsidx); 97 | object_map[path] = t; 98 | 99 | return *t; 100 | } 101 | } 102 | }; 103 | --------------------------------------------------------------------------------