├── .gitignore ├── Contributors.txt ├── LICENSE ├── README.md ├── Readme_Standalone_Version.txt ├── design ├── app_icon.ico ├── app_icon.xcf ├── delete_icon.png ├── delete_icon.xcf ├── icon_sourcefiles │ ├── 1stperson.png │ ├── 1view.png │ ├── 2view.png │ ├── 2view_hor.png │ ├── 3dviewer.ai │ ├── 4view.png │ ├── boundbox.png │ ├── export.png │ ├── joints.png │ ├── load.png │ ├── mesh.png │ ├── normal.png │ ├── normalview.png │ ├── orbit.png │ ├── picking.png │ ├── root.png │ ├── settings.png │ ├── shading.png │ ├── skeletonview.png │ ├── texture.png │ └── wireframe.png ├── open3modIconDesign-1.odt ├── open3modIconDesign-1.pdf ├── redo.ico └── undo.ico ├── libs ├── Leap │ ├── LeapCSharp.NET4.0.dll │ ├── x64 │ │ ├── Leap.dll │ │ └── LeapCSharp.dll │ └── x86 │ │ ├── Leap.dll │ │ └── LeapCSharp.dll ├── Mono.Cecil │ ├── Net20 │ │ ├── Mono.Cecil.Pdb.dll │ │ └── Mono.Cecil.dll │ └── Net40 │ │ ├── Mono.Cecil.Pdb.dll │ │ └── Mono.Cecil.dll ├── OpenTK │ ├── License.txt │ ├── OpenTK.GLControl.dll │ ├── OpenTK.GLControl.xml │ ├── OpenTK.dll │ └── OpenTK.xml ├── SmartThreadPool │ └── SmartThreadPool │ │ ├── CallerThreadContext.cs │ │ ├── CanceledWorkItemsGroup.cs │ │ ├── EventWaitHandle.cs │ │ ├── EventWaitHandleFactory.cs │ │ ├── Exceptions.cs │ │ ├── Interfaces.cs │ │ ├── InternalInterfaces.cs │ │ ├── PriorityQueue.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── SLExt.cs │ │ ├── STPEventWaitHandle.cs │ │ ├── STPPerformanceCounter.cs │ │ ├── STPStartInfo.cs │ │ ├── SmartThreadPool.ThreadEntry.cs │ │ ├── SmartThreadPool.cs │ │ ├── SmartThreadPool.csproj │ │ ├── Stopwatch.cs │ │ ├── SynchronizedDictionary.cs │ │ ├── WIGStartInfo.cs │ │ ├── WorkItem.WorkItemResult.cs │ │ ├── WorkItem.cs │ │ ├── WorkItemFactory.cs │ │ ├── WorkItemInfo.cs │ │ ├── WorkItemResultTWrapper.cs │ │ ├── WorkItemsGroup.cs │ │ ├── WorkItemsGroupBase.cs │ │ └── WorkItemsQueue.cs ├── assimp-net │ ├── AssimpNet.Interop.Generator │ │ ├── App.config │ │ ├── AssimpNet.Interop.Generator.csproj │ │ ├── Program.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── AssimpNet.sln │ ├── AssimpNet │ │ ├── Animation.cs │ │ ├── AssimpContext.cs │ │ ├── AssimpException.cs │ │ ├── AssimpKey.snk │ │ ├── AssimpLicense.txt │ │ ├── AssimpNet.csproj │ │ ├── Bone.cs │ │ ├── Camera.cs │ │ ├── Color3D.cs │ │ ├── Color4D.cs │ │ ├── Configs │ │ │ └── PropertyConfig.cs │ │ ├── EmbeddedTexture.cs │ │ ├── Enums.cs │ │ ├── ExportDataBlob.cs │ │ ├── ExportFormatDescription.cs │ │ ├── Face.cs │ │ ├── FileIOSystem.cs │ │ ├── IOStream.cs │ │ ├── IOSystem.cs │ │ ├── Interfaces.cs │ │ ├── InternalInterop.cs │ │ ├── Light.cs │ │ ├── LogStream.cs │ │ ├── Material.cs │ │ ├── MaterialProperty.cs │ │ ├── Matrix3x3.cs │ │ ├── Matrix4x4.cs │ │ ├── MemoryHelper.cs │ │ ├── Mesh.cs │ │ ├── MeshAnimationAttachment.cs │ │ ├── MeshAnimationChannel.cs │ │ ├── MeshKey.cs │ │ ├── Node.cs │ │ ├── NodeAnimationChannel.cs │ │ ├── NodeCollection.cs │ │ ├── Plane.cs │ │ ├── PostProcessPreset.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Quaternion.cs │ │ ├── QuaternionKey.cs │ │ ├── Ray.cs │ │ ├── Scene.cs │ │ ├── Texel.cs │ │ ├── TextureSlot.cs │ │ ├── UVTransform.cs │ │ ├── Unmanaged │ │ │ ├── AiConfigs.cs │ │ │ ├── AiDefines.cs │ │ │ ├── AiMatKeys.cs │ │ │ ├── AssimpLibrary.cs │ │ │ └── UnmanagedStructures.cs │ │ ├── Vector2D.cs │ │ ├── Vector3D.cs │ │ ├── VectorKey.cs │ │ └── VertexWeight.cs │ └── libs │ │ └── Assimp │ │ ├── Assimp32.dll │ │ └── Assimp64.dll ├── devil-net │ ├── DevILNet.sln │ ├── DevILNet │ │ ├── Collections.cs │ │ ├── DevILNet.csproj │ │ ├── Enums.cs │ │ ├── FilterEngine.cs │ │ ├── Image.cs │ │ ├── ImageData.cs │ │ ├── ImageExporter.cs │ │ ├── ImageImporter.cs │ │ ├── ImageStates.cs │ │ ├── ManagedImage.cs │ │ ├── MemoryHelper.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Structures.cs │ │ ├── TransformEngine.cs │ │ └── Unmanaged │ │ │ ├── Enums.cs │ │ │ ├── IL.cs │ │ │ ├── ILDefines.cs │ │ │ ├── ILU.cs │ │ │ ├── ILUDefines.cs │ │ │ └── Structures.cs │ └── Libs │ │ ├── DevIL_License.txt │ │ ├── x64 │ │ ├── DevIL.dll │ │ └── ILU.dll │ │ └── x86 │ │ ├── DevIL.dll │ │ └── ILU.dll └── kd-sharp │ ├── KDTree │ ├── DistanceFunctions.cs │ ├── IntervalHeap.cs │ ├── KDNode.cs │ ├── KDTree.cs │ ├── KDTree.csproj │ ├── MinHeap.cs │ ├── NearestNeighbour.cs │ └── Properties │ │ └── AssemblyInfo.cs │ ├── LICENSE │ └── README.md ├── licenses ├── LICENSE_Assimp ├── LICENSE_AssimpNet ├── LICENSE_DevilNet ├── LICENSE_OpenTK ├── LICENSE_SmartThreadPool └── LICENSE_TestFiles ├── open3mod.sln ├── open3mod ├── About.Designer.cs ├── About.cs ├── About.resx ├── AnimEvaluator.cs ├── AnimationInspectionView.Designer.cs ├── AnimationInspectionView.cs ├── AnimationInspectionView.resx ├── App.config ├── AssimpToOpenTk.cs ├── BoneByVertexMap.cs ├── ChangeTracker.cs ├── CoreSettings.Designer.cs ├── CoreSettings.settings ├── CpuSkinningEvaluator.cs ├── DonationDialog.Designer.cs ├── DonationDialog.cs ├── DonationDialog.resx ├── EditMesh.cs ├── EmbeddedTextureLoader.cs ├── EnumExtensionsNet4Backport.cs ├── ExportDialog.Designer.cs ├── ExportDialog.cs ├── ExportDialog.resx ├── ExportSettings.Designer.cs ├── ExportSettings.settings ├── FileAssociations.cs ├── FolderSetDisplay.Designer.cs ├── FolderSetDisplay.cs ├── FolderSetDisplay.resx ├── FpsCameraController.cs ├── FpsTracker.cs ├── GenericShallowCopy.cs ├── GraphicsSettings.Designer.cs ├── GraphicsSettings.settings ├── HierarchyInspectionView.Designer.cs ├── HierarchyInspectionView.cs ├── HierarchyInspectionView.resx ├── ICameraController.cs ├── IHoverUpdateDialog.cs ├── ISceneRenderer.cs ├── ImageFromResource.cs ├── Images │ ├── FailedToLoad.bmp │ ├── FailedToLoad.png │ ├── FailedToLoad.xcf │ ├── HUDBar.png │ ├── HUD_FPS_Hover.png │ ├── HUD_FPS_Normal.png │ ├── HUD_FPS_Normal.xcf │ ├── HUD_FPS_Selected.png │ ├── HUD_Orbit_Hover.png │ ├── HUD_Orbit_Normal.png │ ├── HUD_Orbit_Normal.xcf │ ├── HUD_Orbit_Selected.png │ ├── HUD_Picking_Hover.png │ ├── HUD_Picking_Normal.png │ ├── HUD_Picking_Selected.png │ ├── HUD_X_Hover.png │ ├── HUD_X_Normal.png │ ├── HUD_X_Normal.xcf │ ├── HUD_X_Selected.png │ ├── HUD_Y_Hover.png │ ├── HUD_Y_Normal.png │ ├── HUD_Y_Normal.xcf │ ├── HUD_Y_Selected.png │ ├── HUD_Z_Hover.png │ ├── HUD_Z_Normal.png │ ├── HUD_Z_Normal.xcf │ ├── HUD_Z_Selected.png │ ├── HierarchyIconGenerated.xcf │ ├── HierarchyIconGenericNode.xcf │ ├── HierarchyIconHidden.xcf │ ├── HierarchyIconJoint.xcf │ ├── HierarchyIconMesh.xcf │ ├── PlayAnim.png │ ├── PlayAnim.xcf │ ├── StopAnim.png │ ├── StopAnim.xcf │ ├── TextureLoading.gif │ ├── TextureTransparentBackground.png │ ├── TipOfTheDay │ │ ├── Tip0.png │ │ ├── Tip0.xcf │ │ ├── Tip1.png │ │ ├── Tip1.xcf │ │ ├── Tip2.png │ │ ├── Tip2.xcf │ │ ├── Tip3.png │ │ ├── Tip3.xcf │ │ ├── Tip4.png │ │ ├── Tip4.xcf │ │ ├── Tip5.png │ │ └── Tip5.xcf │ ├── alex_happy.png │ ├── alex_unhappy.png │ └── fps.png ├── InspectionView.Designer.cs ├── InspectionView.cs ├── InspectionView.resx ├── LeapListener.cs ├── LinqZipNet4Backport.cs ├── LogPipe.cs ├── LogStore.cs ├── LogViewer.Designer.cs ├── LogViewer.cs ├── LogViewer.resx ├── MainWindow.Designer.cs ├── MainWindow.cs ├── MainWindow.resx ├── MainWindow_Input.cs ├── MaterialInspectionView.cs ├── MaterialMapper.cs ├── MaterialMapperClassicGl.cs ├── MaterialMapperModernGl.cs ├── MaterialPreviewRenderer.cs ├── MaterialThumbnailControl.cs ├── MeshDetailsDialog.Designer.cs ├── MeshDetailsDialog.cs ├── MeshDetailsDialog.resx ├── MeshInfoPopup.Designer.cs ├── MeshInfoPopup.cs ├── MeshInfoPopup.resx ├── MeshUtil.cs ├── NodeInfoPopup.Designer.cs ├── NodeInfoPopup.cs ├── NodeInfoPopup.resx ├── NodeItemsDialog.Designer.cs ├── NodeItemsDialog.cs ├── NodeItemsDialog.resx ├── NormalVectorGenerator.cs ├── NormalVectorGeneratorDialog.Designer.cs ├── NormalVectorGeneratorDialog.cs ├── NormalVectorGeneratorDialog.resx ├── OpenTkToAssimp.cs ├── OrbitCameraController.cs ├── OverlayBoundingBox.cs ├── OverlayLightSource.cs ├── OverlayNormals.cs ├── OverlaySkeleton.cs ├── ParallelForEach.cs ├── PickingCameraController.cs ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── RenameDialog.Designer.cs ├── RenameDialog.cs ├── RenameDialog.resx ├── RenderControl.cs ├── RenderMesh.cs ├── Renderer.cs ├── RoundedRectangle.cs ├── RunOnceGuard.cs ├── SafeRenamer.cs ├── Scene.cs ├── SceneAnimator.cs ├── SceneRendererClassicGl.cs ├── SceneRendererModernGl.cs ├── SceneRendererShared.cs ├── SettingsDialog.Designer.cs ├── SettingsDialog.cs ├── SettingsDialog.resx ├── Shader.cs ├── Shader │ ├── UberFragmentShader.glsl │ └── UberVertexShader.glsl ├── ShaderGen.cs ├── SphereGeometry.cs ├── Tab.cs ├── TabUISkeleton.Designer.cs ├── TabUISkeleton.cs ├── TabUISkeleton.resx ├── TextOverlay.cs ├── Texture.cs ├── TextureDetailsDialog.Designer.cs ├── TextureDetailsDialog.cs ├── TextureDetailsDialog.resx ├── TextureExporter.cs ├── TextureInspectionView.cs ├── TextureLoader.cs ├── TextureQueue.cs ├── TextureSet.cs ├── TextureThumbnailControl.cs ├── ThumbnailControlBase.Designer.cs ├── ThumbnailControlBase.cs ├── ThumbnailControlBase.resx ├── ThumbnailViewBase.cs ├── TimeSlideControl.Designer.cs ├── TimeSlideControl.cs ├── TimeSlideControl.resx ├── TipOfTheDayDialog.Designer.cs ├── TipOfTheDayDialog.cs ├── TipOfTheDayDialog.resx ├── TrafoMatrixViewControl.Designer.cs ├── TrafoMatrixViewControl.cs ├── TrafoMatrixViewControl.resx ├── UIState.cs ├── UndoStack.cs ├── Viewport.cs ├── app_icon.ico └── open3mod.csproj ├── scripts ├── abbrev.py ├── fixheaders.py └── headers │ ├── footer_cs.txt │ └── header_cs.txt ├── setup ├── License.rtf ├── Setup.isl └── Setup.isproj └── testdata ├── redist ├── duck │ ├── duck.dae │ └── duckCM.tga ├── jeep │ ├── jeep1.jpg │ ├── jeep1.ms3d │ └── jeep1.readme.txt └── lost-empire │ ├── copyright.txt │ ├── lost_empire-Alpha.png │ ├── lost_empire-RGB.png │ ├── lost_empire-RGBA.png │ ├── lost_empire.mtl │ └── lost_empire.obj └── scenes ├── COLLADA.dae ├── HUMAN.blend ├── SpiderTex.jpg ├── Spider_binary.stl ├── SuzanneSubdiv_252.blend ├── Testwuson.X ├── UglyVertexColors.lwo ├── Wuson.ply ├── Wuson.stl ├── drkwood2.jpg ├── engineflare1.jpg ├── fels.3ds ├── hierarchy_smoothed.lwo ├── spider.mtl ├── spider.obj ├── wal67ar_small.jpg └── wal69ar_small.jpg /.gitignore: -------------------------------------------------------------------------------- 1 | # git ignore file 2 | _Resharper* 3 | obj/ 4 | bin/ 5 | *.suo 6 | *.user 7 | *.pyc 8 | releases/ 9 | *.pdb 10 | -------------------------------------------------------------------------------- /Contributors.txt: -------------------------------------------------------------------------------- 1 | Contributors to Open3Mod 2 | ================================================= 3 | In chronological order (Github username in parentheses) 4 | 5 | 6 | Alexander Gessler (acgessler) 7 | Project Founder, Core Development 8 | 9 | Tobias Rittig (diiigle) 10 | Leap Motion Support, Bugfixes, Usability Tweaks 11 | 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | ===================================================================== 2 | 3 | Open 3D Model Viewer (open3mod) 4 | 5 | Copyright (c) 2012-2015, open3mod contributors. 6 | All rights reserved. 7 | 8 | Redistribution and use of this software in source and binary forms, 9 | with or without modification, are permitted provided that the 10 | following conditions are met: 11 | 12 | * Redistributions of source code must retain the above 13 | copyright notice, this list of conditions and the 14 | following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above 17 | copyright notice, this list of conditions and the 18 | following disclaimer in the documentation and/or other 19 | materials provided with the distribution. 20 | 21 | * Neither the name of the project, nor the names of its 22 | contributors may be used to endorse or promote products 23 | derived from this software without specific prior 24 | written permission of the copyright holders. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 32 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 33 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 34 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | 38 | ===================================================================== 39 | The following external license files apply to cover third party 40 | components: 41 | 42 | licenses/LICENSE_* -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Open 3D Model Viewer 2 | 3 | A general-purpose 3D model viewer. Based on 4 | [Open Asset Import Library](https://github.com/assimp/assimp), it supports 5 | reading about __fourty 3D file formats__, including __FBX, DXF, Collada, Obj, X, PLY, 3DS, LWO, LWS, STL__ 6 | and __IFC__ ([full list](http://assimp.sourceforge.net/main_features_formats.html)). 7 | 8 | ![Screenshot of open3mod (09-05-2013)](http://s1.directupload.net/images/130509/44lqi4p9.png) 9 | 10 | __Some key features:__ 11 | 12 | - Powerful 3D preview that leverages modern rendering and lighting technologies and thus gives a good impression of how 13 | scenes would look in a modern 3D game, or even in non-realtime renderings. 14 | - Skeletal animation playback at arbitrary speed or single-step. 15 | - Efficient tools to inspect the scene or parts of it. Filtering and isolating elements is made as easy as possible. 16 | - Tabbed UI, so multiple scenes can be open at the same time 17 | - Replace textures and fix missing paths by Drag & Drop 18 | - Multiple viewports (up to 4) and different camera modes such as orbit cameras or even First-Person 19 | - A multitude of texture file formats is supported through DevIL. Textures are being loaded asynchronously, so there 20 | are no extra waiting times if you only care about geometry 21 | - Export of scenes (or parts of scenes) is supported. Output formats include Collada, PLY, STL, OBJ 22 | (as of now). 23 | 24 | ## License 25 | 26 | 3-clause BSD license. Read `LICENSE` for the details, but it boils down to "use as you like but reproduce the copyright notice". 27 | 28 | ## Contribute 29 | 30 | Contributions to the projects are highly appreciated. Simply fork the project on Github, hack, and send me a PR. 31 | 32 | As a starter, lots of open3mod features (such as high-quality rendering) have been started and are present in the codebase, but are currently disabled. Contact me if you'd like to help out, but don't know where to start. 33 | -------------------------------------------------------------------------------- /Readme_Standalone_Version.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/Readme_Standalone_Version.txt -------------------------------------------------------------------------------- /design/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/app_icon.ico -------------------------------------------------------------------------------- /design/app_icon.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/app_icon.xcf -------------------------------------------------------------------------------- /design/delete_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/delete_icon.png -------------------------------------------------------------------------------- /design/delete_icon.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/delete_icon.xcf -------------------------------------------------------------------------------- /design/icon_sourcefiles/1stperson.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/1stperson.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/1view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/1view.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/2view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/2view.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/2view_hor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/2view_hor.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/3dviewer.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/3dviewer.ai -------------------------------------------------------------------------------- /design/icon_sourcefiles/4view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/4view.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/boundbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/boundbox.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/export.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/joints.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/joints.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/load.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/load.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/mesh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/mesh.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/normal.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/normalview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/normalview.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/orbit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/orbit.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/picking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/picking.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/root.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/root.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/settings.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/shading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/shading.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/skeletonview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/skeletonview.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/texture.png -------------------------------------------------------------------------------- /design/icon_sourcefiles/wireframe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/icon_sourcefiles/wireframe.png -------------------------------------------------------------------------------- /design/open3modIconDesign-1.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/open3modIconDesign-1.odt -------------------------------------------------------------------------------- /design/open3modIconDesign-1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/open3modIconDesign-1.pdf -------------------------------------------------------------------------------- /design/redo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/redo.ico -------------------------------------------------------------------------------- /design/undo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/design/undo.ico -------------------------------------------------------------------------------- /libs/Leap/LeapCSharp.NET4.0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/Leap/LeapCSharp.NET4.0.dll -------------------------------------------------------------------------------- /libs/Leap/x64/Leap.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/Leap/x64/Leap.dll -------------------------------------------------------------------------------- /libs/Leap/x64/LeapCSharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/Leap/x64/LeapCSharp.dll -------------------------------------------------------------------------------- /libs/Leap/x86/Leap.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/Leap/x86/Leap.dll -------------------------------------------------------------------------------- /libs/Leap/x86/LeapCSharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/Leap/x86/LeapCSharp.dll -------------------------------------------------------------------------------- /libs/Mono.Cecil/Net20/Mono.Cecil.Pdb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/Mono.Cecil/Net20/Mono.Cecil.Pdb.dll -------------------------------------------------------------------------------- /libs/Mono.Cecil/Net20/Mono.Cecil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/Mono.Cecil/Net20/Mono.Cecil.dll -------------------------------------------------------------------------------- /libs/Mono.Cecil/Net40/Mono.Cecil.Pdb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/Mono.Cecil/Net40/Mono.Cecil.Pdb.dll -------------------------------------------------------------------------------- /libs/Mono.Cecil/Net40/Mono.Cecil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/Mono.Cecil/Net40/Mono.Cecil.dll -------------------------------------------------------------------------------- /libs/OpenTK/License.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/OpenTK/License.txt -------------------------------------------------------------------------------- /libs/OpenTK/OpenTK.GLControl.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/OpenTK/OpenTK.GLControl.dll -------------------------------------------------------------------------------- /libs/OpenTK/OpenTK.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/OpenTK/OpenTK.dll -------------------------------------------------------------------------------- /libs/SmartThreadPool/SmartThreadPool/CanceledWorkItemsGroup.cs: -------------------------------------------------------------------------------- 1 | namespace Amib.Threading.Internal 2 | { 3 | internal class CanceledWorkItemsGroup 4 | { 5 | public readonly static CanceledWorkItemsGroup NotCanceledWorkItemsGroup = new CanceledWorkItemsGroup(); 6 | 7 | public CanceledWorkItemsGroup() 8 | { 9 | IsCanceled = false; 10 | } 11 | 12 | public bool IsCanceled { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /libs/SmartThreadPool/SmartThreadPool/EventWaitHandle.cs: -------------------------------------------------------------------------------- 1 | #if (_WINDOWS_CE) 2 | 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Threading; 6 | 7 | namespace Amib.Threading.Internal 8 | { 9 | /// 10 | /// EventWaitHandle class 11 | /// In WindowsCE this class doesn't exist and I needed the WaitAll and WaitAny implementation. 12 | /// So I wrote this class to implement these two methods with some of their overloads. 13 | /// It uses the WaitForMultipleObjects API to do the WaitAll and WaitAny. 14 | /// Note that this class doesn't even inherit from WaitHandle! 15 | /// 16 | public class STPEventWaitHandle 17 | { 18 | #region Public Constants 19 | 20 | public const int WaitTimeout = Timeout.Infinite; 21 | 22 | #endregion 23 | 24 | #region Private External Constants 25 | 26 | private const Int32 WAIT_FAILED = -1; 27 | private const Int32 WAIT_TIMEOUT = 0x102; 28 | private const UInt32 INFINITE = 0xFFFFFFFF; 29 | 30 | #endregion 31 | 32 | #region WaitAll and WaitAny 33 | 34 | internal static bool WaitOne(WaitHandle waitHandle, int millisecondsTimeout, bool exitContext) 35 | { 36 | return waitHandle.WaitOne(millisecondsTimeout, exitContext); 37 | } 38 | 39 | private static IntPtr[] PrepareNativeHandles(WaitHandle[] waitHandles) 40 | { 41 | IntPtr[] nativeHandles = new IntPtr[waitHandles.Length]; 42 | for (int i = 0; i < waitHandles.Length; i++) 43 | { 44 | nativeHandles[i] = waitHandles[i].Handle; 45 | } 46 | return nativeHandles; 47 | } 48 | 49 | public static bool WaitAll(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) 50 | { 51 | uint timeout = millisecondsTimeout < 0 ? INFINITE : (uint)millisecondsTimeout; 52 | 53 | IntPtr[] nativeHandles = PrepareNativeHandles(waitHandles); 54 | 55 | int result = WaitForMultipleObjects((uint)waitHandles.Length, nativeHandles, true, timeout); 56 | 57 | if (result == WAIT_TIMEOUT || result == WAIT_FAILED) 58 | { 59 | return false; 60 | } 61 | 62 | return true; 63 | } 64 | 65 | 66 | public static int WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) 67 | { 68 | uint timeout = millisecondsTimeout < 0 ? INFINITE : (uint)millisecondsTimeout; 69 | 70 | IntPtr[] nativeHandles = PrepareNativeHandles(waitHandles); 71 | 72 | int result = WaitForMultipleObjects((uint)waitHandles.Length, nativeHandles, false, timeout); 73 | 74 | if (result >= 0 && result < waitHandles.Length) 75 | { 76 | return result; 77 | } 78 | 79 | return -1; 80 | } 81 | 82 | public static int WaitAny(WaitHandle[] waitHandles) 83 | { 84 | return WaitAny(waitHandles, Timeout.Infinite, false); 85 | } 86 | 87 | public static int WaitAny(WaitHandle[] waitHandles, TimeSpan timeout, bool exitContext) 88 | { 89 | int millisecondsTimeout = (int)timeout.TotalMilliseconds; 90 | 91 | return WaitAny(waitHandles, millisecondsTimeout, false); 92 | } 93 | 94 | #endregion 95 | 96 | #region External methods 97 | 98 | [DllImport("coredll.dll", SetLastError = true)] 99 | public static extern int WaitForMultipleObjects(uint nCount, IntPtr[] lpHandles, bool fWaitAll, uint dwMilliseconds); 100 | 101 | #endregion 102 | } 103 | } 104 | #endif -------------------------------------------------------------------------------- /libs/SmartThreadPool/SmartThreadPool/EventWaitHandleFactory.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | 3 | #if (_WINDOWS_CE) 4 | using System; 5 | using System.Runtime.InteropServices; 6 | #endif 7 | 8 | namespace Amib.Threading.Internal 9 | { 10 | /// 11 | /// EventWaitHandleFactory class. 12 | /// This is a static class that creates AutoResetEvent and ManualResetEvent objects. 13 | /// In WindowCE the WaitForMultipleObjects API fails to use the Handle property 14 | /// of XxxResetEvent. It can use only handles that were created by the CreateEvent API. 15 | /// Consequently this class creates the needed XxxResetEvent and replaces the handle if 16 | /// it's a WindowsCE OS. 17 | /// 18 | public static class EventWaitHandleFactory 19 | { 20 | /// 21 | /// Create a new AutoResetEvent object 22 | /// 23 | /// Return a new AutoResetEvent object 24 | public static AutoResetEvent CreateAutoResetEvent() 25 | { 26 | AutoResetEvent waitHandle = new AutoResetEvent(false); 27 | 28 | #if (_WINDOWS_CE) 29 | ReplaceEventHandle(waitHandle, false, false); 30 | #endif 31 | 32 | return waitHandle; 33 | } 34 | 35 | /// 36 | /// Create a new ManualResetEvent object 37 | /// 38 | /// Return a new ManualResetEvent object 39 | public static ManualResetEvent CreateManualResetEvent(bool initialState) 40 | { 41 | ManualResetEvent waitHandle = new ManualResetEvent(initialState); 42 | 43 | #if (_WINDOWS_CE) 44 | ReplaceEventHandle(waitHandle, true, initialState); 45 | #endif 46 | 47 | return waitHandle; 48 | } 49 | 50 | #if (_WINDOWS_CE) 51 | 52 | /// 53 | /// Replace the event handle 54 | /// 55 | /// The WaitHandle object which its handle needs to be replaced. 56 | /// Indicates if the event is a ManualResetEvent (true) or an AutoResetEvent (false) 57 | /// The initial state of the event 58 | private static void ReplaceEventHandle(WaitHandle waitHandle, bool manualReset, bool initialState) 59 | { 60 | // Store the old handle 61 | IntPtr oldHandle = waitHandle.Handle; 62 | 63 | // Create a new event 64 | IntPtr newHandle = CreateEvent(IntPtr.Zero, manualReset, initialState, null); 65 | 66 | // Replace the old event with the new event 67 | waitHandle.Handle = newHandle; 68 | 69 | // Close the old event 70 | CloseHandle (oldHandle); 71 | } 72 | 73 | [DllImport("coredll.dll", SetLastError = true)] 74 | public static extern IntPtr CreateEvent(IntPtr lpEventAttributes, bool bManualReset, bool bInitialState, string lpName); 75 | 76 | //Handle 77 | [DllImport("coredll.dll", SetLastError = true)] 78 | public static extern bool CloseHandle(IntPtr hObject); 79 | #endif 80 | 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /libs/SmartThreadPool/SmartThreadPool/Exceptions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | #if !(_WINDOWS_CE) 3 | using System.Runtime.Serialization; 4 | #endif 5 | 6 | namespace Amib.Threading 7 | { 8 | #region Exceptions 9 | 10 | /// 11 | /// Represents an exception in case IWorkItemResult.GetResult has been canceled 12 | /// 13 | public sealed partial class WorkItemCancelException : Exception 14 | { 15 | public WorkItemCancelException() 16 | { 17 | } 18 | 19 | public WorkItemCancelException(string message) 20 | : base(message) 21 | { 22 | } 23 | 24 | public WorkItemCancelException(string message, Exception e) 25 | : base(message, e) 26 | { 27 | } 28 | } 29 | 30 | /// 31 | /// Represents an exception in case IWorkItemResult.GetResult has been timed out 32 | /// 33 | public sealed partial class WorkItemTimeoutException : Exception 34 | { 35 | public WorkItemTimeoutException() 36 | { 37 | } 38 | 39 | public WorkItemTimeoutException(string message) 40 | : base(message) 41 | { 42 | } 43 | 44 | public WorkItemTimeoutException(string message, Exception e) 45 | : base(message, e) 46 | { 47 | } 48 | } 49 | 50 | /// 51 | /// Represents an exception in case IWorkItemResult.GetResult has been timed out 52 | /// 53 | public sealed partial class WorkItemResultException : Exception 54 | { 55 | public WorkItemResultException() 56 | { 57 | } 58 | 59 | public WorkItemResultException(string message) 60 | : base(message) 61 | { 62 | } 63 | 64 | public WorkItemResultException(string message, Exception e) 65 | : base(message, e) 66 | { 67 | } 68 | } 69 | 70 | 71 | #if !(_WINDOWS_CE) && !(_SILVERLIGHT) && !(WINDOWS_PHONE) 72 | /// 73 | /// Represents an exception in case IWorkItemResult.GetResult has been canceled 74 | /// 75 | [Serializable] 76 | public sealed partial class WorkItemCancelException 77 | { 78 | public WorkItemCancelException(SerializationInfo si, StreamingContext sc) 79 | : base(si, sc) 80 | { 81 | } 82 | } 83 | 84 | /// 85 | /// Represents an exception in case IWorkItemResult.GetResult has been timed out 86 | /// 87 | [Serializable] 88 | public sealed partial class WorkItemTimeoutException 89 | { 90 | public WorkItemTimeoutException(SerializationInfo si, StreamingContext sc) 91 | : base(si, sc) 92 | { 93 | } 94 | } 95 | 96 | /// 97 | /// Represents an exception in case IWorkItemResult.GetResult has been timed out 98 | /// 99 | [Serializable] 100 | public sealed partial class WorkItemResultException 101 | { 102 | public WorkItemResultException(SerializationInfo si, StreamingContext sc) 103 | : base(si, sc) 104 | { 105 | } 106 | } 107 | 108 | #endif 109 | 110 | #endregion 111 | } 112 | -------------------------------------------------------------------------------- /libs/SmartThreadPool/SmartThreadPool/InternalInterfaces.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Amib.Threading.Internal 3 | { 4 | /// 5 | /// An internal delegate to call when the WorkItem starts or completes 6 | /// 7 | internal delegate void WorkItemStateCallback(WorkItem workItem); 8 | 9 | internal interface IInternalWorkItemResult 10 | { 11 | event WorkItemStateCallback OnWorkItemStarted; 12 | event WorkItemStateCallback OnWorkItemCompleted; 13 | } 14 | 15 | internal interface IInternalWaitableResult 16 | { 17 | /// 18 | /// This method is intent for internal use. 19 | /// 20 | IWorkItemResult GetWorkItemResult(); 21 | } 22 | 23 | public interface IHasWorkItemPriority 24 | { 25 | WorkItemPriority WorkItemPriority { get; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /libs/SmartThreadPool/SmartThreadPool/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("Amib.Threading")] 6 | [assembly: AssemblyDescription("Smart Thread Pool")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("Amib.Threading")] 10 | [assembly: AssemblyCopyright("")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | [assembly: ComVisible(false)] 14 | [assembly: Guid("c764a3de-c4f8-434d-85b5-a09830d1e44f")] 15 | [assembly: AssemblyVersion("2.2.3.0")] 16 | 17 | #if (_PUBLISH) 18 | [assembly: InternalsVisibleTo("STPTests,PublicKey=00240000048000009400000006020000002400005253413100040000010001004fe3d39add741ba7c8d52cd1eb0d94c7d79060ad956cbaff0e51c1dce94db10356b261778bc1ac3114b3218434da6fcd8416dd5507653809598f7d2afc422099ce4f6b7b0477f18e6c57c727ef2a7ab6ee56e6b4589fe44cb0e25f2875a3c65ab0383ee33c4dd93023f7ce1218bebc8b7a9a1dac878938f5c4f45ea74b6bd8ad")] 19 | #else 20 | [assembly: InternalsVisibleTo("STPTests")] 21 | #endif 22 | 23 | 24 | -------------------------------------------------------------------------------- /libs/SmartThreadPool/SmartThreadPool/SLExt.cs: -------------------------------------------------------------------------------- 1 | #if _SILVERLIGHT 2 | 3 | using System.Threading; 4 | 5 | namespace Amib.Threading 6 | { 7 | public enum ThreadPriority 8 | { 9 | Lowest, 10 | BelowNormal, 11 | Normal, 12 | AboveNormal, 13 | Highest, 14 | } 15 | } 16 | #endif 17 | -------------------------------------------------------------------------------- /libs/SmartThreadPool/SmartThreadPool/STPEventWaitHandle.cs: -------------------------------------------------------------------------------- 1 | #if !(_WINDOWS_CE) 2 | 3 | using System; 4 | using System.Threading; 5 | 6 | namespace Amib.Threading.Internal 7 | { 8 | #if _WINDOWS || WINDOWS_PHONE 9 | internal static class STPEventWaitHandle 10 | { 11 | public const int WaitTimeout = Timeout.Infinite; 12 | 13 | internal static bool WaitAll(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) 14 | { 15 | // WaitAll() does not support waiting for multiple handles on STA threads. 16 | // http://stackoverflow.com/questions/4192834/ 17 | if (Thread.CurrentThread.GetApartmentState() == ApartmentState.STA) 18 | { 19 | foreach (var e in waitHandles) 20 | { 21 | e.WaitOne(millisecondsTimeout); 22 | } 23 | return true; 24 | } 25 | return WaitHandle.WaitAll(waitHandles, millisecondsTimeout); 26 | } 27 | 28 | internal static int WaitAny(WaitHandle[] waitHandles) 29 | { 30 | return WaitHandle.WaitAny(waitHandles); 31 | } 32 | 33 | internal static int WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) 34 | { 35 | return WaitHandle.WaitAny(waitHandles, millisecondsTimeout); 36 | } 37 | 38 | internal static bool WaitOne(WaitHandle waitHandle, int millisecondsTimeout, bool exitContext) 39 | { 40 | return waitHandle.WaitOne(millisecondsTimeout); 41 | } 42 | } 43 | #else 44 | internal static class STPEventWaitHandle 45 | { 46 | public const int WaitTimeout = Timeout.Infinite; 47 | 48 | internal static bool WaitAll(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) 49 | { 50 | return WaitHandle.WaitAll(waitHandles, millisecondsTimeout, exitContext); 51 | } 52 | 53 | internal static int WaitAny(WaitHandle[] waitHandles) 54 | { 55 | return WaitHandle.WaitAny(waitHandles); 56 | } 57 | 58 | internal static int WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) 59 | { 60 | return WaitHandle.WaitAny(waitHandles, millisecondsTimeout, exitContext); 61 | } 62 | 63 | internal static bool WaitOne(WaitHandle waitHandle, int millisecondsTimeout, bool exitContext) 64 | { 65 | return waitHandle.WaitOne(millisecondsTimeout, exitContext); 66 | } 67 | } 68 | #endif 69 | 70 | } 71 | 72 | #endif -------------------------------------------------------------------------------- /libs/SmartThreadPool/SmartThreadPool/SmartThreadPool.ThreadEntry.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using Amib.Threading.Internal; 4 | 5 | namespace Amib.Threading 6 | { 7 | public partial class SmartThreadPool 8 | { 9 | #region ThreadEntry class 10 | 11 | internal class ThreadEntry 12 | { 13 | /// 14 | /// The thread creation time 15 | /// The value is stored as UTC value. 16 | /// 17 | private readonly DateTime _creationTime; 18 | 19 | /// 20 | /// The last time this thread has been running 21 | /// It is updated by IAmAlive() method 22 | /// The value is stored as UTC value. 23 | /// 24 | private DateTime _lastAliveTime; 25 | 26 | /// 27 | /// A reference from each thread in the thread pool to its SmartThreadPool 28 | /// object container. 29 | /// With this variable a thread can know whatever it belongs to a 30 | /// SmartThreadPool. 31 | /// 32 | private readonly SmartThreadPool _associatedSmartThreadPool; 33 | 34 | /// 35 | /// A reference to the current work item a thread from the thread pool 36 | /// is executing. 37 | /// 38 | public WorkItem CurrentWorkItem { get; set; } 39 | 40 | public ThreadEntry(SmartThreadPool stp) 41 | { 42 | _associatedSmartThreadPool = stp; 43 | _creationTime = DateTime.UtcNow; 44 | _lastAliveTime = DateTime.MinValue; 45 | } 46 | 47 | public SmartThreadPool AssociatedSmartThreadPool 48 | { 49 | get { return _associatedSmartThreadPool; } 50 | } 51 | 52 | public void IAmAlive() 53 | { 54 | _lastAliveTime = DateTime.UtcNow; 55 | } 56 | } 57 | 58 | #endregion 59 | } 60 | } -------------------------------------------------------------------------------- /libs/SmartThreadPool/SmartThreadPool/Stopwatch.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Amib.Threading.Internal 4 | { 5 | /// 6 | /// Stopwatch class 7 | /// Used with WindowsCE and Silverlight which don't have Stopwatch 8 | /// 9 | internal class Stopwatch 10 | { 11 | private long _elapsed; 12 | private bool _isRunning; 13 | private long _startTimeStamp; 14 | 15 | public Stopwatch() 16 | { 17 | Reset(); 18 | } 19 | 20 | private long GetElapsedDateTimeTicks() 21 | { 22 | long rawElapsedTicks = GetRawElapsedTicks(); 23 | return rawElapsedTicks; 24 | } 25 | 26 | private long GetRawElapsedTicks() 27 | { 28 | long elapsed = _elapsed; 29 | if (_isRunning) 30 | { 31 | long ticks = GetTimestamp() - _startTimeStamp; 32 | elapsed += ticks; 33 | } 34 | return elapsed; 35 | } 36 | 37 | public static long GetTimestamp() 38 | { 39 | return DateTime.UtcNow.Ticks; 40 | } 41 | 42 | public void Reset() 43 | { 44 | _elapsed = 0L; 45 | _isRunning = false; 46 | _startTimeStamp = 0L; 47 | } 48 | 49 | public void Start() 50 | { 51 | if (!_isRunning) 52 | { 53 | _startTimeStamp = GetTimestamp(); 54 | _isRunning = true; 55 | } 56 | } 57 | 58 | public static Stopwatch StartNew() 59 | { 60 | Stopwatch stopwatch = new Stopwatch(); 61 | stopwatch.Start(); 62 | return stopwatch; 63 | } 64 | 65 | public void Stop() 66 | { 67 | if (_isRunning) 68 | { 69 | long ticks = GetTimestamp() - _startTimeStamp; 70 | _elapsed += ticks; 71 | _isRunning = false; 72 | } 73 | } 74 | 75 | // Properties 76 | public TimeSpan Elapsed 77 | { 78 | get 79 | { 80 | return new TimeSpan(GetElapsedDateTimeTicks()); 81 | } 82 | } 83 | 84 | public long ElapsedMilliseconds 85 | { 86 | get 87 | { 88 | return (GetElapsedDateTimeTicks() / 0x2710L); 89 | } 90 | } 91 | 92 | public long ElapsedTicks 93 | { 94 | get 95 | { 96 | return GetRawElapsedTicks(); 97 | } 98 | } 99 | 100 | public bool IsRunning 101 | { 102 | get 103 | { 104 | return _isRunning; 105 | } 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /libs/SmartThreadPool/SmartThreadPool/SynchronizedDictionary.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Amib.Threading.Internal 4 | { 5 | internal class SynchronizedDictionary 6 | { 7 | private readonly Dictionary _dictionary; 8 | private readonly object _lock; 9 | 10 | public SynchronizedDictionary() 11 | { 12 | _lock = new object(); 13 | _dictionary = new Dictionary(); 14 | } 15 | 16 | public int Count 17 | { 18 | get { return _dictionary.Count; } 19 | } 20 | 21 | public bool Contains(TKey key) 22 | { 23 | lock (_lock) 24 | { 25 | return _dictionary.ContainsKey(key); 26 | } 27 | } 28 | 29 | public void Remove(TKey key) 30 | { 31 | lock (_lock) 32 | { 33 | _dictionary.Remove(key); 34 | } 35 | } 36 | 37 | public object SyncRoot 38 | { 39 | get { return _lock; } 40 | } 41 | 42 | public TValue this[TKey key] 43 | { 44 | get 45 | { 46 | lock (_lock) 47 | { 48 | return _dictionary[key]; 49 | } 50 | } 51 | set 52 | { 53 | lock (_lock) 54 | { 55 | _dictionary[key] = value; 56 | } 57 | } 58 | } 59 | 60 | public Dictionary.KeyCollection Keys 61 | { 62 | get 63 | { 64 | lock (_lock) 65 | { 66 | return _dictionary.Keys; 67 | } 68 | } 69 | } 70 | 71 | public Dictionary.ValueCollection Values 72 | { 73 | get 74 | { 75 | lock (_lock) 76 | { 77 | return _dictionary.Values; 78 | } 79 | } 80 | } 81 | public void Clear() 82 | { 83 | lock (_lock) 84 | { 85 | _dictionary.Clear(); 86 | } 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /libs/SmartThreadPool/SmartThreadPool/WorkItemInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Amib.Threading 2 | { 3 | #region WorkItemInfo class 4 | 5 | /// 6 | /// Summary description for WorkItemInfo. 7 | /// 8 | public class WorkItemInfo 9 | { 10 | public WorkItemInfo() 11 | { 12 | UseCallerCallContext = SmartThreadPool.DefaultUseCallerCallContext; 13 | UseCallerHttpContext = SmartThreadPool.DefaultUseCallerHttpContext; 14 | DisposeOfStateObjects = SmartThreadPool.DefaultDisposeOfStateObjects; 15 | CallToPostExecute = SmartThreadPool.DefaultCallToPostExecute; 16 | PostExecuteWorkItemCallback = SmartThreadPool.DefaultPostExecuteWorkItemCallback; 17 | WorkItemPriority = SmartThreadPool.DefaultWorkItemPriority; 18 | } 19 | 20 | public WorkItemInfo(WorkItemInfo workItemInfo) 21 | { 22 | UseCallerCallContext = workItemInfo.UseCallerCallContext; 23 | UseCallerHttpContext = workItemInfo.UseCallerHttpContext; 24 | DisposeOfStateObjects = workItemInfo.DisposeOfStateObjects; 25 | CallToPostExecute = workItemInfo.CallToPostExecute; 26 | PostExecuteWorkItemCallback = workItemInfo.PostExecuteWorkItemCallback; 27 | WorkItemPriority = workItemInfo.WorkItemPriority; 28 | Timeout = workItemInfo.Timeout; 29 | } 30 | 31 | /// 32 | /// Get/Set if to use the caller's security context 33 | /// 34 | public bool UseCallerCallContext { get; set; } 35 | 36 | /// 37 | /// Get/Set if to use the caller's HTTP context 38 | /// 39 | public bool UseCallerHttpContext { get; set; } 40 | 41 | /// 42 | /// Get/Set if to dispose of the state object of a work item 43 | /// 44 | public bool DisposeOfStateObjects { get; set; } 45 | 46 | /// 47 | /// Get/Set the run the post execute options 48 | /// 49 | public CallToPostExecute CallToPostExecute { get; set; } 50 | 51 | /// 52 | /// Get/Set the post execute callback 53 | /// 54 | public PostExecuteWorkItemCallback PostExecuteWorkItemCallback { get; set; } 55 | 56 | /// 57 | /// Get/Set the work item's priority 58 | /// 59 | public WorkItemPriority WorkItemPriority { get; set; } 60 | 61 | /// 62 | /// Get/Set the work item's timout in milliseconds. 63 | /// This is a passive timout. When the timout expires the work item won't be actively aborted! 64 | /// 65 | public long Timeout { get; set; } 66 | } 67 | 68 | #endregion 69 | } 70 | -------------------------------------------------------------------------------- /libs/assimp-net/AssimpNet.Interop.Generator/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /libs/assimp-net/AssimpNet.Interop.Generator/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2013 AssimpNet - Nicholas Woodfield 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System.Reflection; 24 | using System.Runtime.InteropServices; 25 | 26 | // General Information about an assembly is controlled through the following 27 | // set of attributes. Change these attribute values to modify the information 28 | // associated with an assembly. 29 | [assembly: AssemblyTitle("AssimpNet.Interop.Generator")] 30 | [assembly: AssemblyDescription("")] 31 | [assembly: AssemblyConfiguration("")] 32 | [assembly: AssemblyCompany("Nicholas Woodfield")] 33 | [assembly: AssemblyProduct("AssimpNetInterop.Generator")] 34 | [assembly: AssemblyCopyright("Copyright © 2012-2013 AssimpNet - Nicholas Woodfield")] 35 | [assembly: AssemblyTrademark("")] 36 | [assembly: AssemblyCulture("")] 37 | 38 | // Setting ComVisible to false makes the types in this assembly not visible 39 | // to COM components. If you need to access a type in this assembly from 40 | // COM, set the ComVisible attribute to true on that type. 41 | [assembly: ComVisible(false)] 42 | 43 | // The following GUID is for the ID of the typelib if this project is exposed to COM 44 | [assembly: Guid("fbee750a-7314-4053-8450-796d119ee3e8")] 45 | 46 | // Version information for an assembly consists of the following four values: 47 | // 48 | // Major Version 49 | // Minor Version 50 | // Build Number 51 | // Revision 52 | // 53 | // You can specify all the values or you can default the Build and Revision Numbers 54 | // by using the '*' as shown below: 55 | // [assembly: AssemblyVersion("1.0.*")] 56 | [assembly: AssemblyVersion("1.0.0.0")] 57 | [assembly: AssemblyFileVersion("1.0.0.0")] 58 | -------------------------------------------------------------------------------- /libs/assimp-net/AssimpNet/AssimpException.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2013 AssimpNet - Nicholas Woodfield 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System; 24 | 25 | namespace Assimp { 26 | /// 27 | /// AssimpNet general exception. 28 | /// 29 | public class AssimpException : Exception { 30 | 31 | /// 32 | /// Initializes a new instance of the class. 33 | /// 34 | public AssimpException() : base() {} 35 | 36 | /// 37 | /// Initializes a new instance of the class. 38 | /// 39 | /// The error message. 40 | public AssimpException(String msg) : base(msg) {} 41 | 42 | /// 43 | /// Initializes a new instance of the class. 44 | /// 45 | /// Name of the param. 46 | /// The error message. 47 | public AssimpException(String paramName, String msg) 48 | : base("Parameter: " + paramName + " Error: " + msg) { } 49 | 50 | /// 51 | /// Initializes a new instance of the class. 52 | /// 53 | /// The error message 54 | /// The inner exception. 55 | public AssimpException(String msg, Exception innerException) : base(msg, innerException) {} 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /libs/assimp-net/AssimpNet/AssimpKey.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/assimp-net/AssimpNet/AssimpKey.snk -------------------------------------------------------------------------------- /libs/assimp-net/AssimpNet/AssimpLicense.txt: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2012-2013 AssimpNet - Nicholas Woodfield 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | ==================================================================================== 23 | 24 | Open Asset Import Library (Assimp) 25 | 26 | 27 | Copyright (c) 2006-2013, Assimp Development Team 28 | All rights reserved. 29 | 30 | Redistribution and use of this software in source and binary forms, 31 | with or without modification, are permitted provided that the 32 | following conditions are met: 33 | 34 | * Redistributions of source code must retain the above 35 | copyright notice, this list of conditions and the 36 | following disclaimer. 37 | 38 | * Redistributions in binary form must reproduce the above 39 | copyright notice, this list of conditions and the 40 | following disclaimer in the documentation and/or other 41 | materials provided with the distribution. 42 | 43 | * Neither the name of the ASSIMP team, nor the names of its 44 | contributors may be used to endorse or promote products 45 | derived from this software without specific prior 46 | written permission of the ASSIMP Development Team. 47 | 48 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 49 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 50 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 51 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 52 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 53 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 54 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 55 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 56 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 57 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 58 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 59 | 60 | 61 | 62 | AN EXCEPTION applies to all files in the ./test/models-nonbsd subfolder. 63 | These are 3d models for testing purposes, from various free sources 64 | on the internet. They are - unless otherwise stated - copyright of 65 | their respective creators, which may impose additional requirements 66 | on the use of their work. For any of these models, see 67 | .source.txt for more legal information. Contact us if you 68 | are a copyright holder and believe that we credited you inproperly or 69 | if you don't want your files to appear in the repository. 70 | 71 | -------------------------------------------------------------------------------- /libs/assimp-net/AssimpNet/ExportFormatDescription.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2013 AssimpNet - Nicholas Woodfield 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System; 24 | using System.Diagnostics; 25 | using System.Runtime.InteropServices; 26 | using Assimp.Unmanaged; 27 | 28 | namespace Assimp { 29 | /// 30 | /// Describes a file format which Assimp can export to. 31 | /// 32 | [DebuggerDisplay("{Description}")] 33 | public sealed class ExportFormatDescription { 34 | private String m_formatId; 35 | private String m_description; 36 | private String m_fileExtension; 37 | 38 | /// 39 | /// Gets a short string ID to uniquely identify the export format. E.g. "dae" or "obj". 40 | /// 41 | public String FormatId { 42 | get { 43 | return m_formatId; 44 | } 45 | } 46 | 47 | /// 48 | /// Gets a short description of the file format to present to users. 49 | /// 50 | public String Description { 51 | get { 52 | return m_description; 53 | } 54 | } 55 | 56 | /// 57 | /// Gets the recommended file extension for the exported file in lower case. 58 | /// 59 | public String FileExtension { 60 | get { 61 | return m_fileExtension; 62 | } 63 | } 64 | 65 | /// 66 | /// Constructs a new ExportFormatDescription. 67 | /// 68 | /// Unmanaged structure 69 | internal ExportFormatDescription(ref AiExportFormatDesc formatDesc) { 70 | m_formatId = Marshal.PtrToStringAnsi(formatDesc.FormatId); 71 | m_description = Marshal.PtrToStringAnsi(formatDesc.Description); 72 | m_fileExtension = Marshal.PtrToStringAnsi(formatDesc.FileExtension); 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /libs/assimp-net/AssimpNet/Interfaces.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2013 AssimpNet - Nicholas Woodfield 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System; 24 | 25 | namespace Assimp { 26 | /// 27 | /// Represents an object that can be marshaled to and from a native representation. 28 | /// 29 | /// Managed object type 30 | /// Native value type 31 | public interface IMarshalable 32 | where Managed : class, new() 33 | where Native : struct { 34 | 35 | /// 36 | /// Gets if the native value type is blittable (that is, does not require marshaling by the runtime, e.g. has MarshalAs attributes). 37 | /// 38 | bool IsNativeBlittable { get; } 39 | 40 | /// 41 | /// Writes the managed data to the native value. 42 | /// 43 | /// Optional pointer to the memory that will hold the native value. 44 | /// Output native value 45 | void ToNative(IntPtr thisPtr, out Native nativeValue); 46 | 47 | /// 48 | /// Reads the unmanaged data from the native value. 49 | /// 50 | /// Input native value 51 | void FromNative(ref Native nativeValue); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /libs/assimp-net/AssimpNet/InternalInterop.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2013 AssimpNet - Nicholas Woodfield 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System; 24 | 25 | namespace Assimp { 26 | /// 27 | /// Internal usage only for fast-interop - used to find where we need to patch up code and is removed after the patching process. 28 | /// 29 | internal static class InternalInterop { 30 | 31 | public static unsafe void WriteArray(IntPtr pDest, T[] data, int startIndex, int count) where T : struct { 32 | throw new NotImplementedException(); 33 | } 34 | 35 | public static unsafe void ReadArray(IntPtr pSrc, T[] data, int startIndex, int count) where T : struct { 36 | throw new NotImplementedException(); 37 | } 38 | 39 | public static unsafe void WriteInline(void* pDest, ref T srcData) where T : struct { 40 | throw new NotImplementedException(); 41 | } 42 | 43 | public static unsafe T ReadInline(void* pSrc) where T : struct { 44 | throw new NotImplementedException(); 45 | } 46 | 47 | public static unsafe int SizeOfInline() { 48 | throw new NotImplementedException(); 49 | } 50 | 51 | public static unsafe void MemCopyInline(void* pDest, void* pSrc, int count) { 52 | throw new NotImplementedException(); 53 | } 54 | 55 | public static unsafe void MemSetInline(void* pDest, byte value, int count) { 56 | throw new NotImplementedException(); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /libs/assimp-net/AssimpNet/Plane.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2013 AssimpNet - Nicholas Woodfield 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System; 24 | using System.Runtime.InteropServices; 25 | 26 | namespace Assimp { 27 | /// 28 | /// Represents a plane in three-dimensional euclidean space where 29 | /// A, B, C are components of the plane normal and D is the distance along the 30 | /// normal from the origin to the plane. 31 | /// 32 | [Serializable] 33 | [StructLayout(LayoutKind.Sequential)] 34 | public struct Plane { 35 | 36 | /// 37 | /// X component of the normal vector. 38 | /// 39 | public float A; 40 | 41 | /// 42 | /// Y component of the normal vector. 43 | /// 44 | public float B; 45 | 46 | /// 47 | /// Z component of the normal vector. 48 | /// 49 | public float C; 50 | 51 | /// 52 | /// Distance from the origin to the plane along the normal vector. 53 | /// 54 | public float D; 55 | 56 | /// 57 | /// Constructs a new Plane. 58 | /// 59 | /// X component of the normal vector. 60 | /// Y component of the normal vector. 61 | /// Z component of the normal vector. 62 | /// Distance from the origin to the plane along the normal vector. 63 | public Plane(float a, float b, float c, float d) { 64 | A = a; 65 | B = b; 66 | C = c; 67 | D = d; 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /libs/assimp-net/AssimpNet/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2013 AssimpNet - Nicholas Woodfield 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System; 24 | using System.Reflection; 25 | using System.Runtime.InteropServices; 26 | 27 | [assembly: CLSCompliant(true)] 28 | 29 | // General Information about an assembly is controlled through the following 30 | // set of attributes. Change these attribute values to modify the information 31 | // associated with an assembly. 32 | [assembly: AssemblyTitle("AssimpNet")] 33 | [assembly: AssemblyDescription("A .NET Wrapper for the Open Asset Import (Assimp) library.")] 34 | [assembly: AssemblyConfiguration("")] 35 | [assembly: AssemblyCompany("Nicholas Woodfield")] 36 | [assembly: AssemblyProduct("AssimpNet")] 37 | [assembly: AssemblyCopyright("Copyright © 2012-2013 AssimpNet - Nicholas Woodfield")] 38 | [assembly: AssemblyTrademark("")] 39 | [assembly: AssemblyCulture("")] 40 | 41 | // Setting ComVisible to false makes the types in this assembly not visible 42 | // to COM components. If you need to access a type in this assembly from 43 | // COM, set the ComVisible attribute to true on that type. 44 | [assembly: ComVisible(false)] 45 | 46 | // The following GUID is for the ID of the typelib if this project is exposed to COM 47 | [assembly: Guid("a2aee677-907b-4ec9-a9d4-a52d60542083")] 48 | 49 | // Version information for an assembly consists of the following four values: 50 | // 51 | // Major Version 52 | // Minor Version 53 | // Build Number 54 | // Revision 55 | // 56 | // You can specify all the values or you can default the Build and Revision Numbers 57 | // by using the '*' as shown below: 58 | // [assembly: AssemblyVersion("1.0.*")] 59 | [assembly: AssemblyVersion("3.2")] 60 | [assembly: AssemblyFileVersion("3.2")] 61 | -------------------------------------------------------------------------------- /libs/assimp-net/AssimpNet/Ray.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2013 AssimpNet - Nicholas Woodfield 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System; 24 | using System.Runtime.InteropServices; 25 | 26 | namespace Assimp { 27 | 28 | /// 29 | /// Defines a 3D ray with a point of origin and a direction. 30 | /// 31 | [Serializable] 32 | [StructLayout(LayoutKind.Sequential)] 33 | public struct Ray { 34 | 35 | /// 36 | /// Origin of the ray in space. 37 | /// 38 | public Vector3D Position; 39 | 40 | /// 41 | /// Direction of the ray. 42 | /// 43 | public Vector3D Direction; 44 | 45 | /// 46 | /// Constructs a new Ray. 47 | /// 48 | /// 49 | /// 50 | public Ray(Vector3D pos, Vector3D dir) { 51 | Position = pos; 52 | Direction = dir; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /libs/assimp-net/AssimpNet/UVTransform.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2013 AssimpNet - Nicholas Woodfield 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System; 24 | using System.Runtime.InteropServices; 25 | 26 | namespace Assimp { 27 | /// 28 | /// Defines how an UV channel is transformed. 29 | /// 30 | [Serializable] 31 | [StructLayoutAttribute(LayoutKind.Sequential)] 32 | public struct UVTransform { 33 | /// 34 | /// Translation on the U and V axes. Default is 0|0 35 | /// 36 | public Vector2D Translation; 37 | 38 | /// 39 | /// Scaling on the U and V axes. Default is 1|1. 40 | /// 41 | public Vector2D Scaling; 42 | 43 | /// 44 | /// Rotation in counter-clockwise direction, specfied in 45 | /// radians. The rotation center is 0.5f|0.5f and the 46 | /// default value is zero. 47 | /// 48 | public float Rotation; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /libs/assimp-net/AssimpNet/VertexWeight.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2013 AssimpNet - Nicholas Woodfield 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System; 24 | using System.Globalization; 25 | using System.Runtime.InteropServices; 26 | 27 | namespace Assimp { 28 | /// 29 | /// Represents a single influence of a bone on a vertex. 30 | /// 31 | [Serializable] 32 | [StructLayoutAttribute(LayoutKind.Sequential)] 33 | public struct VertexWeight { 34 | /// 35 | /// Index of the vertex which is influenced by the bone. 36 | /// 37 | public int VertexID; 38 | 39 | /// 40 | /// Strength of the influence in range of (0...1). All influences 41 | /// from all bones at one vertex amounts to 1. 42 | /// 43 | public float Weight; 44 | 45 | /// 46 | /// Constructs a new VertexWeight. 47 | /// 48 | /// Index of the vertex. 49 | /// Weight of the influence. 50 | public VertexWeight(int vertID, float weight) { 51 | VertexID = vertID; 52 | Weight = weight; 53 | } 54 | 55 | /// 56 | /// Returns a that represents this instance. 57 | /// 58 | /// 59 | /// A that represents this instance. 60 | /// 61 | public override string ToString() { 62 | CultureInfo info = CultureInfo.CurrentCulture; 63 | return String.Format(info, "{{VertexID:{0} Weight:{1}}}", 64 | new Object[] { VertexID.ToString(info), Weight.ToString(info) }); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /libs/assimp-net/libs/Assimp/Assimp32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/assimp-net/libs/Assimp/Assimp32.dll -------------------------------------------------------------------------------- /libs/assimp-net/libs/Assimp/Assimp64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/assimp-net/libs/Assimp/Assimp64.dll -------------------------------------------------------------------------------- /libs/devil-net/DevILNet.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevILNet", "DevILNet\DevILNet.csproj", "{578FD0D9-41AA-4FA4-8D9B-4021978FA48D}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevILNet.Sample", "DevILNet.Sample\DevILNet.Sample.csproj", "{B394A356-0F45-4155-B700-C30A5851495B}" 7 | EndProject 8 | Global 9 | GlobalSection(SubversionScc) = preSolution 10 | Svn-Managed = True 11 | Manager = AnkhSVN - Subversion Support for Visual Studio 12 | EndGlobalSection 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|x64 = Debug|x64 15 | Debug|x86 = Debug|x86 16 | Release|x64 = Release|x64 17 | Release|x86 = Release|x86 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {578FD0D9-41AA-4FA4-8D9B-4021978FA48D}.Debug|x64.ActiveCfg = Debug|x64 21 | {578FD0D9-41AA-4FA4-8D9B-4021978FA48D}.Debug|x64.Build.0 = Debug|x64 22 | {578FD0D9-41AA-4FA4-8D9B-4021978FA48D}.Debug|x86.ActiveCfg = Debug|x86 23 | {578FD0D9-41AA-4FA4-8D9B-4021978FA48D}.Debug|x86.Build.0 = Debug|x86 24 | {578FD0D9-41AA-4FA4-8D9B-4021978FA48D}.Release|x64.ActiveCfg = Release|x64 25 | {578FD0D9-41AA-4FA4-8D9B-4021978FA48D}.Release|x64.Build.0 = Release|x64 26 | {578FD0D9-41AA-4FA4-8D9B-4021978FA48D}.Release|x86.ActiveCfg = Release|x86 27 | {578FD0D9-41AA-4FA4-8D9B-4021978FA48D}.Release|x86.Build.0 = Release|x86 28 | {B394A356-0F45-4155-B700-C30A5851495B}.Debug|x64.ActiveCfg = Debug|x64 29 | {B394A356-0F45-4155-B700-C30A5851495B}.Debug|x64.Build.0 = Debug|x64 30 | {B394A356-0F45-4155-B700-C30A5851495B}.Debug|x86.ActiveCfg = Debug|x86 31 | {B394A356-0F45-4155-B700-C30A5851495B}.Debug|x86.Build.0 = Debug|x86 32 | {B394A356-0F45-4155-B700-C30A5851495B}.Release|x64.ActiveCfg = Release|x86 33 | {B394A356-0F45-4155-B700-C30A5851495B}.Release|x86.ActiveCfg = Release|x86 34 | {B394A356-0F45-4155-B700-C30A5851495B}.Release|x86.Build.0 = Release|x86 35 | EndGlobalSection 36 | GlobalSection(SolutionProperties) = preSolution 37 | HideSolutionNode = FALSE 38 | EndGlobalSection 39 | EndGlobal 40 | -------------------------------------------------------------------------------- /libs/devil-net/DevILNet/Collections.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Nicholas Woodfield 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System.Collections.Generic; 24 | 25 | namespace DevIL { 26 | 27 | public class MipMapChain : List { 28 | 29 | } 30 | 31 | public class MipMapChainCollection : List { 32 | 33 | } 34 | 35 | public class AnimationChainCollection : List { 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /libs/devil-net/DevILNet/ImageExporter.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Nicholas Woodfield 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System; 24 | using System.IO; 25 | using DevIL.Unmanaged; 26 | 27 | namespace DevIL { 28 | public sealed class ImageExporter : IDisposable { 29 | private bool m_isDisposed; 30 | 31 | public bool IsDisposed { 32 | get { 33 | return m_isDisposed; 34 | } 35 | } 36 | 37 | public ImageExporter() { 38 | m_isDisposed = false; 39 | IL.AddRef(); 40 | } 41 | 42 | ~ImageExporter() { 43 | Dispose(false); 44 | } 45 | 46 | public bool SaveImage(Image image, String filename) { 47 | if(!image.IsValid || String.IsNullOrEmpty(filename)) { 48 | return false; 49 | } 50 | 51 | CheckDisposed(); 52 | 53 | IL.BindImage(image.ImageID); 54 | return IL.SaveImage(filename); 55 | } 56 | 57 | public bool SaveImage(Image image, ImageType imageType, String filename) { 58 | if(!image.IsValid || imageType == ImageType.Unknown || String.IsNullOrEmpty(filename)) { 59 | return false; 60 | } 61 | 62 | CheckDisposed(); 63 | 64 | IL.BindImage(image.ImageID); 65 | return IL.SaveImage(imageType, filename); 66 | } 67 | 68 | public bool SaveImageToStream(Image image, ImageType imageType, Stream stream) { 69 | if(!image.IsValid || imageType == ImageType.Unknown || stream == null || !stream.CanWrite) { 70 | return false; 71 | } 72 | 73 | CheckDisposed(); 74 | 75 | IL.BindImage(image.ImageID); 76 | return IL.SaveImageToStream(imageType, stream); 77 | } 78 | 79 | public String[] GetSupportedExtensions() { 80 | return IL.GetExportExtensions(); 81 | } 82 | 83 | private void CheckDisposed() { 84 | if(m_isDisposed) { 85 | throw new ObjectDisposedException("Exporter has been disposed."); 86 | } 87 | } 88 | 89 | public void Dispose() { 90 | Dispose(true); 91 | GC.SuppressFinalize(this); 92 | } 93 | 94 | private void Dispose(bool disposing) { 95 | if(!m_isDisposed) { 96 | 97 | IL.Release(); 98 | 99 | m_isDisposed = true; 100 | } 101 | } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /libs/devil-net/DevILNet/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Nicholas Woodfield 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System; 24 | using System.Reflection; 25 | using System.Runtime.InteropServices; 26 | 27 | // General Information about an assembly is controlled through the following 28 | // set of attributes. Change these attribute values to modify the information 29 | // associated with an assembly. 30 | [assembly: AssemblyTitle("DevIL .NET")] 31 | [assembly: AssemblyDescription(".NET for the Open Image Library (DevIL)")] 32 | [assembly: AssemblyConfiguration("")] 33 | [assembly: AssemblyCompany("Nicholas Woodfield")] 34 | [assembly: AssemblyProduct("DevIL .NET")] 35 | [assembly: AssemblyCopyright("Copyright © Nicholas Woodfield 2012")] 36 | [assembly: AssemblyTrademark("")] 37 | [assembly: AssemblyCulture("")] 38 | [assembly: CLSCompliant(true)] 39 | 40 | // Setting ComVisible to false makes the types in this assembly not visible 41 | // to COM components. If you need to access a type in this assembly from 42 | // COM, set the ComVisible attribute to true on that type. 43 | [assembly: ComVisible(false)] 44 | 45 | // The following GUID is for the ID of the typelib if this project is exposed to COM 46 | [assembly: Guid("b220f6cf-ec18-480c-99b3-dd4fd25d38ac")] 47 | 48 | // Version information for an assembly consists of the following four values: 49 | // 50 | // Major Version 51 | // Minor Version 52 | // Build Number 53 | // Revision 54 | // 55 | // You can specify all the values or you can default the Build and Revision Numbers 56 | // by using the '*' as shown below: 57 | // [assembly: AssemblyVersion("1.0.*")] 58 | [assembly: AssemblyVersion("1.0.0.0")] 59 | [assembly: AssemblyFileVersion("1.0.0.0")] 60 | -------------------------------------------------------------------------------- /libs/devil-net/DevILNet/Structures.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace DevIL { 7 | public struct Color { 8 | public float R; 9 | public float G; 10 | public float B; 11 | public float A; 12 | 13 | public Color(float r, float g, float b, float a) { 14 | R = r; 15 | G = g; 16 | B = b; 17 | A = a; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /libs/devil-net/DevILNet/Unmanaged/ILUDefines.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Nicholas Woodfield 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | 24 | namespace DevIL.Unmanaged { 25 | public static class ILUDefines { 26 | public const int ILU_FILTER = 0x2600; 27 | public const int ILU_NEAREST = 0x2601; 28 | public const int ILU_LINEAR = 0x2602; 29 | public const int ILU_BILINEAR = 0x2603; 30 | public const int ILU_SCALE_BOX = 0x2604; 31 | public const int ILU_SCALE_TRIANGLE = 0x2605; 32 | public const int ILU_SCALE_BELL = 0x2606; 33 | public const int ILU_SCALE_BSPLINE = 0x2607; 34 | public const int ILU_SCALE_LANCZOS3 = 0x2608; 35 | public const int ILU_SCALE_MITCHELL = 0x2609; 36 | 37 | public const int ILU_INVALID_ENUM = 0x0501; 38 | public const int ILU_OUT_OF_MEMORY = 0x0502; 39 | public const int ILU_INTERNAL_ERROR = 0x0504; 40 | public const int ILU_INVALID_VALUE = 0x0505; 41 | public const int ILU_ILLEGAL_OPERATION = 0x0506; 42 | public const int ILU_INVALID_PARAM = 0x0509; 43 | 44 | public const int ILU_PLACEMENT = 0x0700; 45 | public const int ILU_LOWER_LEFT = 0x0701; 46 | public const int ILU_LOWER_RIGHT = 0x0702; 47 | public const int ILU_UPPER_LEFT = 0x0703; 48 | public const int ILU_UPPER_RIGHT = 0x0704; 49 | public const int ILU_CENTER = 0x0705; 50 | public const int ILU_CONVOLUTION_MATRIX = 0x0710; 51 | 52 | public const int ILU_ENGLISH = 0x0800; 53 | public const int ILU_ARABIC = 0x0801; 54 | public const int ILU_DUTCH = 0x0802; 55 | public const int ILU_JAPANESE = 0x0803; 56 | public const int ILU_SPANISH = 0x0804; 57 | public const int ILU_GERMAN = 0x0805; 58 | public const int ILU_FRENCH = 0x0806; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /libs/devil-net/Libs/x64/DevIL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/devil-net/Libs/x64/DevIL.dll -------------------------------------------------------------------------------- /libs/devil-net/Libs/x64/ILU.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/devil-net/Libs/x64/ILU.dll -------------------------------------------------------------------------------- /libs/devil-net/Libs/x86/DevIL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/devil-net/Libs/x86/DevIL.dll -------------------------------------------------------------------------------- /libs/devil-net/Libs/x86/ILU.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/libs/devil-net/Libs/x86/ILU.dll -------------------------------------------------------------------------------- /libs/kd-sharp/KDTree/DistanceFunctions.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace KDTree 8 | { 9 | /// 10 | /// An interface which enables flexible distance functions. 11 | /// 12 | public interface DistanceFunctions 13 | { 14 | /// 15 | /// Compute a distance between two n-dimensional points. 16 | /// 17 | /// The first point. 18 | /// The second point. 19 | /// The n-dimensional distance. 20 | double Distance(double[] p1, double[] p2); 21 | 22 | /// 23 | /// Find the shortest distance from a point to an axis aligned rectangle in n-dimensional space. 24 | /// 25 | /// The point of interest. 26 | /// The minimum coordinate of the rectangle. 27 | /// The maximum coorindate of the rectangle. 28 | /// The shortest n-dimensional distance between the point and rectangle. 29 | double DistanceToRectangle(double[] point, double[] min, double[] max); 30 | } 31 | 32 | /// 33 | /// A distance function for our KD-Tree which returns squared euclidean distances. 34 | /// 35 | public class SquareEuclideanDistanceFunction : DistanceFunctions 36 | { 37 | /// 38 | /// Find the squared distance between two n-dimensional points. 39 | /// 40 | /// The first point. 41 | /// The second point. 42 | /// The n-dimensional squared distance. 43 | public double Distance(double[] p1, double[] p2) 44 | { 45 | double fSum = 0; 46 | for (int i = 0; i < p1.Length; i++) 47 | { 48 | double fDifference = (p1[i] - p2[i]); 49 | fSum += fDifference * fDifference; 50 | } 51 | return fSum; 52 | } 53 | 54 | /// 55 | /// Find the shortest distance from a point to an axis aligned rectangle in n-dimensional space. 56 | /// 57 | /// The point of interest. 58 | /// The minimum coordinate of the rectangle. 59 | /// The maximum coorindate of the rectangle. 60 | /// The shortest squared n-dimensional squared distance between the point and rectangle. 61 | public double DistanceToRectangle(double[] point, double[] min, double[] max) 62 | { 63 | double fSum = 0; 64 | double fDifference = 0; 65 | for (int i = 0; i < point.Length; ++i) 66 | { 67 | fDifference = 0; 68 | if (point[i] > max[i]) 69 | fDifference = (point[i] - max[i]); 70 | else if (point[i] < min[i]) 71 | fDifference = (point[i] - min[i]); 72 | fSum += fDifference * fDifference; 73 | } 74 | return fSum; 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /libs/kd-sharp/KDTree/KDTree.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace KDTree 8 | { 9 | 10 | /// 11 | /// A KDTree class represents the root of a variable-dimension KD-Tree. 12 | /// 13 | /// The generic data type we want this tree to contain. 14 | /// This is based on this: https://bitbucket.org/rednaxela/knn-benchmark/src/tip/ags/utils/dataStructures/trees/thirdGenKD/ 15 | public class KDTree : KDNode 16 | { 17 | /// 18 | /// Create a new KD-Tree given a number of dimensions. 19 | /// 20 | /// The number of data sorting dimensions. i.e. 3 for a 3D point. 21 | public KDTree(int iDimensions) 22 | : base(iDimensions, 24) 23 | { 24 | } 25 | 26 | /// 27 | /// Create a new KD-Tree given a number of dimensions and initial bucket capacity. 28 | /// 29 | /// The number of data sorting dimensions. i.e. 3 for a 3D point. 30 | /// The default number of items that can be stored in each node. 31 | public KDTree(int iDimensions, int iBucketCapacity) 32 | : base(iDimensions, iBucketCapacity) 33 | { 34 | } 35 | 36 | /// 37 | /// Get the nearest neighbours to a point in the kd tree using a square euclidean distance function. 38 | /// 39 | /// The point of interest. 40 | /// The maximum number of points which can be returned by the iterator. 41 | /// A threshold distance to apply. Optional. Negative values mean that it is not applied. 42 | /// A new nearest neighbour iterator with the given parameters. 43 | public NearestNeighbour NearestNeighbors(double[] tSearchPoint, int iMaxReturned, double fDistance = -1) 44 | { 45 | DistanceFunctions distanceFunction = new SquareEuclideanDistanceFunction(); 46 | return NearestNeighbors(tSearchPoint, distanceFunction, iMaxReturned, fDistance); 47 | } 48 | 49 | /// 50 | /// Get the nearest neighbours to a point in the kd tree using a user defined distance function. 51 | /// 52 | /// The point of interest. 53 | /// The maximum number of points which can be returned by the iterator. 54 | /// The distance function to use. 55 | /// A threshold distance to apply. Optional. Negative values mean that it is not applied. 56 | /// A new nearest neighbour iterator with the given parameters. 57 | public NearestNeighbour NearestNeighbors(double[] tSearchPoint, DistanceFunctions kDistanceFunction, int iMaxReturned, double fDistance) 58 | { 59 | return new NearestNeighbour(this, tSearchPoint, kDistanceFunction, iMaxReturned, fDistance); 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /libs/kd-sharp/KDTree/KDTree.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {33A00A90-C02E-474B-A8C0-3B0559873EA0} 9 | Library 10 | Properties 11 | KDTree 12 | KDTree 13 | v3.5 14 | 512 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 59 | -------------------------------------------------------------------------------- /libs/kd-sharp/KDTree/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("KDTree")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("KDTree")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b1f6e08e-691d-42c0-9eea-7e9de37deb76")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /libs/kd-sharp/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013, Original Committers 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /libs/kd-sharp/README.md: -------------------------------------------------------------------------------- 1 | # kd-sharp 2 | Simple C# implementation of a kd-tree. Automatically exported from code.google.com/p/kd-sharp for use with open3mod. 3 | 4 | The Google Code repository says this is MIT licensed code, copyright is with the original author (asheepcalledgeorge). 5 | -------------------------------------------------------------------------------- /licenses/LICENSE_AssimpNet: -------------------------------------------------------------------------------- 1 | License conditions for Assimp-net (https://code.google.com/p/assimp-net/): 2 | 3 | /* 4 | * Copyright (c) 2012-2013 Nicholas Woodfield 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ -------------------------------------------------------------------------------- /licenses/LICENSE_DevilNet: -------------------------------------------------------------------------------- 1 | License conditions for Devil-net (https://code.google.com/p/devil-net): 2 | 3 | /* 4 | * Copyright (c) 2012 Nicholas Woodfield 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ -------------------------------------------------------------------------------- /licenses/LICENSE_OpenTK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/licenses/LICENSE_OpenTK -------------------------------------------------------------------------------- /licenses/LICENSE_SmartThreadPool: -------------------------------------------------------------------------------- 1 | Source: https://github.com/amibar/SmartThreadPool 2 | http://www.codeproject.com/Articles/7933/Smart-Thread-Pool 3 | 4 | Microsoft Public License (MS-PL) 5 | 6 | This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. 7 | 8 | 1. Definitions 9 | The terms "reproduce," "reproduction," "derivative works," and "distribution" have the 10 | same meaning here as under U.S. copyright law. 11 | A "contribution" is the original software, or any additions or changes to the software. 12 | A "contributor" is any person that distributes its contribution under this license. 13 | "Licensed patents" are a contributor's patent claims that read directly on its contribution. 14 | 15 | 2. Grant of Rights 16 | (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. 17 | (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. 18 | 19 | 3. Conditions and Limitations 20 | (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. 21 | (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. 22 | (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. 23 | (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. 24 | (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. 25 | -------------------------------------------------------------------------------- /licenses/LICENSE_TestFiles: -------------------------------------------------------------------------------- 1 | testscenes/lost-empire 2 | ====================== 3 | Underground city in the 4 | "Lost Empire" area from the Vokselia Minecraft world 5 | http://vokselia.com 6 | CC BY 3.0 License http://creativecommons.org/licenses/by/3.0/ 7 | 8 | Converted to OBJ by Morgan McGuire using Mineways (http://mineways.com) 9 | 10 | 11 | testscenes/jeep 12 | =============== 13 | 14 | Jeep designed, modelled and skinned by me, Psionic 15 | 16 | FREE for use however you like, credits are appreciated!!! 17 | 18 | It was modelled in Milkshape 3D and includes the MS3D files oriented for X or B3D format (BlitzBasic 3D), its 2032 polys with a 512x512 jpg texture map. There are two skin variations plus a UV template to help out if you want to create your own skin variations. 19 | 20 | I'd love to see a few screenshots of it being used in-game so feel free to stop by my site and maybe drop by my forums and show us all what your doing with it!!!!!!! 21 | 22 | Check out more of my work at:- 23 | 24 | http://xu1productions.com/3dstudio/index.html - 3D Game Resources 25 | 26 | http://www.psionicdesign.com - My Main 2D/3D Digital Art site 27 | 28 | Psionic 2002 29 | 30 | 31 | testscenes/duck 32 | ================ 33 | 34 | Collada sample repository 35 | 36 | 37 | testscenes/wuson 38 | testscenes/spider 39 | ================= 40 | 41 | From Assimp (http://assimp.sf.net), covered by LICENSE_Assimp -------------------------------------------------------------------------------- /open3mod/AssimpToOpenTk.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [AssimpToOpenTk.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using Assimp; 22 | using OpenTK; 23 | using OpenTK.Graphics; 24 | 25 | namespace open3mod 26 | { 27 | /// 28 | /// Static utility functions to convert from assimp math data types to OpenTk data types. 29 | /// 30 | public static class AssimpToOpenTk 31 | { 32 | public static Matrix4 FromMatrix(Matrix4x4 mat) 33 | { 34 | return FromMatrix(ref mat); 35 | } 36 | 37 | public static Matrix4 FromMatrix(ref Matrix4x4 mat) 38 | { 39 | var m = new Matrix4 40 | { 41 | M11 = mat.A1, 42 | M12 = mat.A2, 43 | M13 = mat.A3, 44 | M14 = mat.A4, 45 | M21 = mat.B1, 46 | M22 = mat.B2, 47 | M23 = mat.B3, 48 | M24 = mat.B4, 49 | M31 = mat.C1, 50 | M32 = mat.C2, 51 | M33 = mat.C3, 52 | M34 = mat.C4, 53 | M41 = mat.D1, 54 | M42 = mat.D2, 55 | M43 = mat.D3, 56 | M44 = mat.D4 57 | }; 58 | return m; 59 | } 60 | 61 | public static Vector3 FromVector(Vector3D vec) 62 | { 63 | Vector3 v; 64 | v.X = vec.X; 65 | v.Y = vec.Y; 66 | v.Z = vec.Z; 67 | return v; 68 | } 69 | 70 | public static Color4 FromColor(Color4D color) 71 | { 72 | Color4 c; 73 | c.R = color.R; 74 | c.G = color.G; 75 | c.B = color.B; 76 | c.A = color.A; 77 | return c; 78 | } 79 | } 80 | } 81 | 82 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/DonationDialog.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [DonationDialog.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using System; 22 | using System.Diagnostics; 23 | using System.Windows.Forms; 24 | 25 | namespace open3mod 26 | { 27 | public partial class DonationDialog : Form 28 | { 29 | public DonationDialog() 30 | { 31 | InitializeComponent(); 32 | labelCount.Text = "In total, you have opened " + CoreSettings.CoreSettings.Default.CountFilesOpened + " 3D models"; 33 | } 34 | 35 | private void NotNowAskAgain(object sender, EventArgs e) 36 | { 37 | Close(); 38 | } 39 | 40 | private void DontAskAgain(object sender, EventArgs e) 41 | { 42 | CoreSettings.CoreSettings.Default.DonationUseCountDown = -1; 43 | Close(); 44 | } 45 | 46 | private void Donate(object sender, EventArgs e) 47 | { 48 | Process.Start("http://www.open3mod.com/donate.htm?ref=inapp"); 49 | Close(); 50 | } 51 | } 52 | } 53 | 54 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/EnumExtensionsNet4Backport.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [EnumExtensionsNet4Backport.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | // HasFlags() backported from .net 4 to .net 3.5 (and earlier) 22 | // Taken from http://stackoverflow.com/questions/4108828/generic-extension-method-to-see-if-an-enum-contains-a-flag 23 | 24 | using System; 25 | 26 | namespace open3mod 27 | { 28 | public static class EnumExtensionsNet4Backported 29 | { 30 | /// 31 | /// Check to see if a flags enumeration has a specific flag set. 32 | /// 33 | /// Flags enumeration to check 34 | /// Flag to check for 35 | /// 36 | public static bool HasFlag(this Enum variable, Enum value) 37 | { 38 | if (variable == null) 39 | { 40 | return false; 41 | } 42 | 43 | if (value == null) 44 | { 45 | throw new ArgumentNullException("value"); 46 | } 47 | 48 | if (!Enum.IsDefined(variable.GetType(), value)) 49 | { 50 | throw new ArgumentException(string.Format( 51 | "Enumeration type mismatch. The flag is of type '{0}', was expecting '{1}'.", 52 | value.GetType(), variable.GetType())); 53 | } 54 | 55 | var num = Convert.ToUInt64(value); 56 | return ((Convert.ToUInt64(variable) & num) == num); 57 | } 58 | } 59 | } 60 | 61 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/ExportSettings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | textures 7 | 8 | 9 | True 10 | 11 | 12 | True 13 | 14 | 15 | True 16 | 17 | 18 | 19 | 20 | 21 | False 22 | 23 | 24 | True 25 | 26 | 27 | 0 28 | 29 | 30 | -------------------------------------------------------------------------------- /open3mod/FileAssociations.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [FileAssociations.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using System; 22 | using System.Runtime.InteropServices; 23 | using System.Windows.Forms; 24 | using Microsoft.Win32; 25 | 26 | namespace open3mod 27 | { 28 | public static class FileAssociations 29 | { 30 | /// 31 | /// Set file-system associations for the given list of file formats 32 | /// 33 | /// 34 | public static bool SetAssociations(string[] extensionList) 35 | { 36 | // based on the old assimp viewer code (/tools/assimp_cmd) and 37 | // http://stackoverflow.com/questions/2681878/associate-file-extension-with-application 38 | foreach(var extension in extensionList) 39 | { 40 | using (var baseKey = Registry.CurrentUser.CreateSubKey(@"Software\Classes\" + extension)) 41 | { 42 | if (baseKey != null) 43 | { 44 | baseKey.SetValue("", "OPEN3MOD_CLASS"); 45 | } 46 | else 47 | { 48 | return false; 49 | } 50 | } 51 | } 52 | 53 | using (var currentUser = Registry.CurrentUser.CreateSubKey(@"Software\Classes\OPEN3MOD_CLASS")) 54 | { 55 | using (var openKey = Registry.CurrentUser.CreateSubKey(@"Software\Classes\OPEN3MOD_CLASS\shell\open\command")) 56 | { 57 | if (openKey != null) 58 | { 59 | openKey.SetValue("", Application.ExecutablePath + " \"%1\""); 60 | } 61 | else 62 | { 63 | return false; 64 | } 65 | } 66 | } 67 | 68 | // Tell explorer the file association has been changed 69 | SHChangeNotify(0x08000000, 0x0000, IntPtr.Zero, IntPtr.Zero); 70 | return true; 71 | } 72 | 73 | 74 | [DllImport("shell32.dll", CharSet = CharSet.Auto, SetLastError = true)] 75 | private static extern void SHChangeNotify(uint wEventId, uint uFlags, IntPtr dwItem1, IntPtr dwItem2); 76 | } 77 | } 78 | 79 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/FpsTracker.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [FpsTracker.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using System.Diagnostics; 22 | using System.Threading; 23 | 24 | namespace open3mod 25 | { 26 | /// 27 | /// Tracks performance and draws the nice fps counter in the rendering panel 28 | /// 29 | public class FpsTracker 30 | { 31 | private int _frameCnt = 1; 32 | private Stopwatch _sw; 33 | private double _lastFrameDelta; 34 | private double _lastFps; 35 | 36 | 37 | // limit maximum framerate to avoid taking too much CPU, overheating 38 | // laptop mainboards or accidentially causing nuclear detonations. 39 | public const int FRAMERATE_LIMIT = 100; 40 | 41 | 42 | public double LastFrameDelta 43 | { 44 | get { return _lastFrameDelta; } 45 | } 46 | 47 | public int FrameCnt 48 | { 49 | get { return _frameCnt; } 50 | } 51 | 52 | public double LastFps 53 | { 54 | get { return _lastFps; } 55 | } 56 | 57 | /// 58 | /// Called once per frame to update the internal frame statistics 59 | /// 60 | public void Update() 61 | { 62 | _frameCnt = FrameCnt + 1; 63 | if(_sw == null) 64 | { 65 | _sw = new Stopwatch(); 66 | _lastFrameDelta = 0.0; 67 | } 68 | else 69 | { 70 | _lastFrameDelta = _sw.Elapsed.TotalMilliseconds / 1000.0; 71 | _sw.Reset(); 72 | } 73 | 74 | _sw.Start(); 75 | 76 | // prevent divide by zero 77 | if (_lastFrameDelta < 1e-8) 78 | { 79 | _lastFps = 0.0; 80 | } 81 | else 82 | { 83 | _lastFps = 1/_lastFrameDelta; 84 | } 85 | 86 | if (_lastFps > FRAMERATE_LIMIT) 87 | { 88 | Thread.Sleep(1 + (int)(1000.0 / FRAMERATE_LIMIT - _lastFrameDelta * 1000)); 89 | } 90 | } 91 | } 92 | } 93 | 94 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/GenericShallowCopy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Reflection; 5 | using System.Runtime.Serialization; 6 | 7 | namespace open3mod 8 | { 9 | // Adapted from http://csharptest.net/372/how-to-implement-a-generic-shallow-clone-for-an-object-in-c/. 10 | class GenericShallowCopy 11 | { 12 | /// 13 | /// Shallow copy |instance| to |copy|. Use with care. 14 | /// 15 | /// (This covers the case where we want to shallow copy into an existing object, 16 | /// which is not handled by Object.MemberwiseCopy). 17 | /// 18 | /// 19 | /// 20 | /// 21 | /// 22 | public static void Copy(T copy, T instance) 23 | { 24 | var type = instance.GetType(); 25 | var fields = new List(); 26 | if (type.GetCustomAttributes(typeof(SerializableAttribute), false).Length == 0) 27 | { 28 | var t = type; 29 | while (t != typeof(Object)) 30 | { 31 | Debug.Assert(t != null, "t != null"); 32 | fields.AddRange( 33 | t.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | 34 | BindingFlags.DeclaredOnly)); 35 | t = t.BaseType; 36 | } 37 | } 38 | else 39 | { 40 | fields.AddRange(FormatterServices.GetSerializableMembers(instance.GetType())); 41 | } 42 | var values = FormatterServices.GetObjectData(instance, fields.ToArray()); 43 | FormatterServices.PopulateObjectMembers(copy, fields.ToArray(), values); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /open3mod/GraphicsSettings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 0 7 | 8 | 9 | 3 10 | 11 | 12 | True 13 | 14 | 15 | 2 16 | 17 | 18 | 0 19 | 20 | 21 | 1 22 | 23 | 24 | False 25 | 26 | 27 | 50 28 | 29 | 30 | -------------------------------------------------------------------------------- /open3mod/IHoverUpdateDialog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace open3mod 7 | { 8 | // Class of "Details" dialogs used in sidebar: if dialog is open for item A and the user 9 | // hovers over item B in the sidebar that also supports the dialog, we auto-update the 10 | // dialog contents to refer to item B. 11 | interface IHoverUpdateDialog 12 | { 13 | // Indicates if "hover-update" is currently for this dialog. 14 | // 15 | // For non-surprising UX, dialogs usually disable the feature if they display 16 | // sub-dialogs which normally do not hover-update. 17 | bool HoverUpdateEnabled { get; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /open3mod/ISceneRenderer.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [ISceneRenderer.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using System; 22 | using System.Collections.Generic; 23 | using Assimp; 24 | 25 | namespace open3mod 26 | { 27 | [Flags] 28 | public enum RenderFlags 29 | { 30 | Wireframe = 0x1, 31 | Shaded = 0x2, 32 | ShowBoundingBoxes = 0x4, 33 | ShowNormals = 0x8, 34 | ShowSkeleton = 0x10, 35 | Textured = 0x20, 36 | ShowGhosts = 0x40, // show ghost (i.e. semi-transparent) shapes for filtered meshes 37 | } 38 | 39 | 40 | /// 41 | /// Abstract interface to support different scene rendering implementations. 42 | /// An ISceneRenderer is always bound to a single scene during its entire 43 | /// lifetime. Renderers are expected to handle all view filters requested by 44 | /// a scene. 45 | /// 46 | public interface ISceneRenderer : IDisposable 47 | { 48 | /// 49 | /// Called once per frame to update per-frame data. 50 | /// 51 | /// 52 | void Update(double delta); 53 | 54 | /// 55 | /// Draws the scene 56 | /// 57 | /// Camera controller to be used 58 | /// Set of meshes to be drawn for specific nodes. 59 | /// If a node has a null entry, all of its meshes should be drawn. Otherwise 60 | /// only the meshes in the list. If this parameter is null, all nodes with all 61 | /// meshes should be drawn. 62 | /// true if the visible set is different to the last 63 | /// time this method was invoked (this refers to changes in either the visibleNodes 64 | /// and the visibleMeshesByNode parameters. 65 | /// true if one or more textures were changed since 66 | /// the last time this method was invoked. This happens when textures are being 67 | /// replaced by the user, or during asynchronous loading. 68 | /// Selected set of rendering overlays 69 | void Render(ICameraController cam, 70 | Dictionary> visibleMeshesByNode, 71 | bool visibleSetChanged, bool texturesChanged, 72 | RenderFlags flags, Renderer renderer); 73 | } 74 | } 75 | 76 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/ImageFromResource.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [ImageFromResource.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using System.Collections.Generic; 22 | using System.Diagnostics; 23 | using System.Drawing; 24 | using System.IO; 25 | using System.Reflection; 26 | 27 | namespace open3mod 28 | { 29 | public static class ImageFromResource 30 | { 31 | // this only exists to keep references to all image streams 32 | private static readonly List StreamRefs = new List(); 33 | private static readonly Dictionary Cache = new Dictionary(); 34 | 35 | /// 36 | /// Load a given embedded image resource. 37 | /// Images are cached so redundant calls are ok to make. 38 | /// 39 | /// Resource identifier 40 | /// 41 | public static Image Get(string resPath) 42 | { 43 | Image img; 44 | if (Cache.TryGetValue(resPath, out img)) 45 | { 46 | return img; 47 | } 48 | 49 | var assembly = Assembly.GetExecutingAssembly(); 50 | // for some reason we need to keep the stream open for the _lifetime_ of the Image, 51 | // therefore the Dispose() is _not_ missing here. 52 | var stream = assembly.GetManifestResourceStream(resPath); 53 | 54 | StreamRefs.Add(stream); 55 | 56 | Debug.Assert(stream != null); 57 | img = Image.FromStream(stream); 58 | 59 | Cache[resPath] = img; 60 | return img; 61 | } 62 | } 63 | } 64 | 65 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/Images/FailedToLoad.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/FailedToLoad.bmp -------------------------------------------------------------------------------- /open3mod/Images/FailedToLoad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/FailedToLoad.png -------------------------------------------------------------------------------- /open3mod/Images/FailedToLoad.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/FailedToLoad.xcf -------------------------------------------------------------------------------- /open3mod/Images/HUDBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUDBar.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_FPS_Hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_FPS_Hover.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_FPS_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_FPS_Normal.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_FPS_Normal.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_FPS_Normal.xcf -------------------------------------------------------------------------------- /open3mod/Images/HUD_FPS_Selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_FPS_Selected.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_Orbit_Hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_Orbit_Hover.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_Orbit_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_Orbit_Normal.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_Orbit_Normal.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_Orbit_Normal.xcf -------------------------------------------------------------------------------- /open3mod/Images/HUD_Orbit_Selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_Orbit_Selected.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_Picking_Hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_Picking_Hover.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_Picking_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_Picking_Normal.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_Picking_Selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_Picking_Selected.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_X_Hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_X_Hover.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_X_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_X_Normal.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_X_Normal.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_X_Normal.xcf -------------------------------------------------------------------------------- /open3mod/Images/HUD_X_Selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_X_Selected.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_Y_Hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_Y_Hover.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_Y_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_Y_Normal.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_Y_Normal.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_Y_Normal.xcf -------------------------------------------------------------------------------- /open3mod/Images/HUD_Y_Selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_Y_Selected.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_Z_Hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_Z_Hover.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_Z_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_Z_Normal.png -------------------------------------------------------------------------------- /open3mod/Images/HUD_Z_Normal.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_Z_Normal.xcf -------------------------------------------------------------------------------- /open3mod/Images/HUD_Z_Selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HUD_Z_Selected.png -------------------------------------------------------------------------------- /open3mod/Images/HierarchyIconGenerated.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HierarchyIconGenerated.xcf -------------------------------------------------------------------------------- /open3mod/Images/HierarchyIconGenericNode.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HierarchyIconGenericNode.xcf -------------------------------------------------------------------------------- /open3mod/Images/HierarchyIconHidden.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HierarchyIconHidden.xcf -------------------------------------------------------------------------------- /open3mod/Images/HierarchyIconJoint.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HierarchyIconJoint.xcf -------------------------------------------------------------------------------- /open3mod/Images/HierarchyIconMesh.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/HierarchyIconMesh.xcf -------------------------------------------------------------------------------- /open3mod/Images/PlayAnim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/PlayAnim.png -------------------------------------------------------------------------------- /open3mod/Images/PlayAnim.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/PlayAnim.xcf -------------------------------------------------------------------------------- /open3mod/Images/StopAnim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/StopAnim.png -------------------------------------------------------------------------------- /open3mod/Images/StopAnim.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/StopAnim.xcf -------------------------------------------------------------------------------- /open3mod/Images/TextureLoading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/TextureLoading.gif -------------------------------------------------------------------------------- /open3mod/Images/TextureTransparentBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/TextureTransparentBackground.png -------------------------------------------------------------------------------- /open3mod/Images/TipOfTheDay/Tip0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/TipOfTheDay/Tip0.png -------------------------------------------------------------------------------- /open3mod/Images/TipOfTheDay/Tip0.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/TipOfTheDay/Tip0.xcf -------------------------------------------------------------------------------- /open3mod/Images/TipOfTheDay/Tip1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/TipOfTheDay/Tip1.png -------------------------------------------------------------------------------- /open3mod/Images/TipOfTheDay/Tip1.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/TipOfTheDay/Tip1.xcf -------------------------------------------------------------------------------- /open3mod/Images/TipOfTheDay/Tip2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/TipOfTheDay/Tip2.png -------------------------------------------------------------------------------- /open3mod/Images/TipOfTheDay/Tip2.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/TipOfTheDay/Tip2.xcf -------------------------------------------------------------------------------- /open3mod/Images/TipOfTheDay/Tip3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/TipOfTheDay/Tip3.png -------------------------------------------------------------------------------- /open3mod/Images/TipOfTheDay/Tip3.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/TipOfTheDay/Tip3.xcf -------------------------------------------------------------------------------- /open3mod/Images/TipOfTheDay/Tip4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/TipOfTheDay/Tip4.png -------------------------------------------------------------------------------- /open3mod/Images/TipOfTheDay/Tip4.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/TipOfTheDay/Tip4.xcf -------------------------------------------------------------------------------- /open3mod/Images/TipOfTheDay/Tip5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/TipOfTheDay/Tip5.png -------------------------------------------------------------------------------- /open3mod/Images/TipOfTheDay/Tip5.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/TipOfTheDay/Tip5.xcf -------------------------------------------------------------------------------- /open3mod/Images/alex_happy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/alex_happy.png -------------------------------------------------------------------------------- /open3mod/Images/alex_unhappy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/alex_unhappy.png -------------------------------------------------------------------------------- /open3mod/Images/fps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/Images/fps.png -------------------------------------------------------------------------------- /open3mod/LinqZipNet4Backport.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [LinqZipNet4Backport.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using System; 22 | using System.Collections.Generic; 23 | 24 | namespace open3mod 25 | { 26 | // Zip() was added in .NET 4.0. 27 | // http://blogs.msdn.com/b/ericlippert/archive/2009/05/07/zip-me-up.aspx, 28 | // - Added overload for Action 29 | public static class LinqZipNet4Backport 30 | { 31 | public static IEnumerable Zip (this IEnumerable first, 32 | IEnumerable second, 33 | Func resultSelector) 34 | { 35 | if (first == null) 36 | throw new ArgumentNullException("first"); 37 | if (second == null) 38 | throw new ArgumentNullException("second"); 39 | if (resultSelector == null) 40 | throw new ArgumentNullException("resultSelector"); 41 | return ZipIterator(first, second, resultSelector); 42 | } 43 | 44 | private static IEnumerable ZipIterator 45 | (IEnumerable first, 46 | IEnumerable second, 47 | Func resultSelector) 48 | { 49 | using (IEnumerator e1 = first.GetEnumerator()) 50 | using (IEnumerator e2 = second.GetEnumerator()) 51 | while (e1.MoveNext() && e2.MoveNext()) 52 | yield return resultSelector(e1.Current, e2.Current); 53 | } 54 | 55 | public static void ZipAction(this IEnumerable first, 56 | IEnumerable second, 57 | Action action) 58 | { 59 | if (first == null) 60 | throw new ArgumentNullException("first"); 61 | if (second == null) 62 | throw new ArgumentNullException("second"); 63 | if (action == null) 64 | throw new ArgumentNullException("action"); 65 | using (IEnumerator e1 = first.GetEnumerator()) 66 | using (IEnumerator e2 = second.GetEnumerator()) 67 | while (e1.MoveNext() && e2.MoveNext()) 68 | action(e1.Current, e2.Current); 69 | } 70 | } 71 | } 72 | 73 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/LogStore.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [LogStore.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using System.Collections.Generic; 22 | 23 | namespace open3mod 24 | { 25 | /// 26 | /// Stores a list of logging messages obtained from assimp 27 | /// Log messages are intercepted in this fashion to enable arbitrary 28 | /// filtering in the UI. 29 | /// 30 | public class LogStore 31 | { 32 | 33 | /// 34 | /// Enumeration of logging levels. Category.System is for logging 35 | /// messsages produced by viewer code while all other categories 36 | /// are strictly taken from assimp. 37 | /// 38 | public enum Category 39 | { 40 | Info = 0, 41 | Warn, 42 | Error, 43 | Debug, 44 | 45 | System 46 | } 47 | 48 | /// 49 | /// Represents a single logging entry along with a timestamp 50 | /// 51 | public struct Entry 52 | { 53 | public int ThreadId; 54 | public Category Cat; 55 | public string Message; 56 | public long Time; 57 | } 58 | 59 | 60 | 61 | public List Messages 62 | { 63 | get { return _messages; } 64 | } 65 | 66 | 67 | /// 68 | /// Construct a fresh store for log messages 69 | /// 70 | /// Number of entries to be expected 71 | public LogStore(int capacity = 200) 72 | { 73 | _messages = new List(capacity); 74 | } 75 | 76 | 77 | public void Add(Category cat, string message, long time, int tid) 78 | { 79 | _messages.Add(new Entry() {Cat = cat, Message = message, Time = time, ThreadId = tid}); 80 | } 81 | 82 | 83 | public void Drop() 84 | { 85 | _messages.Clear(); 86 | } 87 | 88 | 89 | 90 | private readonly List _messages; 91 | } 92 | } 93 | 94 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/MaterialMapperModernGl.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [MaterialMapperModernGl.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using System; 22 | using System.Diagnostics; 23 | using Assimp; 24 | using System.Diagnostics; 25 | 26 | namespace open3mod 27 | { 28 | public sealed class MaterialMapperModernGl : MaterialMapper 29 | { 30 | 31 | internal MaterialMapperModernGl(Scene scene) 32 | : base(scene) 33 | { } 34 | 35 | private readonly ShaderGen _shaderGen = new ShaderGen(); 36 | 37 | 38 | #if DEBUG 39 | ~MaterialMapperModernGl() 40 | { 41 | Debug.Assert(false); 42 | } 43 | #endif 44 | 45 | public override void Dispose() 46 | { 47 | _shaderGen.Dispose(); 48 | GC.SuppressFinalize(this); 49 | } 50 | 51 | 52 | public override void ApplyMaterial(Mesh mesh, Material mat, bool textured, bool shaded) 53 | { 54 | ShaderGen.GenFlags flags = 0; 55 | if (textured) 56 | { 57 | flags |= ShaderGen.GenFlags.ColorMap; 58 | } 59 | if (shaded) 60 | { 61 | flags |= ShaderGen.GenFlags.Lighting; 62 | } 63 | Shader shader = _shaderGen.GenerateOrGetFromCache(flags); 64 | shader.BindIfNecessary(); 65 | } 66 | 67 | 68 | //public override void UnapplyMaterial(Mesh, Material, Tex) 69 | 70 | 71 | public override void ApplyGhostMaterial(Mesh mesh, Material material, bool shaded) 72 | { 73 | 74 | } 75 | 76 | public override void BeginScene(Renderer renderer) 77 | { 78 | } 79 | 80 | public override void EndScene(Renderer renderer) 81 | { 82 | } 83 | } 84 | } 85 | 86 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/MeshInfoPopup.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [MeshInfoPopup.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using System.Diagnostics; 22 | using System.Windows.Forms; 23 | using Assimp; 24 | 25 | namespace open3mod 26 | { 27 | public partial class MeshInfoPopup : UserControl 28 | { 29 | private HierarchyInspectionView _owner; 30 | 31 | public MeshInfoPopup() 32 | { 33 | InitializeComponent(); 34 | } 35 | 36 | 37 | public HierarchyInspectionView Owner 38 | { 39 | set { _owner = value; } 40 | } 41 | 42 | 43 | /// 44 | /// Sets the contents of the info pop-up given an assimp mesh. 45 | /// 46 | /// At the time this method is called, the mesh info popup's 47 | /// location has already been adjusted by the caller. 48 | /// 49 | public void Populate(Mesh mesh) 50 | { 51 | Debug.Assert(mesh != null); 52 | Debug.Assert(_owner != null); 53 | 54 | labelInfo.Text = string.Format("{0} Vertices\n{1} Faces\n", mesh.VertexCount, mesh.FaceCount); 55 | } 56 | } 57 | } 58 | 59 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/MeshUtil.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Assimp; 3 | using Assimp.Unmanaged; 4 | 5 | namespace open3mod 6 | { 7 | /// 8 | /// Utilities supporting deep and shallow copies of meshes. 9 | /// 10 | /// Generally, we avoid creating new Mesh instances. Many places in the application 11 | /// retain references to meshes, so replacing Mesh instances is dangerous. It's 12 | /// preferred to swap out the contents of the mesh. 13 | /// 14 | public static class MeshUtil 15 | { 16 | public static void DeepCopy(Mesh dest, Mesh src) 17 | { 18 | ShallowCopy(dest, src); 19 | dest.Vertices = new List(src.Vertices); 20 | dest.Normals = new List(src.Normals); 21 | dest.Tangents = new List(src.Tangents); 22 | dest.BiTangents = new List(src.BiTangents); 23 | dest.TextureCoordinateChannels = new List[AiDefines.AI_MAX_NUMBER_OF_TEXTURECOORDS]; 24 | for (int i = 0; i < AiDefines.AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i) 25 | { 26 | dest.TextureCoordinateChannels[i] = new List(src.TextureCoordinateChannels[i]); 27 | } 28 | dest.VertexColorChannels = new List[AiDefines.AI_MAX_NUMBER_OF_COLOR_SETS]; 29 | for (int i = 0; i < AiDefines.AI_MAX_NUMBER_OF_COLOR_SETS; ++i) 30 | { 31 | dest.VertexColorChannels[i] = new List(src.VertexColorChannels[i]); 32 | } 33 | dest.Faces = new List(src.Faces); 34 | for (int i = 0; i < dest.Faces.Count; ++i) 35 | { 36 | dest.Faces[i] = new Face(dest.Faces[i].Indices.ToArray()); 37 | } 38 | // TODO(acgessler): Handle bones. 39 | } 40 | 41 | public static void ShallowCopy(Mesh dest, Mesh src) 42 | { 43 | GenericShallowCopy.Copy(dest, src); 44 | } 45 | 46 | public static Mesh DeepCopy(Mesh src) 47 | { 48 | var mesh = new Mesh(); 49 | DeepCopy(mesh, src); 50 | return mesh; 51 | } 52 | 53 | public static Mesh ShallowCopy(Mesh src) 54 | { 55 | var mesh = new Mesh(); 56 | ShallowCopy(mesh, src); 57 | return mesh; 58 | } 59 | 60 | public static void ClearMesh(Mesh mesh) 61 | { 62 | mesh.Vertices.Clear(); 63 | mesh.Normals.Clear(); 64 | mesh.Tangents.Clear(); 65 | mesh.BiTangents.Clear(); 66 | for (int i = 0; i < AiDefines.AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i) 67 | { 68 | mesh.TextureCoordinateChannels[i].Clear(); 69 | } 70 | for (int i = 0; i < AiDefines.AI_MAX_NUMBER_OF_COLOR_SETS; ++i) 71 | { 72 | mesh.VertexColorChannels[i].Clear(); 73 | } 74 | mesh.Faces.Clear(); 75 | mesh.PrimitiveType = 0; 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /open3mod/OpenTkToAssimp.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [OpenTkToAssimp.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using Assimp; 22 | using OpenTK; 23 | 24 | namespace open3mod 25 | { 26 | /// 27 | /// Static utility functions to convert from OpenTk math data types to assimp data types. 28 | /// 29 | public static class OpenTkToAssimp 30 | { 31 | public static void FromMatrix(ref Matrix4 mConv, out Matrix4x4 m) 32 | { 33 | m.A1 = mConv.M11; 34 | m.A2 = mConv.M12; 35 | m.A3 = mConv.M13; 36 | m.A4 = mConv.M14; 37 | 38 | m.B1 = mConv.M21; 39 | m.B2 = mConv.M22; 40 | m.B3 = mConv.M23; 41 | m.B4 = mConv.M24; 42 | 43 | m.C1 = mConv.M31; 44 | m.C2 = mConv.M32; 45 | m.C3 = mConv.M33; 46 | m.C4 = mConv.M34; 47 | 48 | m.D1 = mConv.M41; 49 | m.D2 = mConv.M42; 50 | m.D3 = mConv.M43; 51 | m.D4 = mConv.M44; 52 | } 53 | 54 | 55 | public static Matrix4x4 FromMatrix(Matrix4 mConv) 56 | { 57 | Matrix4x4 m; 58 | FromMatrix(ref mConv, out m); 59 | return m; 60 | } 61 | } 62 | } 63 | 64 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/OverlayLightSource.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [OverlayLightSource.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using OpenTK; 22 | using OpenTK.Graphics; 23 | using OpenTK.Graphics.OpenGL; 24 | 25 | namespace open3mod 26 | { 27 | public static class OverlayLightSource 28 | { 29 | public static void DrawLightSource(Vector3 dir) 30 | { 31 | 32 | 33 | GL.Disable(EnableCap.Lighting); 34 | GL.Disable(EnableCap.Texture2D); 35 | GL.Enable(EnableCap.ColorMaterial); 36 | GL.Disable(EnableCap.CullFace); 37 | GL.ColorMaterial(MaterialFace.FrontAndBack, ColorMaterialParameter.AmbientAndDiffuse); 38 | 39 | GL.Begin(BeginMode.Lines); 40 | 41 | GL.Color4(new Color4(1.0f, 0.0f, 0.0f, 1.0f)); 42 | GL.Vertex3(dir * 2.0f); 43 | 44 | GL.Color4(new Color4(1.0f, 0.0f, 0.0f, 1.0f)); 45 | GL.Vertex3(dir * 2.1f); 46 | 47 | GL.End(); 48 | } 49 | } 50 | } 51 | 52 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/OverlayNormals.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [OverlayNormals.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using Assimp; 22 | using OpenTK; 23 | using OpenTK.Graphics; 24 | using OpenTK.Graphics.OpenGL; 25 | 26 | namespace open3mod 27 | { 28 | public static class OverlayNormals 29 | { 30 | public static void DrawNormals(Node node, int meshIndex, Mesh mesh, CpuSkinningEvaluator skinner, float invGlobalScale, Matrix4 transform) 31 | { 32 | if (!mesh.HasNormals) 33 | { 34 | return; 35 | } 36 | 37 | // The normal directions are transformed using the transpose(inverse(transform)). 38 | // This ensures correct direction is used when non-uniform scaling is present. 39 | Matrix4 normalMatrix = transform; 40 | normalMatrix.Invert(); 41 | normalMatrix.Transpose(); 42 | 43 | // Scale by scene size because the scene will be resized to fit 44 | // the unit box, but the normals should have a fixed length. 45 | var scale = invGlobalScale * 0.05f; 46 | 47 | GL.Begin(BeginMode.Lines); 48 | 49 | GL.Disable(EnableCap.Lighting); 50 | GL.Disable(EnableCap.Texture2D); 51 | GL.Enable(EnableCap.ColorMaterial); 52 | 53 | GL.Color4(new Color4(0.0f, 1.0f, 0.0f, 1.0f)); 54 | 55 | for (uint i = 0; i < mesh.VertexCount; ++i) 56 | { 57 | Vector3 v; 58 | if (skinner != null && mesh.HasBones) 59 | { 60 | skinner.GetTransformedVertexPosition(node, mesh, i, out v); 61 | } 62 | else 63 | { 64 | v = AssimpToOpenTk.FromVector(mesh.Vertices[(int)i]); 65 | } 66 | v = Vector4.Transform(new Vector4(v, 1.0f), transform).Xyz; // Skip dividing by W component. It should always be 1, here. 67 | 68 | Vector3 n; 69 | if (skinner != null) 70 | { 71 | skinner.GetTransformedVertexNormal(node, mesh, i, out n); 72 | } 73 | else 74 | { 75 | n = AssimpToOpenTk.FromVector(mesh.Normals[(int)i]); 76 | } 77 | n = Vector4.Transform(new Vector4(n, 0.0f), normalMatrix).Xyz; // Toss the W component. It is non-sensical for normals. 78 | n.Normalize(); 79 | 80 | GL.Vertex3(v); 81 | GL.Vertex3(v + n * scale); 82 | } 83 | GL.End(); 84 | 85 | GL.Disable(EnableCap.ColorMaterial); 86 | } 87 | } 88 | } 89 | 90 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/OverlaySkeleton.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [OverlaySkeleton.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using Assimp; 22 | using OpenTK; 23 | using OpenTK.Graphics; 24 | using OpenTK.Graphics.OpenGL; 25 | 26 | namespace open3mod 27 | { 28 | public static class OverlaySkeleton 29 | { 30 | public static void DrawSkeletonBone(Node node, float invGlobalScale, bool highlight) 31 | { 32 | var target = new Vector3(node.Transform.A4, node.Transform.B4, node.Transform.C4); 33 | if (!(target.LengthSquared > 1e-6f)) 34 | { 35 | return; 36 | } 37 | 38 | GL.Disable(EnableCap.Lighting); 39 | GL.Disable(EnableCap.Texture2D); 40 | GL.Enable(EnableCap.ColorMaterial); 41 | GL.Disable(EnableCap.DepthTest); 42 | 43 | GL.Color4(highlight ? new Color4(0.0f, 1.0f, 0.5f, 1.0f) : new Color4(0.0f, 0.5f, 1.0f, 1.0f)); 44 | 45 | var right = new Vector3(1, 0, 0); 46 | var targetNorm = target; 47 | targetNorm.Normalize(); 48 | 49 | Vector3 up; 50 | Vector3.Cross(ref targetNorm, ref right, out up); 51 | Vector3.Cross(ref up, ref targetNorm, out right); 52 | 53 | up *= invGlobalScale; 54 | right *= invGlobalScale; 55 | 56 | const float jointWidth = 0.03f; 57 | 58 | GL.Begin(BeginMode.LineLoop); 59 | GL.Vertex3(-jointWidth * up + -jointWidth * right); 60 | GL.Vertex3(-jointWidth * up + jointWidth * right); 61 | GL.Vertex3(jointWidth * up + jointWidth * right); 62 | GL.Vertex3(jointWidth * up + -jointWidth * right); 63 | GL.End(); 64 | 65 | GL.Begin(BeginMode.Lines); 66 | GL.Vertex3(-jointWidth * up + -jointWidth * right); 67 | GL.Vertex3(target); 68 | GL.Vertex3(-jointWidth * up + jointWidth * right); 69 | GL.Vertex3(target); 70 | GL.Vertex3(jointWidth * up + jointWidth * right); 71 | GL.Vertex3(target); 72 | GL.Vertex3(jointWidth * up + -jointWidth * right); 73 | GL.Vertex3(target); 74 | 75 | GL.Color4(highlight ? new Color4(1.0f, 0.0f, 0.0f, 1.0f) : new Color4(1.0f, 1.0f, 0.0f, 1.0f)); 76 | 77 | GL.Vertex3(Vector3.Zero); 78 | GL.Vertex3(target); 79 | GL.End(); 80 | 81 | GL.Disable(EnableCap.ColorMaterial); 82 | GL.Enable(EnableCap.DepthTest); 83 | } 84 | 85 | } 86 | } 87 | 88 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/ParallelForEach.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading; 6 | using System.Windows.Forms; 7 | using Amib.Threading; 8 | 9 | namespace open3mod 10 | { 11 | // Adapted from https://github.com/robvolk/Helpers.Net/blob/master/Src/Helpers.Net/ParallelProcessor.cs 12 | // 13 | // Restricted inputs to a List. We need to iterate it twice anyway to break it into chunks. 14 | public static class ParallelForEach 15 | { 16 | public const int DefaultMinChunkSize = 200; 17 | 18 | private static readonly SmartThreadPool DefaultSmartThreadPool = new SmartThreadPool(1000, 16, 8); 19 | 20 | /// 21 | /// Break |list| into slices of at least |minChunkSize| and schedule them on a thread pool. 22 | /// |action| is executed on each slice. 23 | /// 24 | public static void ParallelDo(this IList list, Action> action, 25 | int minChunkSize = DefaultMinChunkSize, 26 | SmartThreadPool threadPool = null) 27 | { 28 | threadPool = threadPool ?? DefaultSmartThreadPool; 29 | const int maxHandles = 64; // Maximum for WaitHandle 30 | var count = list.Count(); 31 | if (count == 0) 32 | { 33 | return; 34 | } 35 | // WaitAll() does not support waiting for multiple handles on STA threads. 36 | if (count < minChunkSize * 2) 37 | { 38 | action(list); 39 | return; 40 | } 41 | var parallelism = Math.Min(maxHandles, Math.Max(1, count / minChunkSize)); 42 | var effectiveChunkSize = count/parallelism; 43 | var items = new IWorkItemResult[parallelism]; 44 | for (var offset = 0; offset < parallelism; offset++) 45 | { 46 | var start = effectiveChunkSize * offset; 47 | var chunk = list.Skip(start).Take(offset == parallelism - 1 ? count - start : effectiveChunkSize); 48 | items[offset] = threadPool.QueueWorkItem(() => action(chunk)); 49 | } 50 | try 51 | { 52 | SmartThreadPool.WaitAll(items); 53 | } 54 | catch (ThreadInterruptedException ex) 55 | { 56 | foreach (var item in items) 57 | { 58 | item.Cancel(); 59 | } 60 | throw; 61 | } 62 | } 63 | 64 | /// 65 | /// Break |list| into slices of at least |minChunkSize| and schedule them on a thread pool. 66 | /// |action| is executed on each individual item. 67 | /// 68 | public static void ParallelDo(this IList list, Action action, 69 | int minChunkSize = DefaultMinChunkSize, 70 | SmartThreadPool threadPool = null) 71 | { 72 | list.ParallelDo( 73 | (chunk) => 74 | { 75 | foreach (var elem in chunk) 76 | { 77 | action(elem); 78 | } 79 | }, minChunkSize, threadPool); 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /open3mod/PickingCameraController.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [PickingCameraController.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using System; 22 | using System.Collections.Generic; 23 | using System.Linq; 24 | using System.Text; 25 | 26 | using OpenTK; 27 | 28 | namespace open3mod 29 | { 30 | public class PickingCameraController : ICameraController 31 | { 32 | private Matrix4 _view; 33 | public PickingCameraController(Matrix4 view) 34 | { 35 | _view = view; 36 | } 37 | 38 | 39 | public PickingCameraController() 40 | { 41 | 42 | } 43 | 44 | 45 | public void SetPivot(Vector3 pivot) 46 | {} 47 | 48 | public void SetView(Matrix4 view) 49 | { 50 | _view = view; 51 | } 52 | 53 | 54 | public Matrix4 GetView() 55 | { 56 | return _view; 57 | } 58 | 59 | 60 | public void Pan(float x, float y) 61 | { 62 | } 63 | 64 | 65 | public void MovementKey(float x, float y, float z) 66 | { 67 | } 68 | 69 | 70 | public CameraMode GetCameraMode() 71 | { 72 | return CameraMode.Pick; 73 | } 74 | 75 | 76 | public void MouseMove(int x, int y) 77 | { 78 | } 79 | 80 | 81 | public void Scroll(float z) 82 | { 83 | 84 | } 85 | 86 | public void LeapInput(float x, float y, float z, float pitch, float roll, float yaw) 87 | { 88 | 89 | } 90 | } 91 | } 92 | 93 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("open3mod")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("open3mod")] 13 | [assembly: AssemblyCopyright("Copyright © 2012")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("79f990bd-3247-42bf-b5dd-9bbc1086ce21")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /open3mod/RenameDialog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace open3mod 11 | { 12 | public partial class RenameDialog : Form 13 | { 14 | private readonly HashSet _blacklist; 15 | private readonly HashSet _greylist; 16 | public string OldName { get; private set; } 17 | public string NewName { get; private set; } 18 | 19 | public RenameDialog(string oldName, HashSet blacklist, HashSet greylist) 20 | { 21 | _blacklist = blacklist; 22 | _greylist = greylist; 23 | OldName = oldName; 24 | InitializeComponent(); 25 | textBoxNewName.Text = OldName; 26 | if (OldName == "") 27 | { 28 | OnValidate(null, null); 29 | } 30 | Text = string.Format("{0} {1}", Text, oldName); 31 | } 32 | 33 | 34 | private void OnCancel(object sender, EventArgs e) 35 | { 36 | NewName = OldName; 37 | Close(); 38 | } 39 | 40 | private void OnOk(object sender, EventArgs e) 41 | { 42 | Close(); 43 | } 44 | 45 | private void OnValidate(object sender, EventArgs e) 46 | { 47 | buttonOk.Enabled = true; 48 | 49 | if (textBoxNewName.Text.Trim() == "") 50 | { 51 | labelStatus.ForeColor = Color.Red; 52 | labelStatus.Text = "Name can not be empty."; 53 | buttonOk.Enabled = false; 54 | } 55 | else if (textBoxNewName.Text == OldName) 56 | { 57 | labelStatus.ForeColor = Color.Green; 58 | labelStatus.Text = "Unchanged"; 59 | NewName = OldName; 60 | } 61 | else if (_blacklist.Contains(textBoxNewName.Text)) 62 | { 63 | labelStatus.ForeColor = Color.Red; 64 | labelStatus.Text = "Name is already used and cannot be re-used."; 65 | buttonOk.Enabled = false; 66 | } 67 | else if (_greylist.Contains(textBoxNewName.Text)) 68 | { 69 | labelStatus.ForeColor = Color.Orange; 70 | labelStatus.Text = "Name is already used. It can be used again,\nbut should be avoided."; 71 | } 72 | else if (textBoxNewName.Text.Contains(" ") || textBoxNewName.Text.Contains("\t")) 73 | { 74 | labelStatus.ForeColor = Color.Orange; 75 | labelStatus.Text = "Avoid whitespace in names"; 76 | } 77 | else 78 | { 79 | labelStatus.ForeColor = Color.Green; 80 | labelStatus.Text = "OK"; 81 | NewName = textBoxNewName.Text; 82 | } 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /open3mod/Shader/UberFragmentShader.glsl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v0.1) 3 | // [UberFragmentShader.glsl] 4 | // (c) 2012-2013, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | // note: all lighting calculations done in modelview space 22 | uniform sampler2D Texture0; 23 | 24 | uniform vec4 LightDiffuse_SceneBrightness; 25 | uniform vec3 LightSpecular; 26 | uniform vec3 LightDirection; // modelview space, norm. 27 | 28 | uniform vec4 MaterialDiffuse_Alpha; 29 | uniform vec4 MaterialSpecular_Shininess; 30 | uniform vec3 MaterialAmbient; 31 | uniform vec3 MaterialEmissive; 32 | 33 | in vec3 position; 34 | in vec3 normal; 35 | 36 | #ifdef HAS_COLOR_MAP 37 | in vec2 texCoord; 38 | #endif 39 | 40 | #ifdef HAS_VERTEX_COLOR 41 | in vec3 vertexColor; 42 | #endif 43 | 44 | 45 | void main(void) 46 | { 47 | vec4 diffuseAndAlpha = MaterialDiffuse_Alpha.rgba; 48 | 49 | #ifdef HAS_COLOR_MAP 50 | diffuseAndAlpha *= texture2D(Texture0, texCoord.xy); 51 | #endif 52 | 53 | #ifdef HAS_VERTEX_COLOR 54 | diffuseAndAlpha.rgb *= vertexColor; 55 | #endif 56 | 57 | float li = dot(normal, LightDirection); 58 | diffuseAndAlpha.rgb = li * diffuseAndAlpha.rgb + MaterialAmbient; 59 | 60 | vec3 specular = vec3(0.0, 0.0, 0.0); 61 | 62 | #ifdef HAS_PHONG_SPECULAR_SHADING 63 | vec3 eyeDir = normalize(-position); 64 | vec3 r = normalize(reflect(-LightDirection, normal)); 65 | specular = LightSpecular * pow(max(dot(r, eyeDir), 0.0), MaterialSpecular_Shininess.w); 66 | #endif 67 | 68 | vec3 totalColor = (diffuseAndAlpha.rgb + specular + MaterialEmissive) * LightDiffuse_SceneBrightness.w; 69 | gl_FragColor = vec4(totalColor.rgb, diffuseAndAlpha.a); 70 | } 71 | 72 | -------------------------------------------------------------------------------- /open3mod/Shader/UberVertexShader.glsl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v0.1) 3 | // [UberVertexShader.glsl] 4 | // (c) 2012-2013, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | 22 | uniform mat4x4 WorldViewProjection; 23 | uniform mat4x4 WorldView; 24 | 25 | out vec3 position; 26 | out vec3 normal; 27 | 28 | // use custom varyings to pass to the fragment shader to simplify porting to HLSL 29 | #ifdef HAS_COLOR_MAP 30 | out vec2 texCoord; 31 | #endif 32 | 33 | #ifdef HAS_VERTEX_COLOR 34 | out vec3 vertexColor; 35 | #endif 36 | 37 | 38 | void main(void) 39 | { 40 | gl_Position = WorldViewProjection * gl_Vertex; 41 | 42 | #ifdef HAS_VERTEX_COLOR 43 | vertexColor = gl_Color.rgb; 44 | #endif 45 | 46 | #ifdef HAS_COLOR_MAP 47 | texCoord = gl_MultiTexCoord0.xy; 48 | #endif 49 | 50 | position = vec3(WorldView * gl_Vertex); 51 | // Scale is always uniform so the 3x3 part of WorldView is the same as the WorldViewTranspose. 52 | normal = normalize(vec3(WorldView * vec4(gl_Normal, 0.0))); 53 | } 54 | 55 | -------------------------------------------------------------------------------- /open3mod/ShaderGen.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [ShaderGen.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using System; 22 | using System.Collections.Generic; 23 | using System.Linq; 24 | using System.Text; 25 | 26 | 27 | namespace open3mod 28 | { 29 | public class ShaderGen : IDisposable 30 | { 31 | [Flags] 32 | public enum GenFlags 33 | { 34 | ColorMap = 0x1, 35 | VertexColor = 0x2, 36 | PhongSpecularShading = 0x4, 37 | Skinning = 0x8, 38 | Lighting = 0x10 39 | }; 40 | 41 | private readonly Dictionary shaders_ = new Dictionary(); 42 | 43 | public Shader GenerateOrGetFromCache(GenFlags flags) 44 | { 45 | if (!shaders_.ContainsKey(flags)) 46 | { 47 | shaders_[flags] = Generate(flags); 48 | } 49 | return shaders_[flags]; 50 | } 51 | 52 | public void Dispose() 53 | { 54 | foreach (var v in shaders_) 55 | { 56 | v.Value.Dispose(); 57 | } 58 | GC.SuppressFinalize(this); 59 | } 60 | 61 | public Shader Generate( GenFlags flags ) 62 | { 63 | string pp = ""; 64 | 65 | if (flags.HasFlag(GenFlags.ColorMap)) 66 | { 67 | pp += "#define HAS_COLOR_MAP\n"; 68 | } 69 | 70 | if (flags.HasFlag(GenFlags.VertexColor)) 71 | { 72 | pp += "#define HAS_VERTEX_COLOR\n"; 73 | } 74 | 75 | if (flags.HasFlag(GenFlags.PhongSpecularShading)) 76 | { 77 | pp += "#define HAS_PHONG_SPECULAR_SHADING\n"; 78 | } 79 | 80 | if (flags.HasFlag(GenFlags.Skinning)) 81 | { 82 | pp += "#define HAS_SKINNING\n"; 83 | } 84 | 85 | if (flags.HasFlag(GenFlags.Lighting)) 86 | { 87 | pp += "#define HAS_LIGHTING\n"; 88 | } 89 | 90 | return Shader.FromResource("open3mod.Shader.UberVertexShader.glsl", "open3mod.Shader.UberFragmentShader.glsl", pp); 91 | } 92 | 93 | } 94 | } 95 | 96 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/TabUISkeleton.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [TabUISkeleton.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using System.Collections.Generic; 22 | using System.ComponentModel; 23 | using System.Drawing; 24 | using System.Data; 25 | using System.Linq; 26 | using System.Text; 27 | 28 | using System.Windows.Forms; 29 | 30 | using OpenTK; 31 | using OpenTK.Graphics; 32 | 33 | namespace open3mod 34 | { 35 | public partial class TabUiSkeleton : UserControl 36 | { 37 | public TabUiSkeleton() 38 | { 39 | InitializeComponent(); 40 | splitContainer.SplitterDistance = splitContainer.Width - 440; 41 | } 42 | 43 | public SplitContainer GetSplitter() 44 | { 45 | return splitContainer; 46 | } 47 | 48 | public InspectionView GetInspector() 49 | { 50 | return inspectionView1; 51 | } 52 | 53 | public void InjectGlControl(GLControl gl) 54 | { 55 | var s = splitContainer.Controls[0]; 56 | 57 | s.Controls.Add(gl); 58 | gl.Left = s.Left; 59 | gl.Top = s.Top; 60 | 61 | gl.Width = s.Width; 62 | gl.Height = s.Height; 63 | } 64 | 65 | private void OnSplitterMove(object sender, SplitterEventArgs e) 66 | { 67 | // Commented because it does not seem to avoid a slight offset every time the splitter is restored. 68 | /* 69 | var settings = CoreSettings.CoreSettings.Default; 70 | settings.InspectorRecordedWidth = splitContainer.Panel1.Width; 71 | // for some reason this is necessary to keep the layout from breaking up. 72 | inspectionView1.ClientSize = splitContainer.Panel2.ClientSize; */ 73 | //inspectionView1.ClientSize = splitContainer.Panel2.ClientSize; 74 | } 75 | } 76 | } 77 | 78 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/TextureDetailsDialog.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [TextureDetailsDialog.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using System; 22 | using System.Collections.Generic; 23 | using System.ComponentModel; 24 | using System.Data; 25 | using System.Diagnostics; 26 | using System.Drawing; 27 | using System.IO; 28 | using System.Linq; 29 | using System.Text; 30 | 31 | using System.Windows.Forms; 32 | using Assimp; 33 | 34 | namespace open3mod 35 | { 36 | public partial class TextureDetailsDialog : Form 37 | { 38 | private TextureThumbnailControl _tex; 39 | public TextureDetailsDialog() 40 | { 41 | InitializeComponent(); 42 | } 43 | 44 | 45 | public TextureThumbnailControl GetTexture() 46 | { 47 | return _tex; 48 | } 49 | 50 | 51 | public void SetTexture(TextureThumbnailControl tex) 52 | { 53 | Debug.Assert(tex != null && tex.Texture != null); 54 | 55 | _tex = tex; 56 | var img = tex.Texture.Image; 57 | 58 | Text = Path.GetFileName(tex.FilePath) + " - Details"; 59 | 60 | pictureBox1.Image = img; 61 | 62 | if (img != null) 63 | { 64 | labelInfo.Text = string.Format("Size: {0} x {1} px", img.Width, img.Height); 65 | } 66 | checkBoxHasAlpha.Checked = tex.Texture.HasAlpha == Texture.AlphaState.HasAlpha; 67 | pictureBox1.SizeMode = PictureBoxSizeMode.Zoom; 68 | } 69 | } 70 | } 71 | 72 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/TextureExporter.cs: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // Open 3D Model Viewer (open3mod) (v2.0) 3 | // [TextureExporter.cs] 4 | // (c) 2012-2015, Open3Mod Contributors 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | 21 | using System; 22 | using System.Collections.Generic; 23 | using System.Diagnostics; 24 | using System.Linq; 25 | using System.Text; 26 | 27 | 28 | 29 | namespace open3mod 30 | { 31 | public class TextureExporter 32 | { 33 | private readonly Texture _texture; 34 | 35 | public TextureExporter(Texture texture) 36 | { 37 | _texture = texture; 38 | Debug.Assert(_texture != null); 39 | } 40 | 41 | 42 | public string[] GetExtensionList() 43 | { 44 | // GDI+ encoders 45 | // http://msdn.microsoft.com/de-de/library/vstudio/system.drawing.imaging.imageformat.aspx 46 | var gdi = new[] {"bmp","emf","exif","gif","ico","jpeg","png","tiff","wmf"}; 47 | return gdi; 48 | } 49 | 50 | 51 | public bool Export(string path) 52 | { 53 | try 54 | { 55 | _texture.Image.Save(path); 56 | } 57 | catch(Exception) 58 | { 59 | return false; 60 | } 61 | return true; 62 | } 63 | } 64 | } 65 | 66 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /open3mod/TimeSlideControl.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace open3mod 2 | { 3 | partial class TimeSlideControl 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Component Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.SuspendLayout(); 32 | // 33 | // TimeSlideControl 34 | // 35 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 36 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 37 | this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 38 | this.DoubleBuffered = true; 39 | this.Name = "TimeSlideControl"; 40 | this.Size = new System.Drawing.Size(360, 61); 41 | this.ResumeLayout(false); 42 | 43 | } 44 | 45 | #endregion 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /open3mod/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/open3mod/app_icon.ico -------------------------------------------------------------------------------- /scripts/abbrev.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: UTF_8 -*- 3 | 4 | #///////////////////////////////////////////////////////////////////////////////// 5 | # Useful abbreviations to reduce typing work writing typical python mini-scripts. 6 | # (c) Alexander Gessler, 2010 7 | # 8 | # HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 9 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 10 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 11 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 12 | # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 13 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 14 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 15 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 17 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18 | # /////////////////////////////////////////////////////////////////////////////////// 19 | 20 | # re module 21 | import re 22 | rec = re.compile 23 | 24 | # os module 25 | import os 26 | opj = os.path.join 27 | ope = os.path.exists 28 | opse = os.path.splitext 29 | ops = os.path.split 30 | oprp = os.path.realpath 31 | opap = os.path.abspath 32 | opid = os.path.isdir 33 | opif = os.path.isfile 34 | opil = os.path.islink 35 | opia = os.path.isabs 36 | opgs = os.path.getsize 37 | old = os.listdir 38 | 39 | # itertools module 40 | import itertools 41 | itch = itertools.chain 42 | itc = itertools.combinations 43 | itp = itertools.permutations 44 | itcp = itertools.product 45 | 46 | # collections module 47 | import collections 48 | dd = collections.defaultdict 49 | 50 | # vim: ai ts=4 sts=4 et sw=4 51 | 52 | -------------------------------------------------------------------------------- /scripts/headers/footer_cs.txt: -------------------------------------------------------------------------------- 1 | /* vi: set shiftwidth=4 tabstop=4: */ -------------------------------------------------------------------------------- /scripts/headers/header_cs.txt: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | // (v.) 3 | // [] 4 | // 5 | // 6 | // Licensed under the terms and conditions of the 3-clause BSD license. See 7 | // the LICENSE file in the root folder of the repository for the details. 8 | // 9 | // HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 10 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 11 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 12 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 13 | // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 14 | // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 15 | // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 16 | // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 18 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19 | /////////////////////////////////////////////////////////////////////////////////// 20 | -------------------------------------------------------------------------------- /setup/Setup.isproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Express 5 | 6 | Debug 7 | $(Configuration) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /testdata/redist/duck/duckCM.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/redist/duck/duckCM.tga -------------------------------------------------------------------------------- /testdata/redist/jeep/jeep1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/redist/jeep/jeep1.jpg -------------------------------------------------------------------------------- /testdata/redist/jeep/jeep1.ms3d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/redist/jeep/jeep1.ms3d -------------------------------------------------------------------------------- /testdata/redist/jeep/jeep1.readme.txt: -------------------------------------------------------------------------------- 1 | Jeep designed, modelled and skinned by me, Psionic 2 | 3 | FREE for use however you like, credits are appreciated!!! 4 | 5 | It was modelled in Milkshape 3D and includes the MS3D files oriented for X or B3D format (BlitzBasic 3D), its 2032 polys with a 512x512 jpg texture map. There are two skin variations plus a UV template to help out if you want to create your own skin variations. 6 | 7 | I'd love to see a few screenshots of it being used in-game so feel free to stop by my site and maybe drop by my forums and show us all what your doing with it!!!!!!! 8 | 9 | Check out more of my work at:- 10 | 11 | http://xu1productions.com/3dstudio/index.html - 3D Game Resources 12 | 13 | http://www.psionicdesign.com - My Main 2D/3D Digital Art site 14 | 15 | Psionic 2002 -------------------------------------------------------------------------------- /testdata/redist/lost-empire/copyright.txt: -------------------------------------------------------------------------------- 1 | Underground city in the 2 | "Lost Empire" area from the Vokselia Minecraft world 3 | http://vokselia.com 4 | CC BY 3.0 License http://creativecommons.org/licenses/by/3.0/ 5 | 6 | 224,998 faces 7 | 449,992 vertices 8 | after loading and welding colocated vertices 9 | 10 | ------------------ 11 | Converted to OBJ by Morgan McGuire using Mineways (http://mineways.com) 12 | -------------------------------------------------------------------------------- /testdata/redist/lost-empire/lost_empire-Alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/redist/lost-empire/lost_empire-Alpha.png -------------------------------------------------------------------------------- /testdata/redist/lost-empire/lost_empire-RGB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/redist/lost-empire/lost_empire-RGB.png -------------------------------------------------------------------------------- /testdata/redist/lost-empire/lost_empire-RGBA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/redist/lost-empire/lost_empire-RGBA.png -------------------------------------------------------------------------------- /testdata/scenes/HUMAN.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/scenes/HUMAN.blend -------------------------------------------------------------------------------- /testdata/scenes/SpiderTex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/scenes/SpiderTex.jpg -------------------------------------------------------------------------------- /testdata/scenes/Spider_binary.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/scenes/Spider_binary.stl -------------------------------------------------------------------------------- /testdata/scenes/SuzanneSubdiv_252.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/scenes/SuzanneSubdiv_252.blend -------------------------------------------------------------------------------- /testdata/scenes/Testwuson.X: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/scenes/Testwuson.X -------------------------------------------------------------------------------- /testdata/scenes/UglyVertexColors.lwo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/scenes/UglyVertexColors.lwo -------------------------------------------------------------------------------- /testdata/scenes/Wuson.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/scenes/Wuson.stl -------------------------------------------------------------------------------- /testdata/scenes/drkwood2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/scenes/drkwood2.jpg -------------------------------------------------------------------------------- /testdata/scenes/engineflare1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/scenes/engineflare1.jpg -------------------------------------------------------------------------------- /testdata/scenes/fels.3ds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/scenes/fels.3ds -------------------------------------------------------------------------------- /testdata/scenes/hierarchy_smoothed.lwo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/scenes/hierarchy_smoothed.lwo -------------------------------------------------------------------------------- /testdata/scenes/spider.mtl: -------------------------------------------------------------------------------- 1 | # 2 | # spider.mtl 3 | # 4 | 5 | newmtl Skin 6 | Ka 0.200000 0.200000 0.200000 7 | Kd 0.827451 0.792157 0.772549 8 | Ks 0.000000 0.000000 0.000000 9 | Ns 0.000000 10 | map_Kd .\wal67ar_small.jpg 11 | 12 | newmtl Brusttex 13 | Ka 0.200000 0.200000 0.200000 14 | Kd 0.800000 0.800000 0.800000 15 | Ks 0.000000 0.000000 0.000000 16 | Ns 0.000000 17 | map_Kd .\wal69ar_small.jpg 18 | 19 | newmtl HLeibTex 20 | Ka 0.200000 0.200000 0.200000 21 | Kd 0.690196 0.639216 0.615686 22 | Ks 0.000000 0.000000 0.000000 23 | Ns 0.000000 24 | map_Kd .\SpiderTex.jpg 25 | 26 | newmtl BeinTex 27 | Ka 0.200000 0.200000 0.200000 28 | Kd 0.800000 0.800000 0.800000 29 | Ks 0.000000 0.000000 0.000000 30 | Ns 0.000000 31 | map_Kd .\drkwood2.jpg 32 | 33 | newmtl Augentex 34 | Ka 0.200000 0.200000 0.200000 35 | Kd 0.800000 0.800000 0.800000 36 | Ks 0.000000 0.000000 0.000000 37 | Ns 0.000000 38 | map_Kd .\engineflare1.jpg -------------------------------------------------------------------------------- /testdata/scenes/wal67ar_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/scenes/wal67ar_small.jpg -------------------------------------------------------------------------------- /testdata/scenes/wal69ar_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acgessler/open3mod/d49f258dbfcc173001221b0562cc8c96264e66fc/testdata/scenes/wal69ar_small.jpg --------------------------------------------------------------------------------