TEX_
).
*/
public final class AiMaterial {
+ /**
+ * List of properties.
+ */
+ private final List
+ *
+ * Only used by meshes that are not pure triangular
+ */
+ private ByteBuffer m_faceOffsets = null;
+
+ /**
+ * Buffer for normals.
+ */
+ private ByteBuffer m_normals = null;
+
+ /**
+ * Buffer for tangents.
+ */
+ private ByteBuffer m_tangents = null;
+
+ /**
+ * Buffer for bitangents.
+ */
+ private ByteBuffer m_bitangents = null;
+
+ /**
+ * Vertex colors.
+ */
+ private ByteBuffer[] m_colorsets =
+ new ByteBuffer[JassimpConfig.MAX_NUMBER_COLORSETS];
+
+ /**
+ * Number of UV components for each texture coordinate set.
+ */
+ private int[] m_numUVComponents = new int[JassimpConfig.MAX_NUMBER_TEXCOORDS];
+
+ /**
+ * Texture coordinates.
+ */
+ private ByteBuffer[] m_texcoords =
+ new ByteBuffer[JassimpConfig.MAX_NUMBER_TEXCOORDS];
+
+ /**
+ * Bones.
+ */
+ private final List
- *
- * Only used by meshes that are not pure triangular
- */
- private ByteBuffer m_faceOffsets = null;
-
-
- /**
- * Buffer for normals.
- */
- private ByteBuffer m_normals = null;
-
-
- /**
- * Buffer for tangents.
- */
- private ByteBuffer m_tangents = null;
-
-
- /**
- * Buffer for bitangents.
- */
- private ByteBuffer m_bitangents = null;
-
-
- /**
- * Vertex colors.
- */
- private ByteBuffer[] m_colorsets =
- new ByteBuffer[JassimpConfig.MAX_NUMBER_COLORSETS];
-
-
- /**
- * Number of UV components for each texture coordinate set.
- */
- private int[] m_numUVComponents = new int[JassimpConfig.MAX_NUMBER_TEXCOORDS];
-
-
- /**
- * Texture coordinates.
- */
- private ByteBuffer[] m_texcoords =
- new ByteBuffer[JassimpConfig.MAX_NUMBER_TEXCOORDS];
-
-
- /**
- * Bones.
- */
- private final List
@@ -143,11 +148,5 @@ public enum AiSceneFlag {
*/
private AiSceneFlag(int rawValue) {
m_rawValue = rawValue;
- }
-
-
- /**
- * The mapped c/c++ integer enum value.
- */
- private final int m_rawValue;
+ }
}
diff --git a/port/jassimp/jassimp/src/jassimp/Jassimp.java b/port/jassimp/jassimp/src/jassimp/Jassimp.java
index d1b4aae4e..727570a5b 100644
--- a/port/jassimp/jassimp/src/jassimp/Jassimp.java
+++ b/port/jassimp/jassimp/src/jassimp/Jassimp.java
@@ -60,6 +60,44 @@ import java.util.Set;
*/
public final class Jassimp {
+ /**
+ * The native interface.
+ *
+ * @param filename the file to load
+ * @param postProcessing post processing flags
+ * @return the loaded scene, or null if an error occurred
+ * @throws IOException if an error occurs
+ */
+ private static native AiScene aiImportFile(String filename,
+ long postProcessing, AiIOSystem> ioSystem) throws IOException;
+
+
+ /**
+ * The active wrapper provider.
+ */
+ private static AiWrapperProvider, ?, ?, ?, ?> s_wrapperProvider =
+ new AiBuiltInWrapperProvider();
+
+
+ /**
+ * The library loader to load the native library.
+ */
+ private static JassimpLibraryLoader s_libraryLoader =
+ new JassimpLibraryLoader();
+
+ /**
+ * Status flag if the library is loaded.
+ *
+ * Volatile to avoid problems with double checked locking.
+ *
+ */
+ private static volatile boolean s_libraryLoaded = false;
+
+ /**
+ * Lock for library loading.
+ */
+ private static final Object s_libraryLoadingLock = new Object();
+
/**
* The default wrapper provider using built in types.
*/
@@ -327,48 +365,9 @@ public final class Jassimp {
s_libraryLoaded = true;
}
}
-
}
}
-
- /**
- * The native interface.
- *
- * @param filename the file to load
- * @param postProcessing post processing flags
- * @return the loaded scene, or null if an error occurred
- * @throws IOException if an error occurs
- */
- private static native AiScene aiImportFile(String filename,
- long postProcessing, AiIOSystem> ioSystem) throws IOException;
-
-
- /**
- * The active wrapper provider.
- */
- private static AiWrapperProvider, ?, ?, ?, ?> s_wrapperProvider =
- new AiBuiltInWrapperProvider();
-
-
- /**
- * The library loader to load the native library.
- */
- private static JassimpLibraryLoader s_libraryLoader =
- new JassimpLibraryLoader();
-
- /**
- * Status flag if the library is loaded.
- *
- * Volatile to avoid problems with double checked locking.
- *
- */
- private static volatile boolean s_libraryLoaded = false;
-
- /**
- * Lock for library loading.
- */
- private static final Object s_libraryLoadingLock = new Object();
-
+
/**
* Pure static class, no accessible constructor.
*/
@@ -384,5 +383,4 @@ public final class Jassimp {
public static int NATIVE_UINT_SIZE;
public static int NATIVE_DOUBLE_SIZE;
public static int NATIVE_LONG_SIZE;
-
}
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 82d320bed..210d95550 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -124,6 +124,8 @@ SET( IMPORTERS
unit/ImportExport/utOgreImportExport.cpp
unit/ImportExport/utQ3BSPFileImportExport.cpp
unit/ImportExport/utOFFImportExport.cpp
+ unit/ImportExport/utNFFImportExport.cpp
+ unit/ImportExport/utXGLImportExport.cpp
)
SET( MATERIAL
diff --git a/test/unit/ImportExport/utNFFImportExport.cpp b/test/unit/ImportExport/utNFFImportExport.cpp
new file mode 100644
index 000000000..aca9e0392
--- /dev/null
+++ b/test/unit/ImportExport/utNFFImportExport.cpp
@@ -0,0 +1,63 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp 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 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.
+---------------------------------------------------------------------------
+*/
+
+#include "UnitTestPCH.h"
+#include "AbstractImportExportBase.h"
+#include