Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated gltf importer #10

Merged
merged 14 commits into from
Feb 23, 2022
Merged
4 changes: 4 additions & 0 deletions include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ add_subdirectory(optical)
add_subdirectory(qtcad)
add_subdirectory(rt)

set(TINYGLTF_HEADER_ONLY ON CACHE INTERNAL "" FORCE)
SET(TINYGLTF_INSTALL OFF CACHE INTERNAL "" FORCE)
add_subdirectory(/path/to/tinygltf)

set(public_hdrs
RtServerImpl.h
analyze.h
Expand Down
1 change: 1 addition & 0 deletions src/conv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ verbose_add_subdirectory("src/conv" asc)
verbose_add_subdirectory("src/conv" gcv)
verbose_add_subdirectory("src/conv" step)
verbose_add_subdirectory("src/conv" csg)
verbose_add_subdirectory("src/conv" gltf)

verbose_add_subdirectory("src/conv" iges)
verbose_add_subdirectory("src/conv" intaval)
Expand Down
20 changes: 20 additions & 0 deletions src/conv/gltf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
set(GLTF_CONV_INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}
${BU_INCLUDE_DIRS}
${RT_INCLUDE_DIRS}
)
BRLCAD_INCLUDE_DIRS(GLTF_CONV_INCLUDE_DIRS)

BRLCAD_ADDEXEC(gltf-g gltf-g.cpp "libwdb;librt;libnmg;libbu" FOLDER Conv)


CMAKEFILES(
CMakeLists.txt
)

# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
2 changes: 2 additions & 0 deletions src/conv/gltf/NEED TINYGLTF
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This path needs a tinygltf folder for the importer to work. For some reason, Github was not letting me import it, an issue with Cmake? So basically just put the "tinygltf"
folder from github into the gltf file next to the gltf converter and it will work
Binary file added src/conv/gltf/baseColor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/conv/gltf/blob.glb
Binary file not shown.
Loading