diff --git a/no-repo-override.xml b/no-repo-override.xml new file mode 100644 index 0000000..e69de29 diff --git a/pom.xml b/pom.xml index 0fb831a..abd2ac8 100644 --- a/pom.xml +++ b/pom.xml @@ -20,6 +20,15 @@ jitpack.io https://jitpack.io + + central + Default Repository + default + https://repo1.maven.org/maven2 + + false + + diff --git a/src/main/java/org/example/Mesh.java b/src/main/java/org/example/Mesh.java new file mode 100644 index 0000000..778ea7d --- /dev/null +++ b/src/main/java/org/example/Mesh.java @@ -0,0 +1,43 @@ +package org.example; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.ArrayList; +import java.util.Scanner; + +public class Mesh { + private final int vaoId; + private final int vboId; + + public Mesh() { + this.vaoId = 0; + this.vboId = 0; + } + + public void loadObj(String file_path) { + Scanner scanner; + File obj; + ArrayList vertices; + ArrayList normals; + + String line; + String[] face_data_temp; + int[] face_data = new int[3]; + int i; + + // Try to open the file + try { + obj = new File(file_path); + scanner = new Scanner(obj); + } catch (FileNotFoundException e) { + System.out.println("ERROR: OBJ File \"" + file_path + "\" not found."); + e.printStackTrace(); + return; + } + + while (scanner.hasNextLine()) { + + } + + } +}