ソースを参照

Merge branch 'master' into pkoller-patch-1

Kim Kulling 6 年 前
コミット
8ec3aaed7d
4 ファイル変更16 行追加9 行削除
  1. 7 2
      Readme.md
  2. 7 5
      code/Material/MaterialSystem.cpp
  3. 1 1
      port/AssimpNET/Readme.md
  4. 1 1
      test/models/PLY/cube_test.ply

+ 7 - 2
Readme.md

@@ -125,7 +125,7 @@ Take a look into the https://github.com/assimp/assimp/blob/master/Build.md file.
 ### Ports ###
 * [Android](port/AndroidJNI/README.md)
 * [Python](port/PyAssimp/README.md)
-* [.NET](port/AssimpNET/Readme.md)
+* [.NET](https://github.com/kebby/assimp-net)
 * [Pascal](port/AssimpPascal/Readme.md)
 * [Javascript (Alpha)](https://github.com/makc/assimp2json)
 * [Unity 3d Plugin](https://www.assetstore.unity3d.com/en/#!/content/91777)
@@ -136,7 +136,7 @@ Take a look into the https://github.com/assimp/assimp/blob/master/Build.md file.
 [open3mod](https://github.com/acgessler/open3mod) is a powerful 3D model viewer based on Assimp's import and export abilities.
 
 #### Repository structure ####
-Open Asset Import Library is implemented in C++. The directory structure is:
+Open Asset Import Library is implemented in C++. The directory structure looks like:
 
 	/code		Source code
 	/contrib	Third-party libraries
@@ -149,6 +149,11 @@ Open Asset Import Library is implemented in C++. The directory structure is:
 	/samples	A small number of samples to illustrate possible
                         use cases for Assimp
 
+The source code is organized in the following way:
+
+	code/Common		The base implementation for importers and the infrastructure
+	code/PostProcessing	The post-processing steps
+	code/<FormatName>	Implementation for import and export for the format
 
 ### Where to get help ###
 For more information, visit [our website](http://assimp.org/). Or check out the `./doc`- folder, which contains the official documentation in HTML format.

+ 7 - 5
code/Material/MaterialSystem.cpp

@@ -96,12 +96,12 @@ aiReturn aiGetMaterialFloatArray(const aiMaterial* pMat,
     ai_real* pOut,
     unsigned int* pMax)
 {
-    ai_assert( pOut != NULL );
-    ai_assert( pMat != NULL );
+    ai_assert( pOut != nullptr );
+    ai_assert( pMat != nullptr );
 
     const aiMaterialProperty* prop;
     aiGetMaterialProperty(pMat,pKey,type,index, (const aiMaterialProperty**) &prop);
-    if (!prop) {
+    if ( nullptr == prop) {
         return AI_FAILURE;
     }
 
@@ -112,9 +112,11 @@ aiReturn aiGetMaterialFloatArray(const aiMaterial* pMat,
         if (pMax) {
             iWrite = std::min(*pMax,iWrite); ;
         }
-        for (unsigned int a = 0; a < iWrite;++a)    {
-            pOut[a] = static_cast<ai_real> ( reinterpret_cast<float*>(prop->mData)[a] );
+
+        for (unsigned int a = 0; a < iWrite; ++a) {
+            pOut[ a ] = static_cast<ai_real> ( reinterpret_cast<float*>(prop->mData)[a] );
         }
+
         if (pMax) {
             *pMax = iWrite;
         }

+ 1 - 1
port/AssimpNET/Readme.md

@@ -1 +1 @@
-Please check the following git-repo for the source: https://bitbucket.org/Starnick/assimpnet
+Please check the following git-repo for the source: https://github.com/kebby/assimp-net

+ 1 - 1
test/models/PLY/cube_test.ply

@@ -1,6 +1,6 @@
 ply
 format ascii 1.0
-comment Created by Open Asset Import Library - http://assimp.sf.net (v4.1.4151146389)
+comment Created by Open Asset Import Library - http://assimp.sf.net (v4.1.2760932948)
 element vertex 8
 property float x
 property float y