Switch output y and z coordinates.

This commit is contained in:
lzwdgc 2017-07-27 19:27:20 +03:00
parent 3ae21d2eca
commit a0aab7807d
4 changed files with 20 additions and 7 deletions

View file

@ -21,12 +21,21 @@ file(GLOB mmp_extractor_src "mmp_extractor/*")
add_executable(mmp_extractor ${mmp_extractor_src})
target_link_libraries(mmp_extractor common)
file(GLOB mod_converter_src "mod_converter/*")
add_executable(mod_converter ${mod_converter_src})
target_link_libraries(mod_converter
common
pvt.cppan.demo.eigen
)
if (DEFINED FBX_SDK_ROOT)
file(GLOB mod_converter_src "mod_converter/*")
add_executable(mod_converter ${mod_converter_src})
target_link_libraries(mod_converter
common
#pvt.cppan.demo.eigen
debug "${FBX_SDK_ROOT}/lib/vs2015/x86/debug/libfbxsdk.lib"
optimized "${FBX_SDK_ROOT}/lib/vs2015/x86/release/libfbxsdk.lib"
)
target_include_directories(mod_converter
PUBLIC "${FBX_SDK_ROOT}/include"
)
else()
message(STATUS "provide fbx sdk path to build mod converter")
endif()
file(GLOB mpj_loader_src "mpj_loader/*")
add_executable(mpj_loader ${mpj_loader_src})

View file

@ -85,6 +85,7 @@ void convert_model(string fn)
// write all
m.print(filename);
m.printFbx(filename);
return;
// write obj and mtl

View file

@ -27,6 +27,8 @@
#include <buffer.h>
#include <fbxsdk.h>
//#include <Eigen/Core>
//#include <Eigen/Dense>
@ -324,7 +326,7 @@ std::string block::printObj(int group_offset, bool rotate_x_90) const
x += "/" + x + "/" + x;
y += "/" + y + "/" + y;
z += "/" + z + "/" + z;
s += "f " + x + " " + y + " " + z + "\n";
s += "f " + x + " " + z + " " + y + "\n";
}
}

View file

@ -249,4 +249,5 @@ struct model
void load(const buffer &b);
void print(const std::string &fn);
void printFbx(const std::string &fn);
};