Compare commits
70 Commits
sopyer-mas
...
curve
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98da6829ac | ||
|
|
aa07206fc1 | ||
|
|
8329bdd135 | ||
|
|
def9fe7f16 | ||
|
|
82ae20b833 | ||
|
|
164c152216 | ||
|
|
3058419d7d | ||
|
|
6727aeaca1 | ||
|
|
fb361547e5 | ||
|
|
805bd814fa | ||
|
|
1adfc794ae | ||
|
|
a2851fdf17 | ||
|
|
4e9e812b09 | ||
|
|
b963227246 | ||
|
|
a7759a740a | ||
|
|
2c005ddad1 | ||
|
|
42d6bfbafb | ||
|
|
59acd32d0a | ||
|
|
0aab63eb20 | ||
|
|
49e82e2e00 | ||
|
|
7a3e607898 | ||
|
|
d828e7521d | ||
|
|
911f0dd636 | ||
|
|
527000abd6 | ||
|
|
ba5fde9fd5 | ||
|
|
8b8435d436 | ||
|
|
8d300917a3 | ||
|
|
79af31df5a | ||
|
|
e8ed70b15f | ||
|
|
5615af5316 | ||
|
|
4ea1cf0b77 | ||
|
|
9d7012673e | ||
|
|
daaec1c9aa | ||
|
|
28005f9cdf | ||
|
|
32dcf7d535 | ||
|
|
8a384a057b | ||
|
|
32414c27b4 | ||
|
|
f020169c26 | ||
|
|
f0fdaa307d | ||
|
|
743cfcd861 | ||
|
|
285f5b0cfd | ||
|
|
2cceb53214 | ||
|
|
1390f7f707 | ||
|
|
9979275835 | ||
|
|
011e1b3ebd | ||
|
|
f28d2eef88 | ||
|
|
a67a60d19f | ||
|
|
672f252195 | ||
|
|
6796d61d07 | ||
|
|
0a500b77e7 | ||
|
|
5e5095cb8d | ||
|
|
41db59cde5 | ||
|
|
fae5b03e7c | ||
|
|
276c7e151e | ||
|
|
4779593e44 | ||
|
|
b5352a642b | ||
|
|
062f7a1b6d | ||
|
|
c5ed61f358 | ||
|
|
d535310c94 | ||
|
|
9b69811bb6 | ||
|
|
aabdad4bc4 | ||
|
|
9587ad9aee | ||
|
|
93d7232614 | ||
|
|
e5bbda3835 | ||
|
|
f750f3faeb | ||
|
|
c1ed13c36c | ||
|
|
878a6560cd | ||
|
|
80b243092b | ||
|
|
b214cfb4b9 | ||
|
|
b35f4989ad |
7
.clang-format
Normal file
7
.clang-format
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
BasedOnStyle: LLVM
|
||||||
|
IndentWidth: 2
|
||||||
|
TabWidth: 2
|
||||||
|
UseTab: Always
|
||||||
|
BreakBeforeBraces: Attach
|
||||||
|
Standard: Cpp03
|
||||||
10
.drone.yml
Normal file
10
.drone.yml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
image: syoyo/ubu-dev
|
||||||
|
script:
|
||||||
|
- curl -L -o premake4 https://github.com/syoyo/orebuildenv/blob/master/build/linux/bin/premake4?raw=true
|
||||||
|
- chmod +x ./premake4
|
||||||
|
- ./premake4 gmake
|
||||||
|
- make
|
||||||
|
notify:
|
||||||
|
email:
|
||||||
|
recipients:
|
||||||
|
- syoyo@lighttransport.com
|
||||||
@@ -26,18 +26,26 @@ add_library(tinyobjloader
|
|||||||
${tinyobjloader-Source}
|
${tinyobjloader-Source}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(test ${tinyobjloader-Test-Source})
|
option(TINYOBJLOADER_BUILD_TEST_LOADER "Build Test Loader Application" OFF)
|
||||||
target_link_libraries(test tinyobjloader)
|
|
||||||
|
|
||||||
add_executable(obj_sticher ${tinyobjloader-examples-objsticher})
|
if(TINYOBJLOADER_BUILD_TEST_LOADER)
|
||||||
target_link_libraries(obj_sticher tinyobjloader)
|
add_executable(test_loader ${tinyobjloader-Test-Source})
|
||||||
|
target_link_libraries(test_loader tinyobjloader)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(TINYOBJLOADER_BUILD_OBJ_STICHER "Build OBJ Sticher Application" OFF)
|
||||||
|
if (TINYOBJLOADER_BUILD_OBJ_STICHER)
|
||||||
|
add_executable(obj_sticher ${tinyobjloader-examples-objsticher})
|
||||||
|
target_link_libraries(obj_sticher tinyobjloader)
|
||||||
|
|
||||||
|
install ( TARGETS
|
||||||
|
obj_sticher
|
||||||
|
DESTINATION
|
||||||
|
bin
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
#Installation
|
#Installation
|
||||||
install ( TARGETS
|
|
||||||
obj_sticher
|
|
||||||
DESTINATION
|
|
||||||
bin
|
|
||||||
)
|
|
||||||
install ( TARGETS
|
install ( TARGETS
|
||||||
tinyobjloader
|
tinyobjloader
|
||||||
DESTINATION
|
DESTINATION
|
||||||
|
|||||||
20
README.md
20
README.md
@@ -1,17 +1,25 @@
|
|||||||
tinyobjloader
|
tinyobjloader
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
[](https://gitter.im/syoyo/tinyobjloader?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
|
|
||||||
[](https://app.wercker.com/project/bykey/495a3bac400212cdacdeb4dd9397bf4f)
|
[](https://app.wercker.com/project/bykey/495a3bac400212cdacdeb4dd9397bf4f)
|
||||||
|
|
||||||
|
[](https://ci.appveyor.com/project/syoyo/tinyobjloader/branch/master)
|
||||||
|
|
||||||
http://syoyo.github.io/tinyobjloader/
|
http://syoyo.github.io/tinyobjloader/
|
||||||
|
|
||||||
Tiny but poweful single file wavefront obj loader written in C++. No dependency except for C++ STL. It can parse 10M over polygons with moderate memory and time.
|
Tiny but poweful single file wavefront obj loader written in C++. No dependency except for C++ STL. It can parse 10M over polygons with moderate memory and time.
|
||||||
|
|
||||||
Good for embedding .obj loader to your (global illumination) renderer ;-)
|
`tinyobjloader` is good for embedding .obj loader to your (global illumination) renderer ;-)
|
||||||
|
|
||||||
|
|
||||||
What's new
|
What's new
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
* Jun 23, 2015 : Various fixes and added more projects using tinyobjloader. Thanks many contributors!
|
||||||
|
* Mar 03, 2015 : Replace atof() with hand-written parser for robust reading of numeric value. Thanks skurmedel!
|
||||||
|
* Feb 06, 2015 : Fix parsing multi-material object
|
||||||
* Sep 14, 2014 : Add support for multi-material per object/group. Thanks Mykhailo!
|
* Sep 14, 2014 : Add support for multi-material per object/group. Thanks Mykhailo!
|
||||||
* Mar 17, 2014 : Fixed trim newline bugs. Thanks ardneran!
|
* Mar 17, 2014 : Fixed trim newline bugs. Thanks ardneran!
|
||||||
* Apr 29, 2014 : Add API to read .obj from std::istream. Good for reading compressed .obj or connecting to procedural primitive generator. Thanks burnse!
|
* Apr 29, 2014 : Add API to read .obj from std::istream. Good for reading compressed .obj or connecting to procedural primitive generator. Thanks burnse!
|
||||||
@@ -37,6 +45,12 @@ TinyObjLoader is successfully used in ...
|
|||||||
* bullet3 https://github.com/erwincoumans/bullet3
|
* bullet3 https://github.com/erwincoumans/bullet3
|
||||||
* pbrt-v2 https://https://github.com/mmp/pbrt-v2
|
* pbrt-v2 https://https://github.com/mmp/pbrt-v2
|
||||||
* OpenGL game engine development http://swarminglogic.com/jotting/2013_10_gamedev01
|
* OpenGL game engine development http://swarminglogic.com/jotting/2013_10_gamedev01
|
||||||
|
* mallie https://lighttransport.github.io/mallie
|
||||||
|
* IBLBaker (Image Based Lighting Baker). http://www.derkreature.com/iblbaker/
|
||||||
|
* Stanford CS148 http://web.stanford.edu/class/cs148/assignments/assignment3.pdf
|
||||||
|
* Awesome Bump http://awesomebump.besaba.com/about/
|
||||||
|
* sdlgl3-wavefront OpenGL .obj viewer https://github.com/chrisliebert/sdlgl3-wavefront
|
||||||
|
* pbrt-v3 https://https://github.com/mmp/pbrt-v3
|
||||||
* Your project here!
|
* Your project here!
|
||||||
|
|
||||||
Features
|
Features
|
||||||
@@ -47,7 +61,7 @@ Features
|
|||||||
* Texcoord
|
* Texcoord
|
||||||
* Normal
|
* Normal
|
||||||
* Material
|
* Material
|
||||||
* Unknown material attributes are treated as key-value.
|
* Unknown material attributes are returned as key-value(value is string) map.
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
-----
|
-----
|
||||||
@@ -57,7 +71,7 @@ Polygon is converted into triangle.
|
|||||||
TODO
|
TODO
|
||||||
----
|
----
|
||||||
|
|
||||||
* Support quad polygon and some tags for OpenSubdiv http://graphics.pixar.com/opensubdiv/
|
- [ ] Support quad polygon and some tags for OpenSubdiv http://graphics.pixar.com/opensubdiv/
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|||||||
12
appveyor.yml
Normal file
12
appveyor.yml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
version: 0.9.{build}
|
||||||
|
|
||||||
|
# scripts that runs after repo cloning.
|
||||||
|
install:
|
||||||
|
- vcsetup.bat
|
||||||
|
|
||||||
|
platform: x64
|
||||||
|
configuration: Release
|
||||||
|
|
||||||
|
build:
|
||||||
|
parallel: true
|
||||||
|
project: TinyObjLoaderSolution.sln
|
||||||
146
cornell_box_multimaterial.obj
Normal file
146
cornell_box_multimaterial.obj
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
# cornell_box.obj and cornell_box.mtl are grabbed from Intel's embree project.
|
||||||
|
# original cornell box data
|
||||||
|
# comment
|
||||||
|
|
||||||
|
# empty line including some space
|
||||||
|
|
||||||
|
|
||||||
|
mtllib cornell_box.mtl
|
||||||
|
|
||||||
|
o floor
|
||||||
|
usemtl white
|
||||||
|
v 552.8 0.0 0.0
|
||||||
|
v 0.0 0.0 0.0
|
||||||
|
v 0.0 0.0 559.2
|
||||||
|
v 549.6 0.0 559.2
|
||||||
|
|
||||||
|
v 130.0 0.0 65.0
|
||||||
|
v 82.0 0.0 225.0
|
||||||
|
v 240.0 0.0 272.0
|
||||||
|
v 290.0 0.0 114.0
|
||||||
|
|
||||||
|
v 423.0 0.0 247.0
|
||||||
|
v 265.0 0.0 296.0
|
||||||
|
v 314.0 0.0 456.0
|
||||||
|
v 472.0 0.0 406.0
|
||||||
|
|
||||||
|
f 1 2 3 4
|
||||||
|
f 8 7 6 5
|
||||||
|
f 12 11 10 9
|
||||||
|
|
||||||
|
o light
|
||||||
|
usemtl light
|
||||||
|
v 343.0 548.0 227.0
|
||||||
|
v 343.0 548.0 332.0
|
||||||
|
v 213.0 548.0 332.0
|
||||||
|
v 213.0 548.0 227.0
|
||||||
|
f -4 -3 -2 -1
|
||||||
|
|
||||||
|
o ceiling
|
||||||
|
usemtl white
|
||||||
|
v 556.0 548.8 0.0
|
||||||
|
v 556.0 548.8 559.2
|
||||||
|
v 0.0 548.8 559.2
|
||||||
|
v 0.0 548.8 0.0
|
||||||
|
f -4 -3 -2 -1
|
||||||
|
|
||||||
|
o back_wall
|
||||||
|
usemtl white
|
||||||
|
v 549.6 0.0 559.2
|
||||||
|
v 0.0 0.0 559.2
|
||||||
|
v 0.0 548.8 559.2
|
||||||
|
v 556.0 548.8 559.2
|
||||||
|
f -4 -3 -2 -1
|
||||||
|
|
||||||
|
o front_wall
|
||||||
|
usemtl blue
|
||||||
|
v 549.6 0.0 0
|
||||||
|
v 0.0 0.0 0
|
||||||
|
v 0.0 548.8 0
|
||||||
|
v 556.0 548.8 0
|
||||||
|
#f -1 -2 -3 -4
|
||||||
|
|
||||||
|
o green_wall
|
||||||
|
usemtl green
|
||||||
|
v 0.0 0.0 559.2
|
||||||
|
v 0.0 0.0 0.0
|
||||||
|
v 0.0 548.8 0.0
|
||||||
|
v 0.0 548.8 559.2
|
||||||
|
f -4 -3 -2 -1
|
||||||
|
|
||||||
|
o red_wall
|
||||||
|
usemtl red
|
||||||
|
v 552.8 0.0 0.0
|
||||||
|
v 549.6 0.0 559.2
|
||||||
|
v 556.0 548.8 559.2
|
||||||
|
v 556.0 548.8 0.0
|
||||||
|
f -4 -3 -2 -1
|
||||||
|
|
||||||
|
o short_block
|
||||||
|
usemtl white
|
||||||
|
|
||||||
|
v 130.0 165.0 65.0
|
||||||
|
v 82.0 165.0 225.0
|
||||||
|
v 240.0 165.0 272.0
|
||||||
|
v 290.0 165.0 114.0
|
||||||
|
f -4 -3 -2 -1
|
||||||
|
|
||||||
|
v 290.0 0.0 114.0
|
||||||
|
v 290.0 165.0 114.0
|
||||||
|
v 240.0 165.0 272.0
|
||||||
|
v 240.0 0.0 272.0
|
||||||
|
f -4 -3 -2 -1
|
||||||
|
|
||||||
|
v 130.0 0.0 65.0
|
||||||
|
v 130.0 165.0 65.0
|
||||||
|
v 290.0 165.0 114.0
|
||||||
|
v 290.0 0.0 114.0
|
||||||
|
f -4 -3 -2 -1
|
||||||
|
|
||||||
|
v 82.0 0.0 225.0
|
||||||
|
v 82.0 165.0 225.0
|
||||||
|
v 130.0 165.0 65.0
|
||||||
|
v 130.0 0.0 65.0
|
||||||
|
f -4 -3 -2 -1
|
||||||
|
|
||||||
|
v 240.0 0.0 272.0
|
||||||
|
v 240.0 165.0 272.0
|
||||||
|
v 82.0 165.0 225.0
|
||||||
|
v 82.0 0.0 225.0
|
||||||
|
f -4 -3 -2 -1
|
||||||
|
|
||||||
|
o tall_block
|
||||||
|
usemtl white
|
||||||
|
|
||||||
|
v 423.0 330.0 247.0
|
||||||
|
v 265.0 330.0 296.0
|
||||||
|
v 314.0 330.0 456.0
|
||||||
|
v 472.0 330.0 406.0
|
||||||
|
f -4 -3 -2 -1
|
||||||
|
|
||||||
|
usemtl white
|
||||||
|
v 423.0 0.0 247.0
|
||||||
|
v 423.0 330.0 247.0
|
||||||
|
v 472.0 330.0 406.0
|
||||||
|
v 472.0 0.0 406.0
|
||||||
|
f -4 -3 -2 -1
|
||||||
|
|
||||||
|
v 472.0 0.0 406.0
|
||||||
|
v 472.0 330.0 406.0
|
||||||
|
v 314.0 330.0 456.0
|
||||||
|
v 314.0 0.0 456.0
|
||||||
|
f -4 -3 -2 -1
|
||||||
|
usemtl green
|
||||||
|
|
||||||
|
v 314.0 0.0 456.0
|
||||||
|
v 314.0 330.0 456.0
|
||||||
|
v 265.0 330.0 296.0
|
||||||
|
v 265.0 0.0 296.0
|
||||||
|
f -4 -3 -2 -1
|
||||||
|
|
||||||
|
v 265.0 0.0 296.0
|
||||||
|
v 265.0 330.0 296.0
|
||||||
|
v 423.0 330.0 247.0
|
||||||
|
v 423.0 0.0 247.0
|
||||||
|
f -4 -3 -2 -1
|
||||||
|
|
||||||
@@ -81,6 +81,7 @@ main(
|
|||||||
std::vector<Shape> shapes;
|
std::vector<Shape> shapes;
|
||||||
std::vector<Material> materials;
|
std::vector<Material> materials;
|
||||||
shapes.resize(num_objfiles);
|
shapes.resize(num_objfiles);
|
||||||
|
materials.resize(num_objfiles);
|
||||||
|
|
||||||
for (int i = 0; i < num_objfiles; i++) {
|
for (int i = 0; i < num_objfiles; i++) {
|
||||||
std::cout << "Loading " << argv[i+1] << " ... " << std::flush;
|
std::cout << "Loading " << argv[i+1] << " ... " << std::flush;
|
||||||
@@ -98,7 +99,8 @@ main(
|
|||||||
std::vector<tinyobj::material_t> out_material;
|
std::vector<tinyobj::material_t> out_material;
|
||||||
StichObjs(out_shape, out_material, shapes, materials);
|
StichObjs(out_shape, out_material, shapes, materials);
|
||||||
|
|
||||||
bool ret = WriteObj(out_filename, out_shape, out_material);
|
bool coordTransform = true;
|
||||||
|
bool ret = WriteObj(out_filename, out_shape, out_material, coordTransform);
|
||||||
assert(ret);
|
assert(ret);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ bool WriteMat(const std::string& filename, const std::vector<tinyobj::material_t
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WriteObj(const std::string& filename, const std::vector<tinyobj::shape_t>& shapes, const std::vector<tinyobj::material_t>& materials) {
|
bool WriteObj(const std::string& filename, const std::vector<tinyobj::shape_t>& shapes, const std::vector<tinyobj::material_t>& materials, bool coordTransform) {
|
||||||
FILE* fp = fopen(filename.c_str(), "w");
|
FILE* fp = fopen(filename.c_str(), "w");
|
||||||
if (!fp) {
|
if (!fp) {
|
||||||
fprintf(stderr, "Failed to open file [ %s ] for write.\n", filename.c_str());
|
fprintf(stderr, "Failed to open file [ %s ] for write.\n", filename.c_str());
|
||||||
@@ -74,10 +74,17 @@ bool WriteObj(const std::string& filename, const std::vector<tinyobj::shape_t>&
|
|||||||
for (size_t k = 0; k < shapes[i].mesh.indices.size() / 3; k++) {
|
for (size_t k = 0; k < shapes[i].mesh.indices.size() / 3; k++) {
|
||||||
for (int j = 0; j < 3; j++) {
|
for (int j = 0; j < 3; j++) {
|
||||||
int idx = shapes[i].mesh.indices[3*k+j];
|
int idx = shapes[i].mesh.indices[3*k+j];
|
||||||
fprintf(fp, "v %f %f %f\n",
|
if (coordTransform) {
|
||||||
shapes[i].mesh.positions[3*idx+0],
|
fprintf(fp, "v %f %f %f\n",
|
||||||
shapes[i].mesh.positions[3*idx+1],
|
shapes[i].mesh.positions[3*idx+0],
|
||||||
shapes[i].mesh.positions[3*idx+2]);
|
shapes[i].mesh.positions[3*idx+2],
|
||||||
|
-shapes[i].mesh.positions[3*idx+1]);
|
||||||
|
} else {
|
||||||
|
fprintf(fp, "v %f %f %f\n",
|
||||||
|
shapes[i].mesh.positions[3*idx+0],
|
||||||
|
shapes[i].mesh.positions[3*idx+1],
|
||||||
|
shapes[i].mesh.positions[3*idx+2]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,10 +93,17 @@ bool WriteObj(const std::string& filename, const std::vector<tinyobj::shape_t>&
|
|||||||
for (size_t k = 0; k < shapes[i].mesh.indices.size() / 3; k++) {
|
for (size_t k = 0; k < shapes[i].mesh.indices.size() / 3; k++) {
|
||||||
for (int j = 0; j < 3; j++) {
|
for (int j = 0; j < 3; j++) {
|
||||||
int idx = shapes[i].mesh.indices[3*k+j];
|
int idx = shapes[i].mesh.indices[3*k+j];
|
||||||
fprintf(fp, "vn %f %f %f\n",
|
if (coordTransform) {
|
||||||
shapes[i].mesh.normals[3*idx+0],
|
fprintf(fp, "vn %f %f %f\n",
|
||||||
shapes[i].mesh.normals[3*idx+1],
|
shapes[i].mesh.normals[3*idx+0],
|
||||||
shapes[i].mesh.normals[3*idx+2]);
|
shapes[i].mesh.normals[3*idx+2],
|
||||||
|
-shapes[i].mesh.normals[3*idx+1]);
|
||||||
|
} else {
|
||||||
|
fprintf(fp, "vn %f %f %f\n",
|
||||||
|
shapes[i].mesh.normals[3*idx+0],
|
||||||
|
shapes[i].mesh.normals[3*idx+1],
|
||||||
|
shapes[i].mesh.normals[3*idx+2]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -119,6 +133,10 @@ bool WriteObj(const std::string& filename, const std::vector<tinyobj::shape_t>&
|
|||||||
int v1 = (3*k + 1) + 1 + v_offset;
|
int v1 = (3*k + 1) + 1 + v_offset;
|
||||||
int v2 = (3*k + 2) + 1 + v_offset;
|
int v2 = (3*k + 2) + 1 + v_offset;
|
||||||
|
|
||||||
|
int vt0 = (3*k + 0) + 1 + vt_offset;
|
||||||
|
int vt1 = (3*k + 1) + 1 + vt_offset;
|
||||||
|
int vt2 = (3*k + 2) + 1 + vt_offset;
|
||||||
|
|
||||||
int material_id = shapes[i].mesh.material_ids[k];
|
int material_id = shapes[i].mesh.material_ids[k];
|
||||||
if (material_id != prev_material_id) {
|
if (material_id != prev_material_id) {
|
||||||
std::string material_name = materials[material_id].name;
|
std::string material_name = materials[material_id].name;
|
||||||
@@ -128,7 +146,7 @@ bool WriteObj(const std::string& filename, const std::vector<tinyobj::shape_t>&
|
|||||||
|
|
||||||
if (has_vn && has_vt) {
|
if (has_vn && has_vt) {
|
||||||
fprintf(fp, "f %d/%d/%d %d/%d/%d %d/%d/%d\n",
|
fprintf(fp, "f %d/%d/%d %d/%d/%d %d/%d/%d\n",
|
||||||
v0, v0, v0, v1, v1, v1, v2, v2, v2);
|
v0, vt0, v0, v1, vt1, v1, v2, vt2, v2);
|
||||||
} else if (has_vn && !has_vt) {
|
} else if (has_vn && !has_vt) {
|
||||||
fprintf(fp, "f %d//%d %d//%d %d//%d\n", v0, v0, v1, v1, v2, v2);
|
fprintf(fp, "f %d//%d %d//%d %d//%d\n", v0, v0, v1, v1, v2, v2);
|
||||||
} else if (!has_vn && has_vt) {
|
} else if (!has_vn && has_vt) {
|
||||||
@@ -141,7 +159,7 @@ bool WriteObj(const std::string& filename, const std::vector<tinyobj::shape_t>&
|
|||||||
|
|
||||||
v_offset += shapes[i].mesh.indices.size();
|
v_offset += shapes[i].mesh.indices.size();
|
||||||
//vn_offset += shapes[i].mesh.normals.size() / 3;
|
//vn_offset += shapes[i].mesh.normals.size() / 3;
|
||||||
//vt_offset += shapes[i].mesh.texcoords.size() / 2;
|
vt_offset += shapes[i].mesh.texcoords.size() / 2;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "../../tiny_obj_loader.h"
|
#include "../../tiny_obj_loader.h"
|
||||||
|
|
||||||
extern bool WriteObj(const std::string& filename, const std::vector<tinyobj::shape_t>& shapes, const std::vector<tinyobj::material_t>& materials);
|
extern bool WriteObj(const std::string& filename, const std::vector<tinyobj::shape_t>& shapes, const std::vector<tinyobj::material_t>& materials, bool coordTransform = false);
|
||||||
|
|
||||||
|
|
||||||
#endif // __OBJ_WRITER_H__
|
#endif // __OBJ_WRITER_H__
|
||||||
|
|||||||
601
python/cornell_box_output.json
Normal file
601
python/cornell_box_output.json
Normal file
@@ -0,0 +1,601 @@
|
|||||||
|
{
|
||||||
|
"shapes": {
|
||||||
|
"ceiling": {
|
||||||
|
"texcoords": [],
|
||||||
|
"positions": [
|
||||||
|
556.0,
|
||||||
|
548.7999877929688,
|
||||||
|
0.0,
|
||||||
|
556.0,
|
||||||
|
548.7999877929688,
|
||||||
|
559.2000122070312,
|
||||||
|
0.0,
|
||||||
|
548.7999877929688,
|
||||||
|
559.2000122070312,
|
||||||
|
0.0,
|
||||||
|
548.7999877929688,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"indicies": [
|
||||||
|
0.0,
|
||||||
|
1.0,
|
||||||
|
2.0,
|
||||||
|
0.0,
|
||||||
|
2.0,
|
||||||
|
3.0
|
||||||
|
],
|
||||||
|
"material_ids": [
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"normals": []
|
||||||
|
},
|
||||||
|
"floor": {
|
||||||
|
"texcoords": [],
|
||||||
|
"positions": [
|
||||||
|
552.7999877929688,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
559.2000122070312,
|
||||||
|
549.5999755859375,
|
||||||
|
0.0,
|
||||||
|
559.2000122070312,
|
||||||
|
290.0,
|
||||||
|
0.0,
|
||||||
|
114.0,
|
||||||
|
240.0,
|
||||||
|
0.0,
|
||||||
|
272.0,
|
||||||
|
82.0,
|
||||||
|
0.0,
|
||||||
|
225.0,
|
||||||
|
130.0,
|
||||||
|
0.0,
|
||||||
|
65.0,
|
||||||
|
472.0,
|
||||||
|
0.0,
|
||||||
|
406.0,
|
||||||
|
314.0,
|
||||||
|
0.0,
|
||||||
|
456.0,
|
||||||
|
265.0,
|
||||||
|
0.0,
|
||||||
|
296.0,
|
||||||
|
423.0,
|
||||||
|
0.0,
|
||||||
|
247.0
|
||||||
|
],
|
||||||
|
"indicies": [
|
||||||
|
0.0,
|
||||||
|
1.0,
|
||||||
|
2.0,
|
||||||
|
0.0,
|
||||||
|
2.0,
|
||||||
|
3.0,
|
||||||
|
4.0,
|
||||||
|
5.0,
|
||||||
|
6.0,
|
||||||
|
4.0,
|
||||||
|
6.0,
|
||||||
|
7.0,
|
||||||
|
8.0,
|
||||||
|
9.0,
|
||||||
|
10.0,
|
||||||
|
8.0,
|
||||||
|
10.0,
|
||||||
|
11.0
|
||||||
|
],
|
||||||
|
"material_ids": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"normals": []
|
||||||
|
},
|
||||||
|
"light": {
|
||||||
|
"texcoords": [],
|
||||||
|
"positions": [
|
||||||
|
343.0,
|
||||||
|
548.0,
|
||||||
|
227.0,
|
||||||
|
343.0,
|
||||||
|
548.0,
|
||||||
|
332.0,
|
||||||
|
213.0,
|
||||||
|
548.0,
|
||||||
|
332.0,
|
||||||
|
213.0,
|
||||||
|
548.0,
|
||||||
|
227.0
|
||||||
|
],
|
||||||
|
"indicies": [
|
||||||
|
0.0,
|
||||||
|
1.0,
|
||||||
|
2.0,
|
||||||
|
0.0,
|
||||||
|
2.0,
|
||||||
|
3.0
|
||||||
|
],
|
||||||
|
"material_ids": [
|
||||||
|
4.0,
|
||||||
|
4.0
|
||||||
|
],
|
||||||
|
"normals": []
|
||||||
|
},
|
||||||
|
"green_wall": {
|
||||||
|
"texcoords": [],
|
||||||
|
"positions": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
559.2000122070312,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
548.7999877929688,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
548.7999877929688,
|
||||||
|
559.2000122070312
|
||||||
|
],
|
||||||
|
"indicies": [
|
||||||
|
0.0,
|
||||||
|
1.0,
|
||||||
|
2.0,
|
||||||
|
0.0,
|
||||||
|
2.0,
|
||||||
|
3.0
|
||||||
|
],
|
||||||
|
"material_ids": [
|
||||||
|
2.0,
|
||||||
|
2.0
|
||||||
|
],
|
||||||
|
"normals": []
|
||||||
|
},
|
||||||
|
"back_wall": {
|
||||||
|
"texcoords": [],
|
||||||
|
"positions": [
|
||||||
|
549.5999755859375,
|
||||||
|
0.0,
|
||||||
|
559.2000122070312,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
559.2000122070312,
|
||||||
|
0.0,
|
||||||
|
548.7999877929688,
|
||||||
|
559.2000122070312,
|
||||||
|
556.0,
|
||||||
|
548.7999877929688,
|
||||||
|
559.2000122070312
|
||||||
|
],
|
||||||
|
"indicies": [
|
||||||
|
0.0,
|
||||||
|
1.0,
|
||||||
|
2.0,
|
||||||
|
0.0,
|
||||||
|
2.0,
|
||||||
|
3.0
|
||||||
|
],
|
||||||
|
"material_ids": [
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"normals": []
|
||||||
|
},
|
||||||
|
"short_block": {
|
||||||
|
"texcoords": [],
|
||||||
|
"positions": [
|
||||||
|
130.0,
|
||||||
|
165.0,
|
||||||
|
65.0,
|
||||||
|
82.0,
|
||||||
|
165.0,
|
||||||
|
225.0,
|
||||||
|
240.0,
|
||||||
|
165.0,
|
||||||
|
272.0,
|
||||||
|
290.0,
|
||||||
|
165.0,
|
||||||
|
114.0,
|
||||||
|
290.0,
|
||||||
|
0.0,
|
||||||
|
114.0,
|
||||||
|
290.0,
|
||||||
|
165.0,
|
||||||
|
114.0,
|
||||||
|
240.0,
|
||||||
|
165.0,
|
||||||
|
272.0,
|
||||||
|
240.0,
|
||||||
|
0.0,
|
||||||
|
272.0,
|
||||||
|
130.0,
|
||||||
|
0.0,
|
||||||
|
65.0,
|
||||||
|
130.0,
|
||||||
|
165.0,
|
||||||
|
65.0,
|
||||||
|
290.0,
|
||||||
|
165.0,
|
||||||
|
114.0,
|
||||||
|
290.0,
|
||||||
|
0.0,
|
||||||
|
114.0,
|
||||||
|
82.0,
|
||||||
|
0.0,
|
||||||
|
225.0,
|
||||||
|
82.0,
|
||||||
|
165.0,
|
||||||
|
225.0,
|
||||||
|
130.0,
|
||||||
|
165.0,
|
||||||
|
65.0,
|
||||||
|
130.0,
|
||||||
|
0.0,
|
||||||
|
65.0,
|
||||||
|
240.0,
|
||||||
|
0.0,
|
||||||
|
272.0,
|
||||||
|
240.0,
|
||||||
|
165.0,
|
||||||
|
272.0,
|
||||||
|
82.0,
|
||||||
|
165.0,
|
||||||
|
225.0,
|
||||||
|
82.0,
|
||||||
|
0.0,
|
||||||
|
225.0
|
||||||
|
],
|
||||||
|
"indicies": [
|
||||||
|
0.0,
|
||||||
|
1.0,
|
||||||
|
2.0,
|
||||||
|
0.0,
|
||||||
|
2.0,
|
||||||
|
3.0,
|
||||||
|
4.0,
|
||||||
|
5.0,
|
||||||
|
6.0,
|
||||||
|
4.0,
|
||||||
|
6.0,
|
||||||
|
7.0,
|
||||||
|
8.0,
|
||||||
|
9.0,
|
||||||
|
10.0,
|
||||||
|
8.0,
|
||||||
|
10.0,
|
||||||
|
11.0,
|
||||||
|
12.0,
|
||||||
|
13.0,
|
||||||
|
14.0,
|
||||||
|
12.0,
|
||||||
|
14.0,
|
||||||
|
15.0,
|
||||||
|
16.0,
|
||||||
|
17.0,
|
||||||
|
18.0,
|
||||||
|
16.0,
|
||||||
|
18.0,
|
||||||
|
19.0
|
||||||
|
],
|
||||||
|
"material_ids": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"normals": []
|
||||||
|
},
|
||||||
|
"tall_block": {
|
||||||
|
"texcoords": [],
|
||||||
|
"positions": [
|
||||||
|
423.0,
|
||||||
|
0.0,
|
||||||
|
247.0,
|
||||||
|
423.0,
|
||||||
|
330.0,
|
||||||
|
247.0,
|
||||||
|
472.0,
|
||||||
|
330.0,
|
||||||
|
406.0,
|
||||||
|
472.0,
|
||||||
|
0.0,
|
||||||
|
406.0,
|
||||||
|
472.0,
|
||||||
|
0.0,
|
||||||
|
406.0,
|
||||||
|
472.0,
|
||||||
|
330.0,
|
||||||
|
406.0,
|
||||||
|
314.0,
|
||||||
|
330.0,
|
||||||
|
456.0,
|
||||||
|
314.0,
|
||||||
|
0.0,
|
||||||
|
456.0,
|
||||||
|
314.0,
|
||||||
|
0.0,
|
||||||
|
456.0,
|
||||||
|
314.0,
|
||||||
|
330.0,
|
||||||
|
456.0,
|
||||||
|
265.0,
|
||||||
|
330.0,
|
||||||
|
296.0,
|
||||||
|
265.0,
|
||||||
|
0.0,
|
||||||
|
296.0,
|
||||||
|
265.0,
|
||||||
|
0.0,
|
||||||
|
296.0,
|
||||||
|
265.0,
|
||||||
|
330.0,
|
||||||
|
296.0,
|
||||||
|
423.0,
|
||||||
|
330.0,
|
||||||
|
247.0,
|
||||||
|
423.0,
|
||||||
|
0.0,
|
||||||
|
247.0
|
||||||
|
],
|
||||||
|
"indicies": [
|
||||||
|
0.0,
|
||||||
|
1.0,
|
||||||
|
2.0,
|
||||||
|
0.0,
|
||||||
|
2.0,
|
||||||
|
3.0,
|
||||||
|
4.0,
|
||||||
|
5.0,
|
||||||
|
6.0,
|
||||||
|
4.0,
|
||||||
|
6.0,
|
||||||
|
7.0,
|
||||||
|
8.0,
|
||||||
|
9.0,
|
||||||
|
10.0,
|
||||||
|
8.0,
|
||||||
|
10.0,
|
||||||
|
11.0,
|
||||||
|
12.0,
|
||||||
|
13.0,
|
||||||
|
14.0,
|
||||||
|
12.0,
|
||||||
|
14.0,
|
||||||
|
15.0
|
||||||
|
],
|
||||||
|
"material_ids": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"normals": []
|
||||||
|
},
|
||||||
|
"red_wall": {
|
||||||
|
"texcoords": [],
|
||||||
|
"positions": [
|
||||||
|
552.7999877929688,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
549.5999755859375,
|
||||||
|
0.0,
|
||||||
|
559.2000122070312,
|
||||||
|
556.0,
|
||||||
|
548.7999877929688,
|
||||||
|
559.2000122070312,
|
||||||
|
556.0,
|
||||||
|
548.7999877929688,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"indicies": [
|
||||||
|
0.0,
|
||||||
|
1.0,
|
||||||
|
2.0,
|
||||||
|
0.0,
|
||||||
|
2.0,
|
||||||
|
3.0
|
||||||
|
],
|
||||||
|
"material_ids": [
|
||||||
|
1.0,
|
||||||
|
1.0
|
||||||
|
],
|
||||||
|
"normals": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"materials": {
|
||||||
|
"blue": {
|
||||||
|
"transmittance": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"illum": 0,
|
||||||
|
"emission": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"diffuse_texname": "",
|
||||||
|
"ambient_texname": "",
|
||||||
|
"normal_texname": "",
|
||||||
|
"shininess": 1.0,
|
||||||
|
"ior": 1.0,
|
||||||
|
"specular": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"specular_texname": "",
|
||||||
|
"diffuse": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
1.0
|
||||||
|
],
|
||||||
|
"ambient": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"dissolve": 1.0
|
||||||
|
},
|
||||||
|
"light": {
|
||||||
|
"transmittance": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"illum": 0,
|
||||||
|
"emission": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"diffuse_texname": "",
|
||||||
|
"ambient_texname": "",
|
||||||
|
"normal_texname": "",
|
||||||
|
"shininess": 1.0,
|
||||||
|
"ior": 1.0,
|
||||||
|
"specular": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"specular_texname": "",
|
||||||
|
"diffuse": [
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0
|
||||||
|
],
|
||||||
|
"ambient": [
|
||||||
|
20.0,
|
||||||
|
20.0,
|
||||||
|
20.0
|
||||||
|
],
|
||||||
|
"dissolve": 1.0
|
||||||
|
},
|
||||||
|
"white": {
|
||||||
|
"transmittance": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"illum": 0,
|
||||||
|
"emission": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"diffuse_texname": "",
|
||||||
|
"ambient_texname": "",
|
||||||
|
"normal_texname": "",
|
||||||
|
"shininess": 1.0,
|
||||||
|
"ior": 1.0,
|
||||||
|
"specular": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"specular_texname": "",
|
||||||
|
"diffuse": [
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0
|
||||||
|
],
|
||||||
|
"ambient": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"dissolve": 1.0
|
||||||
|
},
|
||||||
|
"green": {
|
||||||
|
"transmittance": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"illum": 0,
|
||||||
|
"emission": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"diffuse_texname": "",
|
||||||
|
"ambient_texname": "",
|
||||||
|
"normal_texname": "",
|
||||||
|
"shininess": 1.0,
|
||||||
|
"ior": 1.0,
|
||||||
|
"specular": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"specular_texname": "",
|
||||||
|
"diffuse": [
|
||||||
|
0.0,
|
||||||
|
1.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"ambient": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"dissolve": 1.0
|
||||||
|
},
|
||||||
|
"red": {
|
||||||
|
"transmittance": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"illum": 0,
|
||||||
|
"emission": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"diffuse_texname": "",
|
||||||
|
"ambient_texname": "",
|
||||||
|
"normal_texname": "",
|
||||||
|
"shininess": 1.0,
|
||||||
|
"ior": 1.0,
|
||||||
|
"specular": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"specular_texname": "",
|
||||||
|
"diffuse": [
|
||||||
|
1.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"ambient": [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0
|
||||||
|
],
|
||||||
|
"dissolve": 1.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
python/howto.py
Normal file
11
python/howto.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import tinyobjloader as tol
|
||||||
|
import json
|
||||||
|
|
||||||
|
model = tol.LoadObj("cornell_box.obj")
|
||||||
|
|
||||||
|
#print(model["shapes"], model["materials"])
|
||||||
|
print( json.dumps(model, indent=4) )
|
||||||
|
|
||||||
|
#see cornell_box_output.json
|
||||||
|
|
||||||
|
|
||||||
148
python/main.cpp
Normal file
148
python/main.cpp
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
//python3 module for tinyobjloader
|
||||||
|
//
|
||||||
|
//usage:
|
||||||
|
// import tinyobjloader as tol
|
||||||
|
// model = tol.LoadObj(name)
|
||||||
|
// print(model["shapes"])
|
||||||
|
// print(model["materials"]
|
||||||
|
|
||||||
|
#include <Python.h>
|
||||||
|
#include <vector>
|
||||||
|
#include "../tiny_obj_loader.h"
|
||||||
|
|
||||||
|
typedef std::vector<double> vectd;
|
||||||
|
|
||||||
|
PyObject*
|
||||||
|
pyTupleFromfloat3 (float array[3])
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
PyObject* tuple = PyTuple_New(3);
|
||||||
|
|
||||||
|
for(i=0; i<=2 ; i++){
|
||||||
|
PyTuple_SetItem(tuple, i, PyFloat_FromDouble(array[i]));
|
||||||
|
}
|
||||||
|
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
|
||||||
|
static PyObject*
|
||||||
|
pyLoadObj(PyObject* self, PyObject* args)
|
||||||
|
{
|
||||||
|
PyObject *rtndict, *pyshapes, *pymaterials,
|
||||||
|
*current, *meshobj;
|
||||||
|
|
||||||
|
char const* filename;
|
||||||
|
char *current_name;
|
||||||
|
vectd vect;
|
||||||
|
|
||||||
|
std::vector<tinyobj::shape_t> shapes;
|
||||||
|
std::vector<tinyobj::material_t> materials;
|
||||||
|
|
||||||
|
if(!PyArg_ParseTuple(args, "s", &filename))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
tinyobj::LoadObj(shapes, materials, filename);
|
||||||
|
|
||||||
|
pyshapes = PyDict_New();
|
||||||
|
pymaterials = PyDict_New();
|
||||||
|
rtndict = PyDict_New();
|
||||||
|
|
||||||
|
for (std::vector<tinyobj::shape_t>::iterator shape = shapes.begin() ;
|
||||||
|
shape != shapes.end(); shape++)
|
||||||
|
{
|
||||||
|
meshobj = PyDict_New();
|
||||||
|
tinyobj::mesh_t cm = (*shape).mesh;
|
||||||
|
|
||||||
|
for (int i = 0; i <= 4; i++ )
|
||||||
|
{
|
||||||
|
current = PyList_New(0);
|
||||||
|
|
||||||
|
switch(i) {
|
||||||
|
|
||||||
|
case 0:
|
||||||
|
current_name = "positions";
|
||||||
|
vect = vectd(cm.positions.begin(), cm.positions.end()); break;
|
||||||
|
case 1:
|
||||||
|
current_name = "normals";
|
||||||
|
vect = vectd(cm.normals.begin(), cm.normals.end()); break;
|
||||||
|
case 2:
|
||||||
|
current_name = "texcoords";
|
||||||
|
vect = vectd(cm.texcoords.begin(), cm.texcoords.end()); break;
|
||||||
|
case 3:
|
||||||
|
current_name = "indicies";
|
||||||
|
vect = vectd(cm.indices.begin(), cm.indices.end()); break;
|
||||||
|
case 4:
|
||||||
|
current_name = "material_ids";
|
||||||
|
vect = vectd(cm.material_ids.begin(), cm.material_ids.end()); break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
for (vectd::iterator it = vect.begin() ;
|
||||||
|
it != vect.end(); it++)
|
||||||
|
{
|
||||||
|
PyList_Insert(current, it - vect.begin(), PyFloat_FromDouble(*it));
|
||||||
|
}
|
||||||
|
|
||||||
|
PyDict_SetItemString(meshobj, current_name, current);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
PyDict_SetItemString(pyshapes, (*shape).name.c_str(), meshobj);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (std::vector<tinyobj::material_t>::iterator mat = materials.begin() ;
|
||||||
|
mat != materials.end(); mat++)
|
||||||
|
{
|
||||||
|
PyObject *matobj = PyDict_New();
|
||||||
|
|
||||||
|
PyDict_SetItemString(matobj, "shininess", PyFloat_FromDouble((*mat).shininess));
|
||||||
|
PyDict_SetItemString(matobj, "ior", PyFloat_FromDouble((*mat).ior));
|
||||||
|
PyDict_SetItemString(matobj, "dissolve", PyFloat_FromDouble((*mat).dissolve));
|
||||||
|
PyDict_SetItemString(matobj, "illum", PyLong_FromLong((*mat).illum));
|
||||||
|
PyDict_SetItemString(matobj, "ambient_texname", PyUnicode_FromString((*mat).ambient_texname.c_str()));
|
||||||
|
PyDict_SetItemString(matobj, "diffuse_texname", PyUnicode_FromString((*mat).diffuse_texname.c_str()));
|
||||||
|
PyDict_SetItemString(matobj, "specular_texname", PyUnicode_FromString((*mat).specular_texname.c_str()));
|
||||||
|
PyDict_SetItemString(matobj, "normal_texname", PyUnicode_FromString((*mat).normal_texname.c_str()));
|
||||||
|
PyDict_SetItemString(matobj, "ambient", pyTupleFromfloat3((*mat).ambient));
|
||||||
|
PyDict_SetItemString(matobj, "diffuse", pyTupleFromfloat3((*mat).diffuse));
|
||||||
|
PyDict_SetItemString(matobj, "specular", pyTupleFromfloat3((*mat).specular));
|
||||||
|
PyDict_SetItemString(matobj, "transmittance", pyTupleFromfloat3((*mat).transmittance));
|
||||||
|
PyDict_SetItemString(matobj, "emission", pyTupleFromfloat3((*mat).emission));
|
||||||
|
|
||||||
|
PyDict_SetItemString(pymaterials, (*mat).name.c_str(), matobj);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyDict_SetItemString(rtndict, "shapes", pyshapes);
|
||||||
|
PyDict_SetItemString(rtndict, "materials", pymaterials);
|
||||||
|
|
||||||
|
return rtndict;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static PyMethodDef mMethods[] = {
|
||||||
|
|
||||||
|
{"LoadObj", pyLoadObj, METH_VARARGS},
|
||||||
|
{NULL, NULL, 0, NULL}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"tinyobjloader",
|
||||||
|
NULL,
|
||||||
|
-1,
|
||||||
|
mMethods
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
PyMODINIT_FUNC
|
||||||
|
PyInit_tinyobjloader(void)
|
||||||
|
{
|
||||||
|
return PyModule_Create(&moduledef);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
96
python/pyTOL.cbp.mak
Normal file
96
python/pyTOL.cbp.mak
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
#------------------------------------------------------------------------------#
|
||||||
|
# This makefile was generated by 'cbp2make' tool rev.147 #
|
||||||
|
#------------------------------------------------------------------------------#
|
||||||
|
|
||||||
|
|
||||||
|
WORKDIR = `pwd`
|
||||||
|
|
||||||
|
CC = gcc
|
||||||
|
CXX = g++
|
||||||
|
AR = ar
|
||||||
|
LD = g++
|
||||||
|
WINDRES = windres
|
||||||
|
|
||||||
|
INC =
|
||||||
|
CFLAGS = -Wall -fexceptions `python3-config --cflags`
|
||||||
|
RESINC =
|
||||||
|
LIBDIR =
|
||||||
|
LIB =
|
||||||
|
LDFLAGS = `python3-config --ldflags`
|
||||||
|
|
||||||
|
INC_DEBUG = $(INC)
|
||||||
|
CFLAGS_DEBUG = $(CFLAGS) -g
|
||||||
|
RESINC_DEBUG = $(RESINC)
|
||||||
|
RCFLAGS_DEBUG = $(RCFLAGS)
|
||||||
|
LIBDIR_DEBUG = $(LIBDIR)
|
||||||
|
LIB_DEBUG = $(LIB)
|
||||||
|
LDFLAGS_DEBUG = $(LDFLAGS)
|
||||||
|
OBJDIR_DEBUG = obj/Debug
|
||||||
|
DEP_DEBUG =
|
||||||
|
OUT_DEBUG = bin/Debug/tinyobjloader.so
|
||||||
|
|
||||||
|
INC_RELEASE = $(INC)
|
||||||
|
CFLAGS_RELEASE = $(CFLAGS) -O2
|
||||||
|
RESINC_RELEASE = $(RESINC)
|
||||||
|
RCFLAGS_RELEASE = $(RCFLAGS)
|
||||||
|
LIBDIR_RELEASE = $(LIBDIR)
|
||||||
|
LIB_RELEASE = $(LIB)
|
||||||
|
LDFLAGS_RELEASE = $(LDFLAGS) -s
|
||||||
|
OBJDIR_RELEASE = obj/Release
|
||||||
|
DEP_RELEASE =
|
||||||
|
OUT_RELEASE = bin/Release/tinyobjloader.so
|
||||||
|
|
||||||
|
OBJ_DEBUG = $(OBJDIR_DEBUG)/main.o $(OBJDIR_DEBUG)/tiny_obj_loader.o
|
||||||
|
|
||||||
|
OBJ_RELEASE = $(OBJDIR_RELEASE)/main.o $(OBJDIR_RELEASE)/tiny_obj_loader.o
|
||||||
|
|
||||||
|
all: debug release
|
||||||
|
|
||||||
|
clean: clean_debug clean_release
|
||||||
|
|
||||||
|
before_debug:
|
||||||
|
test -d bin/Debug || mkdir -p bin/Debug
|
||||||
|
test -d $(OBJDIR_DEBUG) || mkdir -p $(OBJDIR_DEBUG)
|
||||||
|
|
||||||
|
after_debug:
|
||||||
|
|
||||||
|
debug: before_debug out_debug after_debug
|
||||||
|
|
||||||
|
out_debug: before_debug $(OBJ_DEBUG) $(DEP_DEBUG)
|
||||||
|
$(LD) -shared $(LIBDIR_DEBUG) $(OBJ_DEBUG) -o $(OUT_DEBUG) $(LDFLAGS_DEBUG) $(LIB_DEBUG)
|
||||||
|
|
||||||
|
$(OBJDIR_DEBUG)/main.o: main.cpp
|
||||||
|
$(CXX) $(CFLAGS_DEBUG) $(INC_DEBUG) -c main.cpp -o $(OBJDIR_DEBUG)/main.o
|
||||||
|
|
||||||
|
$(OBJDIR_DEBUG)/tiny_obj_loader.o: ../tiny_obj_loader.cc
|
||||||
|
$(CC) $(CFLAGS_DEBUG) $(INC_DEBUG) -c ../tiny_obj_loader.cc -o $(OBJDIR_DEBUG)/tiny_obj_loader.o
|
||||||
|
|
||||||
|
clean_debug:
|
||||||
|
rm -f $(OBJ_DEBUG) $(OUT_DEBUG)
|
||||||
|
rm -rf bin/Debug
|
||||||
|
rm -rf $(OBJDIR_DEBUG)
|
||||||
|
|
||||||
|
before_release:
|
||||||
|
test -d bin/Release || mkdir -p bin/Release
|
||||||
|
test -d $(OBJDIR_RELEASE) || mkdir -p $(OBJDIR_RELEASE)
|
||||||
|
|
||||||
|
after_release:
|
||||||
|
|
||||||
|
release: before_release out_release after_release
|
||||||
|
|
||||||
|
out_release: before_release $(OBJ_RELEASE) $(DEP_RELEASE)
|
||||||
|
$(LD) -shared $(LIBDIR_RELEASE) $(OBJ_RELEASE) -o $(OUT_RELEASE) $(LDFLAGS_RELEASE) $(LIB_RELEASE)
|
||||||
|
|
||||||
|
$(OBJDIR_RELEASE)/main.o: main.cpp
|
||||||
|
$(CXX) $(CFLAGS_RELEASE) $(INC_RELEASE) -c main.cpp -o $(OBJDIR_RELEASE)/main.o
|
||||||
|
|
||||||
|
$(OBJDIR_RELEASE)/tiny_obj_loader.o: ../tiny_obj_loader.cc
|
||||||
|
$(CC) $(CFLAGS_RELEASE) $(INC_RELEASE) -c ../tiny_obj_loader.cc -o $(OBJDIR_RELEASE)/tiny_obj_loader.o
|
||||||
|
|
||||||
|
clean_release:
|
||||||
|
rm -f $(OBJ_RELEASE) $(OUT_RELEASE)
|
||||||
|
rm -rf bin/Release
|
||||||
|
rm -rf $(OBJDIR_RELEASE)
|
||||||
|
|
||||||
|
.PHONY: before_debug after_debug clean_debug before_release after_release clean_release
|
||||||
|
|
||||||
13
python/setup.py
Normal file
13
python/setup.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
from distutils.core import setup, Extension
|
||||||
|
|
||||||
|
|
||||||
|
m = Extension('tinyobjloader',
|
||||||
|
sources = ['main.cpp', '../tiny_obj_loader.cc'])
|
||||||
|
|
||||||
|
|
||||||
|
setup (name = 'tinyobjloader',
|
||||||
|
version = '0.1',
|
||||||
|
description = 'Python module for tinyobjloader',
|
||||||
|
ext_modules = [m])
|
||||||
|
|
||||||
|
|
||||||
36
test.cc
36
test.cc
@@ -7,9 +7,10 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
static void PrintInfo(const std::vector<tinyobj::shape_t>& shapes, const std::vector<tinyobj::material_t>& materials)
|
static void PrintInfo(const std::vector<tinyobj::shape_t>& shapes, const std::vector<tinyobj::curve_t>& curves, const std::vector<tinyobj::material_t>& materials)
|
||||||
{
|
{
|
||||||
std::cout << "# of shapes : " << shapes.size() << std::endl;
|
std::cout << "# of shapes : " << shapes.size() << std::endl;
|
||||||
|
std::cout << "# of curves : " << curves.size() << std::endl;
|
||||||
std::cout << "# of materials : " << materials.size() << std::endl;
|
std::cout << "# of materials : " << materials.size() << std::endl;
|
||||||
|
|
||||||
for (size_t i = 0; i < shapes.size(); i++) {
|
for (size_t i = 0; i < shapes.size(); i++) {
|
||||||
@@ -31,6 +32,29 @@ static void PrintInfo(const std::vector<tinyobj::shape_t>& shapes, const std::ve
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (size_t i = 0; i < curves.size(); i++) {
|
||||||
|
printf("curve[%ld].name = %s\n", i, curves[i].name.c_str());
|
||||||
|
printf("Size of curve[%ld].indices: %ld\n", i, curves[i].indices.size());
|
||||||
|
|
||||||
|
printf("curves[%ld].vertices: %ld\n", i, curves[i].positions.size());
|
||||||
|
assert((curves[i].positions.size() % 3) == 0);
|
||||||
|
for (size_t v = 0; v < curves[i].positions.size() / 3; v++) {
|
||||||
|
printf(" v[%ld] = (%f, %f, %f)\n", v,
|
||||||
|
curves[i].positions[3*v+0],
|
||||||
|
curves[i].positions[3*v+1],
|
||||||
|
curves[i].positions[3*v+2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (size_t v = 0; v < curves[i].u_params.size(); v++) {
|
||||||
|
printf(" u[%ld] = %f\n", v, curves[i].u_params[v]);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (size_t v = 0; v < curves[i].v_params.size(); v++) {
|
||||||
|
printf(" u[%ld] = %f\n", v, curves[i].v_params[v]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
for (size_t i = 0; i < materials.size(); i++) {
|
for (size_t i = 0; i < materials.size(); i++) {
|
||||||
printf("material[%ld].name = %s\n", i, materials[i].name.c_str());
|
printf("material[%ld].name = %s\n", i, materials[i].name.c_str());
|
||||||
printf(" material.Ka = (%f, %f ,%f)\n", materials[i].ambient[0], materials[i].ambient[1], materials[i].ambient[2]);
|
printf(" material.Ka = (%f, %f ,%f)\n", materials[i].ambient[0], materials[i].ambient[1], materials[i].ambient[2]);
|
||||||
@@ -63,15 +87,16 @@ TestLoadObj(
|
|||||||
std::cout << "Loading " << filename << std::endl;
|
std::cout << "Loading " << filename << std::endl;
|
||||||
|
|
||||||
std::vector<tinyobj::shape_t> shapes;
|
std::vector<tinyobj::shape_t> shapes;
|
||||||
|
std::vector<tinyobj::curve_t> curves;
|
||||||
std::vector<tinyobj::material_t> materials;
|
std::vector<tinyobj::material_t> materials;
|
||||||
std::string err = tinyobj::LoadObj(shapes, materials, filename, basepath);
|
std::string err = tinyobj::LoadObj(shapes, curves, materials, filename, basepath);
|
||||||
|
|
||||||
if (!err.empty()) {
|
if (!err.empty()) {
|
||||||
std::cerr << err << std::endl;
|
std::cerr << err << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintInfo(shapes, materials);
|
PrintInfo(shapes, curves, materials);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -163,15 +188,16 @@ std::string matStream(
|
|||||||
|
|
||||||
MaterialStringStreamReader matSSReader(matStream);
|
MaterialStringStreamReader matSSReader(matStream);
|
||||||
std::vector<tinyobj::shape_t> shapes;
|
std::vector<tinyobj::shape_t> shapes;
|
||||||
|
std::vector<tinyobj::curve_t> curves;
|
||||||
std::vector<tinyobj::material_t> materials;
|
std::vector<tinyobj::material_t> materials;
|
||||||
std::string err = tinyobj::LoadObj(shapes, materials, objStream, matSSReader);
|
std::string err = tinyobj::LoadObj(shapes, curves, materials, objStream, matSSReader);
|
||||||
|
|
||||||
if (!err.empty()) {
|
if (!err.empty()) {
|
||||||
std::cerr << err << std::endl;
|
std::cerr << err << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintInfo(shapes, materials);
|
PrintInfo(shapes, curves, materials);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
1388
tiny_obj_loader.cc
Executable file → Normal file
1388
tiny_obj_loader.cc
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// Copyright 2012-2013, Syoyo Fujita.
|
// Copyright 2012-2015, Syoyo Fujita.
|
||||||
//
|
//
|
||||||
// Licensed under 2-clause BSD liecense.
|
// Licensed under 2-clause BSD liecense.
|
||||||
//
|
//
|
||||||
@@ -12,96 +12,101 @@
|
|||||||
|
|
||||||
namespace tinyobj {
|
namespace tinyobj {
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
std::string name;
|
||||||
std::string name;
|
|
||||||
|
|
||||||
float ambient[3];
|
float ambient[3];
|
||||||
float diffuse[3];
|
float diffuse[3];
|
||||||
float specular[3];
|
float specular[3];
|
||||||
float transmittance[3];
|
float transmittance[3];
|
||||||
float emission[3];
|
float emission[3];
|
||||||
float shininess;
|
float shininess;
|
||||||
float ior; // index of refraction
|
float ior; // index of refraction
|
||||||
float dissolve; // 1 == opaque; 0 == fully transparent
|
float dissolve; // 1 == opaque; 0 == fully transparent
|
||||||
// illumination model (see http://www.fileformat.info/format/material/)
|
// illumination model (see http://www.fileformat.info/format/material/)
|
||||||
int illum;
|
int illum;
|
||||||
|
|
||||||
std::string ambient_texname;
|
std::string ambient_texname;
|
||||||
std::string diffuse_texname;
|
std::string diffuse_texname;
|
||||||
std::string specular_texname;
|
std::string specular_texname;
|
||||||
std::string normal_texname;
|
std::string normal_texname;
|
||||||
std::map<std::string, std::string> unknown_parameter;
|
std::map<std::string, std::string> unknown_parameter;
|
||||||
} material_t;
|
} material_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
std::vector<float> positions;
|
||||||
std::vector<float> positions;
|
std::vector<float> normals;
|
||||||
std::vector<float> normals;
|
std::vector<float> texcoords;
|
||||||
std::vector<float> texcoords;
|
std::vector<unsigned int> indices;
|
||||||
std::vector<unsigned int> indices;
|
std::vector<int> material_ids; // per-mesh material ID
|
||||||
std::vector<int> material_ids; // per-mesh material ID
|
|
||||||
} mesh_t;
|
} mesh_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
std::vector<float> positions;
|
||||||
std::string name;
|
std::vector<unsigned int> indices;
|
||||||
mesh_t mesh;
|
} line_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
std::string name;
|
||||||
|
std::vector<float> positions; // control points. xyz
|
||||||
|
std::vector<unsigned int> indices; // index to control point
|
||||||
|
std::vector<float> u_params;
|
||||||
|
std::vector<float> v_params;
|
||||||
|
int degree;
|
||||||
|
int type; // 0: bspline, 1: bezier, 2: cardinal
|
||||||
|
} curve_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
std::string name;
|
||||||
|
mesh_t mesh;
|
||||||
} shape_t;
|
} shape_t;
|
||||||
|
|
||||||
class MaterialReader
|
class MaterialReader {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
MaterialReader(){}
|
MaterialReader() {}
|
||||||
virtual ~MaterialReader(){}
|
virtual ~MaterialReader() {}
|
||||||
|
|
||||||
virtual std::string operator() (
|
virtual std::string operator()(const std::string &matId,
|
||||||
const std::string& matId,
|
std::vector<material_t> &materials,
|
||||||
std::vector<material_t>& materials,
|
std::map<std::string, int> &matMap) = 0;
|
||||||
std::map<std::string, int>& matMap) = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class MaterialFileReader:
|
class MaterialFileReader : public MaterialReader {
|
||||||
public MaterialReader
|
public:
|
||||||
{
|
MaterialFileReader(const std::string &mtl_basepath)
|
||||||
public:
|
: m_mtlBasePath(mtl_basepath) {}
|
||||||
MaterialFileReader(const std::string& mtl_basepath): m_mtlBasePath(mtl_basepath) {}
|
virtual ~MaterialFileReader() {}
|
||||||
virtual ~MaterialFileReader() {}
|
virtual std::string operator()(const std::string &matId,
|
||||||
virtual std::string operator() (
|
std::vector<material_t> &materials,
|
||||||
const std::string& matId,
|
std::map<std::string, int> &matMap);
|
||||||
std::vector<material_t>& materials,
|
|
||||||
std::map<std::string, int>& matMap);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string m_mtlBasePath;
|
std::string m_mtlBasePath;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Loads .obj from a file.
|
/// Loads .obj from a file.
|
||||||
/// 'shapes' will be filled with parsed shape data
|
/// 'shapes' will be filled with parsed shape data
|
||||||
|
/// 'curves' will be filled with parsed curve data(NURBS, Bezier, etc)
|
||||||
/// The function returns error string.
|
/// The function returns error string.
|
||||||
/// Returns empty string when loading .obj success.
|
/// Returns empty string when loading .obj success.
|
||||||
/// 'mtl_basepath' is optional, and used for base path for .mtl file.
|
/// 'mtl_basepath' is optional, and used for base path for .mtl file.
|
||||||
std::string LoadObj(
|
std::string LoadObj(std::vector<shape_t> &shapes, // [output]
|
||||||
std::vector<shape_t>& shapes, // [output]
|
std::vector<curve_t> &curves, // [output]
|
||||||
std::vector<material_t>& materials, // [output]
|
std::vector<material_t> &materials, // [output]
|
||||||
const char* filename,
|
const char *filename, const char *mtl_basepath = NULL);
|
||||||
const char* mtl_basepath = NULL);
|
|
||||||
|
|
||||||
/// Loads object from a std::istream, uses GetMtlIStreamFn to retrieve
|
/// Loads object from a std::istream, uses GetMtlIStreamFn to retrieve
|
||||||
/// std::istream for materials.
|
/// std::istream for materials.
|
||||||
/// Returns empty string when loading .obj success.
|
/// Returns empty string when loading .obj success.
|
||||||
std::string LoadObj(
|
std::string LoadObj(std::vector<shape_t> &shapes, // [output]
|
||||||
std::vector<shape_t>& shapes, // [output]
|
std::vector<curve_t> &curves, // [output]
|
||||||
std::vector<material_t>& materials, // [output]
|
std::vector<material_t> &materials, // [output]
|
||||||
std::istream& inStream,
|
std::istream &inStream, MaterialReader &readMatFn);
|
||||||
MaterialReader& readMatFn);
|
|
||||||
|
|
||||||
/// Loads materials into std::map
|
/// Loads materials into std::map
|
||||||
/// Returns an empty string if successful
|
/// Returns an empty string if successful
|
||||||
std::string LoadMtl (
|
std::string LoadMtl(std::map<std::string, int> &material_map,
|
||||||
std::map<std::string, int>& material_map,
|
std::vector<material_t> &materials, std::istream &inStream);
|
||||||
std::vector<material_t>& materials,
|
|
||||||
std::istream& inStream);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _TINY_OBJ_LOADER_H
|
#endif // _TINY_OBJ_LOADER_H
|
||||||
|
|||||||
BIN
tools/windows/premake5.exe
Normal file
BIN
tools/windows/premake5.exe
Normal file
Binary file not shown.
1
vcsetup.bat
Normal file
1
vcsetup.bat
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.\\tools\\windows\\premake5.exe vs2013
|
||||||
Reference in New Issue
Block a user