Commit Graph

240 Commits (f28500dd0f69bda6402c3b6f92d25334c4415127)

Author SHA1 Message Date
Kim Kulling 0b92abe9b4
Merge branch 'master' into empty-string-style 2021-04-30 00:54:57 +02:00
Scott Baldric f523b1e0d7
Merge branch 'master' into SceneCombiner_Memory_Leaks 2021-04-29 08:52:51 -05:00
Jason C 975de81ab6
Merge branch 'master' into patch-4 2021-04-28 22:23:17 -04:00
Jason C cf498c979a
ASSIMP_ENABLE_DEV_IMPORTERS env var to control registration of wip importers; applied to X3D
- GetImporterInstanceList reads ASSIMP_ENABLE_DEV_IMPORTERS env var. Development importers are enabled if the env var is set and is not equal to the literal string "0".
- X3D importer will not be registered unless ASSIMP_ENABLE_DEV_IMPORTERS is set; addresses #3647.

TODO: If this change is incorporated, it should be documented.
NOTE: Effective git branch structure is a better solution. This is an alternate for #3825.
2021-04-28 11:16:49 -04:00
Kim Kulling 6abdd0cd3e
Fix crash when reading 0 bytes
- This is a valid option so crash shall not happen
2021-04-28 16:38:22 +02:00
Krishty e6a47d93c2 removed dead code from 0d29203e24 2021-04-24 13:29:15 +02:00
Krishty afe947d5db fixed malformatted message 2021-04-24 12:38:31 +02:00
Scott Baldric aae3788247 Fix: Removing double delete of texture items.
Textures were being double deleted after a merge scene because the
texture array wasn't being properly deleted at the end of merging.
Furthermore, the texture array was being sized to the number of
materials instead of the number of textures.
2021-04-22 08:49:47 -05:00
Krishty 3fead344ad updated version string (if anyone cares) 2021-04-19 07:37:12 +02:00
Krishty f761dc72f4 style fix - initializing and assigning empty std::string properly
std::string s(""); s = ""; calls the copy constructor, which in turn calls strlen(), … assigning a default-constructed string generates fewer instructions and is therefore preferred.

With C++11 uniform initialization, you’d simply write s = { } instead.
2021-04-16 23:43:56 +02:00
Kim Kulling da0543972b Fix parsing for AMF-Files. 2021-04-03 10:25:03 +02:00
Kim Kulling 6c89631581 closes https://github.com/assimp/assimp/issues/3678: ensure lowercase 2021-03-09 21:08:28 +01:00
Kim Kulling 9e8dbd0ca5 Update copyrights to 2021. 2021-02-28 12:17:54 +01:00
Ville Voutilainen 6ebae5e67c GCC 11 build fixes 2021-01-24 11:04:46 +02:00
Kim Kulling 11a17ebfe6
Merge branch 'master' into tdb/pbrt3_exporter 2021-01-20 20:03:30 +01:00
Kim Kulling f8dd3a9aa6
Update DefaultIOSystem.cpp 2021-01-20 08:05:43 +01:00
Kim Kulling ed3e745752
Update DefaultIOSystem.cpp 2021-01-19 21:58:04 +01:00
Kim Kulling f05a57560b
Remove buggy method. 2021-01-19 21:27:50 +01:00
Kim Kulling 5b325af79f
Fix typo. 2021-01-19 21:19:42 +01:00
Kim Kulling 5a6498af92
Fix nullptr access 2021-01-19 21:14:38 +01:00
Matt Pharr 8f5148f108
Merge branch 'master' into tdb/pbrt3_exporter 2021-01-18 17:15:40 -08:00
Dan Church 0bc5cf9fd3
Fix build failure on Linux 2021-01-18 16:17:28 -06:00
Kim Kulling f24c042925
Fix typo 2021-01-18 20:28:38 +01:00
Kim Kulling 0803e5e6f3
Fix nullptr dereference in scenepreprocessor 2021-01-18 20:25:33 +01:00
Matt Pharr 1042845414 Merge branch 'master' of https://github.com/assimp/assimp into tdb/pbrt3_exporter 2021-01-11 19:57:10 -08:00
Matt Pharr 71cfd8e0cf Merge branch 'master' into tdb/pbrt3_exporter 2021-01-11 19:54:11 -08:00
Matt Pharr 938537c884 Checkpoint improvements to pbrt exporter 2021-01-08 16:57:22 -08:00
Jean-Louis effe52368c No need to allocate a full size buffer for small files 2020-12-24 12:18:07 +01:00
Jean-Louis 895137c7d7 Fix unzip max buffer length error 2020-12-24 11:39:59 +01:00
Jean-Louis 54be7ac582 Update unzip contrib 2020-12-24 01:53:40 +01:00
Kim Kulling b4b011e764
Merge branch 'master' into master 2020-12-22 11:11:45 +01:00
wasd845 4e9176d2cd
_dest may be destructed twice if _dest is not null in MergeScenes() 2020-12-14 19:16:29 +08:00
Biswapriyo Nath e2af015a57 Common: Fix GCC error invalid conversion in MINGW. 2020-12-11 21:43:09 +05:30
Kim Kulling c7aeb882e6
Update ScenePreprocessor.cpp 2020-12-03 17:28:51 +01:00
Neil Clifford ea60563822
Merge branch 'master' into scenepreprocessor-memoryleak 2020-11-26 08:57:57 +00:00
Neil Clifford fc842a0f97 Sceneprecessor potential memory leak 2020-11-19 13:20:43 +00:00
Inho Lee 8845d7eed3 Prevent to generate redundant morph targets for glTF2 2020-11-11 20:49:22 +01:00
Kim Kulling 72bc41b50f
Merge branch 'master' into fix/xcode-compile-20201018 2020-10-28 22:00:08 +01:00
Kim Kulling 57e691e28e openddl: latest greatest. 2020-10-25 10:34:43 +01:00
Kim Kulling 6ee5e248ee
Fix typo 2020-10-22 22:26:29 +02:00
john d48ac9d0a4 fix xcode compile bug 2020-10-18 10:54:04 +08:00
Kim Kulling 857f62cde0 closes pParam.mReference = source; 2020-10-14 20:34:46 +02:00
Kim Kulling d6892b3f58 Merge branch 'master' into pugi_xml 2020-09-25 21:00:09 +02:00
Kim Kulling 0e9621012c
Adapt code style - finally :-). 2020-09-14 08:43:31 +02:00
Kim Kulling 1ff9e2b522
Adapt code style. 2020-09-14 08:40:21 +02:00
Kim Kulling 23defc275a
Merge branch 'master' into makeInternalErrorsAccessible 2020-09-14 08:36:13 +02:00
Denis Blank f3b25b999b Fix an unreferenced formal parameter warning on MSVC when no exporter is built 2020-09-05 23:20:31 +02:00
kimkulling 0730eebe6f fix collada handling of xml nodes. 2020-08-28 16:17:56 +02:00
Malcolm Tyrrell 8f893e3653 Actually, just keep the old behaviour for now. 2020-08-20 14:32:15 +01:00
Malcolm Tyrrell 9b5e758bdd Even simpler DeadlyErrorBase 2020-08-19 17:59:13 +01:00
Malcolm Tyrrell 6f9c61e157 Use case which matches surrounding code. 2020-08-19 17:57:25 +01:00
Malcolm Tyrrell e1a0163e7e Make all exceptions available. 2020-08-18 18:14:51 +01:00
Malcolm Tyrrell 0ffcdf160e Build formatting into DeadlyImportError 2020-08-18 16:32:34 +01:00
Malcolm Tyrrell 829ff1adf0 Maybe this will help. 2020-08-18 10:33:47 +01:00
Malcolm Tyrrell b1ed751b83 Provide an API for accessing internal errors. 2020-08-18 10:33:42 +01:00
Kim Kulling 729882debb
Fix incorrect index
closes https://github.com/assimp/assimp/issues/3364
2020-08-11 19:57:36 +02:00
kimkulling 13d7fad7f7 closes https://github.com/assimp/assimp/issues/2992: add single or double precision + missing compilers. 2020-08-07 14:23:07 +02:00
Kim Kulling e7ae576614
undo change 2020-08-03 15:54:19 +02:00
Kim Kulling 435bba30dd
Move functions into the correct preprocessor branch 2020-08-03 09:30:02 +02:00
RichardTea 9cad10a995 Disable MSVC warnings on all MSVC
Fixes the build on MSVC 2017 (and probably MSVC 2015)
2020-07-17 14:58:51 +01:00
Kim Kulling fa486240d5
Merge branch 'master' into rbsheth_update_hunter 2020-07-17 11:39:55 +02:00
Kim Kulling 516bdc2a4b
Merge branch 'master' into master 2020-07-16 22:48:02 +02:00
Kim Kulling df8792d24b
Merge branch 'master' into gltf1_gltf2_split 2020-07-16 10:45:55 +02:00
Kota Iguchi 84e68eaf24 fix invalid pointer for bone animation 2020-07-16 15:26:02 +09:00
Rahul Sheth 209a61d0e7 Update hunter and utf8cpp inclusion 2020-07-14 19:00:23 -04:00
Ryan Styrczula 84e342acd7 DefaultIOStream: Remove assert on empty count
fwrite() is valid to call with a 0 count, and will simply return 0.
See:
    https://en.cppreference.com/w/cpp/io/c/fwrite
    http://www.cplusplus.com/reference/cstdio/fwrite/

There are code paths where StreamWriter will call Tell(), which calls
Flush(), which calls Write(buffer.data(), 1, buffer.size()). This can
happen when nothing has yet been written to the buffer, so size is 0.
2020-07-14 10:39:18 -04:00
Kim Kulling 306e03d497
Merge branch 'master' into extras_property_callback 2020-07-11 22:46:19 +02:00
kimkulling 9aa468262f closes https://github.com/assimp/assimp/issues/3252: fix build. 2020-07-07 17:35:03 +02:00
Max Vollmer abf43eaf74 * Added ASSIMP_BUILD_NO_GLTF1_IMPORTER, ASSIMP_BUILD_NO_GLTF2_IMPORTER, ASSIMP_BUILD_NO_GLTF1_EXPORTER, and ASSIMP_BUILD_NO_GLTF2_EXPORTER to allow disabling GLTF1 and GLTF2 independently.
* ASSIMP_BUILD_NO_GLTF_IMPORTER and ASSIMP_BUILD_NO_GLTF_EXPORTER remain with same behavior as before
2020-07-05 19:22:31 +01:00
Hill Ma 3fb7747429 Improve ToBinary() for double precision.
The constant 0x80000000 is specific to 32 bit types. Make the bit mask
according to the size of types.
2020-07-03 18:14:45 -07:00
Yingying Wang 97085c1c05 update sync 2020-06-30 11:48:37 -07:00
Yingying Wang 36f899bf09 sync update 2020-06-30 11:45:11 -07:00
Hill Ma 30f09e9fc0 Fix build when ASSIMP_DOUBLE_PRECISION is on.
Tested:
$ cmake -DASSIMP_DOUBLE_PRECISION=1 -DASSIMP_BUILD_MDL_IMPORTER=0 ..; make

The MDL importer is disabled due to the fact that there is some float-only code
in MDL. This also means bin/assimp and bin/unit would not link successfully with
the above build flags.
2020-06-28 17:36:21 -07:00
Kim Kulling 95e822a6ec
Merge branch 'master' into aiAssertHandler 2020-06-24 20:47:10 +02:00
Kim Kulling 6205af4efb replace NULL and avoid ai_assert with more than 2 tests. 2020-06-23 21:05:42 +02:00
Malcolm Tyrrell 9188f56839 Allow assert handling to be replaced. 2020-06-23 11:55:51 +01:00
kimkulling 524e2e4728 fix warning, hopefully ... 2020-06-15 21:34:49 +02:00
ywang e65434bf82 extra callback 2020-06-11 17:37:06 -07:00
ywang f57e7221c0 temp 2020-06-10 13:23:29 -07:00
Yingying Wang 578a7ac502 add Callback API in ExporterProperties 2020-06-09 11:20:48 -07:00
Kim Kulling 88c1509d69
Remove dead code 2020-06-09 10:15:35 +02:00
Kim Kulling 6d04e16c7e
Merge branch 'master' into issue_3165 2020-05-28 21:51:58 +02:00
kimkulling d40a3026db closes https://github.com/assimp/assimp/issues/3165: fix gcc build. 2020-05-28 21:02:13 +02:00
Malcolm Tyrrell e11d78596f Use verbose debug logging in certain places 2020-05-15 17:26:17 +01:00
Malcolm Tyrrell 5e0136d737 Add concept of verboseDebug 2020-05-15 17:23:07 +01:00
kkulling 4e16716924 Merge branch 'file-formatting' of https://github.com/aaronfranke/assimp into aaronfranke-file-formatting 2020-05-05 10:17:52 +02:00
Kim Kulling f8e6512a63 Move format importer and exporter into its won folder. 2020-05-02 15:14:38 +02:00
Kim Kulling c6131ce38a scenecombiner: fix leak. 2020-04-29 20:43:23 +02:00
luca 4488e3e745 build on Linux with gcc and clang; warning as error only for 'assimp' target 2020-04-27 23:38:33 -07:00
Kim Kulling 6c1e21d754 fix formatting. 2020-04-26 19:14:30 +02:00
Kim Kulling bafb8e3189 closes https://github.com/assimp/assimp/issues/3165: remove deprecated code whch causes compiler warning. 2020-04-26 08:59:52 +02:00
Trevor David Black 3dc550a9b2 Got a working geometry prototype, sponza renders correctly when camera and light is added 2020-04-25 00:10:31 -07:00
Kim Kulling d12e938a70
Merge branch 'master' into ifdef_export_defines 2020-04-16 10:24:23 +02:00
Kim Kulling e341eadfd9
Fix typo 2020-04-16 10:23:50 +02:00
Trevor David Black 8c3b374486 Pbrt file exporter hello world 2020-04-06 12:12:37 -07:00
Kim Kulling 131aed73b0 closes https://github.com/assimp/assimp/issues/2166: add missing setter for metadata. 2020-04-06 11:16:16 +02:00
Marc-Antoine Lortie 609632c6a5 Added missing functionalities to C API.
The C API functions that have been added are the following:

Vector2:
- aiVector2AreEqual
- aiVector2AreEqualEpsilon
- aiVector2Add
- aiVector2Subtract
- aiVector2Scale
- aiVector2SymMul
- aiVector2DivideByScalar
- aiVector2DivideByVector
- aiVector2Length
- aiVector2SquareLength
- aiVector2Negate
- aiVector2DotProduct
- aiVector2Normalize

Vector3:
- aiVector3AreEqual
- aiVector3AreEqualEpsilon
- aiVector3LessThan
- aiVector3Add
- aiVector3Subtract
- aiVector3Scale
- aiVector3SymMul
- aiVector3DivideByScalar
- aiVector3DivideByVector
- aiVector3Length
- aiVector3SquareLength
- aiVector3Negate
- aiVector3DotProduct
- aiVector3CrossProduct
- aiVector3Normalize
- aiVector3NormalizeSafe
- aiVector3RotateByQuaternion

Matrix3x3:
- aiMatrix3FromMatrix4
- aiMatrix3FromQuaternion
- aiMatrix3AreEqual
- aiMatrix3AreEqualEpsilon
- aiMatrix3Inverse
- aiMatrix3Determinant
- aiMatrix3RotationZ
- aiMatrix3FromRotationAroundAxis
- aiMatrix3Translation
- aiMatrix3FromTo

Matrix4x4:
- aiMatrix4FromMatrix3
- aiMatrix4FromScalingQuaternionPosition
- aiMatrix4Add
- aiMatrix4AreEqual
- aiMatrix4AreEqualEpsilon
- aiMatrix4Inverse
- aiMatrix4Determinant
- aiMatrix4IsIdentity
- aiMatrix4DecomposeIntoScalingEulerAnglesPosition
- aiMatrix4DecomposeIntoScalingAxisAnglePosition
- aiMatrix4DecomposeNoScaling
- aiMatrix4FromEulerAngles
- aiMatrix4RotationX
- aiMatrix4RotationY
- aiMatrix4RotationZ
- aiMatrix4FromRotationAroundAxis
- aiMatrix4Translation
- aiMatrix4Scaling
- aiMatrix4FromTo

Quaternion:
- aiQuaternionFromEulerAngles
- aiQuaternionFromAxisAngle
- aiQuaternionFromNormalizedQuaternion
- aiQuaternionAreEqual
- aiQuaternionAreEqualEpsilon
- aiQuaternionNormalize
- aiQuaternionConjugate
- aiQuaternionMultiply
- aiQuaternionInterpolate

In addition, a const qualifier has been added to aiQuaterniont::Rotate to allow call to this method via a const aiQuaterniont pointer.
2020-03-26 13:08:40 -04:00
Kim Kulling 68a9fa2df3 reformat unittests. 2020-03-22 12:13:09 +01:00
Aaron Franke 1529f9518f
Make file formatting comply with POSIX and Unix standards
UTF-8, LF, no BOM, and newlines at the end of files
2020-03-21 02:34:12 -04:00
Kim Kulling 097d2faeea fix vs2013 specific warnings. 2020-03-18 19:31:30 +01:00