@@ -44,18 +44,19 @@ class ScenePreprocessor(
4444 fun AiMesh.process () {
4545
4646 // If aiMesh::mNumUVComponents is *not* set assign the default value of 2
47- for (i in 0 .. AI_MAX_NUMBER_OF_TEXTURECOORDS - 1 ) {
48- if (mTextureCoords[i] == null )
49- mNumUVComponents[i] = 0
50- else {
51- if (mNumUVComponents[i] == 0 )
52- mNumUVComponents[i] = 2
53-
54- // Ensure unsued components are zeroed. This will make 1D texture channels work as if they were 2D
55- // channels .. just in case an application doesn't handle this case
56- // TODO
57- }
58- }
47+ // TODO change -> for in mTextureCoords
48+ // for (i in 0 until AI_MAX_NUMBER_OF_TEXTURECOORDS) {
49+ // if (mTextureCoords[i].isEmpty())
50+ // mNumUVComponents[i] = 0
51+ // else {
52+ // if (mNumUVComponents[i] == 0)
53+ // mNumUVComponents[i] = 2
54+ //
55+ // // Ensure unsued components are zeroed. This will make 1D texture channels work as if they were 2D
56+ // // channels .. just in case an application doesn't handle this case
57+ // // TODO
58+ // }
59+ // }
5960
6061 // If the information which primitive types are there in the mesh is currently not available, compute it.
6162 if (mPrimitiveTypes == 0 ) {
@@ -70,7 +71,7 @@ class ScenePreprocessor(
7071 }
7172
7273 // If tangents and normals are given but no bitangents compute them
73- if (mTangents != null && mNormals != null && mBitangents == null ) {
74+ if (mTangents.isNotEmpty() && mNormals.isNotEmpty() && mBitangents.isEmpty() ) {
7475
7576 mBitangents = ArrayList (mNumVertices)
7677// for (i in 0..mNumVertices - 1)
0 commit comments