From d17c5341949adf1a135511e4c01a8e995f21e35b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Sun, 16 Jun 2019 19:40:15 +0200 Subject: [PATCH] Update obj tool --- programs/cat1Model.h | 3 ++- programs/cat2Model.h | 3 ++- programs/chestModel.h | 3 ++- programs/cityModel.h | 3 ++- programs/houseModel.h | 3 ++- programs/plantModel.h | 3 ++- tools/obj2array.py | 5 +++-- 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/programs/cat1Model.h b/programs/cat1Model.h index 90d6715..fc40569 100644 --- a/programs/cat1Model.h +++ b/programs/cat1Model.h @@ -399,7 +399,8 @@ S3L_Model3D cat1Model = .vertices = cat1Vertices, .vertexCount = CAT1_VERTEX_COUNT, .triangles = cat1TriangleIndices, - .triangleCount = CAT1_TRIANGLE_COUNT + .triangleCount = CAT1_TRIANGLE_COUNT, + .customTransformMatrix = 0 }; #endif // guard diff --git a/programs/cat2Model.h b/programs/cat2Model.h index ca20585..a776d7b 100644 --- a/programs/cat2Model.h +++ b/programs/cat2Model.h @@ -399,7 +399,8 @@ S3L_Model3D cat2Model = .vertices = cat2Vertices, .vertexCount = CAT2_VERTEX_COUNT, .triangles = cat2TriangleIndices, - .triangleCount = CAT2_TRIANGLE_COUNT + .triangleCount = CAT2_TRIANGLE_COUNT, + .customTransformMatrix = 0 }; #endif // guard diff --git a/programs/chestModel.h b/programs/chestModel.h index 341baf3..19d57bc 100644 --- a/programs/chestModel.h +++ b/programs/chestModel.h @@ -758,7 +758,8 @@ S3L_Model3D chestModel = .vertices = chestVertices, .vertexCount = CHEST_VERTEX_COUNT, .triangles = chestTriangleIndices, - .triangleCount = CHEST_TRIANGLE_COUNT + .triangleCount = CHEST_TRIANGLE_COUNT, + .customTransformMatrix = 0 }; #endif // guard diff --git a/programs/cityModel.h b/programs/cityModel.h index 95313db..fca11a5 100644 --- a/programs/cityModel.h +++ b/programs/cityModel.h @@ -950,7 +950,8 @@ S3L_Model3D cityModel = .vertices = cityVertices, .vertexCount = CITY_VERTEX_COUNT, .triangles = cityTriangleIndices, - .triangleCount = CITY_TRIANGLE_COUNT + .triangleCount = CITY_TRIANGLE_COUNT, + .customTransformMatrix = 0 }; #endif // guard diff --git a/programs/houseModel.h b/programs/houseModel.h index f05f4e6..d99db07 100644 --- a/programs/houseModel.h +++ b/programs/houseModel.h @@ -722,7 +722,8 @@ S3L_Model3D houseModel = .vertices = houseVertices, .vertexCount = HOUSE_VERTEX_COUNT, .triangles = houseTriangleIndices, - .triangleCount = HOUSE_TRIANGLE_COUNT + .triangleCount = HOUSE_TRIANGLE_COUNT, + .customTransformMatrix = 0 }; #endif // guard diff --git a/programs/plantModel.h b/programs/plantModel.h index 92a4c7a..e9c31a2 100644 --- a/programs/plantModel.h +++ b/programs/plantModel.h @@ -46,7 +46,8 @@ S3L_Model3D plantModel = .vertices = plantVertices, .vertexCount = PLANT_VERTEX_COUNT, .triangles = plantTriangleIndices, - .triangleCount = PLANT_TRIANGLE_COUNT + .triangleCount = PLANT_TRIANGLE_COUNT, + .customTransformMatrix = 0 }; #endif // guard diff --git a/tools/obj2array.py b/tools/obj2array.py index bdb82c0..164ee86 100644 --- a/tools/obj2array.py +++ b/tools/obj2array.py @@ -185,13 +185,14 @@ if COMPACT: print("{.vertices=" + NAME + "Vertices,.vertexCount=" + str(len(vertices)) + ",.triangles=" + NAME.upper() + "TriangleIndices,\n.triangleCount=" + - str(len(triangles)) + "};"); + str(len(triangles)) + ",.customTransformMatrix=0};"); else: print("{") print(" .vertices = " + NAME + "Vertices,") print(" .vertexCount = " + NAME.upper() + "_VERTEX_COUNT,") print(" .triangles = " + NAME + "TriangleIndices,") - print(" .triangleCount = " + NAME.upper() + "_TRIANGLE_COUNT") + print(" .triangleCount = " + NAME.upper() + "_TRIANGLE_COUNT,") + print(" .customTransformMatrix = 0") print("};") if GUARDS: