A mesh loader Android library. Supports .ply and .obj format.
Add JitPack in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add the dependency
dependencies {
implementation 'com.github.MarcoCiaramella:MeshLoader:x.x.x'
}
Obj obj = new Obj(context, fileName);
obj.load();
float[] vertices = obj.getVertices();
float[] normals = obj.getNormals();
int[] indices = obj.getIndices();
Ply ply = new Ply(context, fileName);
ply.load();
float[] vertices = ply.getVertices();
float[] normals = ply.getNormals();
float[] colors = ply.getColors();
float[] texCoords = ply.getUvs();
int[] indices = ply.getIndices();