diff options
author | Chuyuan Fu <fuchuyuan.kelly@gmail.com> | 2020-01-30 19:25:04 -0800 |
---|---|---|
committer | Chuyuan Fu <fuchuyuan.kelly@gmail.com> | 2020-01-30 19:25:04 -0800 |
commit | e76ebe86d9aedc0919d9dfacc4ce9cab876b55b9 (patch) | |
tree | 18ed9aa7b5d92be59b2f45842f73db80e55a4ace /Extras | |
parent | 7380a55ba7c97933ed3db1ed461bb06530eef82e (diff) | |
download | bullet3-e76ebe86d9aedc0919d9dfacc4ce9cab876b55b9.tar.gz |
fix index for obj2sdf
Diffstat (limited to 'Extras')
-rw-r--r-- | Extras/obj2sdf/obj2sdf.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Extras/obj2sdf/obj2sdf.cpp b/Extras/obj2sdf/obj2sdf.cpp index 8d3db3955..720bcf18e 100644 --- a/Extras/obj2sdf/obj2sdf.cpp +++ b/Extras/obj2sdf/obj2sdf.cpp @@ -376,11 +376,11 @@ int main(int argc, char* argv[]) continue; } fprintf(f, "f %d/%d/%d %d/%d/%d %d/%d/%d\n", - shape.mesh.indices[face].vertex_index + 1, shape.mesh.indices[face].vertex_index + 1, shape.mesh.indices[face].vertex_index + 1, - shape.mesh.indices[face + 1].vertex_index + 1, shape.mesh.indices[face + 1].vertex_index + 1, shape.mesh.indices[face + 1].vertex_index + 1, - shape.mesh.indices[face + 2].vertex_index + 1, shape.mesh.indices[face + 2].vertex_index + 1, shape.mesh.indices[face + 2].vertex_index + 1); + shape.mesh.indices[face].vertex_index + 1, shape.mesh.indices[face].texcoord_index + 1, shape.mesh.indices[face].normal_index + 1, + shape.mesh.indices[face + 1].vertex_index + 1, shape.mesh.indices[face + 1].texcoord_index + 1, shape.mesh.indices[face + 1].normal_index + 1, + shape.mesh.indices[face + 2].vertex_index + 1, shape.mesh.indices[face + 2].texcoord_index + 1, shape.mesh.indices[face + 2].normal_index + 1); } - fclose(f); + fclose(f); float kdRed = mat.diffuse[0]; float kdGreen = mat.diffuse[1]; |