flag).
- */
- const char* AI_CONFIG_PP_TUV_EVALUATE = "PP_TUV_EVALUATE";
-
- /**
- * A hint to assimp to favour speed against import quality.
- *
- * Enabling this option may result in faster loading, but it needn't.
- * It represents just a hint to loaders and post-processing steps to use
- * faster code paths, if possible.
- *
- * Default value: false.
- *
- * Property type: bool.
- */
- const char* AI_CONFIG_FAVOUR_SPEED = "FAVOUR_SPEED";
-
-
- /*
- * Importer settings.
- *
- * Various stuff to fine-tune the behaviour of specific importer plugins.
- */
-
- /**
- * Set the vertex animation keyframe to be imported.
- *
- * Assimp does not support vertex keyframes (only bone animation is
- * supported). The library reads only one frame of models with vertex
- * animations.
- *
- * Default value: 0 (first frame).
- *
- * Property type: integer.
- *
- * Note: This option applies to all importers. However, it is also possible
- * to override the global setting for a specific loader. You can use the
- * AI_CONFIG_IMPORT_XXX_KEYFRAME options (where XXX is a placeholder for
- * the file format for which you want to override the global setting).
- */
- const char* AI_CONFIG_IMPORT_GLOBAL_KEYFRAME = "IMPORT_GLOBAL_KEYFRAME";
-
- const char* AI_CONFIG_IMPORT_MD3_KEYFRAME = "IMPORT_MD3_KEYFRAME";
- const char* AI_CONFIG_IMPORT_MD2_KEYFRAME = "IMPORT_MD2_KEYFRAME";
- const char* AI_CONFIG_IMPORT_MDL_KEYFRAME = "IMPORT_MDL_KEYFRAME";
- const char* AI_CONFIG_IMPORT_MDC_KEYFRAME = "IMPORT_MDC_KEYFRAME";
- const char* AI_CONFIG_IMPORT_SMD_KEYFRAME = "IMPORT_SMD_KEYFRAME";
- const char* AI_CONFIG_IMPORT_UNREAL_KEYFRAME = "IMPORT_UNREAL_KEYFRAME";
-
-
- /**
- * Configures the AC loader to collect all surfaces which have the
- * "Backface cull" flag set in separate meshes.
- *
- * Default value: true.
- *
- * Property type: bool.
- */
- const char* AI_CONFIG_IMPORT_AC_SEPARATE_BFCULL = "IMPORT_AC_SEPARATE_BFCULL";
-
- /**
- * Configures the UNREAL 3D loader to separate faces with different surface
- * flags (e.g. two-sided vs. single-sided).
- *
- * Default value: true.
- *
- * Property type: bool.
- */
- const char* AI_CONFIG_IMPORT_UNREAL_HANDLE_FLAGS = "UNREAL_HANDLE_FLAGS";
-
- /**
- * Configures the terragen import plugin to compute uv's for terrains, if
- * not given. Furthermore, a default texture is assigned.
- *
- * UV coordinates for terrains are so simple to compute that you'll usually
- * want to compute them on your own, if you need them. This option is intended
- * for model viewers which want to offer an easy way to apply textures to
- * terrains.
- *
- * Default value: false.
- *
- * Property type: bool.
- */
- const char* AI_CONFIG_IMPORT_TER_MAKE_UVS = "IMPORT_TER_MAKE_UVS";
-
- /**
- * Configures the ASE loader to always reconstruct normal vectors basing on
- * the smoothing groups loaded from the file.
- *
- * Many ASE files have invalid normals (they're not orthonormal).
- *
- * Default value: true.
- *
- * Property type: bool.
- */
- const char* AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS = "IMPORT_ASE_RECONSTRUCT_NORMALS";
-
- /**
- * Configures the M3D loader to detect and process multi-part Quake player
- * models.
- *
- * These models usually consist of three files, lower.md3,
- * upper.md3 and head.md3. If this property is set
- * to true, Assimp will try to load and combine all three files if one of
- * them is loaded.
- *
- * Default value: true.
- *
- * Property type: bool.
- */
- const char* AI_CONFIG_IMPORT_MD3_HANDLE_MULTIPART = "IMPORT_MD3_HANDLE_MULTIPART";
-
- /**
- * Tells the MD3 loader which skin files to load.
- *
- * When loading MD3 files, Assimp checks whether a file
- * _.skin is existing. These files
- * are used by Quake 3 to be able to assign different skins (e.g. red and
- * blue team) to models. 'default', 'red', 'blue' are typical skin names.
- *
- * Default value: "default".
- *
- * Property type: string.
- */
- const char* AI_CONFIG_IMPORT_MD3_SKIN_NAME = "IMPORT_MD3_SKIN_NAME";
-
- /**
- * Specify the Quake 3 shader file to be used for a particular MD3 file.
- * This can also be a search path.
- *
- * By default Assimp's behaviour is as follows: If a MD3 file
- * [any_path]/models/[any_q3_subdir]/[model_name]/[file_name].md3
- * is loaded, the library tries to locate the corresponding shader file in
- * [any_path]/scripts/[model_name].shader. This property
- * overrides this behaviour. It can either specify a full path to the shader
- * to be loaded or alternatively the path (relative or absolute) to the
- * directory where the shaders for all MD3s to be loaded reside. Assimp
- * attempts to open [dir]/[model_name].shader first,
- * [dir]/[file_name].shader is the fallback file. Note that
- * [dir] should have a terminal (back)slash.
- *
- * Default value: n/a.
- *
- * Property type: string.
- */
- const char* AI_CONFIG_IMPORT_MD3_SHADER_SRC = "IMPORT_MD3_SHADER_SRC";
-
- /**
- * Configures the LWO loader to load just one layer from the model.
- *
- * LWO files consist of layers and in some cases it could be useful to load
- * only one of them. This property can be either a string – which specifies
- * the name of the layer – or an integer – the index of the layer. If the
- * property is not set the whole LWO model is loaded. Loading fails if the
- * requested layer is not available. The layer index is zero-based and the
- * layer name may not be empty.
- *
- * Default value: all layers are loaded.
- *
- * Property type: integer/string.
- */
- const char* AI_CONFIG_IMPORT_LWO_ONE_LAYER_ONLY = "IMPORT_LWO_ONE_LAYER_ONLY";
-
- /**
- * Configures the MD5 loader to not load the MD5ANIM file for a MD5MESH file
- * automatically.
- *
- * The default strategy is to look for a file with the same name but the
- * MD5ANIM extension in the same directory. If it is found, it is loaded
- * and combined with the MD5MESH file. This configuration option can be
- * used to disable this behaviour.
- *
- * Default value: false.
- *
- * Property type: bool.
- */
- const char* AI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOAD = "IMPORT_MD5_NO_ANIM_AUTOLOAD";
-
- /**
- * Defines the begin of the time range for which the LWS loader evaluates
- * animations and computes aiNodeAnims.
- *
- * Assimp provides full conversion of LightWave's envelope system, including
- * pre and post conditions. The loader computes linearly subsampled animation
- * chanels with the frame rate given in the LWS file. This property defines
- * the start time. Note: animation channels are only generated if a node
- * has at least one envelope with more tan one key assigned. This property.
- * is given in frames, '0' is the first frame. By default, if this property
- * is not set, the importer takes the animation start from the input LWS
- * file ('FirstFrame' line).
- *
- * Default value: read from file.
- *
- * Property type: integer.
- *
- * See: AI_CONFIG_IMPORT_LWS_ANIM_END – end of the imported
- * time range
- */
- const char* AI_CONFIG_IMPORT_LWS_ANIM_START = "IMPORT_LWS_ANIM_START";
- const char* AI_CONFIG_IMPORT_LWS_ANIM_END = "IMPORT_LWS_ANIM_END";
-
- /**
- * Defines the output frame rate of the IRR loader.
- *
- * IRR animations are difficult to convert for Assimp and there will always
- * be a loss of quality. This setting defines how many keys per second are
- * returned by the converter.
- *
- * Default value: 100.
- *
- * Property type: integer.
- */
- const char* AI_CONFIG_IMPORT_IRR_ANIM_FPS = "IMPORT_IRR_ANIM_FPS";
-
- /**
- * Ogre Importer will try to load this material file.
- *
- * Ogre Mehs contain only the material name, not the material file. If there
- * is no material file with the same name as the material, Ogre Importer
- * will try to load this file and search the material in it.
- *
- * Property type: string. Default value: "Scene.material".
- */
- const char* AI_CONFIG_IMPORT_OGRE_MATERIAL_FILE = "IMPORT_OGRE_MATERIAL_FILE";
-}
diff --git a/ExternalResources/assimp-master/port/dAssimp/assimp/fileIO.d b/ExternalResources/assimp-master/port/dAssimp/assimp/fileIO.d
deleted file mode 100644
index d893016..0000000
--- a/ExternalResources/assimp-master/port/dAssimp/assimp/fileIO.d
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
----------------------------------------------------------------------------
-Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------------
-
-Copyright (c) 2006-2009, ASSIMP Development Team
-
-All rights reserved.
-
-Redistribution and use of this software in source and binary forms,
-with or without modification, are permitted provided that the following
-conditions are met:
-
- * Redistributions of source code must retain the above
- copyright notice, this list of conditions and the
- following disclaimer.
-
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-
- * Neither the name of the ASSIMP team, nor the names of its
- contributors may be used to endorse or promote products
- derived from this software without specific prior
- written permission of the ASSIMP Development Team.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------------
-*/
-
-/**
- * The data structures necessary to use Assimip with a custom IO system.
- */
-module assimp.fileIO;
-
-import assimp.types;
-
-extern ( C ) {
- // aiFile callbacks
- alias size_t function( aiFile*, char*, size_t, size_t ) aiFileWriteProc;
- alias size_t function( aiFile*, char*, size_t, size_t ) aiFileReadProc;
- alias size_t function( aiFile* ) aiFileTellProc;
- alias void function( aiFile* ) aiFileFlushProc;
- alias aiReturn function( aiFile*, size_t, aiOrigin ) aiFileSeek;
-
- // aiFileIO callbacks
- alias aiFile* function( aiFileIO*, char*, char* ) aiFileOpenProc;
- alias void function( aiFileIO*, aiFile* ) aiFileCloseProc;
-
- /**
- * Represents user-defined data.
- */
- alias char* aiUserData;
-
- /**
- * File system callbacks.
- *
- * Provided are functions to open and close files. Supply a custom structure
- * to the import function. If you don't, a default implementation is used.
- * Use custom file systems to enable reading from other sources, such as
- * ZIPs or memory locations.
- */
- struct aiFileIO {
- /**
- * Function used to open a new file
- */
- aiFileOpenProc OpenProc;
-
- /**
- * Function used to close an existing file
- */
- aiFileCloseProc CloseProc;
-
- /**
- * User-defined, opaque data.
- */
- aiUserData UserData;
- }
-
- /**
- * File callbacks.
- *
- * Actually, it's a data structure to wrap a set of fXXXX
- * (e.g fopen()) replacement functions.
- *
- * The default implementation of the functions utilizes the fXXX
- * functions from the CRT. However, you can supply a custom implementation
- * to Assimp by passing a custom aiFileIO. Use this to enable
- * reading from other sources such as ZIP archives or memory locations.
- */
- struct aiFile {
- /**
- * Callback to read from a file.
- */
- aiFileReadProc ReadProc;
-
- /**
- * Callback to write to a file.
- */
- aiFileWriteProc WriteProc;
-
- /**
- * Callback to retrieve the current position of the file cursor
- * (ftell()).
- */
- aiFileTellProc TellProc;
-
- /**
- * Callback to retrieve the size of the file, in bytes.
- */
- aiFileTellProc FileSizeProc;
-
- /**
- * Callback to set the current position of the file cursor
- * (fseek()).
- */
- aiFileSeek SeekProc;
-
- /**
- * Callback to flush the file contents.
- */
- aiFileFlushProc FlushProc;
-
- /**
- * User-defined, opaque data.
- */
- aiUserData UserData;
- }
-}
diff --git a/ExternalResources/assimp-master/port/dAssimp/assimp/light.d b/ExternalResources/assimp-master/port/dAssimp/assimp/light.d
deleted file mode 100644
index 8d78239..0000000
--- a/ExternalResources/assimp-master/port/dAssimp/assimp/light.d
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
----------------------------------------------------------------------------
-Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------------
-
-Copyright (c) 2006-2009, ASSIMP Development Team
-
-All rights reserved.
-
-Redistribution and use of this software in source and binary forms,
-with or without modification, are permitted provided that the following
-conditions are met:
-
- * Redistributions of source code must retain the above
- copyright notice, this list of conditions and the
- following disclaimer.
-
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-
- * Neither the name of the ASSIMP team, nor the names of its
- contributors may be used to endorse or promote products
- derived from this software without specific prior
- written permission of the ASSIMP Development Team.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------------
-*/
-
-/**
- * Contains the data structures which are used to store the imported information
- * about the light sources in the scene.
- */
-module assimp.light;
-
-import assimp.math;
-import assimp.types;
-
-extern ( C ) {
- /**
- * Enumerates all supported types of light sources.
- */
- enum aiLightSourceType : uint {
- UNDEFINED = 0x0,
-
- /**
- * A directional light source has a well-defined direction but is
- * infinitely far away. That's quite a good approximation for sun light.
- */
- DIRECTIONAL = 0x1,
-
- /**
- * A point light source has a well-defined position in space but no
- * direction – it emits light in all directions. A normal bulb is a point
- * light.
- */
- POINT = 0x2,
-
- /**
- * A spot light source emits light in a specific angle. It has a position
- * and a direction it is pointing to. A good example for a spot light is
- * a light spot in sport arenas.
- */
- SPOT = 0x3
- }
-
- /**
- * Helper structure to describe a light source.
- *
- * Assimp supports multiple sorts of light sources, including directional,
- * point and spot lights. All of them are defined with just a single
- * structure and distinguished by their parameters.
- *
- * Note: Some file formats (such as 3DS, ASE) export a "target point" – the
- * point a spot light is looking at (it can even be animated). Assimp
- * writes the target point as a subnode of a spotlights's main node, called
- * [spotName].Target. However, this is just additional
- * information then, the transformation tracks of the main node make the
- * spot light already point in the right direction.
- */
- struct aiLight {
- /**
- * The name of the light source.
- *
- * There must be a node in the scenegraph with the same name. This node
- * specifies the position of the light in the scenehierarchy and can be
- * animated.
- */
- aiString mName;
-
- /**
- * The type of the light source.
- *
- * aiLightSource.UNDEFINED is not a valid value for this
- * member.
- */
- aiLightSourceType mType;
-
- /**
- * Position of the light source in space. Relative to the transformation
- * of the node corresponding to the light.
- *
- * The position is undefined for directional lights.
- */
- aiVector3D mPosition;
-
- /**
- * Direction of the light source in space. Relative to the transformation
- * of the node corresponding to the light.
- *
- * The direction is undefined for point lights. The vector may be
- * normalized, but it needn't.
- */
- aiVector3D mDirection;
-
- /**
- * Constant light attenuation factor.
- *
- * The intensity of the light source at a given distance
- * d from the light's position is
- * 1/( att0 + att1 * d + att2 * d * d ). This member
- * corresponds to the att0 variable in the equation.
- *
- * Naturally undefined for directional lights.
- */
- float mAttenuationConstant;
-
- /**
- * Linear light attenuation factor.
- *
- * The intensity of the light source at a given distance
- * d from the light's position is
- * 1/( att0 + att1 * d + att2 * d * d ). This member
- * corresponds to the att1 variable in the equation.
- *
- * Naturally undefined for directional lights.
- */
- float mAttenuationLinear;
-
- /**
- * Quadratic light attenuation factor.
- *
- * The intensity of the light source at a given distance
- * d from the light's position is
- * 1/( att0 + att1 * d + att2 * d * d ). This member
- * corresponds to the att2 variable in the equation.
- *
- * Naturally undefined for directional lights.
- */
- float mAttenuationQuadratic;
-
- /**
- * Diffuse color of the light source
- *
- * The diffuse light color is multiplied with the diffuse material color
- * to obtain the final color that contributes to the diffuse shading term.
- */
- aiColor3D mColorDiffuse;
-
- /**
- * Specular color of the light source
- *
- * The specular light color is multiplied with the specular material
- * color to obtain the final color that contributes to the specular
- * shading term.
- */
- aiColor3D mColorSpecular;
-
- /**
- * Ambient color of the light source
- *
- * The ambient light color is multiplied with the ambient material color
- * to obtain the final color that contributes to the ambient shading term.
- *
- * Most renderers will ignore this value it, is just a remaining of the
- * fixed-function pipeline that is still supported by quite many file
- * formats.
- */
- aiColor3D mColorAmbient;
-
- /**
- * Inner angle of a spot light's light cone.
- *
- * The spot light has maximum influence on objects inside this angle. The
- * angle is given in radians. It is 2PI for point lights and undefined
- * for directional lights.
- */
- float mAngleInnerCone;
-
- /**
- * Outer angle of a spot light's light cone.
- *
- * The spot light does not affect objects outside this angle. The angle
- * is given in radians. It is 2PI for point lights and undefined for
- * directional lights. The outer angle must be greater than or equal to
- * the inner angle.
- *
- * It is assumed that the application uses a smooth interpolation between
- * the inner and the outer cone of the spot light.
- */
- float mAngleOuterCone;
- }
-}
diff --git a/ExternalResources/assimp-master/port/dAssimp/assimp/loader.d b/ExternalResources/assimp-master/port/dAssimp/assimp/loader.d
deleted file mode 100644
index 76fd44a..0000000
--- a/ExternalResources/assimp-master/port/dAssimp/assimp/loader.d
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
----------------------------------------------------------------------------
-Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------------
-
-Copyright (c) 2006-2009, ASSIMP Development Team
-
-All rights reserved.
-
-Redistribution and use of this software in source and binary forms,
-with or without modification, are permitted provided that the following
-conditions are met:
-
- * Redistributions of source code must retain the above
- copyright notice, this list of conditions and the
- following disclaimer.
-
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-
- * Neither the name of the ASSIMP team, nor the names of its
- contributors may be used to endorse or promote products
- derived from this software without specific prior
- written permission of the ASSIMP Development Team.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------------
-*/
-
-/**
- * Provides facilities for dynamically loading the Assimp library.
- *
- * Currently requires Tango, but there is no reason why Phobos could not be
- * supported too.
- */
-module assimp.loader;
-
-import assimp.api;
-import tango.io.Stdout;
-import tango.sys.SharedLib;
-
-const uint ASSIMP_BINDINGS_MAJOR = 2;
-const uint ASSIMP_BINDINGS_MINOR = 0;
-
-/**
- * Loader class for dynamically loading the Assimp library.
- *
- * The library is »reference-counted«, meaning that the library is not
- * unloaded on a call to unload() if there are still other
- * references to it.
- */
-struct Assimp {
-public:
- /**
- * Loads the library if it is not already loaded and increases the
- * reference counter.
- *
- * The library file (libassimp.so on POSIX systems,
- * Assimp32.dll on Win32) is loaded via Tango's SharedLib
- * class.
- */
- static void load() {
- if ( m_sRefCount == 0 ) {
- version ( Posix ) {
- version ( OSX ) {
- m_sLibrary = SharedLib.load( "libassimp.dylib" );
- } else {
- m_sLibrary = SharedLib.load( "libassimp.so" );
- }
- }
- version ( Win32 ) {
- m_sLibrary = SharedLib.load( "Assimp32.dll" );
- }
-
- // Versioning
- mixin( bindCode( "aiGetLegalString" ) );
- mixin( bindCode( "aiGetVersionMinor" ) );
- mixin( bindCode( "aiGetVersionMajor" ) );
- mixin( bindCode( "aiGetVersionRevision" ) );
- mixin( bindCode( "aiGetCompileFlags" ) );
-
- // Check for version mismatch between the external, dynamically loaded
- // library and the version the bindings were created against.
- uint libMajor = aiGetVersionMajor();
- uint libMinor = aiGetVersionMinor();
-
- if ( ( libMajor < ASSIMP_BINDINGS_MAJOR ) ||
- ( libMinor < ASSIMP_BINDINGS_MINOR ) ) {
- Stdout.format(
- "WARNING: Assimp version too old (loaded library: {}.{}, " ~
- "bindings: {}.{})!",
- libMajor,
- libMinor,
- ASSIMP_BINDINGS_MAJOR,
- ASSIMP_BINDINGS_MINOR
- ).newline;
- }
-
- if ( libMajor > ASSIMP_BINDINGS_MAJOR ) {
- Stdout.format(
- "WARNING: Assimp version too new (loaded library: {}.{}, " ~
- "bindings: {}.{})!",
- libMajor,
- libMinor,
- ASSIMP_BINDINGS_MAJOR,
- ASSIMP_BINDINGS_MINOR
- ).newline;
- }
-
- // General API
- mixin( bindCode( "aiImportFile" ) );
- mixin( bindCode( "aiImportFileEx" ) );
- mixin( bindCode( "aiImportFileFromMemory" ) );
- mixin( bindCode( "aiApplyPostProcessing" ) );
- mixin( bindCode( "aiGetPredefinedLogStream" ) );
- mixin( bindCode( "aiAttachLogStream" ) );
- mixin( bindCode( "aiEnableVerboseLogging" ) );
- mixin( bindCode( "aiDetachLogStream" ) );
- mixin( bindCode( "aiDetachAllLogStreams" ) );
- mixin( bindCode( "aiReleaseImport" ) );
- mixin( bindCode( "aiGetErrorString" ) );
- mixin( bindCode( "aiIsExtensionSupported" ) );
- mixin( bindCode( "aiGetExtensionList" ) );
- mixin( bindCode( "aiGetMemoryRequirements" ) );
- mixin( bindCode( "aiSetImportPropertyInteger" ) );
- mixin( bindCode( "aiSetImportPropertyFloat" ) );
- mixin( bindCode( "aiSetImportPropertyString" ) );
-
- // Mathematical functions
- mixin( bindCode( "aiCreateQuaternionFromMatrix" ) );
- mixin( bindCode( "aiDecomposeMatrix" ) );
- mixin( bindCode( "aiTransposeMatrix4" ) );
- mixin( bindCode( "aiTransposeMatrix3" ) );
- mixin( bindCode( "aiTransformVecByMatrix3" ) );
- mixin( bindCode( "aiTransformVecByMatrix4" ) );
- mixin( bindCode( "aiMultiplyMatrix4" ) );
- mixin( bindCode( "aiMultiplyMatrix3" ) );
- mixin( bindCode( "aiIdentityMatrix3" ) );
- mixin( bindCode( "aiIdentityMatrix4" ) );
-
- // Material system
- mixin( bindCode( "aiGetMaterialProperty" ) );
- mixin( bindCode( "aiGetMaterialFloatArray" ) );
- mixin( bindCode( "aiGetMaterialIntegerArray" ) );
- mixin( bindCode( "aiGetMaterialColor" ) );
- mixin( bindCode( "aiGetMaterialString" ) );
- mixin( bindCode( "aiGetMaterialTextureCount" ) );
- mixin( bindCode( "aiGetMaterialTexture" ) );
- }
- ++m_sRefCount;
- }
-
- /**
- * Decreases the reference counter and unloads the library if this was the
- * last reference.
- */
- static void unload() {
- assert( m_sRefCount > 0 );
- --m_sRefCount;
-
- if ( m_sRefCount == 0 ) {
- m_sLibrary.unload();
- }
- }
-
-private:
- /// Current number of references to the library.
- static uint m_sRefCount;
-
- /// Library handle.
- static SharedLib m_sLibrary;
-}
-
-/**
- * Private helper function which constructs the bind command for a symbol to
- * keep the code DRY.
- */
-private char[] bindCode( char[] symbol ) {
- return symbol ~ " = cast( typeof( " ~ symbol ~
- " ) )m_sLibrary.getSymbol( `" ~ symbol ~ "` );";
-}
diff --git a/ExternalResources/assimp-master/port/dAssimp/assimp/material.d b/ExternalResources/assimp-master/port/dAssimp/assimp/material.d
deleted file mode 100644
index e0c480b..0000000
--- a/ExternalResources/assimp-master/port/dAssimp/assimp/material.d
+++ /dev/null
@@ -1,641 +0,0 @@
-/*
----------------------------------------------------------------------------
-Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------------
-
-Copyright (c) 2006-2009, ASSIMP Development Team
-
-All rights reserved.
-
-Redistribution and use of this software in source and binary forms,
-with or without modification, are permitted provided that the following
-conditions are met:
-
- * Redistributions of source code must retain the above
- copyright notice, this list of conditions and the
- following disclaimer.
-
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-
- * Neither the name of the ASSIMP team, nor the names of its
- contributors may be used to endorse or promote products
- derived from this software without specific prior
- written permission of the ASSIMP Development Team.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------------
-*/
-
-/**
- * Contains the material system which stores the imported material information.
- */
-module assimp.material;
-
-import assimp.math;
-import assimp.types;
-
-extern ( C ) {
- /**
- * Default material names for meshes without UV coordinates.
- */
- const char* AI_DEFAULT_MATERIAL_NAME = "aiDefaultMat";
-
- /**
- * Default material names for meshes with UV coordinates.
- */
- const char* AI_DEFAULT_TEXTURED_MATERIAL_NAME = "TexturedDefaultMaterial";
-
- /**
- * Defines how the Nth texture of a specific type is combined with the
- * result of all previous layers.
- *
- * Example (left: key, right: value):
- * DiffColor0 - gray
- * DiffTextureOp0 - aiTextureOpMultiply
- * DiffTexture0 - tex1.png
- * DiffTextureOp0 - aiTextureOpAdd
- * DiffTexture1 - tex2.png
- * Written as equation, the final diffuse term for a specific pixel would be:
- * diffFinal = DiffColor0 * sampleTex( DiffTexture0, UV0 ) +
- * sampleTex( DiffTexture1, UV0 ) * diffContrib;
- * where diffContrib is the intensity of the incoming light for
- * that pixel.
- */
- enum aiTextureOp : uint {
- /**
- * T = T1 * T2
- */
- Multiply = 0x0,
-
- /**
- * T = T1 + T2
- */
- Add = 0x1,
-
- /**
- * T = T1 - T2
- */
- Subtract = 0x2,
-
- /**
- * T = T1 / T2
- */
- Divide = 0x3,
-
- /**
- * T = ( T1 + T2 ) - ( T1 * T2 )
- */
- SmoothAdd = 0x4,
-
- /**
- * T = T1 + ( T2 - 0.5 )
- */
- SignedAdd = 0x5
- }
-
- /**
- * Defines how UV coordinates outside the [0..1] range are
- * handled.
- *
- * Commonly referred to as 'wrapping mode'.
- */
- enum aiTextureMapMode : uint {
- /**
- * A texture coordinate u | v is translated to
- * (u%1) | (v%1).
- */
- Wrap = 0x0,
-
- /**
- * Texture coordinates are clamped to the nearest valid value.
- */
- Clamp = 0x1,
-
- /**
- * If the texture coordinates for a pixel are outside
- * [0..1], the texture is not applied to that pixel.
- */
- Decal = 0x3,
-
- /**
- * A texture coordinate u | v becomes
- * (u%1) | (v%1) if (u-(u%1))%2 is
- * zero and (1-(u%1)) | (1-(v%1)) otherwise.
- */
- Mirror = 0x2
- }
-
- /**
- * Defines how the mapping coords for a texture are generated.
- *
- * Real-time applications typically require full UV coordinates, so the use of
- * the aiProcess.GenUVCoords step is highly recommended. It
- * generates proper UV channels for non-UV mapped objects, as long as an
- * accurate description how the mapping should look like (e.g spherical) is
- * given. See the AI_MATKEY_MAPPING property for more details.
- */
- enum aiTextureMapping : uint {
- /**
- * The mapping coordinates are taken from an UV channel.
- *
- * The AI_MATKEY_UVSRC key specifies from which (remember,
- * meshes can have more than one UV channel).
- */
- UV = 0x0,
-
- /**
- * Spherical mapping.
- */
- SPHERE = 0x1,
-
- /**
- * Cylindrical mapping.
- */
- CYLINDER = 0x2,
-
- /**
- * Cubic mapping.
- */
- BOX = 0x3,
-
- /**
- * Planar mapping.
- */
- PLANE = 0x4,
-
- /**
- * Undefined mapping.
- */
- OTHER = 0x5
- }
-
- /**
- * Defines the purpose of a texture
- *
- * This is a very difficult topic. Different 3D packages support different
- * kinds of textures. For very common texture types, such as bumpmaps, the
- * rendering results depend on implementation details in the rendering
- * pipelines of these applications. Assimp loads all texture references from
- * the model file and tries to determine which of the predefined texture
- * types below is the best choice to match the original use of the texture
- * as closely as possible.
- *
- * In content pipelines you'll usually define how textures have to be
- * handled, and the artists working on models have to conform to this
- * specification, regardless which 3D tool they're using.
- */
- enum aiTextureType : uint {
- /**
- * No texture, but the value to be used for
- * aiMaterialProperty.mSemantic for all material properties
- * not related to textures.
- */
- NONE = 0x0,
-
- /**
- * The texture is combined with the result of the diffuse lighting
- * equation.
- */
- DIFFUSE = 0x1,
-
- /**
- * The texture is combined with the result of the specular lighting
- * equation.
- */
- SPECULAR = 0x2,
-
- /**
- * The texture is combined with the result of the ambient lighting
- * equation.
- */
- AMBIENT = 0x3,
-
- /**
- * The texture is added to the result of the lighting calculation. It
- * isn't influenced by incoming light.
- */
- EMISSIVE = 0x4,
-
- /**
- * The texture is a height map.
- *
- * By convention, higher grey-scale values stand for higher elevations
- * from the base height.
- */
- HEIGHT = 0x5,
-
- /**
- * The texture is a (tangent space) normal-map.
- *
- * Again, there are several conventions for tangent-space normal maps.
- * Assimp does (intentionally) not differenciate here.
- */
- NORMALS = 0x6,
-
- /**
- * The texture defines the glossiness of the material.
- *
- * The glossiness is in fact the exponent of the specular (phong)
- * lighting equation. Usually there is a conversion function defined to
- * map the linear color values in the texture to a suitable exponent.
- */
- SHININESS = 0x7,
-
- /**
- * The texture defines per-pixel opacity.
- *
- * Usually white means opaque and black means transparent.
- */
- OPACITY = 0x8,
-
- /**
- * Displacement texture.
- *
- * The exact purpose and format is application-dependent. Higher color
- * values stand for higher vertex displacements.
- */
- DISPLACEMENT = 0x9,
-
- /**
- * Lightmap or ambient occlusion texture.
- *
- * Both lightmaps and dedicated ambient occlusion maps are covered by
- * this material property. The texture contains a scaling value for the
- * final color value of a pixel. Its intensity is not affected by
- * incoming light.
- */
- LIGHTMAP = 0xA,
-
- /**
- * Reflection texture.
- *
- * Contains the color of a perfect mirror reflection. Rarely used, almost
- * never for real-time applications.
- */
- REFLECTION = 0xB,
-
- /**
- * Unknown texture.
- *
- * A texture reference that does not match any of the definitions above is
- * considered to be 'unknown'. It is still imported, but is excluded from
- * any further postprocessing.
- */
- UNKNOWN = 0xC
- }
-
- /**
- * Defines all shading models supported by the library
- *
- * The list of shading modes has been taken from Blender. See Blender
- * documentation for more information. The API does not distinguish between
- * "specular" and "diffuse" shaders (thus the specular term for diffuse
- * shading models like Oren-Nayar remains undefined).
- *
- * Again, this value is just a hint. Assimp tries to select the shader whose
- * most common implementation matches the original rendering results of the
- * 3D modeller which wrote a particular model as closely as possible.
- */
- enum aiShadingMode : uint {
- /**
- * Flat shading.
- *
- * Shading is done on per-face base diffuse only. Also known as
- * »faceted shading«.
- */
- Flat = 0x1,
-
- /**
- * Simple Gouraud shading.
- */
- Gouraud = 0x2,
-
- /**
- * Phong-Shading.
- */
- Phong = 0x3,
-
- /**
- * Phong-Blinn-Shading.
- */
- Blinn = 0x4,
-
- /**
- * Per-pixel toon shading.
- *
- * Often referred to as »comic shading«.
- */
- Toon = 0x5,
-
- /**
- * Per-pixel Oren-Nayar shading.
- *
- * Extension to standard Lambertian shading, taking the roughness of the
- * material into account.
- */
- OrenNayar = 0x6,
-
- /**
- * Per-pixel Minnaert shading.
- *
- * Extension to standard Lambertian shading, taking the "darkness" of the
- * material into account.
- */
- Minnaert = 0x7,
-
- /**
- * Per-pixel Cook-Torrance shading.
- *
- * Special shader for metallic surfaces.
- */
- CookTorrance = 0x8,
-
- /**
- * No shading at all.
- *
- * Constant light influence of 1.
- */
- NoShading = 0x9,
-
- /**
- * Fresnel shading.
- */
- Fresnel = 0xa
- }
-
- /**
- * Defines some mixed flags for a particular texture.
- *
- * Usually you'll instruct your cg artists how textures have to look like
- * and how they will be processed in your application. However, if you use
- * Assimp for completely generic loading purposes you might also need to
- * process these flags in order to display as many 'unknown' 3D models as
- * possible correctly.
- *
- * This corresponds to the AI_MATKEY_TEXFLAGS property.
- */
- enum aiTextureFlags : uint {
- /**
- * The texture's color values have to be inverted (i.e. 1-n
- * component-wise).
- */
- Invert = 0x1,
-
- /**
- * Explicit request to the application to process the alpha channel of the
- * texture.
- *
- * Mutually exclusive with IgnoreAlpha. These flags are
- * set if the library can say for sure that the alpha channel is used/is
- * not used. If the model format does not define this, it is left to the
- * application to decide whether the texture alpha channel – if any – is
- * evaluated or not.
- */
- UseAlpha = 0x2,
-
- /**
- * Explicit request to the application to ignore the alpha channel of the
- * texture.
- *
- * Mutually exclusive with UseAlpha.
- */
- IgnoreAlpha = 0x4
- }
-
-
- /**
- * Defines alpha-blend flags.
- *
- * If you're familiar with OpenGL or D3D, these flags aren't new to you.
- * They define how the final color value of a pixel is computed, based on
- * the previous color at that pixel and the new color value from the
- * material.
- *
- * The basic blending formula is
- * SourceColor * SourceBlend + DestColor * DestBlend,
- * where DestColor is the previous color in the framebuffer at
- * this position and SourceColor is the material color before
- * the transparency calculation.
- *
- * This corresponds to the AI_MATKEY_BLEND_FUNC property.
- */
- enum aiBlendMode :uint {
- /**
- * Formula:
- * SourceColor * SourceAlpha + DestColor * (1 - SourceAlpha)
- */
- Default = 0x0,
-
- /**
- * Additive blending.
- *
- * Formula: SourceColor*1 + DestColor*1
- */
- Additive = 0x1
- }
-
- /**
- * Defines how an UV channel is transformed.
- *
- * This is just a helper structure for the AI_MATKEY_UVTRANSFORM
- * key. See its documentation for more details.
- */
- struct aiUVTransform {
- align ( 1 ) :
- /**
- * Translation on the u and v axes.
- *
- * The default value is (0|0).
- */
- aiVector2D mTranslation;
-
- /**
- * Scaling on the u and v axes.
- *
- * The default value is (1|1).
- */
- aiVector2D mScaling;
-
- /**
- * Rotation - in counter-clockwise direction.
- *
- * The rotation angle is specified in radians. The rotation center is
- * 0.5|0.5. The default value is 0.
- */
- float mRotation;
- }
-
- /**
- * A very primitive RTTI system to store the data type of a material
- * property.
- */
- enum aiPropertyTypeInfo : uint {
- /**
- * Array of single-precision (32 bit) floats.
- *
- * It is possible to use aiGetMaterialInteger[Array]() to
- * query properties stored in floating-point format. The material system
- * performs the type conversion automatically.
- */
- Float = 0x1,
-
- /**
- * aiString property.
- *
- * Arrays of strings aren't possible, aiGetMaterialString()
- * must be used to query a string property.
- */
- String = 0x3,
-
- /**
- * Array of (32 bit) integers.
- *
- * It is possible to use aiGetMaterialFloat[Array]() to
- * query properties stored in integer format. The material system
- * performs the type conversion automatically.
- */
- Integer = 0x4,
-
- /**
- * Simple binary buffer, content undefined. Not convertible to anything.
- */
- Buffer = 0x5
- }
-
- /**
- * Data structure for a single material property.
- *
- * As an user, you'll probably never need to deal with this data structure.
- * Just use the provided aiGetMaterialXXX() functions to query
- * material properties easily. Processing them manually is faster, but it is
- * not the recommended way. It isn't worth the effort.
- *
- * Material property names follow a simple scheme:
- *
- * $[name]: A public property, there must be a corresponding
- * AI_MATKEY_XXX constant.
- *
- * ?[name]: Also public, but ignored by the
- * aiProcess.RemoveRedundantMaterials post-processing step.
- *
- * ~[name]: A temporary property for internal use.
- */
- struct aiMaterialProperty {
- /**
- * Specifies the name of the property (key).
- *
- * Keys are generally case insensitive.
- */
- aiString mKey;
-
- /**
- * For texture properties, this specifies the exact usage semantic.
- *
- * For non-texture properties, this member is always 0 (or rather
- * aiTextureType.NONE).
- */
- uint mSemantic;
-
- /**
- * For texture properties, this specifies the index of the texture.
- *
- * For non-texture properties, this member is always 0.
- */
- uint mIndex;
-
- /**
- * Size of the buffer mData is pointing to (in bytes).
- *
- * This value may not be 0.
- */
- uint mDataLength;
-
- /**
- * Type information for the property.
- *
- * Defines the data layout inside the data buffer. This is used by the
- * library internally to perform debug checks and to utilize proper type
- * conversions.
- */
- aiPropertyTypeInfo mType;
-
- /**
- * Binary buffer to hold the property's value.
- *
- * The size of the buffer is always mDataLength.
- */
- char* mData;
- }
-
- /**
- * Data structure for a material
- *
- * Material data is stored using a key-value structure. A single key-value
- * pair is called a material property. The properties can be
- * queried using the aiMaterialGetXXX family of functions. The
- * library defines a set of standard keys (AI_MATKEY_XXX).
- */
- struct aiMaterial {
- /**
- * List of all material properties loaded.
- */
- aiMaterialProperty** mProperties;
-
- /**
- * Number of properties loaded.
- */
- uint mNumProperties;
- uint mNumAllocated; /// ditto
- }
-
- /**
- * Standard material property keys. Always pass 0 for texture type and index
- * when querying these keys.
- */
- const char* AI_MATKEY_NAME = "?mat.name";
- const char* AI_MATKEY_TWOSIDED = "$mat.twosided"; /// ditto
- const char* AI_MATKEY_SHADING_MODEL = "$mat.shadingm"; /// ditto
- const char* AI_MATKEY_ENABLE_WIREFRAME = "$mat.wireframe"; /// ditto
- const char* AI_MATKEY_BLEND_FUNC = "$mat.blend"; /// ditto
- const char* AI_MATKEY_OPACITY = "$mat.opacity"; /// ditto
- const char* AI_MATKEY_BUMPSCALING = "$mat.bumpscaling"; /// ditto
- const char* AI_MATKEY_SHININESS = "$mat.shininess"; /// ditto
- const char* AI_MATKEY_REFLECTIVITY = "$mat.reflectivity"; /// ditto
- const char* AI_MATKEY_SHININESS_STRENGTH = "$mat.shinpercent"; /// ditto
- const char* AI_MATKEY_REFRACTI = "$mat.refracti"; /// ditto
- const char* AI_MATKEY_COLOR_DIFFUSE = "$clr.diffuse"; /// ditto
- const char* AI_MATKEY_COLOR_AMBIENT = "$clr.ambient"; /// ditto
- const char* AI_MATKEY_COLOR_SPECULAR = "$clr.specular"; /// ditto
- const char* AI_MATKEY_COLOR_EMISSIVE = "$clr.emissive"; /// ditto
- const char* AI_MATKEY_COLOR_TRANSPARENT = "$clr.transparent"; /// ditto
- const char* AI_MATKEY_COLOR_REFLECTIVE = "$clr.reflective"; /// ditto
- const char* AI_MATKEY_GLOBAL_BACKGROUND_IMAGE = "?bg.global"; /// ditto
-
- /**
- * Texture material property keys. Do not forget to specify texture type and
- * index for these keys.
- */
- const char* AI_MATKEY_TEXTURE = "$tex.file";
- const char* AI_MATKEY_UVWSRC = "$tex.uvwsrc"; /// ditto
- const char* AI_MATKEY_TEXOP = "$tex.op"; /// ditto
- const char* AI_MATKEY_MAPPING = "$tex.mapping"; /// ditto
- const char* AI_MATKEY_TEXBLEND = "$tex.blend"; /// ditto
- const char* AI_MATKEY_MAPPINGMODE_U = "$tex.mapmodeu"; /// ditto
- const char* AI_MATKEY_MAPPINGMODE_V = "$tex.mapmodev"; /// ditto
- const char* AI_MATKEY_TEXMAP_AXIS = "$tex.mapaxis"; /// ditto
- const char* AI_MATKEY_UVTRANSFORM = "$tex.uvtrafo"; /// ditto
- const char* AI_MATKEY_TEXFLAGS = "$tex.flags"; /// ditto
-}
diff --git a/ExternalResources/assimp-master/port/dAssimp/assimp/math.d b/ExternalResources/assimp-master/port/dAssimp/assimp/math.d
deleted file mode 100644
index f3cff74..0000000
--- a/ExternalResources/assimp-master/port/dAssimp/assimp/math.d
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
----------------------------------------------------------------------------
-Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------------
-
-Copyright (c) 2006-2009, ASSIMP Development Team
-
-All rights reserved.
-
-Redistribution and use of this software in source and binary forms,
-with or without modification, are permitted provided that the following
-conditions are met:
-
- * Redistributions of source code must retain the above
- copyright notice, this list of conditions and the
- following disclaimer.
-
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-
- * Neither the name of the ASSIMP team, nor the names of its
- contributors may be used to endorse or promote products
- derived from this software without specific prior
- written permission of the ASSIMP Development Team.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------------
-*/
-
-/**
- * Mathematical structures in which the imported data is stored.
- */
-module assimp.math;
-
-extern( C ) {
- /**
- * Represents a two-dimensional vector.
- */
- struct aiVector2D {
- align ( 1 ):
- float x, y;
- }
-
- /**
- * Represents a three-dimensional vector.
- */
- struct aiVector3D {
- align ( 1 ):
- float x, y, z;
- }
-
- /**
- * Represents a quaternion.
- */
- struct aiQuaternion {
- float w, x, y, z;
- }
-
- /**
- * Represents a row-major 3x3 matrix
- *
- * There is much confusion about matrix layouts (column vs. row order). This
- * is always a row-major matrix, even when using the
- * ConvertToLeftHanded post processing step.
- */
- struct aiMatrix3x3 {
- float a1, a2, a3;
- float b1, b2, b3;
- float c1, c2, c3;
- }
-
- /**
- * Represents a row-major 3x3 matrix
- *
- * There is much confusion about matrix layouts (column vs. row order). This
- * is always a row-major matrix, even when using the
- * ConvertToLeftHanded post processing step.
- */
- struct aiMatrix4x4 {
- align ( 1 ):
- float a1, a2, a3, a4;
- float b1, b2, b3, b4;
- float c1, c2, c3, c4;
- float d1, d2, d3, d4;
- }
-
- /**
- * Represents a plane in a three-dimensional, euclidean space
- */
- struct aiPlane {
- align ( 1 ):
- /**
- * Coefficients of the plane equation (ax + by + cz = d).
- */
- float a;
- float b; /// ditto
- float c; /// ditto
- float d; /// ditto
- }
-
- /**
- * Represents a ray.
- */
- struct aiRay {
- align ( 1 ):
- /**
- * Origin of the ray.
- */
- aiVector3D pos;
-
- /**
- * Direction of the ray.
- */
- aiVector3D dir;
- }
-
- /**
- * Represents a color in RGB space.
- */
- struct aiColor3D {
- align ( 1 ):
- /**
- * Red, green and blue values.
- */
- float r;
- float g; /// ditto
- float b; /// ditto
- }
-
- /**
- * Represents a color in RGB space including an alpha component.
- */
- struct aiColor4D {
- align ( 1 ):
- /**
- * Red, green, blue and alpha values.
- */
- float r;
- float g; /// ditto
- float b; /// ditto
- float a; /// ditto
- }
-}
diff --git a/ExternalResources/assimp-master/port/dAssimp/assimp/mesh.d b/ExternalResources/assimp-master/port/dAssimp/assimp/mesh.d
deleted file mode 100644
index da61936..0000000
--- a/ExternalResources/assimp-master/port/dAssimp/assimp/mesh.d
+++ /dev/null
@@ -1,465 +0,0 @@
-/*
----------------------------------------------------------------------------
-Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------------
-
-Copyright (c) 2006-2009, ASSIMP Development Team
-
-All rights reserved.
-
-Redistribution and use of this software in source and binary forms,
-with or without modification, are permitted provided that the following
-conditions are met:
-
- * Redistributions of source code must retain the above
- copyright notice, this list of conditions and the
- following disclaimer.
-
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-
- * Neither the name of the ASSIMP team, nor the names of its
- contributors may be used to endorse or promote products
- derived from this software without specific prior
- written permission of the ASSIMP Development Team.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------------
-*/
-
-/**
- * Contains the data structures in which the imported geometry is returned by
- * Assimp.
- */
-module assimp.mesh;
-
-import assimp.math;
-import assimp.types;
-
-extern ( C ) {
- /*
- * These limits are required to match the settings Assimp was compiled
- * against. Therefore, do not redefine them unless you build the library
- * from source using the same definitions.
- */
-
- /**
- * Maximum number of indices per face (polygon).
- */
- const AI_MAX_FACE_INDICES = 0x7fff;
-
- /**
- * Maximum number of indices per face (polygon).
- */
- const AI_MAX_BONE_WEIGHTS = 0x7fffffff;
-
- /**
- * Maximum number of vertices per mesh.
- */
- const AI_MAX_VERTICES = 0x7fffffff;
-
- /**
- * Maximum number of faces per mesh.
- */
- const AI_MAX_FACES = 0x7fffffff;
-
- /**
- * Supported number of vertex color sets per mesh.
- */
- const AI_MAX_NUMBER_OF_COLOR_SETS = 0x4;
-
- /**
- * Supported number of texture coord sets (UV(W) channels) per mesh.
- */
- const AI_MAX_NUMBER_OF_TEXTURECOORDS = 0x4;
-
-
- /**
- * A single face in a mesh, referring to multiple vertices.
- *
- * If mNumIndices is 3, we call the face triangle, for
- * for mNumIndices > 3 it's called polygon.
- *
- * aiMesh.mPrimitiveTypes can be queried to quickly examine
- * which types of primitive are actually present in a mesh. The
- * aiProcess.SortByPType flag post-processing step splits
- * meshes containing different primitive types (e.g. lines and triangles) in
- * several "clean" submeshes.
- *
- * Furthermore, there is a configuration option
- * (AI_CONFIG_PP_SBP_REMOVE) to force SortByPType
- * to completely remove specific kinds of primitives from the imported scene.
- * In many cases you'll probably want to set this setting to
- * aiPrimitiveType.LINE | aiPrimitiveType.POINT. Together with
- * the aiProcess.Triangulate flag you can then be sure that
- * mNumIndices is always 3.
- */
- struct aiFace {
- /**
- * Number of indices defining this face.
- *
- * The maximum value for this member is AI_MAX_FACE_INDICES.
- */
- uint mNumIndices;
-
- /**
- * Array of the indices defining the face.
- *
- * The size is given in mNumIndices.
- */
- uint* mIndices;
- }
-
- /**
- * A single influence of a bone on a vertex.
- */
- struct aiVertexWeight {
- /**
- * Index of the vertex which is influenced by the bone.
- */
- uint mVertexId;
-
- /**
- * The strength of the influence in the range [0..1].
- *
- * The influence from all bones at one vertex sums up to 1.
- */
- float mWeight;
- }
-
- /**
- * A single bone of a mesh.
- *
- * A bone has a name by which it can be found in the frame hierarchy and by
- * which it can be addressed by animations. In addition it has a number of
- * influences on vertices.
- */
- struct aiBone {
- /**
- * The name of the bone.
- */
- aiString mName;
-
- /**
- * The number of vertices affected by this bone.
- *
- * The maximum value for this member is AI_MAX_BONE_WEIGHTS.
- */
- uint mNumWeights;
-
- /**
- * The vertices affected by this bone.
- *
- * This array is mNumWeights entries in size.
- */
- aiVertexWeight* mWeights;
-
- /**
- * Matrix that transforms from mesh space to bone space (in the bind
- * pose).
- */
- aiMatrix4x4 mOffsetMatrix;
- }
-
- /**
- * Enumerates the types of geometric primitives supported by Assimp.
- *
- * See: aiFace, aiProcess.SortByPType,
- * aiProcess.Triangulate,
- * AI_CONFIG_PP_SBP_REMOVE.
- */
- enum aiPrimitiveType : uint {
- /** A point primitive.
- *
- * This is just a single vertex in the virtual world,
- * aiFace contains just one index for such a primitive.
- */
- POINT = 0x1,
-
- /** A line primitive.
- *
- * This is a line defined through a start and an end position.
- * aiFace contains exactly two indices for such a primitive.
- */
- LINE = 0x2,
-
- /** A triangular primitive.
- *
- * A triangle consists of three indices.
- */
- TRIANGLE = 0x4,
-
- /** A higher-level polygon with more than 3 edges.
- *
- * A triangle is a polygon, but in this context, polygon means
- * "all polygons that are not triangles". The Triangulate
- * post processing step is provided for your convenience, it splits all
- * polygons in triangles (which are much easier to handle).
- */
- POLYGON = 0x8
- }
-
- // Note: The AI_PRIMITIVE_TYPE_FOR_N_INDICES(n) macro from the C headers is
- // missing since there is probably not much use for it when just reading
- // scene files.
-
- /**
- * NOT CURRENTLY IN USE. An AnimMesh is an attachment to an #aiMesh stores
- * per-vertex animations for a particular frame.
- *
- * You may think of an aiAnimMesh as a `patch` for the host
- * mesh, which replaces only certain vertex data streams at a particular
- * time.
- *
- * Each mesh stores n attached attached meshes (aiMesh.mAnimMeshes).
- * The actual relationship between the time line and anim meshes is
- * established by #aiMeshAnim, which references singular mesh attachments
- * by their ID and binds them to a time offset.
- */
- struct aiAnimMesh {
- /**
- * Replacement for aiMesh.mVertices.
- *
- * If this array is non-null, it *must* contain mNumVertices entries.
- * The corresponding array in the host mesh must be non-null as well -
- * animation meshes may neither add or nor remove vertex components (if
- * a replacement array is NULL and the corresponding source array is
- * not, the source data is taken instead).
- */
- aiVector3D* mVertices;
-
- /// Replacement for aiMesh.mNormals.
- aiVector3D* mNormals;
-
- /// Replacement for aiMesh.mTangents.
- aiVector3D* mTangents;
-
- /// Replacement for aiMesh.mBitangents.
- aiVector3D* mBitangents;
-
- /// Replacement for aiMesh.mColors.
- aiColor4D* mColors[ AI_MAX_NUMBER_OF_COLOR_SETS ];
-
- /// Replacement for aiMesh.mTextureCoords.
- aiVector3D* mTextureCoords[ AI_MAX_NUMBER_OF_TEXTURECOORDS ];
-
- /**
- * The number of vertices in the aiAnimMesh, and thus the length of all
- * the member arrays.
- *
- * This has always the same value as the mNumVertices property in the
- * corresponding aiMesh. It is duplicated here merely to make the length
- * of the member arrays accessible even if the aiMesh is not known, e.g.
- * from language bindings.
- */
- uint mNumVertices;
- }
-
- /**
- * A mesh represents a geometry or model with a single material.
- *
- * It usually consists of a number of vertices and a series
- * primitives/faces referencing the vertices. In addition there might be a
- * series of bones, each of them addressing a number of vertices with a
- * certain weight. Vertex data is presented in channels with each channel
- * containing a single per-vertex information such as a set of texture
- * coords or a normal vector. If a data pointer is non-null, the
- * corresponding data stream is present.
- *
- * A mesh uses only a single material which is referenced by a material ID.
- *
- * Note: The mPositions member is usually not optional.
- * However, vertex positions could be missing if the
- * AI_SCENE_FLAGS_INCOMPLETE flag is set in
- * aiScene.mFlags.
- */
- struct aiMesh {
- /**
- * Bitwise combination of aiPrimitiveType members.
- *
- * This specifies which types of primitives are present in the mesh.
- * The SortByPrimitiveType post processing step can be used
- * to make sure the output meshes consist of one primitive type each.
- */
- uint mPrimitiveTypes;
-
- /**
- * The number of vertices in this mesh.
- *
- * This is also the size of all of the per-vertex data arrays. The
- * maximum value for this member is AI_MAX_VERTICES.
- */
- uint mNumVertices;
-
- /**
- * The number of primitives (triangles, polygons, lines) in this mesh.
- *
- * This is also the size of the mFaces array. The maximum
- * value for this member is AI_MAX_FACES.
- */
- uint mNumFaces;
-
- /**
- * Vertex positions.
- *
- * This array is always present in a mesh. The array is
- * mNumVertices in size.
- */
- aiVector3D* mVertices;
-
- /**
- * Vertex normals.
- *
- * The array contains normalized vectors, null if not present.
- * The array is mNumVertices in size.
- *
- * Normals are undefined for point and line primitives. A mesh
- * consisting of points and lines only may not have normal vectors.
- * Meshes with mixed primitive types (i.e. lines and triangles) may have
- * normals, but the normals for vertices that are only referenced by
- * point or line primitives are undefined and set to QNAN.
- *
- * Note: Normal vectors computed by Assimp are always unit-length.
- * However, this needn't apply for normals that have been taken
- * directly from the model file.
- */
- aiVector3D* mNormals;
-
- /**
- * Vertex tangents.
- *
- * The tangent of a vertex points in the direction of the positive x
- * texture axis. The array contains normalized vectors, null if
- * not present. The array is mNumVertices in size.
- *
- * A mesh consisting of points and lines only may not have normal
- * vectors. Meshes with mixed primitive types (i.e. lines and triangles)
- * may have normals, but the normals for vertices that are only
- * referenced by point or line primitives are undefined and set to
- * QNAN.
- *
- * Note: If the mesh contains tangents, it automatically also contains
- * bitangents (the bitangent is just the cross product of tangent and
- * normal vectors).
- */
- aiVector3D* mTangents;
-
- /**
- * Vertex bitangents.
- *
- * The bitangent of a vertex points in the direction of the positive Y
- * texture axis. The array contains normalized vectors, null if not
- * present. The array is mNumVertices in size.
- *
- * Note: If the mesh contains tangents, it automatically also contains
- * bitangents.
- */
- aiVector3D* mBitangents;
-
- /**
- * Vertex color sets.
- *
- * A mesh may contain 0 to AI_MAX_NUMBER_OF_COLOR_SETS
- * vertex colors per vertex. null if not present.
- *
- * Each array is mNumVertices in size if present.
- */
- aiColor4D* mColors[ AI_MAX_NUMBER_OF_COLOR_SETS ];
-
- /**
- * Vertex texture coords, also known as UV channels.
- * A mesh may contain 0 to AI_MAX_NUMBER_OF_TEXTURECOORDS
- * per vertex. null if not present.
- *
- * Each array is mNumVertices in size.
- */
- aiVector3D* mTextureCoords[ AI_MAX_NUMBER_OF_TEXTURECOORDS ];
-
- /**
- * Specifies the number of components for a given UV channel.
- *
- * Up to three channels are supported (UVW, for accessing volume or cube
- * maps). If the value is 2 for a given channel n, the
- * component p.z of mTextureCoords[n][p] is set
- * to 0. If the value is 1 for a given channel, p.y is set
- * to 0, too. If this value is 0, 2 should be assumed.
- *
- * Note: 4D coords are not supported.
- */
- uint mNumUVComponents[ AI_MAX_NUMBER_OF_TEXTURECOORDS ];
-
- /**
- * The faces the mesh is contstructed from.
- *
- * Each face refers to a number of vertices by their indices.
- * This array is always present in a mesh, its size is given
- * in mNumFaces. If the
- * AI_SCENE_FLAGS_NON_VERBOSE_FORMAT is not set,
- * each face references an unique set of vertices.
- */
- aiFace* mFaces;
-
- /**
- * The number of bones this mesh contains.
- *
- * Can be 0, in which case the mBones array is null.
- */
- uint mNumBones;
-
- /**
- * The bones of this mesh.
- *
- * A bone consists of a name by which it can be found in the frame
- * hierarchy and a set of vertex weights.
- */
- aiBone** mBones;
-
- /**
- * The material used by this mesh.
- *
- * A mesh does use only a single material. If an imported model uses
- * multiple materials, the import splits up the mesh. Use this value as
- * index into the scene's material list.
- */
- uint mMaterialIndex;
-
- /**
- * Name of the mesh.
- *
- * Meshes can be named, but this is not a requirement and leaving this
- * field empty is totally fine.
- *
- * There are mainly three uses for mesh names:
- * - Some formats name nodes and meshes independently.
- * - Importers tend to split meshes up to meet the one-material-per-mesh
- * requirement. Assigning the same (dummy) name to each of the result
- * meshes aids the caller at recovering the original mesh partitioning.
- * - Vertex animations refer to meshes by their names.
- */
- aiString mName;
-
- /// NOT CURRENTLY IN USE. The number of attachment meshes.
- uint mNumAnimMeshes;
-
- /**
- * NOT CURRENTLY IN USE. Attachment meshes for this mesh, for vertex-
- * based animation.
- *
- * Attachment meshes carry replacement data for some of the mesh's
- * vertex components (usually positions, normals).
- */
- aiAnimMesh** mAnimMeshes;
- }
-}
diff --git a/ExternalResources/assimp-master/port/dAssimp/assimp/postprocess.d b/ExternalResources/assimp-master/port/dAssimp/assimp/postprocess.d
deleted file mode 100644
index a720a8c..0000000
--- a/ExternalResources/assimp-master/port/dAssimp/assimp/postprocess.d
+++ /dev/null
@@ -1,597 +0,0 @@
-/*
----------------------------------------------------------------------------
-Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------------
-
-Copyright (c) 2006-2009, ASSIMP Development Team
-
-All rights reserved.
-
-Redistribution and use of this software in source and binary forms,
-with or without modification, are permitted provided that the following
-conditions are met:
-
- * Redistributions of source code must retain the above
- copyright notice, this list of conditions and the
- following disclaimer.
-
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-
- * Neither the name of the ASSIMP team, nor the names of its
- contributors may be used to endorse or promote products
- derived from this software without specific prior
- written permission of the ASSIMP Development Team.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------------
-*/
-
-/**
- * Definitions for import post processing steps.
- */
-module assimp.postprocess;
-
-extern ( C ) {
- /**
- * Defines the flags for all possible post processing steps.
- *
- * See: aiImportFile, aiImportFileEx
- */
- enum aiPostProcessSteps {
- /**
- * Calculates the tangents and bitangents for the imported meshes.
- *
- * Does nothing if a mesh does not have normals. You might want this post
- * processing step to be executed if you plan to use tangent space
- * calculations such as normal mapping applied to the meshes. There is a
- * config setting, AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE,
- * which allows you to specify a maximum smoothing angle for the
- * algorithm. However, usually you will want to use the default value.
- */
- CalcTangentSpace = 0x1,
-
- /**
- * Identifies and joins identical vertex data sets within all imported
- * meshes.
- *
- * After this step is run each mesh does contain only unique vertices
- * anymore, so a vertex is possibly used by multiple faces. You usually
- * want to use this post processing step. If your application deals with
- * indexed geometry, this step is compulsory or you will just waste
- * rendering time. If this flag is not specified, no vertices
- * are referenced by more than one face and no index buffer is
- * required for rendering.
- */
- JoinIdenticalVertices = 0x2,
-
- /**
- * Converts all the imported data to a left-handed coordinate space.
- *
- * By default the data is returned in a right-handed coordinate space
- * which for example OpenGL prefers. In this space, +X points to the
- * right, +Z points towards the viewer and and +Y points upwards. In the
- * DirectX coordinate space +X points to the right, +Y points upwards and
- * +Z points away from the viewer.
- *
- * You will probably want to consider this flag if you use Direct3D for
- * rendering. The ConvertToLeftHanded flag supersedes this
- * setting and bundles all conversions typically required for D3D-based
- * applications.
- */
- MakeLeftHanded = 0x4,
-
- /**
- * Triangulates all faces of all meshes.
- *
- * By default the imported mesh data might contain faces with more than 3
- * indices. For rendering you'll usually want all faces to be triangles.
- * This post processing step splits up all higher faces to triangles.
- * Line and point primitives are not modified!.
- *
- * If you want »triangles only« with no other kinds of primitives,
- * specify both Triangulate and SortByPType and
- * ignore all point and line meshes when you process Assimp's output.
- */
- Triangulate = 0x8,
-
- /**
- * Removes some parts of the data structure (animations, materials, light
- * sources, cameras, textures, vertex components).
- *
- * The components to be removed are specified in a separate configuration
- * option, AI_CONFIG_PP_RVC_FLAGS. This is quite useful if
- * you don't need all parts of the output structure. Especially vertex
- * colors are rarely used today.
- *
- * Calling this step to remove unrequired stuff from the pipeline as
- * early as possible results in an increased performance and a better
- * optimized output data structure.
- *
- * This step is also useful if you want to force Assimp to recompute
- * normals or tangents since the corresponding steps don't recompute them
- * if they have already been loaded from the source asset.
- *
- * This flag is a poor one, mainly because its purpose is usually
- * misunderstood. Consider the following case: a 3d model has been exported
- * from a CAD app, it has per-face vertex colors. Because of the vertex
- * colors (which are not even used by most apps),
- * JoinIdenticalVertices cannot join vertices at the same
- * position. By using this step, unneeded components are excluded as
- * early as possible thus opening more room for internal optimzations.
- */
- RemoveComponent = 0x10,
-
- /**
- * Generates normals for all faces of all meshes.
- *
- * This is ignored if normals are already there at the time where this
- * flag is evaluated. Model importers try to load them from the source
- * file, so they are usually already there. Face normals are shared
- * between all points of a single face, so a single point can have
- * multiple normals, which, in other words, enforces the library to
- * duplicate vertices in some cases. JoinIdenticalVertices
- * is useless then.
- *
- * This flag may not be specified together with
- * GenSmoothNormals.
- */
- GenNormals = 0x20,
-
- /**
- * Generates smooth normals for all vertices in the mesh.
- *
- * This is ignored if normals are already there at the time where this
- * flag is evaluated. Model importers try to load them from the source file, so
- * they are usually already there.
- *
- * There is a configuration option,
- * AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which allows you to
- * specify an angle maximum for the normal smoothing algorithm. Normals
- * exceeding this limit are not smoothed, resulting in a »hard« seam
- * between two faces. Using a decent angle here (e.g. 80°) results in
- * very good visual appearance.
- */
- GenSmoothNormals = 0x40,
-
- /**
- * Splits large meshes into smaller submeshes.
- *
- * This is quite useful for realtime rendering where the number of triangles
- * which can be maximally processed in a single draw-call is usually limited
- * by the video driver/hardware. The maximum vertex buffer is usually limited,
- * too. Both requirements can be met with this step: you may specify both a
- * triangle and vertex limit for a single mesh.
- *
- * The split limits can (and should!) be set through the
- * AI_CONFIG_PP_SLM_VERTEX_LIMIT and
- * AI_CONFIG_PP_SLM_TRIANGLE_LIMIT settings. The default
- * values are AI_SLM_DEFAULT_MAX_VERTICES and
- * AI_SLM_DEFAULT_MAX_TRIANGLES.
- *
- * Note that splitting is generally a time-consuming task, but not if
- * there's nothing to split. The use of this step is recommended for most
- * users.
- */
- SplitLargeMeshes = 0x80,
-
- /**
- * Removes the node graph and pre-transforms all vertices with the local
- * transformation matrices of their nodes.
- *
- * The output scene does still contain nodes, however, there is only a
- * root node with children, each one referencing only one mesh, each
- * mesh referencing one material. For rendering, you can simply render
- * all meshes in order, you don't need to pay attention to local
- * transformations and the node hierarchy. Animations are removed during
- * this step.
- *
- * This step is intended for applications that have no scenegraph.
- *
- * The step can cause some problems: if e.g. a mesh of the asset
- * contains normals and another, using the same material index, does not,
- * they will be brought together, but the first meshes's part of the
- * normal list is zeroed. However, these artifacts are rare.
- *
- * Note: The AI_CONFIG_PP_PTV_NORMALIZE configuration
- * property can be set to normalize the scene's spatial dimension
- * to the -1...1 range.
- */
- PreTransformVertices = 0x100,
-
- /**
- * Limits the number of bones simultaneously affecting a single vertex to
- * a maximum value.
- *
- * If any vertex is affected by more than that number of bones, the least
- * important vertex weights are removed and the remaining vertex weights
- * are renormalized so that the weights still sum up to 1.
- *
- * The default bone weight limit is 4 (AI_LMW_MAX_WEIGHTS),
- * but you can use the #AI_CONFIG_PP_LBW_MAX_WEIGHTS setting
- * to supply your own limit to the post processing step.
- *
- * If you intend to perform the skinning in hardware, this post processing
- * step might be of interest for you.
- */
- LimitBoneWeights = 0x200,
-
- /**
- * Validates the imported scene data structure.
- *
- * This makes sure that all indices are valid, all animations and
- * bones are linked correctly, all material references are correct, etc.
- *
- * It is recommended to capture Assimp's log output if you use this flag,
- * so you can easily find ot what's actually wrong if a file fails the
- * validation. The validator is quite rude and will find all
- * inconsistencies in the data structure.
- *
- * Plugin developers are recommended to use it to debug their loaders.
- *
- * There are two types of validation failures:
- *
- * - Error: There's something wrong with the imported data. Further
- * postprocessing is not possible and the data is not usable at all.
- * The import fails, see
aiGetErrorString() for the
- * error message.
- * - Warning: There are some minor issues (e.g. 1000000 animation
- * keyframes with the same time), but further postprocessing and use
- * of the data structure is still safe. Warning details are written
- * to the log file,
AI_SCENE_FLAGS_VALIDATION_WARNING is
- * set in aiScene::mFlags
- *
- *
- * This post-processing step is not time-consuming. It's use is not
- * compulsory, but recommended.
- */
- ValidateDataStructure = 0x400,
-
- /**
- * Reorders triangles for better vertex cache locality.
- *
- * The step tries to improve the ACMR (average post-transform vertex cache
- * miss ratio) for all meshes. The implementation runs in O(n) and is
- * roughly based on the 'tipsify' algorithm (see
- * http://www.cs.princeton.edu/gfx/pubs/Sander_2007_%3ETR/tipsy.pdf).
- *
- * If you intend to render huge models in hardware, this step might
- * be of interest for you. The AI_CONFIG_PP_ICL_PTCACHE_SIZE
- * config setting can be used to fine-tune the cache optimization.
- */
- ImproveCacheLocality = 0x800,
-
- /**
- * Searches for redundant/unreferenced materials and removes them.
- *
- * This is especially useful in combination with the
- * PretransformVertices and OptimizeMeshes
- * flags. Both join small meshes with equal characteristics, but they
- * can't do their work if two meshes have different materials. Because
- * several material settings are always lost during Assimp's import
- * filters, (and because many exporters don't check for redundant
- * materials), huge models often have materials which are are defined
- * several times with exactly the same settings.
- *
- * Several material settings not contributing to the final appearance of
- * a surface are ignored in all comparisons; the material name is one of
- * them. So, if you are passing additional information through the
- * content pipeline (probably using »magic« material names), don't
- * specify this flag. Alternatively take a look at the
- * AI_CONFIG_PP_RRM_EXCLUDE_LIST setting.
- */
- RemoveRedundantMaterials = 0x1000,
-
- /**
- * This step tries to determine which meshes have normal vectors that are
- * acing inwards.
- *
- * The algorithm is simple but effective: The bounding box of all
- * vertices and their normals is compared against the volume of the
- * bounding box of all vertices without their normals. This works well
- * for most objects, problems might occur with planar surfaces. However,
- * the step tries to filter such cases.
- *
- * The step inverts all in-facing normals. Generally it is recommended to
- * enable this step, although the result is not always correct.
- */
- FixInfacingNormals = 0x2000,
-
- /**
- * This step splits meshes with more than one primitive type in
- * homogeneous submeshes.
- *
- * The step is executed after the triangulation step. After the step
- * returns, just one bit is set in aiMesh.mPrimitiveTypes.
- * This is especially useful for real-time rendering where point and line
- * primitives are often ignored or rendered separately.
- *
- * You can use the AI_CONFIG_PP_SBP_REMOVE option to
- * specify which primitive types you need. This can be used to easily
- * exclude lines and points, which are rarely used, from the import.
- */
- SortByPType = 0x8000,
-
- /**
- * This step searches all meshes for degenerated primitives and converts
- * them to proper lines or points.
- *
- * A face is »degenerated« if one or more of its points are identical.
- * To have the degenerated stuff not only detected and collapsed but also
- * removed, try one of the following procedures:
- *
- * 1. (if you support lines and points for rendering but don't
- * want the degenerates)
- *
- * - Specify the
FindDegenerates flag.
- * - Set the
AI_CONFIG_PP_FD_REMOVE option to 1. This will
- * cause the step to remove degenerated triangles from the import
- * as soon as they're detected. They won't pass any further
- * pipeline steps.
- *
- *
- * 2.(if you don't support lines and points at all ...)
- *
- * - Specify the
FindDegenerates flag.
- * - Specify the
SortByPType flag. This moves line and
- * point primitives to separate meshes.
- * - Set the
AI_CONFIG_PP_SBP_REMOVE option to
- * aiPrimitiveType_POINTS | aiPrimitiveType_LINES
- * to cause SortByPType to reject point and line meshes from the
- * scene.
- *
- *
- * Note: Degenerated polygons are not necessarily bad and that's why
- * they're not removed by default. There are several file formats
- * which don't support lines or points. Some exporters bypass the
- * format specification and write them as degenerated triangle
- * instead.
- */
- FindDegenerates = 0x10000,
-
- /**
- * This step searches all meshes for invalid data, such as zeroed normal
- * vectors or invalid UV coords and removes/fixes them. This is intended
- * to get rid of some common exporter errors.
- *
- * This is especially useful for normals. If they are invalid, and the
- * step recognizes this, they will be removed and can later be
- * recomputed, e.g. by the GenSmoothNormals step.
- *
- * The step will also remove meshes that are infinitely small and reduce
- * animation tracks consisting of hundreds if redundant keys to a single
- * key. The AI_CONFIG_PP_FID_ANIM_ACCURACY config property
- * decides the accuracy of the check for duplicate animation tracks.
- */
- FindInvalidData = 0x20000,
-
- /**
- * This step converts non-UV mappings (such as spherical or cylindrical
- * mapping) to proper texture coordinate channels.
- *
- * Most applications will support UV mapping only, so you will probably
- * want to specify this step in every case. Note tha Assimp is not always
- * able to match the original mapping implementation of the 3d app which
- * produced a model perfectly. It's always better to let the father app
- * compute the UV channels, at least 3ds max, maja, blender, lightwave,
- * modo, ... are able to achieve this.
- *
- * Note: If this step is not requested, you'll need to process the
- * AI_MATKEY_MAPPING material property in order to
- * display all assets properly.
- */
- GenUVCoords = 0x40000,
-
- /**
- * This step applies per-texture UV transformations and bakes them to
- * stand-alone vtexture coordinate channelss.
- *
- * UV transformations are specified per-texture – see the
- * AI_MATKEY_UVTRANSFORM material key for more information.
- * This step processes all textures with transformed input UV coordinates
- * and generates new (pretransformed) UV channel which replace the old
- * channel. Most applications won't support UV transformations, so you
- * will probably want to specify this step.
- *
- * Note: UV transformations are usually implemented in realtime apps by
- * transforming texture coordinates at vertex shader stage with a 3x3
- * (homogenous) transformation matrix.
- */
- TransformUVCoords = 0x80000,
-
- /**
- * This step searches for duplicate meshes and replaces duplicates with
- * references to the first mesh.
- *
- * This step takes a while, don't use it if you have no time. Its main
- * purpose is to workaround the limitation that many export file formats
- * don't support instanced meshes, so exporters need to duplicate meshes.
- * This step removes the duplicates again. Please note that Assimp does
- * currently not support per-node material assignment to meshes, which
- * means that identical meshes with differnent materials are currently
- * not joined, although this is planned for future versions.
- */
- FindInstances = 0x100000,
-
- /**
- * A postprocessing step to reduce the number of meshes.
- *
- * In fact, it will reduce the number of drawcalls.
- *
- * This is a very effective optimization and is recommended to be used
- * together with OptimizeGraph, if possible. The flag is
- * fully compatible with both SplitLargeMeshes and
- * SortByPType.
- */
- OptimizeMeshes = 0x200000,
-
- /**
- * A postprocessing step to optimize the scene hierarchy.
- *
- * Nodes with no animations, bones, lights or cameras assigned are
- * collapsed and joined.
- *
- * Node names can be lost during this step. If you use special tag nodes
- * to pass additional information through your content pipeline, use the
- * AI_CONFIG_PP_OG_EXCLUDE_LIST setting to specify a list of
- * node names you want to be kept. Nodes matching one of the names in
- * this list won't be touched or modified.
- *
- * Use this flag with caution. Most simple files will be collapsed to a
- * single node, complex hierarchies are usually completely lost. That's
- * note the right choice for editor environments, but probably a very
- * effective optimization if you just want to get the model data, convert
- * it to your own format and render it as fast as possible.
- *
- * This flag is designed to be used with OptimizeMeshes for
- * best results.
- *
- * Note: »Crappy« scenes with thousands of extremely small meshes packed
- * in deeply nested nodes exist for almost all file formats.
- * OptimizeMeshes in combination with
- * OptimizeGraph usually fixes them all and makes them
- * renderable.
- */
- OptimizeGraph = 0x400000,
-
- /** This step flips all UV coordinates along the y-axis and adjusts
- * material settings and bitangents accordingly.
- *
- * Output UV coordinate system:
- * 0y|0y ---------- 1x|0y
- * | |
- * | |
- * | |
- * 0x|1y ---------- 1x|1y
- * You'll probably want to consider this flag if you use Direct3D for
- * rendering. The AI_PROCESS_CONVERT_TO_LEFT_HANDED flag
- * supersedes this setting and bundles all conversions typically required
- * for D3D-based applications.
- */
- FlipUVs = 0x800000,
-
- /**
- * This step adjusts the output face winding order to be clockwise.
- *
- * The default face winding order is counter clockwise.
- *
- * Output face order:
- * x2
- *
- * x0
- * x1
- */
- FlipWindingOrder = 0x1000000
- }
-
- /**
- * Abbrevation for convenience.
- */
- alias aiPostProcessSteps aiProcess;
-
- /**
- * Shortcut flag for Direct3D-based applications.
- *
- * Combines the MakeLeftHanded, FlipUVs and
- * FlipWindingOrder flags. The output data matches Direct3D's
- * conventions: left-handed geometry, upper-left origin for UV coordinates
- * and clockwise face order, suitable for CCW culling.
- */
- const aiPostProcessSteps AI_PROCESS_CONVERT_TO_LEFT_HANDED =
- aiProcess.MakeLeftHanded |
- aiProcess.FlipUVs |
- aiProcess.FlipWindingOrder;
-
- /**
- * Default postprocess configuration optimizing the data for real-time rendering.
- *
- * Applications would want to use this preset to load models on end-user
- * PCs, maybe for direct use in game.
- *
- * If you're using DirectX, don't forget to combine this value with
- * the ConvertToLeftHanded step. If you don't support UV
- * transformations in your application, apply the
- * TransformUVCoords step, too.
- *
- * Note: Please take the time to read the doc for the steps enabled by this
- * preset. Some of them offer further configurable properties, some of
- * them might not be of use for you so it might be better to not specify
- * them.
- */
- const aiPostProcessSteps AI_PROCESS_PRESET_TARGET_REALTIME_FAST =
- aiProcess.CalcTangentSpace |
- aiProcess.GenNormals |
- aiProcess.JoinIdenticalVertices |
- aiProcess.Triangulate |
- aiProcess.GenUVCoords |
- aiProcess.SortByPType;
-
- /**
- * Default postprocess configuration optimizing the data for real-time
- * rendering.
- *
- * Unlike AI_PROCESS_PRESET_TARGET_REALTIME_FAST, this
- * configuration performs some extra optimizations to improve rendering
- * speed and to minimize memory usage. It could be a good choice for a
- * level editor environment where import speed is not so important.
- *
- * If you're using DirectX, don't forget to combine this value with
- * the ConvertToLeftHanded step. If you don't support UV
- * transformations in your application, apply the
- * TransformUVCoords step, too.
- *
- * Note: Please take the time to read the doc for the steps enabled by this
- * preset. Some of them offer further configurable properties, some of
- * them might not be of use for you so it might be better to not specify
- * them.
- */
- const aiPostProcessSteps AI_PROCESS_PRESET_TARGET_REALTIME_QUALITY =
- aiProcess.CalcTangentSpace |
- aiProcess.GenSmoothNormals |
- aiProcess.JoinIdenticalVertices |
- aiProcess.ImproveCacheLocality |
- aiProcess.LimitBoneWeights |
- aiProcess.RemoveRedundantMaterials |
- aiProcess.SplitLargeMeshes |
- aiProcess.Triangulate |
- aiProcess.GenUVCoords |
- aiProcess.SortByPType |
- aiProcess.FindDegenerates |
- aiProcess.FindInvalidData;
-
- /**
- * Default postprocess configuration optimizing the data for real-time
- * rendering.
- *
- * This preset enables almost every optimization step to achieve perfectly
- * optimized data. It's your choice for level editor environments where
- * import speed is not important.
- *
- * If you're using DirectX, don't forget to combine this value with
- * the ConvertToLeftHanded step. If you don't support UV
- * transformations in your application, apply the
- * TransformUVCoords step, too.
- *
- * Note: Please take the time to read the doc for the steps enabled by this
- * preset. Some of them offer further configurable properties, some of
- * them might not be of use for you so it might be better to not specify
- * them.
- */
- const aiPostProcessSteps AI_PROCESS_PRESET_TARGET_REALTIME_MAX_QUALITY =
- AI_PROCESS_PRESET_TARGET_REALTIME_QUALITY |
- aiProcess.FindInstances |
- aiProcess.ValidateDataStructure |
- aiProcess.OptimizeMeshes;
-}
diff --git a/ExternalResources/assimp-master/port/dAssimp/assimp/scene.d b/ExternalResources/assimp-master/port/dAssimp/assimp/scene.d
deleted file mode 100644
index ab545b1..0000000
--- a/ExternalResources/assimp-master/port/dAssimp/assimp/scene.d
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
----------------------------------------------------------------------------
-Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------------
-
-Copyright (c) 2006-2009, ASSIMP Development Team
-
-All rights reserved.
-
-Redistribution and use of this software in source and binary forms,
-with or without modification, are permitted provided that the following
-conditions are met:
-
- * Redistributions of source code must retain the above
- copyright notice, this list of conditions and the
- following disclaimer.
-
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-
- * Neither the name of the ASSIMP team, nor the names of its
- contributors may be used to endorse or promote products
- derived from this software without specific prior
- written permission of the ASSIMP Development Team.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------------
-*/
-
-/**
- * Contains the data structures which store the hierarchy fo the imported data.
- */
-module assimp.scene;
-
-import assimp.animation;
-import assimp.camera;
-import assimp.light;
-import assimp.math;
-import assimp.mesh;
-import assimp.material;
-import assimp.texture;
-import assimp.types;
-
-extern ( C ) {
- /**
- * A node in the imported hierarchy.
- *
- * Each node has name, a parent node (except for the root node), a
- * transformation relative to its parent and possibly several child nodes.
- * Simple file formats don't support hierarchical structures, for these
- * formats the imported scene does consist of only a single root node with
- * no childs.
- */
- struct aiNode {
- /**
- * The name of the node.
- *
- * The name might be empty (length of zero) but all nodes which need to
- * be accessed afterwards by bones or animations are usually named.
- * Multiple nodes may have the same name, but nodes which are accessed
- * by bones (see aiBone and aiMesh.mBones)
- * must be unique.
- *
- * Cameras and lights are assigned to a specific node name – if there are
- * multiple nodes with this name, they are assigned to each of them.
- *
- * There are no limitations regarding the characters contained in this
- * string. You should be able to handle stuff like whitespace, tabs,
- * linefeeds, quotation marks, ampersands, …
- */
- aiString mName;
-
- /**
- * The transformation relative to the node's parent.
- */
- aiMatrix4x4 mTransformation;
-
- /**
- * Parent node.
- *
- * null if this node is the root node.
- */
- aiNode* mParent;
-
- /**
- * The number of child nodes of this node.
- */
- uint mNumChildren;
-
- /**
- * The child nodes of this node.
- *
- * null if mNumChildren is 0.
- */
- aiNode** mChildren;
-
- /**
- * The number of meshes of this node.
- */
- int mNumMeshes;
-
- /**
- * The meshes of this node.
- *
- * Each entry is an index for aiScene.mMeshes.
- */
- uint* mMeshes;
- }
-
- /**
- * Flags which are combinated in aiScene.mFlags to store
- * auxiliary information about the imported scene.
- */
- enum aiSceneFlags : uint {
- /**
- * Specifies that the scene data structure that was imported is not
- * complete.
- *
- * This flag bypasses some internal validations and allows the import of
- * animation skeletons, material libraries or camera animation paths
- * using Assimp. Most applications won't support such data.
- */
- INCOMPLETE = 0x1,
-
- /**
- * This flag is set by the validation post-processing step
- * (aiProcess.ValidateDS) if the validation was successful.
- *
- * In a validated scene you can be sure that any cross references in the
- * data structure (e.g. vertex indices) are valid.
- */
- VALIDATED = 0x2,
-
- /**
- * This flag is set by the validation post-processing step
- * (aiProcess.ValidateDS) if the validation is successful
- * but some issues have been found.
- *
- * This can for example mean that a texture that does not exist is
- * referenced by a material or that the bone weights for a vertex don't
- * sum to 1. In most cases you should still be able to use the import.
- *
- * This flag could be useful for applications which don't capture
- * Assimp's log output.
- */
- VALIDATION_WARNING = 0x4,
-
- /**
- * This flag is currently only set by the
- * aiProcess.JoinIdenticalVertices post-processing step. It
- * indicates that the vertices of the output meshes aren't in the
- * internal verbose format anymore. In the verbose format all vertices
- * are unique, no vertex is ever referenced by more than one face.
- */
- NON_VERBOSE_FORMAT = 0x8,
-
- /**
- * Denotes pure height-map terrain data. Pure terrains usually consist of
- * quads, sometimes triangles, in a regular grid. The x,y coordinates of
- * all vertex positions refer to the x,y coordinates on the terrain
- * height map, the z-axis stores the elevation at a specific point.
- *
- * TER (Terragen) and HMP (3D Game Studio) are height map formats.
- *
- * Note: Assimp is probably not the best choice for loading huge
- * terrains – fully triangulated data takes extremely much storage
- * space and should be avoided as long as possible (typically you will
- * perform the triangulation when you actually need to render it).
- */
- FLAGS_TERRAIN = 0x10
- }
-
- /**
- * The root structure of the imported data.
- *
- * Everything that was imported from the given file can be accessed from here.
- * Objects of this class are generally maintained and owned by Assimp, not
- * by the caller. You shouldn't want to instance it, nor should you ever try to
- * delete a given scene on your own.
- */
- struct aiScene {
- /**
- * Any combination of the aiSceneFlags. By default, this
- * value is 0, no flags are set.
- *
- * Most applications will want to reject all scenes with the
- * aiSceneFlags.INCOMPLETE bit set.
- */
- uint mFlags;
-
- /**
- * The root node of the hierarchy.
- *
- * There will always be at least the root node if the import was
- * successful (and no special flags have been set). Presence of further
- * nodes depends on the format and contents of the imported file.
- */
- aiNode* mRootNode;
-
- /**
- * The number of meshes in the scene.
- */
- uint mNumMeshes;
-
- /**
- * The array of meshes.
- *
- * Use the indices given in the aiNode structure to access
- * this array. The array is mNumMeshes in size.
- *
- * If the aiSceneFlags.INCOMPLETE flag is not set, there
- * will always be at least one mesh.
- */
- aiMesh** mMeshes;
-
- /**
- * The number of materials in the scene.
- */
- uint mNumMaterials;
-
- /**
- * The array of meshes.
- *
- * Use the indices given in the aiMesh structure to access
- * this array. The array is mNumMaterials in size.
- *
- * If the aiSceneFlags.INCOMPLETE flag is not set, there
- * will always be at least one material.
- */
- aiMaterial** mMaterials;
-
- /**
- * The number of animations in the scene.
- */
- uint mNumAnimations;
-
- /**
- * The array of animations.
- *
- * All animations imported from the given file are listed here. The array
- * is mNumAnimations in size.
- */
- aiAnimation** mAnimations;
-
- /**
- * The number of textures embedded into the file.
- */
- uint mNumTextures;
-
- /**
- * The array of embedded textures.
- *
- * Not many file formats embed their textures into the file. An example
- * is Quake's MDL format (which is also used by some
- * GameStudio versions).
- */
- aiTexture** mTextures;
-
- /**
- * The number of light sources in the scene.
- *
- * Light sources are fully optional, in most cases this attribute will be
- * 0.
- */
- uint mNumLights;
-
- /**
- * The array of light sources.
- *
- * All light sources imported from the given file are listed here. The
- * array is mNumLights in size.
- */
- aiLight** mLights;
-
- /**
- * The number of cameras in the scene.
- *
- * Cameras are fully optional, in most cases this attribute
- * will be 0.
- */
- uint mNumCameras;
-
- /**
- * The array of cameras.
- *
- * All cameras imported from the given file are listed here. The array is
- * mNumCameras in size.
- *
- * The first camera in the array (if existing) is the default camera view
- * at the scene.
- */
- aiCamera** mCameras;
- }
-}
diff --git a/ExternalResources/assimp-master/port/dAssimp/assimp/texture.d b/ExternalResources/assimp-master/port/dAssimp/assimp/texture.d
deleted file mode 100644
index 0f46ff5..0000000
--- a/ExternalResources/assimp-master/port/dAssimp/assimp/texture.d
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
----------------------------------------------------------------------------
-Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------------
-
-Copyright (c) 2006-2009, ASSIMP Development Team
-
-All rights reserved.
-
-Redistribution and use of this software in source and binary forms,
-with or without modification, are permitted provided that the following
-conditions are met:
-
- * Redistributions of source code must retain the above
- copyright notice, this list of conditions and the
- following disclaimer.
-
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-
- * Neither the name of the ASSIMP team, nor the names of its
- contributors may be used to endorse or promote products
- derived from this software without specific prior
- written permission of the ASSIMP Development Team.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------------
-*/
-
-/**
- * Contains helper structures to handle textures in Assimp.
- *
- * Used for file formats which embed their textures into the model file.
- * Supported are both normal textures, which are stored as uncompressed pixels,
- * and "compressed" textures, which are stored in a file format such as PNG or
- * TGA.
- */
-module assimp.texture;
-
-extern ( C ) {
- /**
- * Helper structure to represent a texel in a ARGB8888 format.
- *
- * Used by aiTexture.
- */
- struct aiTexel {
- align ( 1 ):
- ubyte b, g, r, a;
- }
-
- /**
- * Helper structure to describe an embedded texture.
- *
- * Usually textures are contained in external files but some file formats
- * embed them directly in the model file. There are two types of
- * embedded textures:
- *
- * 1. Uncompressed textures: The color data is given in an
- * uncompressed format.
- *
- * 2. Compressed textures stored in a file format like PNG or JPEG.
- * The raw file bytes are given so the application must utilize an image
- * decoder (e.g. DevIL) to get access to the actual color data.
- */
- struct aiTexture {
- /**
- * Width of the texture, in pixels.
- *
- * If mHeight is zero the texture is compressed in a format
- * like JPEG. In this case, this value specifies the size of the memory
- * area pcData is pointing to, in bytes.
- */
- uint mWidth;
-
- /**
- * Height of the texture, in pixels.
- *
- * If this value is zero, pcData points to an compressed
- * texture in any format (e.g. JPEG).
- */
- uint mHeight;
-
- /**
- * A hint from the loader to make it easier for applications to determine
- * the type of embedded compressed textures.
- *
- * If mHeight is not 0, this member is undefined. Otherwise
- * it is set set to '\0\0\0\0' if the loader has no additional
- * information about the texture file format used, or the file extension
- * of the format without a trailing dot. If there are multiple file
- * extensions for a format, the shortest extension is chosen (JPEG maps
- * to 'jpg', not to 'jpeg'). E.g. 'dds\0', 'pcx\0', 'jpg\0'. All
- * characters are lower-case. The fourth byte will always be '\0'.
- */
- char achFormatHint[4];
-
- /**
- * Data of the texture.
- *
- * Points to an array of mWidth * mHeight
- * aiTexels. The format of the texture data is always
- * ARGB8888 to make the implementation for user of the library as easy as
- * possible.
- *
- * If mHeight is 0, this is a pointer to a memory buffer of
- * size mWidth containing the compressed texture data.
- */
- aiTexel* pcData;
- }
-}
diff --git a/ExternalResources/assimp-master/port/dAssimp/assimp/types.d b/ExternalResources/assimp-master/port/dAssimp/assimp/types.d
deleted file mode 100644
index d3c0b53..0000000
--- a/ExternalResources/assimp-master/port/dAssimp/assimp/types.d
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
----------------------------------------------------------------------------
-Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------------
-
-Copyright (c) 2006-2009, ASSIMP Development Team
-
-All rights reserved.
-
-Redistribution and use of this software in source and binary forms,
-with or without modification, are permitted provided that the following
-conditions are met:
-
- * Redistributions of source code must retain the above
- copyright notice, this list of conditions and the
- following disclaimer.
-
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-
- * Neither the name of the ASSIMP team, nor the names of its
- contributors may be used to endorse or promote products
- derived from this software without specific prior
- written permission of the ASSIMP Development Team.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------------
-*/
-
-/**
- * Contains miscellaneous types used in Assimp's C API.
- */
-module assimp.types;
-
-extern ( C ) {
- /**
- * Our own C boolean type.
- */
- enum aiBool : int {
- FALSE = 0,
- TRUE = 1
- }
-
- /**
- * Type definition for log stream callback function pointers.
- */
- alias void function( char* message, char* user ) aiLogStreamCallback;
-
- /**
- * Represents a log stream. A log stream receives all log messages and
- * streams them somewhere.
- *
- * See: aiGetPredefinedLogStream,
- * aiAttachLogStream and aiDetachLogStream.
- */
- struct aiLogStream {
- /**
- * Callback function to be called when a new message arrives.
- */
- aiLogStreamCallback callback;
-
- /**
- * User data to be passed to the callback.
- */
- char* user;
- }
-
- /**
- * Maximum dimension for aiStrings.
- *
- * Assimp strings are zero terminated.
- */
- const size_t MAXLEN = 1024;
-
- /**
- * Represents an UTF-8 string, zero byte terminated.
- *
- * The length of such a string is limited to MAXLEN bytes
- * (excluding the terminal \0).
- *
- * The character set of an aiString is explicitly defined to be UTF-8. This
- * Unicode transformation was chosen in the belief that most strings in 3d
- * model files are limited to ASCII characters, thus the character set
- * needed to be ASCII compatible.
- *
- * Most text file loaders provide proper Unicode input file handling,
- * special unicode characters are correctly transcoded to UTF-8 and are kept
- * throughout the libraries' import pipeline.
- *
- * For most applications, it will be absolutely sufficient to interpret the
- * aiString as ASCII data and work with it as one would work with a plain
- * char[].
- *
- * To access an aiString from D you might want to use something like the
- * following piece of code:
- * ---
- * char[] importAiString( aiString* s ) {
- * return s.data[ 0 .. s.length ];
- * }
- * ---
- */
- struct aiString {
- /**
- * Length of the string (excluding the terminal \0).
- *
- * This is not the logical length of strings containing UTF-8
- * multibyte sequences, but the number of bytes from the beginning of the
- * string to its end.
- */
- size_t length;
-
- /**
- * String buffer.
- *
- * Size limit is MAXLEN.
- */
- char data[ MAXLEN ];
- }
-
- /**
- * Standard return type for some library functions.
- */
- enum aiReturn : uint {
- /**
- * Indicates that a function was successful.
- */
- SUCCESS = 0x0,
-
- /**
- * Indicates that a function failed.
- */
- FAILURE = -0x1,
-
- /**
- * Indicates that not enough memory was available to perform the
- * requested operation.
- */
- OUTOFMEMORY = -0x3
- }
-
- /**
- * Seek origins (for the virtual file system API).
- */
- enum aiOrigin : uint {
- /**
- * Beginning of the file.
- */
- SET = 0x0,
-
- /**
- * Current position of the file pointer.
- */
- CUR = 0x1,
-
- /**
- * End of the file.
- *
- * Offsets must be negative.
- */
- END = 0x2
- }
-
- /**
- * Enumerates predefined log streaming destinations.
- *
- * Logging to these streams can be enabled with a single call to
- * aiAttachPredefinedLogStream().
- */
- enum aiDefaultLogStream :uint {
- /**
- * Stream the log to a file.
- */
- FILE = 0x1,
-
- /**
- * Stream the log to standard output.
- */
- STDOUT = 0x2,
-
- /**
- * Stream the log to standard error.
- */
- STDERR = 0x4,
-
- /**
- * MSVC only: Stream the log the the debugger (this relies on
- * OutputDebugString from the Win32 SDK).
- */
- DEBUGGER = 0x8
- }
-
- /**
- * Stores the memory requirements for different components (e.g. meshes,
- * materials, animations) of an import. All sizes are in bytes.
- */
- struct aiMemoryInfo {
- /**
- * Storage allocated for texture data.
- */
- uint textures;
-
- /**
- * Storage allocated for material data.
- */
- uint materials;
-
- /**
- * Storage allocated for mesh data.
- */
- uint meshes;
-
- /**
- * Storage allocated for node data.
- */
- uint nodes;
-
- /**
- * Storage allocated for animation data.
- */
- uint animations;
-
- /**
- * Storage allocated for camera data.
- */
- uint cameras;
-
- /**
- * Storage allocated for light data.
- */
- uint lights;
-
- /**
- * Total storage allocated for the full import.
- */
- uint total;
- }
-}
diff --git a/ExternalResources/assimp-master/port/dAssimp/assimp/versionInfo.d b/ExternalResources/assimp-master/port/dAssimp/assimp/versionInfo.d
deleted file mode 100644
index 4981155..0000000
--- a/ExternalResources/assimp-master/port/dAssimp/assimp/versionInfo.d
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
----------------------------------------------------------------------------
-Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------------
-
-Copyright (c) 2006-2009, ASSIMP Development Team
-
-All rights reserved.
-
-Redistribution and use of this software in source and binary forms,
-with or without modification, are permitted provided that the following
-conditions are met:
-
- * Redistributions of source code must retain the above
- copyright notice, this list of conditions and the
- following disclaimer.
-
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-
- * Neither the name of the ASSIMP team, nor the names of its
- contributors may be used to endorse or promote products
- derived from this software without specific prior
- written permission of the ASSIMP Development Team.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------------
-*/
-
-/**
- * Flags returned by aiGetCompileFlags().
- */
-module assimp.versionInfo;
-
-extern ( C ) {
- /**
- * Assimp was compiled as a shared object (Windows: DLL).
- */
- const uint ASSIMP_CFLAGS_SHARED = 0x1;
-
- /**
- * Assimp was compiled against STLport.
- */
- const uint ASSIMP_CFLAGS_STLPORT = 0x2;
-
- /**
- * Assimp was compiled as a debug build.
- */
- const uint ASSIMP_CFLAGS_DEBUG = 0x4;
-
- /**
- * Assimp was compiled with ASSIMP_BUILD_BOOST_WORKAROUND defined.
- */
- const uint ASSIMP_CFLAGS_NOBOOST = 0x8;
-
- /**
- * Assimp was compiled with ASSIMP_BUILD_SINGLETHREADED defined.
- */
- const uint ASSIMP_CFLAGS_SINGLETHREADED = 0x10;
-}
diff --git a/ExternalResources/glfw-3.3/build/CMakeFiles/3.15.2/CompilerIdC/CompilerIdC.exe b/ExternalResources/glfw-3.3/build/CMakeFiles/3.15.2/CompilerIdC/CompilerIdC.exe
deleted file mode 100644
index 0a1a7b0..0000000
Binary files a/ExternalResources/glfw-3.3/build/CMakeFiles/3.15.2/CompilerIdC/CompilerIdC.exe and /dev/null differ
diff --git a/OpenGLEngine/Lib/assimp-vc141-mtd.lib b/OpenGLEngine/Lib/assimp-vc141-mtd.lib
deleted file mode 100644
index 9892af3..0000000
Binary files a/OpenGLEngine/Lib/assimp-vc141-mtd.lib and /dev/null differ
diff --git a/OpenGLEngine/Lib/freetype.lib b/OpenGLEngine/Lib/freetype.lib
deleted file mode 100644
index 798e8ff..0000000
Binary files a/OpenGLEngine/Lib/freetype.lib and /dev/null differ
diff --git a/OpenGLEngine/Lib/glfw3.lib b/OpenGLEngine/Lib/glfw3.lib
deleted file mode 100644
index e7ae794..0000000
Binary files a/OpenGLEngine/Lib/glfw3.lib and /dev/null differ
diff --git a/OpenGLEngine/Lib/reactphysics3d.lib b/OpenGLEngine/Lib/reactphysics3d.lib
deleted file mode 100644
index 744bea3..0000000
Binary files a/OpenGLEngine/Lib/reactphysics3d.lib and /dev/null differ
diff --git a/OpenGLEngine/OpenGLEngine/AeroComponent.h b/OpenGLEngine/OpenGLEngine/AeroComponent.h
deleted file mode 100644
index aa005a9..0000000
--- a/OpenGLEngine/OpenGLEngine/AeroComponent.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-
-namespace Reality
-{
- struct AeroComponent
- {
- AeroComponent(ECSEntity _target = ECSEntity(), Mat3 _aerodynamicTensor = Mat3(1.0f), Vector3 _relativePoint = Vector3(0, 0, 0))
- :target(_target), aerodynamicTensor(_aerodynamicTensor), relativePoint(_relativePoint)
- {
-
- }
- Mat3 aerodynamicTensor;
- ECSEntity target;
- Vector3 relativePoint;
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/AeroControlComponent.h b/OpenGLEngine/OpenGLEngine/AeroControlComponent.h
deleted file mode 100644
index a918690..0000000
--- a/OpenGLEngine/OpenGLEngine/AeroControlComponent.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-#include
-
-namespace Reality
-{
- struct AeroControlComponent
- {
- AeroControlComponent(std::vector _positiveKeys = { GLFW_KEY_UP }, std::vector _negetiveKeys = { GLFW_KEY_DOWN }, float _rate = 1)
- :positiveKeys(_positiveKeys), negetiveKeys(_negetiveKeys), rate(_rate)
- {
-
- }
-
- std::vector positiveKeys;
- std::vector negetiveKeys;
- float rate;
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/AeroControlSystem.cpp b/OpenGLEngine/OpenGLEngine/AeroControlSystem.cpp
deleted file mode 100644
index 98b7cab..0000000
--- a/OpenGLEngine/OpenGLEngine/AeroControlSystem.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-#include "AeroControlSystem.h"
-
-namespace Reality
-{
- AeroControlSystem::AeroControlSystem()
- {
- requireComponent();
- requireComponent();
- }
-
- void AeroControlSystem::Update(float deltaTime)
- {
- pKey = false;
- nKey = false;
- for (auto e : getEntities())
- {
- auto& aero = e.getComponent();
- auto& control = e.getComponent();
-
- for (auto key : control.positiveKeys)
- {
- if (glfwGetKey(getWorld().data.renderUtil->window->glfwWindow, key) == GLFW_PRESS)
- {
- aero.controlSetting += control.rate * deltaTime;
- pKey = true;
- }
- }
-
- for (auto key : control.negetiveKeys)
- {
- if (glfwGetKey(getWorld().data.renderUtil->window->glfwWindow, key) == GLFW_PRESS)
- {
- aero.controlSetting -= control.rate * deltaTime;
- nKey = true;
- }
- }
-
- if (!pKey && !nKey)
- {
- aero.controlSetting = 0;
- }
-
- aero.controlSetting = glm::clamp(aero.controlSetting, -1.0f, 1.0f);
- }
- }
-}
diff --git a/OpenGLEngine/OpenGLEngine/AeroControlSystem.h b/OpenGLEngine/OpenGLEngine/AeroControlSystem.h
deleted file mode 100644
index 27b8ec1..0000000
--- a/OpenGLEngine/OpenGLEngine/AeroControlSystem.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-#include "AeroMinMaxComponent.h"
-#include "AeroControlComponent.h"
-
-namespace Reality
-{
- class AeroControlSystem : public ECSSystem
- {
- public:
- AeroControlSystem();
- void Update(float deltaTime);
- private:
- bool pKey = false;
- bool nKey = false;
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/AeroMinMaxComponent.h b/OpenGLEngine/OpenGLEngine/AeroMinMaxComponent.h
deleted file mode 100644
index 3d6abf6..0000000
--- a/OpenGLEngine/OpenGLEngine/AeroMinMaxComponent.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-
-namespace Reality
-{
- struct AeroMinMaxComponent
- {
- AeroMinMaxComponent(Mat3 _minTensor = Mat3(1.0f), Mat3 _baseTensor = Mat3(1.0f), Mat3 _maxTensor = Mat3(1.0f), float _controlSetting = 0.0f)
- :minTensor(_minTensor), baseTensor(_baseTensor), maxTensor(_maxTensor), controlSetting(_controlSetting)
- {
-
- }
- Mat3 minTensor;
- Mat3 baseTensor;
- Mat3 maxTensor;
- float controlSetting;
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/AeroSystem.cpp b/OpenGLEngine/OpenGLEngine/AeroSystem.cpp
deleted file mode 100644
index 8b68db7..0000000
--- a/OpenGLEngine/OpenGLEngine/AeroSystem.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-#include "AeroSystem.h"
-#include "RigidBodyComponent.h"
-#include "TransformComponentV2.h"
-
-namespace Reality
-{
- AeroSystem::AeroSystem()
- {
- requireComponent();
- }
-
- void AeroSystem::UpdateForceFromTensor(ECSWorld& world, AeroComponent& aero, RigidBodyComponent& body, TransformComponentV2& transform)
- {
- // Calculate total velocity (windspeed and body's velocity).
- Vector3 velocity = body.velocity;
- velocity += windspeed;
-
- // Calculate the velocity in body coordinates
- Vector3 bodyVel = transform.WorldToLocalDirection(velocity);
-
- // Calculate the force in body coordinates
- Vector3 bodyForce = aero.aerodynamicTensor * bodyVel / 1.0f;
- Vector3 force = transform.LocalToWorldDirection(bodyForce);
-
- // Apply the force
- Vector3 forcePoint = transform.LocalToWorldPosition(aero.relativePoint);
- body.AddForceAtPoint(force, forcePoint, transform.GetPosition());
-
- //world.data.renderUtil->DrawLine(transform.GetPosition(), forcePoint + force * 1000.0f, Color::Purple);
- world.data.renderUtil->DrawLine(forcePoint, forcePoint + force * 1000.0f, Color::Purple);
- }
-
- void AeroSystem::Update(float deltaTime)
- {
- for (auto e : getEntities())
- {
- auto& aero = e.getComponent();
- if (aero.target.hasComponent() && aero.target.hasComponent())
- {
- auto& rigidbody = aero.target.getComponent();
- auto& transform = aero.target.getComponent();
- UpdateForceFromTensor(getWorld(), aero, rigidbody, transform);
- }
- }
- }
-}
diff --git a/OpenGLEngine/OpenGLEngine/AeroSystem.h b/OpenGLEngine/OpenGLEngine/AeroSystem.h
deleted file mode 100644
index 63ccebd..0000000
--- a/OpenGLEngine/OpenGLEngine/AeroSystem.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-#include "AeroComponent.h"
-
-namespace Reality
-{
- struct RigidBodyComponent;
- struct TransformComponentV2;
- class AeroSystem : public ECSSystem
- {
- public:
- AeroSystem();
- void Update(float deltaTime);
- Vector3 windspeed = Vector3(0, 0, 0);
- private:
- void UpdateForceFromTensor(ECSWorld& world, AeroComponent& aero, RigidBodyComponent& body, TransformComponentV2& transform);
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/BoxColliderComponent.h b/OpenGLEngine/OpenGLEngine/BoxColliderComponent.h
deleted file mode 100644
index 7ef0bf3..0000000
--- a/OpenGLEngine/OpenGLEngine/BoxColliderComponent.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-#include
-
-namespace Reality
-{
- struct BoxColliderComponent
- {
- BoxColliderComponent(ECSEntity _body = ECSEntity(), Vector3 _size = Vector3(0, 0, 0), Vector3 _offset = Vector3(0, 0, 0), Vector3 _eulerAngles = Vector3(0, 0, 0))
- : body(_body), size(_size), offset(_offset), rp3dId(-1)
- {
- SetRotation(_eulerAngles);
- }
- ECSEntity body;
- Vector3 offset;
- Vector3 size;
- Quaternion orientation;
- // Euler angles in degrees
- inline void SetRotation(Vector3 eulerAngles)
- {
- glm::vec3 rotationInRads = glm::vec3(glm::radians(eulerAngles.x),
- glm::radians(eulerAngles.y), glm::radians(eulerAngles.z));
- orientation = glm::quat(rotationInRads);
- }
- int rp3dId;
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/BoxColliderSystem.cpp b/OpenGLEngine/OpenGLEngine/BoxColliderSystem.cpp
deleted file mode 100644
index 898ccc4..0000000
--- a/OpenGLEngine/OpenGLEngine/BoxColliderSystem.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-#include "BoxColliderSystem.h"
-#include "RigidBodyComponent.h"
-#include "RigidBodySystem.h"
-
-namespace Reality
-{
- BoxColliderSystem::BoxColliderSystem(rp3d::CollisionWorld& _rp3dWorld)
- :rp3dWorld(_rp3dWorld)
- {
- requireComponent();
- }
-
- void BoxColliderSystem::Update(float deltaTime)
- {
- std::vector rp3dShapesTemp;
- std::vector aliveIds;
- aliveIds.resize(rp3dShapes.size());
- int id = 0;
-
- for (auto e : getEntities())
- {
- auto &boxCollider = e.getComponent();
-
- if (boxCollider.body.isAlive() && boxCollider.body.hasComponent())
- {
- auto &body = boxCollider.body.getComponent();
-
- // Update RP3D Ids
- // Calculate local rp3d transform
- rp3d::Vector3 initPosition(boxCollider.offset.x,
- boxCollider.offset.y,
- boxCollider.offset.z);
- rp3d::Quaternion initOrientation = rp3d::Quaternion(boxCollider.orientation.x, boxCollider.orientation.y, boxCollider.orientation.z, boxCollider.orientation.w);
- rp3d::Transform rp3dtransform(initPosition, initOrientation);
-
- auto rp3dBody = getWorld().getSystemManager().getSystem().rp3dBodies[body.rp3dId];
- // If new rigidbody, create an entry
- if (boxCollider.rp3dId < 0)
- {
- rp3d::BoxShape* shape = new rp3d::BoxShape(rp3d::Vector3(boxCollider.size.x, boxCollider.size.y, boxCollider.size.z) * 0.5f);
- // Add the collision shape to the rigid body
-
- rp3d::ProxyShape * proxyShape = rp3dBody->addCollisionShape(shape, rp3dtransform);
- proxyShape->setUserData(&boxCollider);
- rp3dShapesTemp.push_back(proxyShape);
- body.inertiaTensor[0][0] += (1.0f / 12.0f) * (pow(2 * boxCollider.size.y, 2) + pow(2 * boxCollider.size.z, 2)) / body.inverseMass;
- body.inertiaTensor[1][1] += (1.0f / 12.0f) * (pow(2 * boxCollider.size.z, 2) + pow(2 * boxCollider.size.x, 2)) / body.inverseMass;
- body.inertiaTensor[2][2] += (1.0f / 12.0f) * (pow(2 * boxCollider.size.x, 2) + pow(2 * boxCollider.size.y, 2)) / body.inverseMass;
- boxCollider.rp3dId = id;
- }
- else if (boxCollider.body.isAlive())
- {
- rp3d::ProxyShape * shape = rp3dShapes[boxCollider.rp3dId];
- shape->setLocalToBodyTransform(rp3dtransform);
- aliveIds[boxCollider.rp3dId] = 1;
- rp3dShapesTemp.push_back(shape);
- boxCollider.rp3dId = id;
- }
- id++;
-
- if (boxCollider.body.hasComponent())
- {
- auto& bodyTransform = boxCollider.body.getComponent();
- getWorld().data.renderUtil->DrawCube(bodyTransform.GetUnScaledTransformationMatrix() * Vector4(boxCollider.offset, 1.0f), boxCollider.size, bodyTransform.GetOrientation() * boxCollider.orientation);
- }
- }
- else
- {
- // No need to kill it, the death of RB already killed it
- aliveIds[boxCollider.rp3dId] = 1;
- e.kill();
- }
-
- }
-
- for (int i = 0; i < aliveIds.size(); i++)
- {
- if (aliveIds[i] == 0)
- {
- if (rp3dShapes[i])
- {
- auto shape = rp3dShapes[i]->getCollisionShapePublic();
-
- if (rp3dShapes[i]->getBody() && rp3dShapes[i]->getBody()->getProxyShapesList())
- {
- rp3dShapes[i]->getBody()->removeCollisionShape(rp3dShapes[i]);
- }
- delete shape;
- }
- }
- }
-
- rp3dShapes = rp3dShapesTemp;
- }
-}
diff --git a/OpenGLEngine/OpenGLEngine/BoxColliderSystem.h b/OpenGLEngine/OpenGLEngine/BoxColliderSystem.h
deleted file mode 100644
index 189e426..0000000
--- a/OpenGLEngine/OpenGLEngine/BoxColliderSystem.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-#include "BoxColliderComponent.h"
-#include "TransformComponentV2.h"
-#include
-namespace Reality
-{
- class BoxColliderSystem : public ECSSystem
- {
- public:
- BoxColliderSystem(rp3d::CollisionWorld& _rp3dWorld);
- void Update(float deltaTime);
- private:
- rp3d::CollisionWorld& rp3dWorld;
- std::vector rp3dShapes;
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/CableComponent.h b/OpenGLEngine/OpenGLEngine/CableComponent.h
deleted file mode 100644
index 07d09c6..0000000
--- a/OpenGLEngine/OpenGLEngine/CableComponent.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-namespace Reality
-{
- struct CableComponent
- {
- CableComponent(ECSEntity a = ECSEntity(), ECSEntity b = ECSEntity(), float _maxLength = 10, float _restitution = 1.0f)
- : entityA(a), entityB(b), maxLength(_maxLength), restitution(_restitution){}
- ECSEntity entityA;
- ECSEntity entityB;
- float maxLength;
- float restitution;
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/CableComponentSystem.cpp b/OpenGLEngine/OpenGLEngine/CableComponentSystem.cpp
deleted file mode 100644
index 18a69ce..0000000
--- a/OpenGLEngine/OpenGLEngine/CableComponentSystem.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "CableComponentSystem.h"
-#include "TransformComponent.h"
-#include "ParticleContactComponent.h"
-
-namespace Reality
-{
- CableComponentSystem::CableComponentSystem()
- {
- requireComponent();
- }
-
- void CableComponentSystem::Update(float deltaTime)
- {
- for (auto e : getEntities())
- {
- auto& cable = e.getComponent();
- float length = glm::length(cable.entityA.getComponent().position -
- cable.entityB.getComponent().position);
-
- getWorld().data.renderUtil->DrawSphere(cable.entityA.getComponent().position, 1, Color::Magenta);
- getWorld().data.renderUtil->DrawSphere(cable.entityB.getComponent().position, 1, Color::Magenta);
-
- getWorld().data.renderUtil->DrawLine(cable.entityA.getComponent().position,
- cable.entityB.getComponent().position, Color::Blue);
-
- if (length < cable.maxLength)
- {
- continue;
- }
-
- Vector3 normal = glm::normalize(cable.entityB.getComponent().position -
- cable.entityA.getComponent().position);
-
- float penetration = length - cable.maxLength;
-
- auto contactEntity = getWorld().createEntity();
- contactEntity.addComponent(
- cable.entityA,
- cable.entityB,
- cable.restitution,
- normal,
- penetration);
- }
- }
-}
diff --git a/OpenGLEngine/OpenGLEngine/CableComponentSystem.h b/OpenGLEngine/OpenGLEngine/CableComponentSystem.h
deleted file mode 100644
index 78fd957..0000000
--- a/OpenGLEngine/OpenGLEngine/CableComponentSystem.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-#include "CableComponent.h"
-namespace Reality
-{
- class CableComponentSystem : public ECSSystem
- {
- public:
- CableComponentSystem();
- void Update(float deltaTime);
- };
-}
-
diff --git a/OpenGLEngine/OpenGLEngine/CameraLookComponent.h b/OpenGLEngine/OpenGLEngine/CameraLookComponent.h
deleted file mode 100644
index 80c44a4..0000000
--- a/OpenGLEngine/OpenGLEngine/CameraLookComponent.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-
-namespace Reality
-{
- struct CameraLookComponent
- {
- CameraLookComponent()
- {
-
- }
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/CameraLookSystem.cpp b/OpenGLEngine/OpenGLEngine/CameraLookSystem.cpp
deleted file mode 100644
index 420c611..0000000
--- a/OpenGLEngine/OpenGLEngine/CameraLookSystem.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "CameraLookSystem.h"
-#include "MouseMoveEvent.h"
-
-namespace Reality
-{
- CameraLookSystem::CameraLookSystem()
- {
- requireComponent();
- }
-
- void CameraLookSystem::Update(float deltaTime)
- {
- for (auto e : getEntities())
- {
- Camera& camera = getWorld().data.renderUtil->camera;
- auto mouseMoveEvents = getWorld().getEventManager().getEvents();
- for (auto event : mouseMoveEvents)
- {
- camera.ProcessMouseMovement(event.deltaX, event.deltaY);
- }
- }
- }
-}
diff --git a/OpenGLEngine/OpenGLEngine/ContactEvent.h b/OpenGLEngine/OpenGLEngine/ContactEvent.h
deleted file mode 100644
index c8ef717..0000000
--- a/OpenGLEngine/OpenGLEngine/ContactEvent.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-#include "RigidBodyComponent.h"
-
-namespace Reality
-{
- struct ContactEvent
- {
- ContactEvent(ECSEntity _bodyA = ECSEntity(), ECSEntity _bodyB = ECSEntity(), Vector3 _normal = Vector3(0, 0 , 0), float _penetrationDepth = 0, Vector3 _localPointOnShape1 = Vector3(0, 0, 0), Vector3 _localPointOnShape2 = Vector3(0, 0, 0), Vector3 _worldPoint1 = Vector3(0, 0, 0), Vector3 _worldPoint2 = Vector3(0, 0, 0), float _restitution = 1.0f)
- :entityA(_bodyA), entityB(_bodyB), normal(_normal), penetrationDepth(_penetrationDepth), localPointOnShape1(_localPointOnShape1), localPointOnShape2(_localPointOnShape2), worldPoint1(_worldPoint1), worldPoint2(_worldPoint2), restitution(_restitution)
- {
-
- }
-
- ECSEntity entityA;
-
- ECSEntity entityB;
-
- /// Normalized normal vector of the contact (from body1 toward body2) in world space
- Vector3 normal;
-
- /// Penetration depth
- float penetrationDepth;
-
- /// Contact point on proxy shape 1 in local-space of proxy shape 1
- Vector3 localPointOnShape1;
-
- /// Contact point on proxy shape 2 in local-space of proxy shape 2
- Vector3 localPointOnShape2;
-
- /// Contact point on proxy shape 1 in world-space
- Vector3 worldPoint1;
-
- /// Contact point on proxy shape 2 in world-space
- Vector3 worldPoint2;
-
- /// Coefficient Of restitution
- float restitution;
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/ContactGenerationSystem.cpp b/OpenGLEngine/OpenGLEngine/ContactGenerationSystem.cpp
deleted file mode 100644
index 3ecb9f3..0000000
--- a/OpenGLEngine/OpenGLEngine/ContactGenerationSystem.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "ContactGenerationSystem.h"
-
-namespace Reality
-{
- ContactGenerationSystem::ContactGenerationSystem(rp3d::CollisionWorld& _rp3dWorld) : rp3dWorld(_rp3dWorld)
- {
-
- }
-
- void ContactGenerationSystem::Update(float deltaTime)
- {
- if (contactReciever == nullptr)
- {
- contactReciever = new ContactInfoReciever(getWorld());
- }
- rp3dWorld.testCollision(contactReciever);
- }
-
- ContactGenerationSystem::~ContactGenerationSystem()
- {
- delete contactReciever;
- }
-}
diff --git a/OpenGLEngine/OpenGLEngine/ContactGenerationSystem.h b/OpenGLEngine/OpenGLEngine/ContactGenerationSystem.h
deleted file mode 100644
index 14c2b24..0000000
--- a/OpenGLEngine/OpenGLEngine/ContactGenerationSystem.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-#include "ContactInfoReciever.h"
-#include
-
-namespace Reality
-{
- class ContactGenerationSystem : public ECSSystem
- {
- public:
- ContactGenerationSystem(rp3d::CollisionWorld& _rp3dWorld);
- void Update(float deltaTime);
- ~ContactGenerationSystem();
- private:
- rp3d::CollisionWorld& rp3dWorld;
- ContactInfoReciever* contactReciever = nullptr;
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/ContactInfoReciever.h b/OpenGLEngine/OpenGLEngine/ContactInfoReciever.h
deleted file mode 100644
index f472fdd..0000000
--- a/OpenGLEngine/OpenGLEngine/ContactInfoReciever.h
+++ /dev/null
@@ -1,66 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-#include "ContactEvent.h"
-#include "RigidBodyData.h"
-#include
-#include
-#include
-namespace Reality
-{
- class ContactInfoReciever : public rp3d::CollisionCallback
- {
- public:
- ContactInfoReciever(ECSWorld& _world) : world(_world) {}
- ECSWorld& world;
- void notifyContact(const CollisionCallbackInfo& collisionCallbackInfo)
- {
- rp3d::ContactManifoldListElement * listElem = collisionCallbackInfo.contactManifoldElements;
- // For each contact manifold
- for (; listElem != nullptr; listElem = listElem->getNext()) {
- rp3d::ContactManifold * manifold = listElem->getContactManifold();
- // Get the contact point
- rp3d::ContactPoint * point = manifold->getContactPoints();
- // For each contact point of the manifold
- for (int i = 0; i < manifold->getNbContactPoints(); i++) {
- // Get the world - space contact point on body 1
- rp3d::Vector3 pos1 = point->getLocalPointOnShape1();
- // Get the world - space contact point on body 1
- rp3d::Vector3 pos2 = point->getLocalPointOnShape2();
- // Get the world - space contact normal
- rp3d::Vector3 normal = point->getNormal();
- normal.normalize();
- // Get the penetration
- rp3d::decimal penetration = point->getPenetrationDepth();
- // Get Body 1
- rp3d::CollisionBody* body1 = manifold->getBody1();
- assert(body1);
- RigidBodyData* bodyA = (RigidBodyData*)(manifold->getBody1()->getUserData());
- // Get Body 2
- rp3d::CollisionBody* body2 = manifold->getBody2();
- assert(body2);
- RigidBodyData* bodyB = (RigidBodyData*)(manifold->getBody2()->getUserData());
- // Get Collider 1
- rp3d::ProxyShape* shape1 = manifold->getShape1();
- assert(shape1);
- // Get Collider 2
- rp3d::ProxyShape* shape2 = manifold->getShape2();
- assert(shape2);
- // Get World Point 1
- rp3d::Vector3 worldPos1 = shape1->getLocalToWorldTransform() * pos1;
- // Get World Point 2
- rp3d::Vector3 worldPos2 = shape2->getLocalToWorldTransform() * pos2;
- // Create a contact event
- world.getEventManager().emitEvent(bodyA->entity, bodyB->entity,
- Vector3(normal.x, normal.y, normal.z),
- penetration,
- Vector3(pos1.x, pos1.y, pos1.z),
- Vector3(pos2.x, pos2.y, pos2.z),
- Vector3(worldPos1.x, worldPos1.y, worldPos1.z),
- Vector3(worldPos2.x, worldPos2.y, worldPos2.z));
- // Go to the next point in the list
- point = point->getNext();
- }
- }
- }
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/ContactResolutionSystem.cpp b/OpenGLEngine/OpenGLEngine/ContactResolutionSystem.cpp
deleted file mode 100644
index 5999763..0000000
--- a/OpenGLEngine/OpenGLEngine/ContactResolutionSystem.cpp
+++ /dev/null
@@ -1,225 +0,0 @@
-#include "ContactResolutionSystem.h"
-#include "TransformComponentV2.h"
-#include "RigidBodyComponent.h"
-#include
-
-namespace Reality
-{
-
- ContactResolutionSystem::ContactResolutionSystem(rp3d::CollisionWorld& _rp3dWorld) : rp3dWorld(_rp3dWorld)
- {
- }
-
- void ContactResolutionSystem::Update(float deltaTime)
- {
- auto contactEvents = getWorld().getEventManager().getEvents();
- for (auto& contact : contactEvents)
- {
- ResolvePenetration(contact);
- ResolveVelocity(contact);
- }
- getWorld().data.renderUtil->RenderText("Num Contacts = " + to_string(contactEvents.size()), 1920 * 0.5f - 100, 1080 * 0.5f, 0.5f, Color::Red);
- }
- void ContactResolutionSystem::ResolvePenetration(ContactEvent & contact)
- {
- // Get Rigidbodies involved
- auto& rbA = contact.entityA.getComponent();
- auto& rbB = contact.entityB.getComponent();
- auto& transformA = contact.entityA.getComponent();
- auto& transformB = contact.entityB.getComponent();
-
- // Calculate contact point as avg
- Vector3 contactPoint = (contact.worldPoint1 + contact.worldPoint2) * 0.5f;
-
- // Relative Positions
- Vector3 relativePositionA = contact.worldPoint1 - transformA.GetPosition();
- Vector3 relativePositionB = contact.worldPoint2 - transformB.GetPosition();
- contact.normal *= -1;
- // World Inertia Tensors
- Mat3 worldInvInertiaTensorA = rbA.worldInverseInertiaTensor(transformA.GetRotationMatrix());
- Mat3 worldInvInertiaTensorB = rbB.worldInverseInertiaTensor(transformB.GetRotationMatrix());
-
- float totalInertia = 0;
-
- Vector3 angularInertiaWorldA = glm::cross(relativePositionA, contact.normal);
- angularInertiaWorldA = worldInvInertiaTensorA * angularInertiaWorldA;
- angularInertiaWorldA = glm::cross(angularInertiaWorldA, relativePositionA);
-
- float angularInertiaA = glm::dot(angularInertiaWorldA, contact.normal);
- float linearInertiaA = rbA.inverseMass;
- totalInertia += angularInertiaA + linearInertiaA;
-
- Vector3 angularInertiaWorldB = glm::cross(relativePositionB, contact.normal);
- angularInertiaWorldB = worldInvInertiaTensorB * angularInertiaWorldB;
- angularInertiaWorldB = glm::cross(angularInertiaWorldB, relativePositionB);
-
- float angularInertiaB = glm::dot(angularInertiaWorldB, contact.normal);
- float linearInertiaB = rbB.inverseMass;
- totalInertia += angularInertiaB + linearInertiaB;
-
- // Total Moves
- float inverseInertia = 1 / totalInertia;
- float linearMoveA = contact.penetrationDepth * linearInertiaA * inverseInertia;
- float linearMoveB = -contact.penetrationDepth * linearInertiaB * inverseInertia;
- float angularMoveA = contact.penetrationDepth * angularInertiaA * inverseInertia;
- float angularMoveB = -contact.penetrationDepth * angularInertiaB * inverseInertia;
-
- float limitA = angularLimitConstant * glm::length(relativePositionA);
- if (abs(angularMoveA) > limitA)
- {
- float totalMoveA = linearMoveA + angularMoveA;
- // Set the new angular move, with the same sign as before.
- if (angularMoveA >= 0)
- {
- angularMoveA = limitA;
- } else
- {
- angularMoveA = -limitA;
- }
- // Make the linear move take the extra slack.
- linearMoveA = totalMoveA - angularMoveA;
- }
-
- float limitB = angularLimitConstant * glm::length(relativePositionB);
- if (abs(angularMoveB) > limitB)
- {
- float totalMoveB = linearMoveB + angularMoveB;
- // Set the new angular move, with the same sign as before.
- if (angularMoveB >= 0)
- {
- angularMoveB = limitB;
- }
- else
- {
- angularMoveB = -limitB;
- }
- // Make the linear move take the extra slack.
- linearMoveB = totalMoveB - angularMoveB;
- }
-
- // Update Linear Moves
- transformA.SetPosition(transformA.GetPosition() + contact.normal * linearMoveA);
- transformB.SetPosition(transformB.GetPosition() + contact.normal * linearMoveB);
-
- // Update Rotational Moves
- // A
- Vector3 impulsiveTorqueA = glm::cross(relativePositionA, contact.normal);
- Vector3 impulsePerMoveA = worldInvInertiaTensorA * impulsiveTorqueA;
-
- Vector3 rotationPerMoveA = impulsePerMoveA * (1 / angularInertiaA);
- Vector3 rotationA = rotationPerMoveA * angularMoveA;
-
- glm::quat rotationQuatA = glm::quat(0, rotationA.x, rotationA.y, rotationA.z);
- transformA.SetOrientation(glm::normalize(transformA.GetOrientation() + 0.5f * rotationQuatA * transformA.GetOrientation()));
-
- // B
- Vector3 impulsiveTorqueB = glm::cross(relativePositionB, contact.normal);
- Vector3 impulsePerMoveB = worldInvInertiaTensorB * impulsiveTorqueB;
-
- Vector3 rotationPerMoveB = impulsePerMoveB * (1 / angularInertiaB);
- Vector3 rotationB = rotationPerMoveB * angularMoveB;
-
- glm::quat rotationQuatB = glm::quat(0, rotationB.x, rotationB.y, rotationB.z);
- transformB.SetOrientation(glm::normalize(transformB.GetOrientation() + 0.5f * rotationQuatB * transformB.GetOrientation()));
- contact.normal *= -1;
-
- }
- void ContactResolutionSystem::ResolveVelocity(ContactEvent & contact)
- {
- // Get Rigidbodies involved
- auto& rbA = contact.entityA.getComponent();
- auto& rbB = contact.entityB.getComponent();
- auto& transformA = contact.entityA.getComponent();
- auto& transformB = contact.entityB.getComponent();
-
- // Calculate contact point as avg
- Vector3 contactPoint = (contact.worldPoint1 + contact.worldPoint2) * 0.5f;
-
- // Calculate contact point basis
- Vector3 contactY;
- Vector3 contactZ;
- Mat3 contactLocalToWorld = Mat3(1.0f);
- CalculateContactBasis(contact.normal, contactLocalToWorld, contactY, contactZ);
- getWorld().data.renderUtil->DrawLine(contactPoint, contactPoint + 5.0f * contact.normal, Color::Red);
- getWorld().data.renderUtil->DrawLine(contactPoint, contactPoint + 5.0f * contactY, Color::Green);
- getWorld().data.renderUtil->DrawLine(contactPoint, contactPoint + 5.0f * contactZ, Color::Blue);
-
- // Relative Positions
- Vector3 relativePositionA = contact.worldPoint1 - transformA.GetPosition();
- Vector3 relativePositionB = contact.worldPoint2 - transformB.GetPosition();
-
- // World Inertia Tensors
- Mat3 worldInvInertiaTensorA = rbA.worldInverseInertiaTensor(transformA.GetRotationMatrix());
- Mat3 worldInvInertiaTensorB = rbB.worldInverseInertiaTensor(transformB.GetRotationMatrix());
-
- // Calculate velocity Per Unit Impulse
- // Body A
- Vector3 torquePerUnitImpulseA = glm::cross(relativePositionA, contact.normal);
- Vector3 rotationPerUnitImpulseA = worldInvInertiaTensorA * torquePerUnitImpulseA;
- Vector3 deltaVelWorldA = glm::cross(rotationPerUnitImpulseA, relativePositionA);
-
- float deltaVel = glm::dot(deltaVelWorldA, contact.normal);
- deltaVel += rbA.inverseMass;
-
- // Body B
- Vector3 torquePerUnitImpulseB = glm::cross(relativePositionB, contact.normal);
- Vector3 rotationPerUnitImpulseB = worldInvInertiaTensorB * torquePerUnitImpulseB;
- Vector3 deltaVelWorldB = glm::cross(rotationPerUnitImpulseB, relativePositionB);
-
- deltaVel += glm::dot(deltaVelWorldB, contact.normal);
- deltaVel += rbB.inverseMass;
-
- // Closing Velocity
- Vector3 velocityA = glm::cross(rbA.angularVelocity, relativePositionA);
- velocityA += rbA.velocity;
-
- Vector3 velocityB = glm::cross(rbB.angularVelocity, relativePositionB);
- velocityB += rbB.velocity;
-
- Vector3 closingVelocityWorld = velocityA - velocityB;
- Vector3 closingVelocityLocal = glm::transpose(contactLocalToWorld) * closingVelocityWorld;
-
- if (closingVelocityLocal.x < 0)
- {
- return;
- }
- // Delta Velocity and impulse
- float desiredDeltaVelocityLocal = -closingVelocityLocal.x * (1 + 0.4f);
- Vector3 impulseContact = Vector3(desiredDeltaVelocityLocal / deltaVel, 0, 0);
- Vector3 impulseA = contactLocalToWorld * impulseContact;
- Vector3 impulseB = -impulseA;
-
- // Calculate Velocity Change
- // A
- Vector3 velocityChangeA = impulseA * rbA.inverseMass;
- Vector3 rotationalTorqueA = glm::cross(relativePositionA, impulseA);
- Vector3 angularVelocityChangeA = worldInvInertiaTensorA * rotationalTorqueA;
- rbA.velocity += velocityChangeA;
- rbA.angularVelocity += angularVelocityChangeA;
- // B
- Vector3 velocityChangeB = impulseB * rbB.inverseMass;
- Vector3 rotationalTorqueB = glm::cross(relativePositionB, impulseB);
- Vector3 angularVelocityChangeB = worldInvInertiaTensorB * rotationalTorqueB;
- rbB.velocity += velocityChangeB;
- rbB.angularVelocity += angularVelocityChangeB;
-
- // Debug Drawing
- getWorld().data.renderUtil->DrawSphere(contact.worldPoint1, 0.4f, Color::Red);
- getWorld().data.renderUtil->DrawSphere(contact.worldPoint2, 0.4f, Color::Blue);
- getWorld().data.renderUtil->DrawLine(contact.worldPoint1, contact.worldPoint2, Color::Beige);
- }
- void ContactResolutionSystem::CalculateContactBasis(Vector3 contactNormal, Mat3 & transformationMat, Vector3 & y, Vector3 & z)
- {
- Vector3 possibleYAxis = Vector3(0, 1.0f, 0);
- if (glm::length(glm::cross(possibleYAxis, contactNormal)) <= 0.01f)
- {
- possibleYAxis = Vector3(0, 0, 1.0f);
- }
- z = glm::normalize(glm::cross(contactNormal, possibleYAxis));
- y = glm::normalize(glm::cross(z, contactNormal));
-
- transformationMat = Mat3(contactNormal.x, contactNormal.y, contactNormal.z,
- y.x, y.y, y.z,
- z.x, z.y, z.z);
- }
-}
diff --git a/OpenGLEngine/OpenGLEngine/ContactResolutionSystem.h b/OpenGLEngine/OpenGLEngine/ContactResolutionSystem.h
deleted file mode 100644
index 2b70f08..0000000
--- a/OpenGLEngine/OpenGLEngine/ContactResolutionSystem.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-#include "ContactEvent.h"
-#include
-
-namespace Reality
-{
- class ContactResolutionSystem : public ECSSystem
- {
- public:
- ContactResolutionSystem(rp3d::CollisionWorld& _rp3dWorld);
- void Update(float deltaTime);
- rp3d::CollisionWorld& rp3dWorld;
- float angularLimitConstant = 0.2f;
- private:
- void ResolvePenetration(ContactEvent& contact);
- void ResolveVelocity(ContactEvent& contact);
- void CalculateContactBasis(Vector3 contactNormal, Mat3& transformationMat, Vector3& y, Vector3& z);
- };
-}
\ No newline at end of file
diff --git a/OpenGLEngine/OpenGLEngine/FixedSpringComponent.h b/OpenGLEngine/OpenGLEngine/FixedSpringComponent.h
deleted file mode 100644
index b8b312b..0000000
--- a/OpenGLEngine/OpenGLEngine/FixedSpringComponent.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-
-namespace Reality
-{
- struct FixedSpringComponent
- {
- FixedSpringComponent(float _springConstant = 10, float _restLength = 10, ECSEntity e = ECSEntity())
- :springConstant(_springConstant), restLength(_restLength), entity(e){}
- float springConstant;
- float restLength;
- ECSEntity entity;
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/FixedSpringForceGeneratorSystem.cpp b/OpenGLEngine/OpenGLEngine/FixedSpringForceGeneratorSystem.cpp
deleted file mode 100644
index 01f799b..0000000
--- a/OpenGLEngine/OpenGLEngine/FixedSpringForceGeneratorSystem.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-#include "FixedSpringForceGeneratorSystem.h"
-#include "ParticleComponent.h"
-
-namespace Reality
-{
- FixedSpringForceGeneratorSystem::FixedSpringForceGeneratorSystem()
- {
- requireComponent();
- requireComponent();
- }
-
-
- void FixedSpringForceGeneratorSystem::Update(float deltaTime)
- {
- for (auto e : getEntities())
- {
- auto &transform = e.getComponent();
- auto &spring = e.getComponent();
-
- if (spring.entity.hasComponent() &&
- spring.entity.hasComponent())
- {
- auto &particle = spring.entity.getComponent();
- auto &entityTransform = spring.entity.getComponent();
-
- Vector3 relativePosition = entityTransform.position - transform.position;
- float length = glm::length(relativePosition);
- float x = length - spring.restLength;
- Vector3 direction = glm::normalize(relativePosition);
-
- particle.AddForce(-spring.springConstant * x * direction);
-
- /*
- float g = 1.0f / (1.0f + pow(abs(x), 0.5f));
- float r = 1 - g;
-
- Color color = Color(r, g, 0, 1);
-
- float deltaLength = length / 10.0f;
- for (int i = 0; i < 10; i++)
- {
- getWorld().data.renderUtil->DrawCube(
- transform.position + (float)i * deltaLength * direction,
- Vector3(0.1f, 0.1f, 0.1f) * min((spring.springConstant / 10.0f), 5.0f), Vector3(0,0,0), color);
- }
-
- getWorld().data.renderUtil->DrawLine(
- transform.position, transform.position + length * direction, color);*/
- }
- }
-
- }
-}
diff --git a/OpenGLEngine/OpenGLEngine/FlighSimulatorComponent.h b/OpenGLEngine/OpenGLEngine/FlighSimulatorComponent.h
deleted file mode 100644
index 6d4420c..0000000
--- a/OpenGLEngine/OpenGLEngine/FlighSimulatorComponent.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-
-namespace Reality
-{
- struct FlighSimulatorComponent
- {
- FlighSimulatorComponent(Vector3 _propulsion = Vector3(0.0f ,0.0f, 1000.0f))
- :propulsion(_propulsion)
- {
-
- }
- Vector3 propulsion;
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/FlightSimulatorSystem.cpp b/OpenGLEngine/OpenGLEngine/FlightSimulatorSystem.cpp
deleted file mode 100644
index a2ff9d5..0000000
--- a/OpenGLEngine/OpenGLEngine/FlightSimulatorSystem.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "FlightSimulatorSystem.h"
-#include "LifeTimeComponent.h"
-
-namespace Reality
-{
- FlightSimulatorSystem::FlightSimulatorSystem()
- {
- requireComponent();
- requireComponent();
- requireComponent();
- }
-
- void FlightSimulatorSystem::Update(float deltaTime)
- {
- timer += deltaTime;
- for (auto e : getEntities())
- {
- auto& rigidbody = e.getComponent();
- auto& transform = e.getComponent();
- auto& flight = e.getComponent();
-
- rigidbody.AddForce(transform.LocalToWorldDirection(flight.propulsion));
- //rigidbody.AddForce(Vector3(0, -10, 0));
-
- // smoke
- if (timer > 0.1f)
- {
- /*for (int i = 0; i < 3; i++)
- {
- auto e = getWorld().createEntity();
- e.addComponent(transform.GetPosition() + Vector3(RANDOM_FLOAT(-5.0f, 5.0f), RANDOM_FLOAT(-5.0f, 5.0f), RANDOM_FLOAT(-5.0f, 5.0f)) - transform.Forward() * 15.0f);
- e.addComponent(7.0f);
- }*/
- auto e = getWorld().createEntity();
- e.addComponent(transform.GetPosition() - transform.Forward() * 15.0f);
- e.addComponent(7.0f);
- timer = 0;
- }
- }
-
- if (getEntities().size() > 0)
- {
- float width = getWorld().data.renderUtil->window->width;
- float height = getWorld().data.renderUtil->window->height;
-
- getWorld().data.renderUtil->RenderText("W , S - Pitch Controls", width / 2 - 100.0f, 60.0f, 0.4f, Color::Orange);
- getWorld().data.renderUtil->RenderText("A , D - Yaw Controls", width / 2 - 100.0f, 35.0f, 0.4f, Color::Orange);
- getWorld().data.renderUtil->RenderText("Q , E - Roll Controls", width / 2 - 100.0f, 10.0f, 0.4f, Color::Orange);
- }
-
- }
-}
diff --git a/OpenGLEngine/OpenGLEngine/FlightSimulatorSystem.h b/OpenGLEngine/OpenGLEngine/FlightSimulatorSystem.h
deleted file mode 100644
index 67dcc5c..0000000
--- a/OpenGLEngine/OpenGLEngine/FlightSimulatorSystem.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-#include "FlighSimulatorComponent.h"
-#include "RigidBodyComponent.h"
-#include "TransformComponentV2.h"
-
-namespace Reality
-{
- class FlightSimulatorSystem : public ECSSystem
- {
- public:
- FlightSimulatorSystem();
- void Update(float deltaTime);
- private:
- float timer = 0;
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/FollowCameraComponent.h b/OpenGLEngine/OpenGLEngine/FollowCameraComponent.h
deleted file mode 100644
index d78cb5c..0000000
--- a/OpenGLEngine/OpenGLEngine/FollowCameraComponent.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-
-namespace Reality
-{
- struct FollowCameraComponent
- {
- FollowCameraComponent(Vector3 _follow = Vector3(0.0f, 20.0f, 0.0f))
- :follow(_follow)
- {
-
- }
- Vector3 follow;
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/FollowCameraSystem.cpp b/OpenGLEngine/OpenGLEngine/FollowCameraSystem.cpp
deleted file mode 100644
index 2a7fb5a..0000000
--- a/OpenGLEngine/OpenGLEngine/FollowCameraSystem.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "FollowCameraSystem.h"
-
-namespace Reality
-{
- FollowCameraSystem::FollowCameraSystem()
- {
- requireComponent();
- requireComponent();
- }
-
- void FollowCameraSystem::Update(float deltaTime)
- {
- Camera& cam = getWorld().data.renderUtil->camera;
- for (auto e : getEntities())
- {
- auto& follow = e.getComponent();
- auto& transform = e.getComponent();
- getWorld().data.renderUtil->camera.Position = transform.GetPosition() + /*transform.LocalToWorldDirection(follow.follow)*/ - cam.Front * 100.0f;
- }
- }
-}
diff --git a/OpenGLEngine/OpenGLEngine/FollowCameraSystem.h b/OpenGLEngine/OpenGLEngine/FollowCameraSystem.h
deleted file mode 100644
index 2ce6a43..0000000
--- a/OpenGLEngine/OpenGLEngine/FollowCameraSystem.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-#include "FollowCameraComponent.h"
-#include "TransformComponentV2.h"
-
-namespace Reality
-{
- class FollowCameraSystem : public ECSSystem
- {
- public:
- FollowCameraSystem();
- void Update(float deltaTime);
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/ForceAccumulatorSystem.cpp b/OpenGLEngine/OpenGLEngine/ForceAccumulatorSystem.cpp
deleted file mode 100644
index d1bbb3d..0000000
--- a/OpenGLEngine/OpenGLEngine/ForceAccumulatorSystem.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "ForceAccumulatorSystem.h"
-
-
-namespace Reality
-{
- ForceAccumulatorSystem::ForceAccumulatorSystem()
- {
- requireComponent();
- }
-
-
- void ForceAccumulatorSystem::Update(float deltaTime)
- {
- for (auto e : getEntities())
- {
- auto &particle = e.getComponent();
- particle.accelaration = particle.GetForce() * particle.inverseMass;
- particle.ResetForceAccumulator();
- }
- }
-}
diff --git a/OpenGLEngine/OpenGLEngine/ForceAndTorqueAccumulatorSystem.cpp b/OpenGLEngine/OpenGLEngine/ForceAndTorqueAccumulatorSystem.cpp
deleted file mode 100644
index 3b91bdb..0000000
--- a/OpenGLEngine/OpenGLEngine/ForceAndTorqueAccumulatorSystem.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "ForceAndTorqueAccumulatorSystem.h"
-
-namespace Reality
-{
- ForceAndTorqueAccumulatorSystem::ForceAndTorqueAccumulatorSystem()
- {
- requireComponent();
- requireComponent();
- }
-
- void ForceAndTorqueAccumulatorSystem::Update(float deltaTime)
- {
- for (auto e : getEntities())
- {
- auto &rigidbody = e.getComponent();
- auto &transform = e.getComponent();
-
- rigidbody.accelaration = rigidbody.GetForce() * rigidbody.inverseMass;
- rigidbody.ResetForceAccumulator();
-
- Mat3 rotMat = transform.GetRotationMatrix();
- rigidbody.angularAccelaration = rigidbody.worldInverseInertiaTensor(rotMat)
- * rigidbody.GetTorque();
- rigidbody.ResetTorqueAccumulator();
- }
- }
-}
diff --git a/OpenGLEngine/OpenGLEngine/ForceAndTorqueAccumulatorSystem.h b/OpenGLEngine/OpenGLEngine/ForceAndTorqueAccumulatorSystem.h
deleted file mode 100644
index d4f0221..0000000
--- a/OpenGLEngine/OpenGLEngine/ForceAndTorqueAccumulatorSystem.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-#include "RigidBodyComponent.h"
-#include "TransformComponentV2.h"
-
-namespace Reality
-{
- class ForceAndTorqueAccumulatorSystem : public ECSSystem
- {
- public:
- ForceAndTorqueAccumulatorSystem();
- void Update(float deltaTime);
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/GravityForceGeneratorSystem.cpp b/OpenGLEngine/OpenGLEngine/GravityForceGeneratorSystem.cpp
deleted file mode 100644
index c1df543..0000000
--- a/OpenGLEngine/OpenGLEngine/GravityForceGeneratorSystem.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "GravityForceGeneratorSystem.h"
-
-
-namespace Reality
-{
- GravityForceGeneratorSystem::GravityForceGeneratorSystem()
- {
- requireComponent();
- }
-
-
- void GravityForceGeneratorSystem::Update(float deltaTime)
- {
- for (auto e : getEntities())
- {
- auto &particle = e.getComponent();
- particle.AddForce(gravity * particle.gravityScale / particle.inverseMass);
- }
-
- }
-}
diff --git a/OpenGLEngine/OpenGLEngine/InfiniteSpawnComponent.h b/OpenGLEngine/OpenGLEngine/InfiniteSpawnComponent.h
deleted file mode 100644
index 8a81892..0000000
--- a/OpenGLEngine/OpenGLEngine/InfiniteSpawnComponent.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-
-namespace Reality
-{
- struct InfiniteSpawnComponent
- {
- InfiniteSpawnComponent(float _height = 0)
- : height(_height)
- {
-
- }
- float height;
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/InfiniteSpawnSystem.cpp b/OpenGLEngine/OpenGLEngine/InfiniteSpawnSystem.cpp
deleted file mode 100644
index ae10ce8..0000000
--- a/OpenGLEngine/OpenGLEngine/InfiniteSpawnSystem.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-#include "InfiniteSpawnSystem.h"
-#include "SpawnTargetEvent.h"
-
-namespace Reality
-{
- InfiniteSpawnSystem::InfiniteSpawnSystem()
- {
- requireComponent();
- requireComponent();
- }
-
- void InfiniteSpawnSystem::Update(float deltaTime)
- {
- auto targetEvents = getWorld().getEventManager().getEvents();
-
- if (targetEvents.size() > 0)
- {
- Vector3 target = targetEvents[0].targetPos;
-
- for (auto e : getEntities())
- {
- auto& spawn = e.getComponent();
- auto& transform = e.getComponent();
-
- if (abs(target.z - transform.GetPosition().z) > 2050.0f)
- {
- transform.SetPosition(transform.GetPosition() + (target.z > transform.GetPosition().z ? 4050.0f : -4050.0f) * Vector3(0, 0, 1));
- spawn.height = RANDOM_FLOAT(100.0f, 500.0f);
- }
- getWorld().data.renderUtil->DrawCube(transform.GetPosition() + spawn.height * 0.5f * Vector3(0, 1, 0), Vector3(50.0f, spawn.height, 50.0f));
- }
- }
- }
-}
diff --git a/OpenGLEngine/OpenGLEngine/InfiniteSpawnSystem.h b/OpenGLEngine/OpenGLEngine/InfiniteSpawnSystem.h
deleted file mode 100644
index cb95b34..0000000
--- a/OpenGLEngine/OpenGLEngine/InfiniteSpawnSystem.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-#include "InfiniteSpawnComponent.h"
-#include "TransformComponentV2.h"
-
-namespace Reality
-{
- class InfiniteSpawnSystem : public ECSSystem
- {
- public:
- InfiniteSpawnSystem();
- void Update(float deltaTime);
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/InfiniteSpawnTargetComponent.h b/OpenGLEngine/OpenGLEngine/InfiniteSpawnTargetComponent.h
deleted file mode 100644
index 317a9ad..0000000
--- a/OpenGLEngine/OpenGLEngine/InfiniteSpawnTargetComponent.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-
-namespace Reality
-{
- struct InfiniteSpawnTargetComponent
- {
- InfiniteSpawnTargetComponent()
- {
-
- }
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/InfiniteSpawnTargetSystem.cpp b/OpenGLEngine/OpenGLEngine/InfiniteSpawnTargetSystem.cpp
deleted file mode 100644
index 5434839..0000000
--- a/OpenGLEngine/OpenGLEngine/InfiniteSpawnTargetSystem.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "InfiniteSpawnTargetSystem.h"
-#include "SpawnTargetEvent.h"
-
-namespace Reality
-{
- InfiniteSpawnTargetSystem::InfiniteSpawnTargetSystem()
- {
- requireComponent();
- requireComponent();
- }
-
- void InfiniteSpawnTargetSystem::Update(float deltaTime)
- {
- for (auto e : getEntities())
- {
- auto& transform = e.getComponent();
- getWorld().getEventManager().emitEvent(transform.GetPosition());
- }
- }
-}
diff --git a/OpenGLEngine/OpenGLEngine/InfiniteSpawnTargetSystem.h b/OpenGLEngine/OpenGLEngine/InfiniteSpawnTargetSystem.h
deleted file mode 100644
index 7694392..0000000
--- a/OpenGLEngine/OpenGLEngine/InfiniteSpawnTargetSystem.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-#include "InfiniteSpawnTargetComponent.h"
-#include "TransformComponentV2.h"
-
-namespace Reality
-{
- class InfiniteSpawnTargetSystem : public ECSSystem
- {
- public:
- InfiniteSpawnTargetSystem();
- void Update(float deltaTime);
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/LifeTimeComponent.h b/OpenGLEngine/OpenGLEngine/LifeTimeComponent.h
deleted file mode 100644
index 0173690..0000000
--- a/OpenGLEngine/OpenGLEngine/LifeTimeComponent.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-
-namespace Reality
-{
- struct LifeTimeComponent
- {
- LifeTimeComponent(float _maxTime = 10)
- :maxTime(_maxTime), timer(0), startSize(RANDOM_FLOAT(1.0f, 3.0f)), size(0)
- {
-
- }
- float maxTime;
- float timer;
- float startSize;
- float size;
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/LifeTimeSystem.cpp b/OpenGLEngine/OpenGLEngine/LifeTimeSystem.cpp
deleted file mode 100644
index b188084..0000000
--- a/OpenGLEngine/OpenGLEngine/LifeTimeSystem.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "LifeTimeSystem.h"
-
-namespace Reality
-{
- LifeTimeSystem::LifeTimeSystem()
- {
- requireComponent();
- requireComponent();
- }
-
- void LifeTimeSystem::Update(float deltaTime)
- {
- for (auto e : getEntities())
- {
- auto& life = e.getComponent();
- auto& transform = e.getComponent();
-
- life.timer += deltaTime;
- life.size = life.startSize + 10.0f * pow(life.timer, 0.5f);
- getWorld().data.renderUtil->DrawSphere(transform.GetPosition(), life.size, Color::Yellow);
- if (life.timer > life.maxTime)
- {
- e.kill();
- }
- }
- }
-}
diff --git a/OpenGLEngine/OpenGLEngine/LifeTimeSystem.h b/OpenGLEngine/OpenGLEngine/LifeTimeSystem.h
deleted file mode 100644
index 17b76fb..0000000
--- a/OpenGLEngine/OpenGLEngine/LifeTimeSystem.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once
-#include "ECSConfig.h"
-#include "LifeTimeComponent.h"
-#include "TransformComponentV2.h"
-
-namespace Reality
-{
- class LifeTimeSystem : public ECSSystem
- {
- public:
- LifeTimeSystem();
- void Update(float deltaTime);
- };
-}
diff --git a/OpenGLEngine/OpenGLEngine/Main.cpp b/OpenGLEngine/OpenGLEngine/Main.cpp
deleted file mode 100644
index 91a5161..0000000
--- a/OpenGLEngine/OpenGLEngine/Main.cpp
+++ /dev/null
@@ -1,651 +0,0 @@
-//#define STB_IMAGE_IMPLEMENTATION
-#include "UpdateTransformMatricesSystem.h"
-#include "RenderingSystem.h"
-#include "RenderingSystemV2.h"
-#include "InputEventSystem.h"
-#include "RotateSystem.h"
-#include "ParticleSystem.h"
-#include "ParticleSpawnerSystem.h"
-#include "GravityForceGeneratorSystem.h"
-#include "FixedSpringForceGeneratorSystem.h"
-#include "ForceAccumulatorSystem.h"
-#include "PairedSpringForceGeneratorSystem.h"
-#include "SphereContactGeneratorSystem.h"
-#include "ParticleContactResolutionSystem.h"
-#include "CableComponentSystem.h"
-#include "RodSystem.h"
-#include "ForceAndTorqueAccumulatorSystem.h"
-#include "RigidBodySystem.h"
-#include "RigidbodyGravityForceGeneratorSystem.h"
-#include "ContactGenerationSystem.h"
-#include "ContactResolutionSystem.h"
-#include "SphereColliderSystem.h"
-#include "BoxColliderSystem.h"
-#include "MoveInBoundsSystem.h"
-#include "FPSControlSystem.h"
-#include "DynamicDirectionalLightSystem.h"
-#include "DynamicPointLightSystem.h"
-#include "DynamicSpotLightSystem.h"
-#include "FlightSimulatorSystem.h"
-#include "FollowCameraSystem.h"
-#include "InfiniteSpawnSystem.h"
-#include "InfiniteSpawnTargetSystem.h"
-#include "AeroControlSystem.h"
-#include "SetAerodynamicTensorSystem.h"
-#include "AeroSystem.h"
-#include "CameraLookSystem.h"
-#include "LifeTimeSystem.h"
-#include
-#include
-#include
-
-#define DEBUG_LOG_LEVEL 3
-
-using namespace Reality;
-
-void LoadShaders(ECSWorld& world);
-void LoadModels(ECSWorld& world);
-void MakeABunchaObjects(ECSWorld& world);
-void MakeABunchaSprings(ECSWorld& world);
-void MakeABunchaSpheres(ECSWorld& world);
-void MakeACable(ECSWorld& world);
-void MakeCablesAndRods(ECSWorld& world);
-void MakeFlight(ECSWorld& world);
-void TestContacts(ECSWorld& world);
-void TestCollision(ECSWorld& world);
-void SetupLights(ECSWorld& world);
-
-int main()
-{
- ECSWorld world;
-
- // Init and Load
- world.data.InitRendering();
- //LoadAssets(world);
-
- world.data.renderUtil->camera.Position = Vector3(0, 15.0f, 100.0f);
- world.data.renderUtil->SetFOV(60);
- // Create entities
-
- // Make a player controller
- auto e = world.createEntity();
- e.addComponent();
-
- //auto wall = world.createEntity();
- //wall.addComponent(Vector3(0, -3.0f, 0.0f), Vector3(0.1f, 0.1f, 0.1f), Vector3(0, 270, 0));
- //// Add mesh
- //wall.addComponent("Resources/Models/Sponza-master/sponza.obj");
-
- SetupLights(world);
- //MakeABunchaObjects(world);
- //MakeABunchaSpheres(world);
- //MakeABunchaSprings(world);
- //MakeACable(world);
- //akeCablesAndRods(world);
- //MakeFlight(world);
- //TestContacts(world);
- TestCollision(world);
-
- // Create Systems
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
- world.getSystemManager().addSystem();
-
- // Rigidbody Physics
- rp3d::CollisionWorld rp3dWorld;
- world.getSystemManager().addSystem(rp3dWorld);
- world.getSystemManager().addSystem(rp3dWorld);
- world.getSystemManager().addSystem(rp3dWorld);
- world.getSystemManager().addSystem(rp3dWorld);
- world.getSystemManager().addSystem(rp3dWorld);
- world.getSystemManager().addSystem();
-
-
- float time = glfwGetTime();
- float stepTime = glfwGetTime();
- float deltaTime = 0;
- float elapsedDeltaTime = 0;
- float logicDelta = 0;
- float debugDelta = 0;
-
- LoadShaders(world);
- bool shadersLoaded = false;
- bool modelsLoadStarted = false;
- // game loop
- // -----------
- while (!glfwWindowShouldClose(world.data.renderUtil->window->glfwWindow))
- {
- float current = glfwGetTime();
- deltaTime = current - time;
- deltaTime = 1 / 60.0f;
- time = glfwGetTime();
-
- world.update();
-
- // Poll OpenGl events
- glfwPollEvents();
-
- world.data.renderUtil->ClearDisplay(world.data.renderUtil->window->glfwWindow);
-
- // Load
- if (!shadersLoaded)
- {
- shadersLoaded = world.data.assetLoader->ShadersLoaded();
- }
- if(shadersLoaded && !modelsLoadStarted)
- {
- LoadModels(world);
- modelsLoadStarted = true;
- }
- // Update View
- world.data.renderUtil->UpdateViewMatrix();
- // Process Input
- world.getSystemManager().getSystem().Update(deltaTime);
-
- // Game Logic Update
- world.getSystemManager().getSystem().Update(deltaTime);
- world.getSystemManager().getSystem().Update(deltaTime);
- world.getSystemManager().getSystem().Update(deltaTime);
- world.getSystemManager().getSystem().Update(deltaTime);
-
- //Flight Sim
- world.getSystemManager().getSystem().Update(deltaTime);
- world.getSystemManager().getSystem().Update(deltaTime);
- world.getSystemManager().getSystem().Update(deltaTime);
- world.getSystemManager().getSystem().Update(deltaTime);
- world.getSystemManager().getSystem().Update(deltaTime);
- world.getSystemManager().getSystem().Update(deltaTime);
- world.getSystemManager().getSystem().Update(deltaTime);
- world.getSystemManager().getSystem().Update(deltaTime);
-
- // Update Transform
- world.getSystemManager().getSystem().Update(deltaTime);
- // Physics
- float fixedDeltaTime = glfwGetKey(world.data.renderUtil->window->glfwWindow, GLFW_KEY_SPACE) == GLFW_PRESS ? 1 / 60.0f : 0;
- //float fixedDeltaTime = 1 / 60.0f;
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
- // Particle Force Generators
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
- // Rigiidbody Force Generators and collisions
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
- // Physics Solvers
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
-
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
- world.getSystemManager().getSystem().Update(fixedDeltaTime);
-
- // Rendering Update
- world.getSystemManager().getSystem().Update(deltaTime);
- world.getSystemManager().getSystem().Update(deltaTime);
- world.getSystemManager().getSystem().Update(deltaTime);
- world.getSystemManager().getSystem().Update(deltaTime);
- world.getSystemManager().getSystem().Update(deltaTime);
-
- elapsedDeltaTime = glfwGetTime() - time;
- logicDelta = elapsedDeltaTime - world.data.renderUtil->GetRenderDelta();
- stepTime = glfwGetTime();
-
- // Debug
- if (DEBUG_LOG_LEVEL > 0)
- {
- world.data.renderUtil->RenderText("FPS : " + std::to_string((int)round(1.0f / deltaTime)), 1810.0f, 1060.0f, 0.5f, Color(0, 1, 1, 1));
- }
- if (DEBUG_LOG_LEVEL > 1)
- {
- int logic = (int)round(logicDelta * 100.0f / deltaTime);
- std::string logicString = logic < 10 ? " " + std::to_string(logic) : std::to_string(logic);
- int render = (int)round(world.data.renderUtil->GetRenderDelta() * 100.0f / deltaTime);
- std::string renderString = logic < 10 ? " " + std::to_string(render) : std::to_string(render);
- int debug = (int)round(debugDelta * 100.0f / deltaTime);
- std::string debugString = logic < 10 ? " " + std::to_string(debug) : std::to_string(debug);
-
- world.data.renderUtil->RenderText("Logic : " + logicString + "%" +
- //+ " | Physics : " + std::to_string((int)round(physicsDelta * 100.0f / deltaTime)) + "%" +
- + " | Rendering : " + renderString + "%" +
- + " | Debug : " + debugString + "%"
- , 1680.0f, 1040.0f, 0.25f, Color(0, 1, 1, 1));
- }
- if (DEBUG_LOG_LEVEL > 2)
- {
- world.data.renderUtil->RenderText("Draw Calls : " + std::to_string(world.data.renderUtil->GetDrawCalls())
- + " | Verts : " + std::to_string(world.data.renderUtil->GetVerts())
- + " | Tris : " + std::to_string(world.data.renderUtil->GetTris())
- + " | Lines : " + std::to_string(world.data.renderUtil->GetLines())
- , 1610.0f, 1020.0f, 0.25f, Color(0, 1, 1, 1));
- }
-
- // Update debug delta
- debugDelta = glfwGetTime() - stepTime;
- stepTime = glfwGetTime();
-
- world.data.renderUtil->SwapBuffers(world.data.renderUtil->window->glfwWindow);
-
- // Show FPS in console
- //std::cout << "FPS : " << 1.0f / deltaTime << std::endl;
- }
-
- // glfw: terminate, clearing all previously allocated GLFW resources.
- // ------------------------------------------------------------------
- glfwTerminate();
- return 0;
-}
-
-void LoadShaders(ECSWorld& world)
-{
- world.data.assetLoader->StartShaderLoading({ {"Shaders/Lighting_Maps.vs", "Shaders/Lighting_Maps.fs"} });
-}
-void LoadModels(ECSWorld& world)
-{
- world.data.assetLoader->StartModelLoading({
- //ModelData("Resources/Models/snowy-mountain-terrain/SnowyMountainMesh.obj"),
- //ModelData("Resources/Models/Sponza-master/sponza.obj"),
- //ModelData("Resources/Models/nanosuit/nanosuit.obj"),*/
- ModelData("Resources/Models/supermarine-spitfire/spitfire.fbx",
- {{"spitfire_d.png"}})
- });
-}
-
-void MakeABunchaObjects(ECSWorld& world)
-{
- auto e = world.createEntity();
- e.addComponent(Vector3(4, 10.0f, 48), Vector3(0.10f, 0.1f, 0.1f), Vector3(-90, 180, 0));
- // Add mesh
- e.addComponent("Resources/Models/supermarine-spitfire/spitfire.fbx");
- e.addComponent(0, 40, 0);
-
- e = world.createEntity();
- e.addComponent(Vector3(4, 10.0f, -62), Vector3(0.1f, 0.1f, 0.1f), Vector3(-90, 0, 0));
- // Add mesh
- e.addComponent("Resources/Models/supermarine-spitfire/spitfire.fbx");
- e.addComponent(0, 40, 0);
-}
-
-void MakeABunchaSprings(ECSWorld& world)
-{
- auto e = world.createEntity();
- float yOffset = 30;
- e.addComponent(Vector3(-2.5f, -5 + yOffset, -3), Vector3(1.0f, 1.0f, 1.0f));
- e.addComponent();
- // Add mesh
- e.addComponent("Resources/Models/nanosuit/nanosuit.obj");
-
- auto springEntinty = world.createEntity();
- springEntinty.addComponent(Vector3(-2.5f, 0 + yOffset, 3));
- springEntinty.addComponent(8, 2, e);
-
- auto e2 = world.createEntity();
- e2.addComponent(Vector3(2.5f, -5 + yOffset, -1), Vector3(1.0f, 1.0f, 1.0f));
- e2.addComponent();
- // Add mesh
- e2.addComponent("Resources/Models/nanosuit/nanosuit.obj");
-
- auto springEntinty2 = world.createEntity();
- springEntinty2.addComponent(Vector3(2.5f, 0 + yOffset, 1));
- springEntinty2.addComponent(5, 5, e2);
-
- auto pairedSpring = world.createEntity();
- pairedSpring.addComponent(100, 5.0f, e, e2);
-
- auto e3 = world.createEntity();
- e3.addComponent(Vector3(-7.5f, -7.5f + yOffset, 1), Vector3(1.0f, 1.0f, 1.0f));
- e3.addComponent();
- // Add mesh
- e3.addComponent("Resources/Models/nanosuit/nanosuit.obj");
-
- auto springEntinty3 = world.createEntity();
- springEntinty3.addComponent(Vector3(-7.5f, -10 + yOffset, -1));
- springEntinty3.addComponent(7, 7, e3);
-
- auto e4 = world.createEntity();
- e4.addComponent(Vector3(7.5f, -7.5f + yOffset, 3), Vector3(1.0f, 1.0f, 1.0f));
- e4.addComponent();
- // Add mesh
- e4.addComponent("Resources/Models/nanosuit/nanosuit.obj");
-
- auto springEntinty4 = world.createEntity();
- springEntinty4.addComponent(Vector3(7.5f, -10 + yOffset, -3));
- springEntinty4.addComponent(5, 0, e4);
-
- auto pairedSpring2 = world.createEntity();
- pairedSpring2.addComponent(100, 5.2f, e, e3);
-
- auto pairedSpring3 = world.createEntity();
- pairedSpring3.addComponent(100, 5.2f, e2, e4);
-
- auto pairedSpring4 = world.createEntity();
- pairedSpring4.addComponent(100, 10.0f, e3, e4);
-}
-
-void MakeABunchaSpheres(ECSWorld& world)
-{
- for (int i = 0; i < 30; i++)
- {
- auto e = world.createEntity();
- //e.addComponent(Vector3(RANDOM_FLOAT(-1, 1), 20,0));
-
- e.addComponent(Vector3(RANDOM_FLOAT(-15.0f, 15.0f), RANDOM_FLOAT(6.0f, 34.0f), RANDOM_FLOAT(-15.0f, 15.0f)));
- e.addComponent(1, Vector3(RANDOM_FLOAT(-5, 5), RANDOM_FLOAT(-5, 5), RANDOM_FLOAT(-5, 5)));
- e.addComponent(1);
- Color col = Color(0, RANDOM_FLOAT(0.0f, 1.0f), RANDOM_FLOAT(0.0f, 1.0f));
- //e.addComponent(20.0f, col, col, col);
- }
-
- auto ref = world.createEntity();
- ref.addComponent(Vector3(0, 20, 0), Vector3(0.3f, 0.3f, 0.3f), Vector3(0, 180, 0));
- // Add mesh
- ref.addComponent("Resources/Models/nanosuit/nanosuit.obj");
- ref.addComponent(0, 40, 0);
-}
-
-void MakeACable(ECSWorld& world)
-{
- auto e1 = world.createEntity();
- e1.addComponent(Vector3(0, 40, 0));
- //e1.addComponent(1, Vector3(0,0,0), 0);
-
- auto e2 = world.createEntity();
- e2.addComponent(Vector3(0, 30, 0));
- e2.addComponent(1);
-
- auto e = world.createEntity();
- e.addComponent(e1, e2, 20);
-}
-
-void MakeCablesAndRods(ECSWorld& world)
-{
- auto eFixed = world.createEntity();
- eFixed.addComponent(Vector3(10, 40, 0));
- //e1.addComponent(1, Vector3(0,0,0), 0);
-
- auto eFixed2 = world.createEntity();
- eFixed2.addComponent(Vector3(20, 10, 0));
-
- auto eFixed3 = world.createEntity();
- eFixed3.addComponent(Vector3(-20, 10, 0));
-
- auto e1 = world.createEntity();
- e1.addComponent(Vector3(0, 30, 0));
- e1.addComponent(10);
-
- auto e2 = world.createEntity();
- e2.addComponent(Vector3(-10, 20, 0));
- e2.addComponent(10);
-
- auto e3 = world.createEntity();
- e3.addComponent(Vector3(0, 10, 0));
- e3.addComponent(10);
-
- auto e4 = world.createEntity();
- e4.addComponent(Vector3(10, 20, 0));
- e4.addComponent(10);
-
- auto eCable = world.createEntity();
- eCable.addComponent(eFixed, e1, 20);
-
- auto eCable2 = world.createEntity();
- eCable2.addComponent(1000, 20, eFixed2, e4);
-
- auto eCable3 = world.createEntity();
- eCable3.addComponent(1000, 20, eFixed3, e2);
-
- auto eRod1 = world.createEntity();
- eRod1.addComponent(e1, e2, 10 * sqrt(2));
- auto eRod2 = world.createEntity();
- eRod2.addComponent(e2, e3, 10 * sqrt(2));
- auto eRod3 = world.createEntity();
- eRod3.addComponent(e3, e4, 10 * sqrt(2));
- auto eRod4 = world.createEntity();
- eRod4.addComponent(e4, e1, 10 * sqrt(2));
-
- auto eRodDiagonal1 = world.createEntity();
- eRodDiagonal1.addComponent(e1, e3, 20);
- auto eRodDiagonal2 = world.createEntity();
- eRodDiagonal2.addComponent(e2, e4, 20);
-}
-
-void MakeFlight(ECSWorld& world)
-{
- auto e = world.createEntity();
- glm::vec3 rotationInRads = glm::vec3(glm::radians(-90.0f),
- glm::radians(180.0f), glm::radians(0.0f));
- Quaternion orientation = glm::quat(rotationInRads);
- e.addComponent(Vector3(0, 350.0f, 0), Vector3(0.10f, 0.1f, 0.1f));
- // Add mesh
- e.addComponent("Resources/Models/supermarine-spitfire/spitfire.fbx", Vector3(0, -50, 20), Vector3(-90, 0, 0));
- e.addComponent(10.0f ,0.3f, 0.5f);
- e.addComponent();
- e.addComponent(Vector3(0.0f, 15.0f, 40.0f));
- e.addComponent();
- e.addComponent();
-
- std::vector p1 { GLFW_KEY_E };
- std::vector n1 { GLFW_KEY_Q };
- //Right Wing
- auto RW = world.createEntity();
- RW.addComponent