@@ -44,18 +44,16 @@ package assimp
4444
4545import assimp.format.ProgressHandler
4646import glm_.BYTES
47- import glm_.bool
4847import glm_.i
49- import glm_.mat4x4.Mat4
5048import glm_.size
5149import assimp.AiPostProcessSteps as Pps
52- import uno.kotlin.uri
5350import java.io.File
54- import java.io.FileNotFoundException
5551import java.net.URI
52+ import java.net.URL
5653import java.nio.ByteBuffer
54+ import java.nio.file.Path
55+ import java.nio.file.Paths
5756import kotlin.reflect.KMutableProperty0
58- import kotlin.reflect.KMutableProperty1
5957
6058/* * CPP-API: The Importer class forms an C++ interface to the functionality of the Open Asset Import Library.
6159 *
@@ -226,7 +224,10 @@ constructor() {
226224 /* * Get the currently set progress handler */
227225 val progressHandler get() = impl.progressHandler
228226
229- fun readFile (uri : URI , flags : Int = 0) = readFile(uri.path, flags)
227+ fun readFile (url : URL , flags : Int = 0) = readFile(url.toURI(), flags)
228+ fun readFile (uri : URI , flags : Int = 0) = readFile(Paths .get(uri), flags)
229+ fun readFile (path : Path , flags : Int = 0) = readFile(path.toAbsolutePath().toString(), flags)
230+ fun readFile (file : String , flags : Int = 0) = readFile(file, ioHandler, flags)
230231
231232 /* * Reads the given file and returns its contents if successful.
232233 *
@@ -245,9 +246,6 @@ constructor() {
245246 *
246247 * @note Assimp is able to determine the file format of a file automatically.
247248 */
248- // fun readFile(file: URI, flags: Int = 0): AiScene? {
249- fun readFile (file : String , flags : Int = 0) = readFile(file, ioHandler, flags)
250-
251249 fun readFile (file : String , ioSystem : IOSystem = this.ioHandler, flags : Int = 0): AiScene ? {
252250
253251 writeLogOpening(file)
0 commit comments