pixo 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +23 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +8 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/ext/CMakeLists.txt +35 -0
- data/ext/libpixgem/extconf.rb +29 -0
- data/ext/libpixgem/include/opengl.h +4 -0
- data/ext/libpixgem/src/application.cpp +135 -0
- data/ext/libpixgem/src/application.hpp +28 -0
- data/ext/libpixgem/src/camera.cpp +28 -0
- data/ext/libpixgem/src/camera.hpp +22 -0
- data/ext/libpixgem/src/fade_candy.cpp +32 -0
- data/ext/libpixgem/src/fade_candy.hpp +22 -0
- data/ext/libpixgem/src/gem.cpp +58 -0
- data/ext/libpixgem/src/holder.cpp +9 -0
- data/ext/libpixgem/src/holder.hpp +8 -0
- data/ext/libpixgem/src/pattern.cpp +57 -0
- data/ext/libpixgem/src/pattern.hpp +25 -0
- data/ext/pixo/CMakeLists.txt +57 -0
- data/ext/pixo/README.md +3 -0
- data/ext/pixo/ext/glew/CMakeLists.txt +118 -0
- data/ext/pixo/ext/glew/LICENSE.txt +73 -0
- data/ext/pixo/ext/glew/Makefile +347 -0
- data/ext/pixo/ext/glew/README.md +192 -0
- data/ext/pixo/ext/glew/auto/Makefile +357 -0
- data/ext/pixo/ext/glew/auto/bin/filter_gl_ext.sh +523 -0
- data/ext/pixo/ext/glew/auto/bin/filter_gles_ext.sh +19 -0
- data/ext/pixo/ext/glew/auto/bin/filter_spec.py +38 -0
- data/ext/pixo/ext/glew/auto/bin/make.pl +223 -0
- data/ext/pixo/ext/glew/auto/bin/make_def_fun.pl +35 -0
- data/ext/pixo/ext/glew/auto/bin/make_def_var.pl +31 -0
- data/ext/pixo/ext/glew/auto/bin/make_enable_index.pl +45 -0
- data/ext/pixo/ext/glew/auto/bin/make_header.pl +71 -0
- data/ext/pixo/ext/glew/auto/bin/make_html.pl +55 -0
- data/ext/pixo/ext/glew/auto/bin/make_index.pl +38 -0
- data/ext/pixo/ext/glew/auto/bin/make_info.pl +59 -0
- data/ext/pixo/ext/glew/auto/bin/make_info_list.pl +47 -0
- data/ext/pixo/ext/glew/auto/bin/make_init.pl +59 -0
- data/ext/pixo/ext/glew/auto/bin/make_initd.pl +43 -0
- data/ext/pixo/ext/glew/auto/bin/make_list.pl +73 -0
- data/ext/pixo/ext/glew/auto/bin/make_list2.pl +44 -0
- data/ext/pixo/ext/glew/auto/bin/make_str.pl +53 -0
- data/ext/pixo/ext/glew/auto/bin/make_struct_fun.pl +36 -0
- data/ext/pixo/ext/glew/auto/bin/make_struct_var.pl +31 -0
- data/ext/pixo/ext/glew/auto/bin/parse_spec.pl +393 -0
- data/ext/pixo/ext/glew/auto/bin/parse_xml.py +131 -0
- data/ext/pixo/ext/glew/auto/bin/update_ext.sh +25 -0
- data/ext/pixo/ext/glew/auto/blacklist +14 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_AMD_gpu_association +23 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_ARB_get_proc_address +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_ATI_pixel_format_float +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_ATI_render_texture +42 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_EXT_create_context_es2_profile +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_EXT_create_context_es_profile +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_EXT_fbconfig_packed_float +6 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_EXT_framebuffer_sRGB +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_MESA_swap_control +6 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_NV_float_buffer +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_NV_vertex_array_range +6 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_SGIS_shared_multisample +6 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_SGIX_hyperpipe +26 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_SGIX_swap_barrier +6 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_SGIX_swap_group +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_SGI_video_sync +6 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_SUN_video_resize +8 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_VERSION_1_2 +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_VERSION_1_3 +83 -0
- data/ext/pixo/ext/glew/auto/core/gl/GLX_VERSION_1_4 +7 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_APPLE_float_pixels +18 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_APPLE_pixel_buffer +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_APPLE_texture_range +13 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ARB_draw_instanced +4 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ARB_imaging +113 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ARB_instanced_arrays +8 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ARB_internalformat_query2 +104 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ARB_matrix_palette +19 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ARB_multitexture +73 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ARB_robustness +31 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ARB_separate_shader_objects +73 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ARB_vertex_attrib_64bit +14 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ARB_vertex_blend +56 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ATIX_point_sprites +10 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ATIX_texture_env_combine3 +7 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ATIX_texture_env_route +7 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ATIX_vertex_shader_output_point_size +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ATI_envmap_bumpmap +16 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ATI_map_object_buffer +6 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ATI_pn_triangles +15 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ATI_separate_stencil +10 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ATI_shader_texture_lod +4 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ATI_texture_compression_3dc +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_ATI_vertex_streams +59 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_Cg_shader +6 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_bindable_uniform +13 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_debug_marker +7 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_depth_bounds_test +7 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_draw_instanced +6 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_draw_range_elements +7 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_fog_coord +17 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_framebuffer_sRGB +6 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_geometry_shader4 +27 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_gpu_program_parameters +6 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_gpu_shader4 +64 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_packed_float +7 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_pixel_buffer_object +8 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_secondary_color +28 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_texture_array +13 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_texture_buffer_object +10 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_texture_compression_latc +8 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_texture_compression_rgtc +8 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_texture_cube_map +16 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_texture_edge_clamp +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_texture_integer +57 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_texture_rectangle +8 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_texture_shared_exponent +7 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_timer_query +7 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_EXT_vertex_shader +157 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_KTX_buffer_region +13 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NVX_gpu_memory_info +9 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_depth_buffer_float +11 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_depth_range_unclamped +9 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_fragment_program2 +9 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_fragment_program4 +4 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_fragment_program_option +4 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_framebuffer_multisample_coverage +9 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_geometry_program4 +8 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_geometry_shader4 +4 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_gpu_program4 +24 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_gpu_program5 +10 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_parameter_buffer_object +12 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_present_video +16 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_tessellation_program5 +9 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_transform_feedback +40 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_vdpau_interop +19 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_vertex_program2_option +6 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_vertex_program3 +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_NV_vertex_program4 +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_SGIX_shadow +8 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_SUN_read_video_pixels +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_1_2 +50 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_1_2_1 +4 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_1_3 +147 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_1_4 +90 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_1_5 +75 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_2_0 +181 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_2_1 +33 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_3_0 +164 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_3_1 +42 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_3_2 +29 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_3_3 +7 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_4_0 +21 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_4_1 +3 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_4_2 +13 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_4_3 +6 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_4_4 +8 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_VERSION_4_5 +9 -0
- data/ext/pixo/ext/glew/auto/core/gl/GL_WIN_swap_hint +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/WGL_ARB_create_context +13 -0
- data/ext/pixo/ext/glew/auto/core/gl/WGL_ATI_render_texture_rectangle +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/WGL_EXT_create_context_es2_profile +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/WGL_EXT_create_context_es_profile +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/WGL_EXT_framebuffer_sRGB +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/WGL_EXT_pixel_format_packed_float +5 -0
- data/ext/pixo/ext/glew/auto/core/gl/WGL_NV_gpu_affinity +13 -0
- data/ext/pixo/ext/glew/auto/core/gl/WGL_NV_vertex_array_range +6 -0
- data/ext/pixo/ext/glew/auto/custom.txt +7 -0
- data/ext/pixo/ext/glew/auto/doc/advanced.html +130 -0
- data/ext/pixo/ext/glew/auto/doc/basic.html +180 -0
- data/ext/pixo/ext/glew/auto/doc/build.html +49 -0
- data/ext/pixo/ext/glew/auto/doc/credits.html +2 -0
- data/ext/pixo/ext/glew/auto/doc/index.html +111 -0
- data/ext/pixo/ext/glew/auto/doc/install.html +126 -0
- data/ext/pixo/ext/glew/auto/doc/log.html +1073 -0
- data/ext/pixo/ext/glew/auto/src/eglew_head.h +88 -0
- data/ext/pixo/ext/glew/auto/src/eglew_mid.h +4 -0
- data/ext/pixo/ext/glew/auto/src/eglew_tail.h +15 -0
- data/ext/pixo/ext/glew/auto/src/footer.html +4 -0
- data/ext/pixo/ext/glew/auto/src/glew.rc +135 -0
- data/ext/pixo/ext/glew/auto/src/glew_head.c +285 -0
- data/ext/pixo/ext/glew/auto/src/glew_head.h +1129 -0
- data/ext/pixo/ext/glew/auto/src/glew_init_egl.c +45 -0
- data/ext/pixo/ext/glew/auto/src/glew_init_gl.c +206 -0
- data/ext/pixo/ext/glew/auto/src/glew_init_glx.c +53 -0
- data/ext/pixo/ext/glew/auto/src/glew_init_tail.c +67 -0
- data/ext/pixo/ext/glew/auto/src/glew_init_wgl.c +41 -0
- data/ext/pixo/ext/glew/auto/src/glew_license.h +32 -0
- data/ext/pixo/ext/glew/auto/src/glew_str_egl.c +17 -0
- data/ext/pixo/ext/glew/auto/src/glew_str_glx.c +17 -0
- data/ext/pixo/ext/glew/auto/src/glew_str_head.c +9 -0
- data/ext/pixo/ext/glew/auto/src/glew_str_tail.c +7 -0
- data/ext/pixo/ext/glew/auto/src/glew_str_wgl.c +17 -0
- data/ext/pixo/ext/glew/auto/src/glew_tail.h +67 -0
- data/ext/pixo/ext/glew/auto/src/glewinfo.rc +123 -0
- data/ext/pixo/ext/glew/auto/src/glewinfo_egl.c +6 -0
- data/ext/pixo/ext/glew/auto/src/glewinfo_gl.c +7 -0
- data/ext/pixo/ext/glew/auto/src/glewinfo_glx.c +6 -0
- data/ext/pixo/ext/glew/auto/src/glewinfo_head.c +89 -0
- data/ext/pixo/ext/glew/auto/src/glewinfo_tail.c +598 -0
- data/ext/pixo/ext/glew/auto/src/glewinfo_wgl.c +8 -0
- data/ext/pixo/ext/glew/auto/src/glxew_head.h +106 -0
- data/ext/pixo/ext/glew/auto/src/glxew_mid.h +4 -0
- data/ext/pixo/ext/glew/auto/src/glxew_tail.h +20 -0
- data/ext/pixo/ext/glew/auto/src/header.html +98 -0
- data/ext/pixo/ext/glew/auto/src/khronos_license.h +23 -0
- data/ext/pixo/ext/glew/auto/src/mesa_license.h +24 -0
- data/ext/pixo/ext/glew/auto/src/visualinfo.rc +123 -0
- data/ext/pixo/ext/glew/auto/src/wglew_head.h +36 -0
- data/ext/pixo/ext/glew/auto/src/wglew_mid.h +4 -0
- data/ext/pixo/ext/glew/auto/src/wglew_tail.h +22 -0
- data/ext/pixo/ext/glew/build/cmake/CMakeLists.txt +215 -0
- data/ext/pixo/ext/glew/build/cmake/CopyImportedTargetProperties.cmake +88 -0
- data/ext/pixo/ext/glew/build/cmake/glew-config.cmake +60 -0
- data/ext/pixo/ext/glew/build/cmake/testbuild/CMakeLists.txt +25 -0
- data/ext/pixo/ext/glew/build/cmake/testbuild/main.c +23 -0
- data/ext/pixo/ext/glew/build/glew.rc +135 -0
- data/ext/pixo/ext/glew/build/glewinfo.rc +123 -0
- data/ext/pixo/ext/glew/build/vc10/common.props +29 -0
- data/ext/pixo/ext/glew/build/vc10/glew.sln +56 -0
- data/ext/pixo/ext/glew/build/vc10/glew_shared.vcxproj +254 -0
- data/ext/pixo/ext/glew/build/vc10/glew_static.vcxproj +228 -0
- data/ext/pixo/ext/glew/build/vc10/glewinfo.vcxproj +252 -0
- data/ext/pixo/ext/glew/build/vc10/visualinfo.vcxproj +251 -0
- data/ext/pixo/ext/glew/build/vc12/common.props +29 -0
- data/ext/pixo/ext/glew/build/vc12/glew.sln +56 -0
- data/ext/pixo/ext/glew/build/vc12/glew_shared.vcxproj +258 -0
- data/ext/pixo/ext/glew/build/vc12/glew_static.vcxproj +232 -0
- data/ext/pixo/ext/glew/build/vc12/glewinfo.vcxproj +259 -0
- data/ext/pixo/ext/glew/build/vc12/visualinfo.vcxproj +258 -0
- data/ext/pixo/ext/glew/build/vc6/Makefile +21 -0
- data/ext/pixo/ext/glew/build/vc6/glew.dsw +71 -0
- data/ext/pixo/ext/glew/build/vc6/glew_shared.dsp +122 -0
- data/ext/pixo/ext/glew/build/vc6/glew_static.dsp +112 -0
- data/ext/pixo/ext/glew/build/vc6/glewinfo.dsp +103 -0
- data/ext/pixo/ext/glew/build/vc6/visualinfo.dsp +103 -0
- data/ext/pixo/ext/glew/build/visualinfo.rc +123 -0
- data/ext/pixo/ext/glew/cmake-testbuild.sh +71 -0
- data/ext/pixo/ext/glew/config/Makefile.cygming +21 -0
- data/ext/pixo/ext/glew/config/Makefile.cygwin +19 -0
- data/ext/pixo/ext/glew/config/Makefile.darwin +25 -0
- data/ext/pixo/ext/glew/config/Makefile.darwin-ppc +24 -0
- data/ext/pixo/ext/glew/config/Makefile.darwin-universal +27 -0
- data/ext/pixo/ext/glew/config/Makefile.darwin-x86_64 +24 -0
- data/ext/pixo/ext/glew/config/Makefile.fedora-mingw32 +12 -0
- data/ext/pixo/ext/glew/config/Makefile.freebsd +17 -0
- data/ext/pixo/ext/glew/config/Makefile.gnu +17 -0
- data/ext/pixo/ext/glew/config/Makefile.haiku +20 -0
- data/ext/pixo/ext/glew/config/Makefile.irix +17 -0
- data/ext/pixo/ext/glew/config/Makefile.kfreebsd +17 -0
- data/ext/pixo/ext/glew/config/Makefile.linux +34 -0
- data/ext/pixo/ext/glew/config/Makefile.linux-clang +34 -0
- data/ext/pixo/ext/glew/config/Makefile.linux-clang-egl +4 -0
- data/ext/pixo/ext/glew/config/Makefile.linux-egl +4 -0
- data/ext/pixo/ext/glew/config/Makefile.linux-mingw-w64 +22 -0
- data/ext/pixo/ext/glew/config/Makefile.linux-mingw32 +22 -0
- data/ext/pixo/ext/glew/config/Makefile.linux-mingw64 +22 -0
- data/ext/pixo/ext/glew/config/Makefile.linux-osmesa +4 -0
- data/ext/pixo/ext/glew/config/Makefile.mingw +17 -0
- data/ext/pixo/ext/glew/config/Makefile.mingw-win32 +5 -0
- data/ext/pixo/ext/glew/config/Makefile.msys +19 -0
- data/ext/pixo/ext/glew/config/Makefile.msys-win32 +5 -0
- data/ext/pixo/ext/glew/config/Makefile.msys-win64 +5 -0
- data/ext/pixo/ext/glew/config/Makefile.nacl-32 +31 -0
- data/ext/pixo/ext/glew/config/Makefile.nacl-64 +31 -0
- data/ext/pixo/ext/glew/config/Makefile.netbsd +17 -0
- data/ext/pixo/ext/glew/config/Makefile.openbsd +17 -0
- data/ext/pixo/ext/glew/config/Makefile.solaris +14 -0
- data/ext/pixo/ext/glew/config/Makefile.solaris-gcc +15 -0
- data/ext/pixo/ext/glew/config/config.guess +1456 -0
- data/ext/pixo/ext/glew/config/version +7 -0
- data/ext/pixo/ext/glew/doc/advanced.html +232 -0
- data/ext/pixo/ext/glew/doc/basic.html +282 -0
- data/ext/pixo/ext/glew/doc/build.html +151 -0
- data/ext/pixo/ext/glew/doc/credits.html +104 -0
- data/ext/pixo/ext/glew/doc/github.png +0 -0
- data/ext/pixo/ext/glew/doc/glew.css +187 -0
- data/ext/pixo/ext/glew/doc/glew.html +724 -0
- data/ext/pixo/ext/glew/doc/glew.png +0 -0
- data/ext/pixo/ext/glew/doc/glew.txt +29 -0
- data/ext/pixo/ext/glew/doc/glxew.html +185 -0
- data/ext/pixo/ext/glew/doc/gpl.txt +340 -0
- data/ext/pixo/ext/glew/doc/index.html +213 -0
- data/ext/pixo/ext/glew/doc/install.html +228 -0
- data/ext/pixo/ext/glew/doc/khronos.txt +20 -0
- data/ext/pixo/ext/glew/doc/log.html +1175 -0
- data/ext/pixo/ext/glew/doc/mesa.txt +21 -0
- data/ext/pixo/ext/glew/doc/new.png +0 -0
- data/ext/pixo/ext/glew/doc/ogl_sm.jpg +0 -0
- data/ext/pixo/ext/glew/doc/travis.png +0 -0
- data/ext/pixo/ext/glew/doc/wglew.html +168 -0
- data/ext/pixo/ext/glew/glew.pc.in +11 -0
- data/ext/pixo/ext/glew/include/GL/eglew.h +2261 -0
- data/ext/pixo/ext/glew/include/GL/glew.h +20113 -0
- data/ext/pixo/ext/glew/include/GL/glxew.h +1769 -0
- data/ext/pixo/ext/glew/include/GL/wglew.h +1427 -0
- data/ext/pixo/ext/glew/maintain.sh +142 -0
- data/ext/pixo/ext/glew/src/glew.c +23960 -0
- data/ext/pixo/ext/glew/src/glewinfo.c +13912 -0
- data/ext/pixo/ext/glew/src/visualinfo.c +1297 -0
- data/ext/pixo/ext/glfw/CMake/MacOSXBundleInfo.plist.in +38 -0
- data/ext/pixo/ext/glfw/CMake/amd64-mingw32msvc.cmake +13 -0
- data/ext/pixo/ext/glfw/CMake/i586-mingw32msvc.cmake +13 -0
- data/ext/pixo/ext/glfw/CMake/i686-pc-mingw32.cmake +13 -0
- data/ext/pixo/ext/glfw/CMake/i686-w64-mingw32.cmake +13 -0
- data/ext/pixo/ext/glfw/CMake/modules/FindMir.cmake +18 -0
- data/ext/pixo/ext/glfw/CMake/modules/FindVulkan.cmake +34 -0
- data/ext/pixo/ext/glfw/CMake/modules/FindWaylandProtocols.cmake +26 -0
- data/ext/pixo/ext/glfw/CMake/modules/FindXKBCommon.cmake +34 -0
- data/ext/pixo/ext/glfw/CMake/x86_64-w64-mingw32.cmake +13 -0
- data/ext/pixo/ext/glfw/CMakeLists.txt +419 -0
- data/ext/pixo/ext/glfw/COPYING.txt +22 -0
- data/ext/pixo/ext/glfw/README.md +274 -0
- data/ext/pixo/ext/glfw/cmake_uninstall.cmake.in +29 -0
- data/ext/pixo/ext/glfw/deps/KHR/khrplatform.h +282 -0
- data/ext/pixo/ext/glfw/deps/getopt.c +230 -0
- data/ext/pixo/ext/glfw/deps/getopt.h +57 -0
- data/ext/pixo/ext/glfw/deps/glad/glad.h +3520 -0
- data/ext/pixo/ext/glfw/deps/glad.c +1555 -0
- data/ext/pixo/ext/glfw/deps/linmath.h +574 -0
- data/ext/pixo/ext/glfw/deps/mingw/_mingw_dxhelper.h +117 -0
- data/ext/pixo/ext/glfw/deps/mingw/dinput.h +2467 -0
- data/ext/pixo/ext/glfw/deps/mingw/xinput.h +239 -0
- data/ext/pixo/ext/glfw/deps/tinycthread.c +594 -0
- data/ext/pixo/ext/glfw/deps/tinycthread.h +441 -0
- data/ext/pixo/ext/glfw/deps/vulkan/vk_platform.h +120 -0
- data/ext/pixo/ext/glfw/deps/vulkan/vulkan.h +3835 -0
- data/ext/pixo/ext/glfw/docs/CMakeLists.txt +32 -0
- data/ext/pixo/ext/glfw/docs/Doxyfile.in +1859 -0
- data/ext/pixo/ext/glfw/docs/DoxygenLayout.xml +188 -0
- data/ext/pixo/ext/glfw/docs/build.dox +347 -0
- data/ext/pixo/ext/glfw/docs/compat.dox +224 -0
- data/ext/pixo/ext/glfw/docs/compile.dox +284 -0
- data/ext/pixo/ext/glfw/docs/context.dox +345 -0
- data/ext/pixo/ext/glfw/docs/extra.css +1 -0
- data/ext/pixo/ext/glfw/docs/extra.less +370 -0
- data/ext/pixo/ext/glfw/docs/footer.html +7 -0
- data/ext/pixo/ext/glfw/docs/header.html +34 -0
- data/ext/pixo/ext/glfw/docs/input.dox +665 -0
- data/ext/pixo/ext/glfw/docs/internal.dox +116 -0
- data/ext/pixo/ext/glfw/docs/intro.dox +372 -0
- data/ext/pixo/ext/glfw/docs/main.dox +47 -0
- data/ext/pixo/ext/glfw/docs/monitor.dox +216 -0
- data/ext/pixo/ext/glfw/docs/moving.dox +506 -0
- data/ext/pixo/ext/glfw/docs/news.dox +376 -0
- data/ext/pixo/ext/glfw/docs/quick.dox +364 -0
- data/ext/pixo/ext/glfw/docs/spaces.svg +872 -0
- data/ext/pixo/ext/glfw/docs/vulkan.dox +211 -0
- data/ext/pixo/ext/glfw/docs/window.dox +1008 -0
- data/ext/pixo/ext/glfw/examples/CMakeLists.txt +67 -0
- data/ext/pixo/ext/glfw/examples/boing.c +678 -0
- data/ext/pixo/ext/glfw/examples/gears.c +357 -0
- data/ext/pixo/ext/glfw/examples/glfw.icns +0 -0
- data/ext/pixo/ext/glfw/examples/glfw.ico +0 -0
- data/ext/pixo/ext/glfw/examples/glfw.rc +3 -0
- data/ext/pixo/ext/glfw/examples/heightmap.c +511 -0
- data/ext/pixo/ext/glfw/examples/particles.c +1068 -0
- data/ext/pixo/ext/glfw/examples/simple.c +163 -0
- data/ext/pixo/ext/glfw/examples/splitview.c +545 -0
- data/ext/pixo/ext/glfw/examples/wave.c +460 -0
- data/ext/pixo/ext/glfw/include/GLFW/glfw3.h +4248 -0
- data/ext/pixo/ext/glfw/include/GLFW/glfw3native.h +456 -0
- data/ext/pixo/ext/glfw/src/CMakeLists.txt +120 -0
- data/ext/pixo/ext/glfw/src/cocoa_init.m +398 -0
- data/ext/pixo/ext/glfw/src/cocoa_joystick.h +60 -0
- data/ext/pixo/ext/glfw/src/cocoa_joystick.m +511 -0
- data/ext/pixo/ext/glfw/src/cocoa_monitor.m +413 -0
- data/ext/pixo/ext/glfw/src/cocoa_platform.h +150 -0
- data/ext/pixo/ext/glfw/src/cocoa_time.c +60 -0
- data/ext/pixo/ext/glfw/src/cocoa_window.m +1653 -0
- data/ext/pixo/ext/glfw/src/context.c +720 -0
- data/ext/pixo/ext/glfw/src/egl_context.c +746 -0
- data/ext/pixo/ext/glfw/src/egl_context.h +213 -0
- data/ext/pixo/ext/glfw/src/glfw3.pc.in +13 -0
- data/ext/pixo/ext/glfw/src/glfw3Config.cmake.in +1 -0
- data/ext/pixo/ext/glfw/src/glfw_config.h.in +65 -0
- data/ext/pixo/ext/glfw/src/glx_context.c +677 -0
- data/ext/pixo/ext/glfw/src/glx_context.h +182 -0
- data/ext/pixo/ext/glfw/src/init.c +200 -0
- data/ext/pixo/ext/glfw/src/input.c +659 -0
- data/ext/pixo/ext/glfw/src/internal.h +1055 -0
- data/ext/pixo/ext/glfw/src/linux_joystick.c +341 -0
- data/ext/pixo/ext/glfw/src/linux_joystick.h +68 -0
- data/ext/pixo/ext/glfw/src/mir_init.c +238 -0
- data/ext/pixo/ext/glfw/src/mir_monitor.c +182 -0
- data/ext/pixo/ext/glfw/src/mir_platform.h +130 -0
- data/ext/pixo/ext/glfw/src/mir_window.c +848 -0
- data/ext/pixo/ext/glfw/src/monitor.c +477 -0
- data/ext/pixo/ext/glfw/src/nsgl_context.h +60 -0
- data/ext/pixo/ext/glfw/src/nsgl_context.m +308 -0
- data/ext/pixo/ext/glfw/src/posix_time.c +85 -0
- data/ext/pixo/ext/glfw/src/posix_time.h +48 -0
- data/ext/pixo/ext/glfw/src/posix_tls.c +68 -0
- data/ext/pixo/ext/glfw/src/posix_tls.h +49 -0
- data/ext/pixo/ext/glfw/src/vulkan.c +302 -0
- data/ext/pixo/ext/glfw/src/wgl_context.c +718 -0
- data/ext/pixo/ext/glfw/src/wgl_context.h +157 -0
- data/ext/pixo/ext/glfw/src/win32_init.c +473 -0
- data/ext/pixo/ext/glfw/src/win32_joystick.c +763 -0
- data/ext/pixo/ext/glfw/src/win32_joystick.h +64 -0
- data/ext/pixo/ext/glfw/src/win32_monitor.c +401 -0
- data/ext/pixo/ext/glfw/src/win32_platform.h +350 -0
- data/ext/pixo/ext/glfw/src/win32_time.c +74 -0
- data/ext/pixo/ext/glfw/src/win32_tls.c +69 -0
- data/ext/pixo/ext/glfw/src/win32_window.c +1724 -0
- data/ext/pixo/ext/glfw/src/window.c +904 -0
- data/ext/pixo/ext/glfw/src/wl_init.c +658 -0
- data/ext/pixo/ext/glfw/src/wl_monitor.c +269 -0
- data/ext/pixo/ext/glfw/src/wl_platform.h +179 -0
- data/ext/pixo/ext/glfw/src/wl_window.c +1050 -0
- data/ext/pixo/ext/glfw/src/x11_init.c +833 -0
- data/ext/pixo/ext/glfw/src/x11_monitor.c +491 -0
- data/ext/pixo/ext/glfw/src/x11_platform.h +296 -0
- data/ext/pixo/ext/glfw/src/x11_window.c +2475 -0
- data/ext/pixo/ext/glfw/src/xkb_unicode.c +889 -0
- data/ext/pixo/ext/glfw/src/xkb_unicode.h +33 -0
- data/ext/pixo/ext/glfw/tests/CMakeLists.txt +80 -0
- data/ext/pixo/ext/glfw/tests/clipboard.c +157 -0
- data/ext/pixo/ext/glfw/tests/cursor.c +317 -0
- data/ext/pixo/ext/glfw/tests/empty.c +131 -0
- data/ext/pixo/ext/glfw/tests/events.c +620 -0
- data/ext/pixo/ext/glfw/tests/gamma.c +188 -0
- data/ext/pixo/ext/glfw/tests/glfwinfo.c +899 -0
- data/ext/pixo/ext/glfw/tests/icon.c +148 -0
- data/ext/pixo/ext/glfw/tests/iconify.c +298 -0
- data/ext/pixo/ext/glfw/tests/joysticks.c +216 -0
- data/ext/pixo/ext/glfw/tests/monitors.c +243 -0
- data/ext/pixo/ext/glfw/tests/msaa.c +163 -0
- data/ext/pixo/ext/glfw/tests/reopen.c +192 -0
- data/ext/pixo/ext/glfw/tests/sharing.c +186 -0
- data/ext/pixo/ext/glfw/tests/tearing.c +214 -0
- data/ext/pixo/ext/glfw/tests/threads.c +143 -0
- data/ext/pixo/ext/glfw/tests/timeout.c +97 -0
- data/ext/pixo/ext/glfw/tests/title.c +78 -0
- data/ext/pixo/ext/glfw/tests/vulkan.c +2245 -0
- data/ext/pixo/ext/glfw/tests/windows.c +166 -0
- data/ext/pixo/ext/glm/CMakeLists.txt +227 -0
- data/ext/pixo/ext/glm/cmake/CMakePackageConfigHelpers.cmake +227 -0
- data/ext/pixo/ext/glm/cmake/GNUInstallDirs.cmake +188 -0
- data/ext/pixo/ext/glm/cmake/glm.pc.in +7 -0
- data/ext/pixo/ext/glm/cmake/glmBuildConfig.cmake.in +6 -0
- data/ext/pixo/ext/glm/cmake/glmConfig.cmake.in +9 -0
- data/ext/pixo/ext/glm/copying.txt +54 -0
- data/ext/pixo/ext/glm/doc/api/a00001.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00001_source.html +457 -0
- data/ext/pixo/ext/glm/doc/api/a00002.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00002_source.html +83 -0
- data/ext/pixo/ext/glm/doc/api/a00003.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00003_source.html +167 -0
- data/ext/pixo/ext/glm/doc/api/a00004.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00004_source.html +857 -0
- data/ext/pixo/ext/glm/doc/api/a00005.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00005_source.html +754 -0
- data/ext/pixo/ext/glm/doc/api/a00006.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00006_source.html +194 -0
- data/ext/pixo/ext/glm/doc/api/a00007.html +141 -0
- data/ext/pixo/ext/glm/doc/api/a00007_source.html +207 -0
- data/ext/pixo/ext/glm/doc/api/a00008.html +102 -0
- data/ext/pixo/ext/glm/doc/api/a00008_source.html +111 -0
- data/ext/pixo/ext/glm/doc/api/a00009.html +137 -0
- data/ext/pixo/ext/glm/doc/api/a00009_source.html +149 -0
- data/ext/pixo/ext/glm/doc/api/a00010.html +80 -0
- data/ext/pixo/ext/glm/doc/api/a00010_source.html +90 -0
- data/ext/pixo/ext/glm/doc/api/a00011.html +88 -0
- data/ext/pixo/ext/glm/doc/api/a00011_source.html +97 -0
- data/ext/pixo/ext/glm/doc/api/a00012.html +91 -0
- data/ext/pixo/ext/glm/doc/api/a00012_source.html +107 -0
- data/ext/pixo/ext/glm/doc/api/a00013.html +85 -0
- data/ext/pixo/ext/glm/doc/api/a00013_source.html +98 -0
- data/ext/pixo/ext/glm/doc/api/a00014.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00014_source.html +65 -0
- data/ext/pixo/ext/glm/doc/api/a00015.html +81 -0
- data/ext/pixo/ext/glm/doc/api/a00015_source.html +88 -0
- data/ext/pixo/ext/glm/doc/api/a00016.html +327 -0
- data/ext/pixo/ext/glm/doc/api/a00016_source.html +239 -0
- data/ext/pixo/ext/glm/doc/api/a00017.html +93 -0
- data/ext/pixo/ext/glm/doc/api/a00017_source.html +102 -0
- data/ext/pixo/ext/glm/doc/api/a00018.html +162 -0
- data/ext/pixo/ext/glm/doc/api/a00018_source.html +193 -0
- data/ext/pixo/ext/glm/doc/api/a00019.html +129 -0
- data/ext/pixo/ext/glm/doc/api/a00019_source.html +271 -0
- data/ext/pixo/ext/glm/doc/api/a00020.html +89 -0
- data/ext/pixo/ext/glm/doc/api/a00020_source.html +105 -0
- data/ext/pixo/ext/glm/doc/api/a00021.html +126 -0
- data/ext/pixo/ext/glm/doc/api/a00021_source.html +175 -0
- data/ext/pixo/ext/glm/doc/api/a00022.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00022_source.html +65 -0
- data/ext/pixo/ext/glm/doc/api/a00023.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00023_source.html +219 -0
- data/ext/pixo/ext/glm/doc/api/a00024.html +76 -0
- data/ext/pixo/ext/glm/doc/api/a00024_source.html +84 -0
- data/ext/pixo/ext/glm/doc/api/a00025.html +111 -0
- data/ext/pixo/ext/glm/doc/api/a00025_source.html +157 -0
- data/ext/pixo/ext/glm/doc/api/a00026.html +111 -0
- data/ext/pixo/ext/glm/doc/api/a00026_source.html +118 -0
- data/ext/pixo/ext/glm/doc/api/a00027.html +100 -0
- data/ext/pixo/ext/glm/doc/api/a00027_source.html +111 -0
- data/ext/pixo/ext/glm/doc/api/a00028.html +97 -0
- data/ext/pixo/ext/glm/doc/api/a00028_source.html +109 -0
- data/ext/pixo/ext/glm/doc/api/a00029.html +168 -0
- data/ext/pixo/ext/glm/doc/api/a00029_source.html +238 -0
- data/ext/pixo/ext/glm/doc/api/a00030.html +94 -0
- data/ext/pixo/ext/glm/doc/api/a00030_source.html +110 -0
- data/ext/pixo/ext/glm/doc/api/a00031.html +97 -0
- data/ext/pixo/ext/glm/doc/api/a00031_source.html +121 -0
- data/ext/pixo/ext/glm/doc/api/a00032.html +112 -0
- data/ext/pixo/ext/glm/doc/api/a00032_source.html +149 -0
- data/ext/pixo/ext/glm/doc/api/a00033.html +85 -0
- data/ext/pixo/ext/glm/doc/api/a00033_source.html +165 -0
- data/ext/pixo/ext/glm/doc/api/a00034.html +99 -0
- data/ext/pixo/ext/glm/doc/api/a00034_source.html +115 -0
- data/ext/pixo/ext/glm/doc/api/a00035.html +118 -0
- data/ext/pixo/ext/glm/doc/api/a00035_source.html +135 -0
- data/ext/pixo/ext/glm/doc/api/a00036.html +100 -0
- data/ext/pixo/ext/glm/doc/api/a00036_source.html +111 -0
- data/ext/pixo/ext/glm/doc/api/a00037.html +83 -0
- data/ext/pixo/ext/glm/doc/api/a00037_source.html +93 -0
- data/ext/pixo/ext/glm/doc/api/a00038.html +979 -0
- data/ext/pixo/ext/glm/doc/api/a00038_source.html +1716 -0
- data/ext/pixo/ext/glm/doc/api/a00039.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00039_source.html +65 -0
- data/ext/pixo/ext/glm/doc/api/a00040.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00040_source.html +119 -0
- data/ext/pixo/ext/glm/doc/api/a00041.html +81 -0
- data/ext/pixo/ext/glm/doc/api/a00041_source.html +93 -0
- data/ext/pixo/ext/glm/doc/api/a00042.html +79 -0
- data/ext/pixo/ext/glm/doc/api/a00042_source.html +91 -0
- data/ext/pixo/ext/glm/doc/api/a00043.html +67 -0
- data/ext/pixo/ext/glm/doc/api/a00043_source.html +185 -0
- data/ext/pixo/ext/glm/doc/api/a00044.html +93 -0
- data/ext/pixo/ext/glm/doc/api/a00044_source.html +104 -0
- data/ext/pixo/ext/glm/doc/api/a00045.html +98 -0
- data/ext/pixo/ext/glm/doc/api/a00045_source.html +107 -0
- data/ext/pixo/ext/glm/doc/api/a00046.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00046_source.html +65 -0
- data/ext/pixo/ext/glm/doc/api/a00047.html +93 -0
- data/ext/pixo/ext/glm/doc/api/a00047_source.html +124 -0
- data/ext/pixo/ext/glm/doc/api/a00048.html +72 -0
- data/ext/pixo/ext/glm/doc/api/a00048_source.html +237 -0
- data/ext/pixo/ext/glm/doc/api/a00049.html +79 -0
- data/ext/pixo/ext/glm/doc/api/a00049_source.html +89 -0
- data/ext/pixo/ext/glm/doc/api/a00050_source.html +2457 -0
- data/ext/pixo/ext/glm/doc/api/a00051.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00051_source.html +88 -0
- data/ext/pixo/ext/glm/doc/api/a00052.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00052_source.html +80 -0
- data/ext/pixo/ext/glm/doc/api/a00053.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00053_source.html +79 -0
- data/ext/pixo/ext/glm/doc/api/a00054.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00054_source.html +79 -0
- data/ext/pixo/ext/glm/doc/api/a00055.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00055_source.html +88 -0
- data/ext/pixo/ext/glm/doc/api/a00056.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00056_source.html +79 -0
- data/ext/pixo/ext/glm/doc/api/a00057.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00057_source.html +79 -0
- data/ext/pixo/ext/glm/doc/api/a00058_source.html +79 -0
- data/ext/pixo/ext/glm/doc/api/a00059.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00059_source.html +88 -0
- data/ext/pixo/ext/glm/doc/api/a00060.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00060_source.html +65 -0
- data/ext/pixo/ext/glm/doc/api/a00061.html +85 -0
- data/ext/pixo/ext/glm/doc/api/a00061_source.html +101 -0
- data/ext/pixo/ext/glm/doc/api/a00062.html +81 -0
- data/ext/pixo/ext/glm/doc/api/a00062_source.html +87 -0
- data/ext/pixo/ext/glm/doc/api/a00063.html +76 -0
- data/ext/pixo/ext/glm/doc/api/a00063_source.html +91 -0
- data/ext/pixo/ext/glm/doc/api/a00064.html +265 -0
- data/ext/pixo/ext/glm/doc/api/a00064_source.html +438 -0
- data/ext/pixo/ext/glm/doc/api/a00065.html +86 -0
- data/ext/pixo/ext/glm/doc/api/a00065_source.html +104 -0
- data/ext/pixo/ext/glm/doc/api/a00066.html +79 -0
- data/ext/pixo/ext/glm/doc/api/a00066_source.html +89 -0
- data/ext/pixo/ext/glm/doc/api/a00067.html +111 -0
- data/ext/pixo/ext/glm/doc/api/a00067_source.html +143 -0
- data/ext/pixo/ext/glm/doc/api/a00068.html +100 -0
- data/ext/pixo/ext/glm/doc/api/a00068_source.html +122 -0
- data/ext/pixo/ext/glm/doc/api/a00069.html +99 -0
- data/ext/pixo/ext/glm/doc/api/a00069_source.html +108 -0
- data/ext/pixo/ext/glm/doc/api/a00070.html +158 -0
- data/ext/pixo/ext/glm/doc/api/a00070_source.html +289 -0
- data/ext/pixo/ext/glm/doc/api/a00071.html +89 -0
- data/ext/pixo/ext/glm/doc/api/a00071_source.html +110 -0
- data/ext/pixo/ext/glm/doc/api/a00072.html +77 -0
- data/ext/pixo/ext/glm/doc/api/a00072_source.html +84 -0
- data/ext/pixo/ext/glm/doc/api/a00073.html +82 -0
- data/ext/pixo/ext/glm/doc/api/a00073_source.html +100 -0
- data/ext/pixo/ext/glm/doc/api/a00074.html +99 -0
- data/ext/pixo/ext/glm/doc/api/a00074_source.html +121 -0
- data/ext/pixo/ext/glm/doc/api/a00075.html +78 -0
- data/ext/pixo/ext/glm/doc/api/a00075_source.html +84 -0
- data/ext/pixo/ext/glm/doc/api/a00076.html +81 -0
- data/ext/pixo/ext/glm/doc/api/a00076_source.html +85 -0
- data/ext/pixo/ext/glm/doc/api/a00077.html +107 -0
- data/ext/pixo/ext/glm/doc/api/a00077_source.html +115 -0
- data/ext/pixo/ext/glm/doc/api/a00078.html +82 -0
- data/ext/pixo/ext/glm/doc/api/a00078_source.html +91 -0
- data/ext/pixo/ext/glm/doc/api/a00079.html +81 -0
- data/ext/pixo/ext/glm/doc/api/a00079_source.html +86 -0
- data/ext/pixo/ext/glm/doc/api/a00080.html +175 -0
- data/ext/pixo/ext/glm/doc/api/a00080_source.html +233 -0
- data/ext/pixo/ext/glm/doc/api/a00081.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00081_source.html +65 -0
- data/ext/pixo/ext/glm/doc/api/a00082_source.html +61 -0
- data/ext/pixo/ext/glm/doc/api/a00083.html +78 -0
- data/ext/pixo/ext/glm/doc/api/a00083_source.html +84 -0
- data/ext/pixo/ext/glm/doc/api/a00084.html +79 -0
- data/ext/pixo/ext/glm/doc/api/a00084_source.html +87 -0
- data/ext/pixo/ext/glm/doc/api/a00085.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00085_source.html +123 -0
- data/ext/pixo/ext/glm/doc/api/a00086.html +76 -0
- data/ext/pixo/ext/glm/doc/api/a00086_source.html +81 -0
- data/ext/pixo/ext/glm/doc/api/a00087.html +161 -0
- data/ext/pixo/ext/glm/doc/api/a00087_source.html +329 -0
- data/ext/pixo/ext/glm/doc/api/a00088.html +129 -0
- data/ext/pixo/ext/glm/doc/api/a00088_source.html +189 -0
- data/ext/pixo/ext/glm/doc/api/a00089.html +98 -0
- data/ext/pixo/ext/glm/doc/api/a00089_source.html +115 -0
- data/ext/pixo/ext/glm/doc/api/a00090.html +67 -0
- data/ext/pixo/ext/glm/doc/api/a00090_source.html +133 -0
- data/ext/pixo/ext/glm/doc/api/a00091.html +81 -0
- data/ext/pixo/ext/glm/doc/api/a00091_source.html +90 -0
- data/ext/pixo/ext/glm/doc/api/a00092.html +109 -0
- data/ext/pixo/ext/glm/doc/api/a00092_source.html +126 -0
- data/ext/pixo/ext/glm/doc/api/a00093.html +83 -0
- data/ext/pixo/ext/glm/doc/api/a00093_source.html +94 -0
- data/ext/pixo/ext/glm/doc/api/a00094.html +108 -0
- data/ext/pixo/ext/glm/doc/api/a00094_source.html +143 -0
- data/ext/pixo/ext/glm/doc/api/a00095.html +126 -0
- data/ext/pixo/ext/glm/doc/api/a00095_source.html +149 -0
- data/ext/pixo/ext/glm/doc/api/a00096.html +69 -0
- data/ext/pixo/ext/glm/doc/api/a00096_source.html +131 -0
- data/ext/pixo/ext/glm/doc/api/a00097.html +67 -0
- data/ext/pixo/ext/glm/doc/api/a00097_source.html +79 -0
- data/ext/pixo/ext/glm/doc/api/a00098.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00098_source.html +827 -0
- data/ext/pixo/ext/glm/doc/api/a00099.html +67 -0
- data/ext/pixo/ext/glm/doc/api/a00099_source.html +219 -0
- data/ext/pixo/ext/glm/doc/api/a00100.html +67 -0
- data/ext/pixo/ext/glm/doc/api/a00100_source.html +282 -0
- data/ext/pixo/ext/glm/doc/api/a00101.html +67 -0
- data/ext/pixo/ext/glm/doc/api/a00101_source.html +402 -0
- data/ext/pixo/ext/glm/doc/api/a00102.html +82 -0
- data/ext/pixo/ext/glm/doc/api/a00102_source.html +105 -0
- data/ext/pixo/ext/glm/doc/api/a00103.html +91 -0
- data/ext/pixo/ext/glm/doc/api/a00103_source.html +102 -0
- data/ext/pixo/ext/glm/doc/api/a00104.html +82 -0
- data/ext/pixo/ext/glm/doc/api/a00104_source.html +89 -0
- data/ext/pixo/ext/glm/doc/api/a00105.html +88 -0
- data/ext/pixo/ext/glm/doc/api/a00105_source.html +95 -0
- data/ext/pixo/ext/glm/doc/api/a00106.html +102 -0
- data/ext/pixo/ext/glm/doc/api/a00106_source.html +144 -0
- data/ext/pixo/ext/glm/doc/api/a00107.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00107_source.html +65 -0
- data/ext/pixo/ext/glm/doc/api/a00108.html +241 -0
- data/ext/pixo/ext/glm/doc/api/a00108_source.html +383 -0
- data/ext/pixo/ext/glm/doc/api/a00109.html +493 -0
- data/ext/pixo/ext/glm/doc/api/a00109_source.html +769 -0
- data/ext/pixo/ext/glm/doc/api/a00110.html +82 -0
- data/ext/pixo/ext/glm/doc/api/a00110_source.html +113 -0
- data/ext/pixo/ext/glm/doc/api/a00111.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00111_source.html +248 -0
- data/ext/pixo/ext/glm/doc/api/a00112.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00112_source.html +79 -0
- data/ext/pixo/ext/glm/doc/api/a00113.html +102 -0
- data/ext/pixo/ext/glm/doc/api/a00113_source.html +352 -0
- data/ext/pixo/ext/glm/doc/api/a00114.html +271 -0
- data/ext/pixo/ext/glm/doc/api/a00114_source.html +469 -0
- data/ext/pixo/ext/glm/doc/api/a00115.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00115_source.html +245 -0
- data/ext/pixo/ext/glm/doc/api/a00116.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00116_source.html +228 -0
- data/ext/pixo/ext/glm/doc/api/a00117.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00117_source.html +230 -0
- data/ext/pixo/ext/glm/doc/api/a00118.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00118_source.html +236 -0
- data/ext/pixo/ext/glm/doc/api/a00119.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00119_source.html +252 -0
- data/ext/pixo/ext/glm/doc/api/a00120.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00120_source.html +235 -0
- data/ext/pixo/ext/glm/doc/api/a00121.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00121_source.html +240 -0
- data/ext/pixo/ext/glm/doc/api/a00122.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00122_source.html +240 -0
- data/ext/pixo/ext/glm/doc/api/a00123.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00123_source.html +257 -0
- data/ext/pixo/ext/glm/doc/api/a00124.html +71 -0
- data/ext/pixo/ext/glm/doc/api/a00124_source.html +692 -0
- data/ext/pixo/ext/glm/doc/api/a00125.html +128 -0
- data/ext/pixo/ext/glm/doc/api/a00125_source.html +158 -0
- data/ext/pixo/ext/glm/doc/api/a00126.html +67 -0
- data/ext/pixo/ext/glm/doc/api/a00126_source.html +299 -0
- data/ext/pixo/ext/glm/doc/api/a00127.html +192 -0
- data/ext/pixo/ext/glm/doc/api/a00127_source.html +435 -0
- data/ext/pixo/ext/glm/doc/api/a00128.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00128_source.html +357 -0
- data/ext/pixo/ext/glm/doc/api/a00129.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00129_source.html +443 -0
- data/ext/pixo/ext/glm/doc/api/a00130.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00130_source.html +461 -0
- data/ext/pixo/ext/glm/doc/api/a00131.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00131_source.html +500 -0
- data/ext/pixo/ext/glm/doc/api/a00132.html +91 -0
- data/ext/pixo/ext/glm/doc/api/a00132_source.html +101 -0
- data/ext/pixo/ext/glm/doc/api/a00133.html +107 -0
- data/ext/pixo/ext/glm/doc/api/a00133_source.html +159 -0
- data/ext/pixo/ext/glm/doc/api/a00134.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00134_source.html +65 -0
- data/ext/pixo/ext/glm/doc/api/a00135.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00135_source.html +65 -0
- data/ext/pixo/ext/glm/doc/api/a00136.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00136_source.html +65 -0
- data/ext/pixo/ext/glm/doc/api/a00137.html +86 -0
- data/ext/pixo/ext/glm/doc/api/a00137_source.html +98 -0
- data/ext/pixo/ext/glm/doc/api/a00138.html +91 -0
- data/ext/pixo/ext/glm/doc/api/a00138_source.html +104 -0
- data/ext/pixo/ext/glm/doc/api/a00139.html +66 -0
- data/ext/pixo/ext/glm/doc/api/a00139_source.html +65 -0
- data/ext/pixo/ext/glm/doc/api/a00140.html +85 -0
- data/ext/pixo/ext/glm/doc/api/a00140_source.html +94 -0
- data/ext/pixo/ext/glm/doc/api/a00146.html +1123 -0
- data/ext/pixo/ext/glm/doc/api/a00147.html +325 -0
- data/ext/pixo/ext/glm/doc/api/a00148.html +367 -0
- data/ext/pixo/ext/glm/doc/api/a00149.html +577 -0
- data/ext/pixo/ext/glm/doc/api/a00150.html +210 -0
- data/ext/pixo/ext/glm/doc/api/a00151.html +364 -0
- data/ext/pixo/ext/glm/doc/api/a00152.html +532 -0
- data/ext/pixo/ext/glm/doc/api/a00153.html +393 -0
- data/ext/pixo/ext/glm/doc/api/a00154.html +103 -0
- data/ext/pixo/ext/glm/doc/api/a00155.html +177 -0
- data/ext/pixo/ext/glm/doc/api/a00156.html +84 -0
- data/ext/pixo/ext/glm/doc/api/a00157.html +808 -0
- data/ext/pixo/ext/glm/doc/api/a00158.html +2827 -0
- data/ext/pixo/ext/glm/doc/api/a00159.html +53 -0
- data/ext/pixo/ext/glm/doc/api/a00160.html +985 -0
- data/ext/pixo/ext/glm/doc/api/a00161.html +141 -0
- data/ext/pixo/ext/glm/doc/api/a00162.html +670 -0
- data/ext/pixo/ext/glm/doc/api/a00163.html +217 -0
- data/ext/pixo/ext/glm/doc/api/a00164.html +137 -0
- data/ext/pixo/ext/glm/doc/api/a00165.html +290 -0
- data/ext/pixo/ext/glm/doc/api/a00166.html +201 -0
- data/ext/pixo/ext/glm/doc/api/a00167.html +1885 -0
- data/ext/pixo/ext/glm/doc/api/a00168.html +129 -0
- data/ext/pixo/ext/glm/doc/api/a00169.html +1690 -0
- data/ext/pixo/ext/glm/doc/api/a00170.html +136 -0
- data/ext/pixo/ext/glm/doc/api/a00171.html +1406 -0
- data/ext/pixo/ext/glm/doc/api/a00172.html +939 -0
- data/ext/pixo/ext/glm/doc/api/a00173.html +303 -0
- data/ext/pixo/ext/glm/doc/api/a00174.html +406 -0
- data/ext/pixo/ext/glm/doc/api/a00175.html +603 -0
- data/ext/pixo/ext/glm/doc/api/a00176.html +688 -0
- data/ext/pixo/ext/glm/doc/api/a00177.html +3678 -0
- data/ext/pixo/ext/glm/doc/api/a00178.html +445 -0
- data/ext/pixo/ext/glm/doc/api/a00179.html +233 -0
- data/ext/pixo/ext/glm/doc/api/a00180.html +53 -0
- data/ext/pixo/ext/glm/doc/api/a00181.html +1293 -0
- data/ext/pixo/ext/glm/doc/api/a00182.html +273 -0
- data/ext/pixo/ext/glm/doc/api/a00183.html +103 -0
- data/ext/pixo/ext/glm/doc/api/a00184.html +213 -0
- data/ext/pixo/ext/glm/doc/api/a00185.html +153 -0
- data/ext/pixo/ext/glm/doc/api/a00186.html +117 -0
- data/ext/pixo/ext/glm/doc/api/a00187.html +312 -0
- data/ext/pixo/ext/glm/doc/api/a00188.html +193 -0
- data/ext/pixo/ext/glm/doc/api/a00189.html +464 -0
- data/ext/pixo/ext/glm/doc/api/a00190.html +565 -0
- data/ext/pixo/ext/glm/doc/api/a00191.html +99 -0
- data/ext/pixo/ext/glm/doc/api/a00192.html +553 -0
- data/ext/pixo/ext/glm/doc/api/a00193.html +355 -0
- data/ext/pixo/ext/glm/doc/api/a00194.html +282 -0
- data/ext/pixo/ext/glm/doc/api/a00195.html +246 -0
- data/ext/pixo/ext/glm/doc/api/a00196.html +143 -0
- data/ext/pixo/ext/glm/doc/api/a00197.html +137 -0
- data/ext/pixo/ext/glm/doc/api/a00198.html +53 -0
- data/ext/pixo/ext/glm/doc/api/a00199.html +314 -0
- data/ext/pixo/ext/glm/doc/api/a00200.html +397 -0
- data/ext/pixo/ext/glm/doc/api/a00201.html +55 -0
- data/ext/pixo/ext/glm/doc/api/a00202.html +126 -0
- data/ext/pixo/ext/glm/doc/api/a00203.html +105 -0
- data/ext/pixo/ext/glm/doc/api/a00204.html +117 -0
- data/ext/pixo/ext/glm/doc/api/a00205.html +191 -0
- data/ext/pixo/ext/glm/doc/api/a00206.html +421 -0
- data/ext/pixo/ext/glm/doc/api/a00207.html +259 -0
- data/ext/pixo/ext/glm/doc/api/a00208.html +317 -0
- data/ext/pixo/ext/glm/doc/api/a00209.html +251 -0
- data/ext/pixo/ext/glm/doc/api/a00210.html +64 -0
- data/ext/pixo/ext/glm/doc/api/a00211.html +293 -0
- data/ext/pixo/ext/glm/doc/api/a00212.html +99 -0
- data/ext/pixo/ext/glm/doc/api/a00213.html +127 -0
- data/ext/pixo/ext/glm/doc/api/a00214.html +90 -0
- data/ext/pixo/ext/glm/doc/api/a00215.html +127 -0
- data/ext/pixo/ext/glm/doc/api/a00216.html +115 -0
- data/ext/pixo/ext/glm/doc/api/a00217.html +93 -0
- data/ext/pixo/ext/glm/doc/api/a00218.html +105 -0
- data/ext/pixo/ext/glm/doc/api/a00219.html +93 -0
- data/ext/pixo/ext/glm/doc/api/a00220.html +613 -0
- data/ext/pixo/ext/glm/doc/api/a00221.html +55 -0
- data/ext/pixo/ext/glm/doc/api/a00222.html +137 -0
- data/ext/pixo/ext/glm/doc/api/a00223.html +165 -0
- data/ext/pixo/ext/glm/doc/api/a00224.html +439 -0
- data/ext/pixo/ext/glm/doc/api/a00225.html +53 -0
- data/ext/pixo/ext/glm/doc/api/a00226.html +53 -0
- data/ext/pixo/ext/glm/doc/api/a00227.html +53 -0
- data/ext/pixo/ext/glm/doc/api/a00228.html +53 -0
- data/ext/pixo/ext/glm/doc/api/a00229.html +211 -0
- data/ext/pixo/ext/glm/doc/api/a00230.html +213 -0
- data/ext/pixo/ext/glm/doc/api/a00231.html +83 -0
- data/ext/pixo/ext/glm/doc/api/a00232.html +143 -0
- data/ext/pixo/ext/glm/doc/api/a00233.html +372 -0
- data/ext/pixo/ext/glm/doc/api/a00234.html +7811 -0
- data/ext/pixo/ext/glm/doc/api/a00235.html +54 -0
- data/ext/pixo/ext/glm/doc/api/a00236.html +163 -0
- data/ext/pixo/ext/glm/doc/api/a00237.html +271 -0
- data/ext/pixo/ext/glm/doc/api/a00238.html +149 -0
- data/ext/pixo/ext/glm/doc/api/arrowdown.png +0 -0
- data/ext/pixo/ext/glm/doc/api/arrowright.png +0 -0
- data/ext/pixo/ext/glm/doc/api/bc_s.png +0 -0
- data/ext/pixo/ext/glm/doc/api/bdwn.png +0 -0
- data/ext/pixo/ext/glm/doc/api/closed.png +0 -0
- data/ext/pixo/ext/glm/doc/api/dir_1f76e953200861345293ade84ac7fb6c.html +61 -0
- data/ext/pixo/ext/glm/doc/api/dir_275089585c7fc1b5fd5d7d42c69cb1da.html +61 -0
- data/ext/pixo/ext/glm/doc/api/dir_577c788b67d63fb3b3b5752bd495d0f2.html +63 -0
- data/ext/pixo/ext/glm/doc/api/dir_5ce58d942b2d0776e17a9a58abc01e04.html +114 -0
- data/ext/pixo/ext/glm/doc/api/dir_7b98f88bffbed4b390b5f8f520d9c08e.html +61 -0
- data/ext/pixo/ext/glm/doc/api/dir_8d176b5b7dd0ae42ea6876078f2bde49.html +177 -0
- data/ext/pixo/ext/glm/doc/api/dir_9440d7c11b99dcd7e5d369c7cf9802fe.html +101 -0
- data/ext/pixo/ext/glm/doc/api/dir_e29b03b892e0e25920d021a614d4db9b.html +63 -0
- data/ext/pixo/ext/glm/doc/api/dir_e529a619cfdec1fa4c331fb042fd332f.html +129 -0
- data/ext/pixo/ext/glm/doc/api/doc.png +0 -0
- data/ext/pixo/ext/glm/doc/api/doxygen.css +865 -0
- data/ext/pixo/ext/glm/doc/api/doxygen.png +0 -0
- data/ext/pixo/ext/glm/doc/api/dynsections.js +104 -0
- data/ext/pixo/ext/glm/doc/api/files.html +200 -0
- data/ext/pixo/ext/glm/doc/api/folderclosed.png +0 -0
- data/ext/pixo/ext/glm/doc/api/folderopen.png +0 -0
- data/ext/pixo/ext/glm/doc/api/index.html +68 -0
- data/ext/pixo/ext/glm/doc/api/jquery.js +68 -0
- data/ext/pixo/ext/glm/doc/api/logo.png +0 -0
- data/ext/pixo/ext/glm/doc/api/modules.html +149 -0
- data/ext/pixo/ext/glm/doc/api/nav_f.png +0 -0
- data/ext/pixo/ext/glm/doc/api/nav_g.png +0 -0
- data/ext/pixo/ext/glm/doc/api/nav_h.png +0 -0
- data/ext/pixo/ext/glm/doc/api/open.png +0 -0
- data/ext/pixo/ext/glm/doc/api/splitbar.png +0 -0
- data/ext/pixo/ext/glm/doc/api/sync_off.png +0 -0
- data/ext/pixo/ext/glm/doc/api/sync_on.png +0 -0
- data/ext/pixo/ext/glm/doc/api/tab_a.png +0 -0
- data/ext/pixo/ext/glm/doc/api/tab_b.png +0 -0
- data/ext/pixo/ext/glm/doc/api/tab_h.png +0 -0
- data/ext/pixo/ext/glm/doc/api/tab_s.png +0 -0
- data/ext/pixo/ext/glm/doc/api/tabs.css +79 -0
- data/ext/pixo/ext/glm/doc/glm.docx +0 -0
- data/ext/pixo/ext/glm/doc/glm.pdf +0 -0
- data/ext/pixo/ext/glm/doc/logo.png +0 -0
- data/ext/pixo/ext/glm/doc/man.doxy +2396 -0
- data/ext/pixo/ext/glm/doc/pages.doxy +32 -0
- data/ext/pixo/ext/glm/doc/theme/doxygen.css +865 -0
- data/ext/pixo/ext/glm/doc/theme/tabs.css +79 -0
- data/ext/pixo/ext/glm/glm/CMakeLists.txt +67 -0
- data/ext/pixo/ext/glm/glm/common.hpp +6 -0
- data/ext/pixo/ext/glm/glm/detail/_features.hpp +399 -0
- data/ext/pixo/ext/glm/glm/detail/_fixes.hpp +30 -0
- data/ext/pixo/ext/glm/glm/detail/_noise.hpp +107 -0
- data/ext/pixo/ext/glm/glm/detail/_swizzle.hpp +797 -0
- data/ext/pixo/ext/glm/glm/detail/_swizzle_func.hpp +696 -0
- data/ext/pixo/ext/glm/glm/detail/_vectorize.hpp +131 -0
- data/ext/pixo/ext/glm/glm/detail/dummy.cpp +207 -0
- data/ext/pixo/ext/glm/glm/detail/func_common.hpp +427 -0
- data/ext/pixo/ext/glm/glm/detail/func_common.inl +848 -0
- data/ext/pixo/ext/glm/glm/detail/func_common_simd.inl +231 -0
- data/ext/pixo/ext/glm/glm/detail/func_exponential.hpp +103 -0
- data/ext/pixo/ext/glm/glm/detail/func_exponential.inl +146 -0
- data/ext/pixo/ext/glm/glm/detail/func_exponential_simd.inl +35 -0
- data/ext/pixo/ext/glm/glm/detail/func_geometric.hpp +113 -0
- data/ext/pixo/ext/glm/glm/detail/func_geometric.inl +247 -0
- data/ext/pixo/ext/glm/glm/detail/func_geometric_simd.inl +99 -0
- data/ext/pixo/ext/glm/glm/detail/func_integer.hpp +203 -0
- data/ext/pixo/ext/glm/glm/detail/func_integer.inl +375 -0
- data/ext/pixo/ext/glm/glm/detail/func_integer_simd.inl +66 -0
- data/ext/pixo/ext/glm/glm/detail/func_matrix.hpp +149 -0
- data/ext/pixo/ext/glm/glm/detail/func_matrix.inl +401 -0
- data/ext/pixo/ext/glm/glm/detail/func_matrix_simd.inl +88 -0
- data/ext/pixo/ext/glm/glm/detail/func_packing.hpp +168 -0
- data/ext/pixo/ext/glm/glm/detail/func_packing.inl +190 -0
- data/ext/pixo/ext/glm/glm/detail/func_packing_simd.inl +9 -0
- data/ext/pixo/ext/glm/glm/detail/func_trigonometric.hpp +176 -0
- data/ext/pixo/ext/glm/glm/detail/func_trigonometric.inl +200 -0
- data/ext/pixo/ext/glm/glm/detail/func_trigonometric_simd.inl +0 -0
- data/ext/pixo/ext/glm/glm/detail/func_vector_relational.hpp +111 -0
- data/ext/pixo/ext/glm/glm/detail/func_vector_relational.inl +105 -0
- data/ext/pixo/ext/glm/glm/detail/func_vector_relational_simd.inl +9 -0
- data/ext/pixo/ext/glm/glm/detail/glm.cpp +257 -0
- data/ext/pixo/ext/glm/glm/detail/precision.hpp +63 -0
- data/ext/pixo/ext/glm/glm/detail/setup.hpp +777 -0
- data/ext/pixo/ext/glm/glm/detail/type_float.hpp +67 -0
- data/ext/pixo/ext/glm/glm/detail/type_gentype.hpp +195 -0
- data/ext/pixo/ext/glm/glm/detail/type_gentype.inl +341 -0
- data/ext/pixo/ext/glm/glm/detail/type_half.hpp +19 -0
- data/ext/pixo/ext/glm/glm/detail/type_half.inl +244 -0
- data/ext/pixo/ext/glm/glm/detail/type_int.hpp +306 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat.hpp +767 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat.inl +3 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat2x2.hpp +183 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat2x2.inl +490 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat2x3.hpp +165 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat2x3.inl +464 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat2x4.hpp +167 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat2x4.inl +473 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat3x2.hpp +173 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat3x2.inl +498 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat3x3.hpp +190 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat3x3.inl +567 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat3x4.hpp +172 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat3x4.inl +538 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat4x2.hpp +177 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat4x2.inl +551 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat4x3.hpp +177 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat4x3.inl +568 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat4x4.hpp +195 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat4x4.inl +677 -0
- data/ext/pixo/ext/glm/glm/detail/type_mat4x4_simd.inl +7 -0
- data/ext/pixo/ext/glm/glm/detail/type_vec.hpp +576 -0
- data/ext/pixo/ext/glm/glm/detail/type_vec.inl +2 -0
- data/ext/pixo/ext/glm/glm/detail/type_vec1.hpp +299 -0
- data/ext/pixo/ext/glm/glm/detail/type_vec1.inl +564 -0
- data/ext/pixo/ext/glm/glm/detail/type_vec2.hpp +385 -0
- data/ext/pixo/ext/glm/glm/detail/type_vec2.inl +900 -0
- data/ext/pixo/ext/glm/glm/detail/type_vec3.hpp +406 -0
- data/ext/pixo/ext/glm/glm/detail/type_vec3.inl +1028 -0
- data/ext/pixo/ext/glm/glm/detail/type_vec4.hpp +451 -0
- data/ext/pixo/ext/glm/glm/detail/type_vec4.inl +975 -0
- data/ext/pixo/ext/glm/glm/detail/type_vec4_simd.inl +481 -0
- data/ext/pixo/ext/glm/glm/exponential.hpp +6 -0
- data/ext/pixo/ext/glm/glm/ext.hpp +117 -0
- data/ext/pixo/ext/glm/glm/fwd.hpp +2570 -0
- data/ext/pixo/ext/glm/glm/geometric.hpp +6 -0
- data/ext/pixo/ext/glm/glm/glm.hpp +88 -0
- data/ext/pixo/ext/glm/glm/gtc/bitfield.hpp +207 -0
- data/ext/pixo/ext/glm/glm/gtc/bitfield.inl +515 -0
- data/ext/pixo/ext/glm/glm/gtc/color_encoding.hpp +50 -0
- data/ext/pixo/ext/glm/glm/gtc/color_encoding.inl +65 -0
- data/ext/pixo/ext/glm/glm/gtc/color_space.hpp +56 -0
- data/ext/pixo/ext/glm/glm/gtc/color_space.inl +75 -0
- data/ext/pixo/ext/glm/glm/gtc/constants.hpp +176 -0
- data/ext/pixo/ext/glm/glm/gtc/constants.inl +181 -0
- data/ext/pixo/ext/glm/glm/gtc/epsilon.hpp +73 -0
- data/ext/pixo/ext/glm/glm/gtc/epsilon.inl +125 -0
- data/ext/pixo/ext/glm/glm/gtc/functions.hpp +53 -0
- data/ext/pixo/ext/glm/glm/gtc/functions.inl +31 -0
- data/ext/pixo/ext/glm/glm/gtc/integer.hpp +102 -0
- data/ext/pixo/ext/glm/glm/gtc/integer.inl +71 -0
- data/ext/pixo/ext/glm/glm/gtc/matrix_access.hpp +59 -0
- data/ext/pixo/ext/glm/glm/gtc/matrix_access.inl +63 -0
- data/ext/pixo/ext/glm/glm/gtc/matrix_integer.hpp +486 -0
- data/ext/pixo/ext/glm/glm/gtc/matrix_inverse.hpp +49 -0
- data/ext/pixo/ext/glm/glm/gtc/matrix_inverse.inl +120 -0
- data/ext/pixo/ext/glm/glm/gtc/matrix_transform.hpp +465 -0
- data/ext/pixo/ext/glm/glm/gtc/matrix_transform.inl +575 -0
- data/ext/pixo/ext/glm/glm/gtc/noise.hpp +60 -0
- data/ext/pixo/ext/glm/glm/gtc/noise.inl +808 -0
- data/ext/pixo/ext/glm/glm/gtc/packing.hpp +579 -0
- data/ext/pixo/ext/glm/glm/gtc/packing.inl +781 -0
- data/ext/pixo/ext/glm/glm/gtc/quaternion.hpp +397 -0
- data/ext/pixo/ext/glm/glm/gtc/quaternion.inl +801 -0
- data/ext/pixo/ext/glm/glm/gtc/quaternion_simd.inl +198 -0
- data/ext/pixo/ext/glm/glm/gtc/random.hpp +98 -0
- data/ext/pixo/ext/glm/glm/gtc/random.inl +350 -0
- data/ext/pixo/ext/glm/glm/gtc/reciprocal.hpp +135 -0
- data/ext/pixo/ext/glm/glm/gtc/reciprocal.inl +192 -0
- data/ext/pixo/ext/glm/glm/gtc/round.hpp +174 -0
- data/ext/pixo/ext/glm/glm/gtc/round.inl +344 -0
- data/ext/pixo/ext/glm/glm/gtc/type_aligned.hpp +362 -0
- data/ext/pixo/ext/glm/glm/gtc/type_precision.hpp +861 -0
- data/ext/pixo/ext/glm/glm/gtc/type_precision.inl +7 -0
- data/ext/pixo/ext/glm/glm/gtc/type_ptr.hpp +149 -0
- data/ext/pixo/ext/glm/glm/gtc/type_ptr.inl +450 -0
- data/ext/pixo/ext/glm/glm/gtc/ulp.hpp +63 -0
- data/ext/pixo/ext/glm/glm/gtc/ulp.inl +321 -0
- data/ext/pixo/ext/glm/glm/gtc/vec1.hpp +164 -0
- data/ext/pixo/ext/glm/glm/gtc/vec1.inl +2 -0
- data/ext/pixo/ext/glm/glm/gtx/associated_min_max.hpp +202 -0
- data/ext/pixo/ext/glm/glm/gtx/associated_min_max.inl +355 -0
- data/ext/pixo/ext/glm/glm/gtx/bit.hpp +95 -0
- data/ext/pixo/ext/glm/glm/gtx/bit.inl +93 -0
- data/ext/pixo/ext/glm/glm/gtx/closest_point.hpp +45 -0
- data/ext/pixo/ext/glm/glm/gtx/closest_point.inl +46 -0
- data/ext/pixo/ext/glm/glm/gtx/color_space.hpp +68 -0
- data/ext/pixo/ext/glm/glm/gtx/color_space.inl +143 -0
- data/ext/pixo/ext/glm/glm/gtx/color_space_YCoCg.hpp +56 -0
- data/ext/pixo/ext/glm/glm/gtx/color_space_YCoCg.inl +108 -0
- data/ext/pixo/ext/glm/glm/gtx/common.hpp +53 -0
- data/ext/pixo/ext/glm/glm/gtx/common.inl +112 -0
- data/ext/pixo/ext/glm/glm/gtx/compatibility.hpp +130 -0
- data/ext/pixo/ext/glm/glm/gtx/compatibility.inl +65 -0
- data/ext/pixo/ext/glm/glm/gtx/component_wise.hpp +65 -0
- data/ext/pixo/ext/glm/glm/gtx/component_wise.inl +128 -0
- data/ext/pixo/ext/glm/glm/gtx/dual_quaternion.hpp +266 -0
- data/ext/pixo/ext/glm/glm/gtx/dual_quaternion.inl +357 -0
- data/ext/pixo/ext/glm/glm/gtx/euler_angles.hpp +143 -0
- data/ext/pixo/ext/glm/glm/gtx/euler_angles.inl +312 -0
- data/ext/pixo/ext/glm/glm/gtx/extend.hpp +38 -0
- data/ext/pixo/ext/glm/glm/gtx/extend.inl +49 -0
- data/ext/pixo/ext/glm/glm/gtx/extended_min_max.hpp +133 -0
- data/ext/pixo/ext/glm/glm/gtx/extended_min_max.inl +140 -0
- data/ext/pixo/ext/glm/glm/gtx/fast_exponential.hpp +91 -0
- data/ext/pixo/ext/glm/glm/gtx/fast_exponential.inl +137 -0
- data/ext/pixo/ext/glm/glm/gtx/fast_square_root.hpp +88 -0
- data/ext/pixo/ext/glm/glm/gtx/fast_square_root.inl +81 -0
- data/ext/pixo/ext/glm/glm/gtx/fast_trigonometry.hpp +75 -0
- data/ext/pixo/ext/glm/glm/gtx/fast_trigonometry.inl +143 -0
- data/ext/pixo/ext/glm/glm/gtx/float_notmalize.inl +14 -0
- data/ext/pixo/ext/glm/glm/gtx/gradient_paint.hpp +48 -0
- data/ext/pixo/ext/glm/glm/gtx/gradient_paint.inl +37 -0
- data/ext/pixo/ext/glm/glm/gtx/handed_coordinate_space.hpp +46 -0
- data/ext/pixo/ext/glm/glm/gtx/handed_coordinate_space.inl +27 -0
- data/ext/pixo/ext/glm/glm/gtx/hash.hpp +134 -0
- data/ext/pixo/ext/glm/glm/gtx/hash.inl +185 -0
- data/ext/pixo/ext/glm/glm/gtx/integer.hpp +72 -0
- data/ext/pixo/ext/glm/glm/gtx/integer.inl +182 -0
- data/ext/pixo/ext/glm/glm/gtx/intersect.hpp +87 -0
- data/ext/pixo/ext/glm/glm/gtx/intersect.inl +170 -0
- data/ext/pixo/ext/glm/glm/gtx/io.hpp +197 -0
- data/ext/pixo/ext/glm/glm/gtx/io.inl +441 -0
- data/ext/pixo/ext/glm/glm/gtx/log_base.hpp +44 -0
- data/ext/pixo/ext/glm/glm/gtx/log_base.inl +18 -0
- data/ext/pixo/ext/glm/glm/gtx/matrix_cross_product.hpp +43 -0
- data/ext/pixo/ext/glm/glm/gtx/matrix_cross_product.inl +38 -0
- data/ext/pixo/ext/glm/glm/gtx/matrix_decompose.hpp +42 -0
- data/ext/pixo/ext/glm/glm/gtx/matrix_decompose.inl +194 -0
- data/ext/pixo/ext/glm/glm/gtx/matrix_interpolation.hpp +61 -0
- data/ext/pixo/ext/glm/glm/gtx/matrix_interpolation.inl +134 -0
- data/ext/pixo/ext/glm/glm/gtx/matrix_major_storage.hpp +115 -0
- data/ext/pixo/ext/glm/glm/gtx/matrix_major_storage.inl +167 -0
- data/ext/pixo/ext/glm/glm/gtx/matrix_operation.hpp +84 -0
- data/ext/pixo/ext/glm/glm/gtx/matrix_operation.inl +118 -0
- data/ext/pixo/ext/glm/glm/gtx/matrix_query.hpp +73 -0
- data/ext/pixo/ext/glm/glm/gtx/matrix_query.inl +114 -0
- data/ext/pixo/ext/glm/glm/gtx/matrix_transform_2d.hpp +78 -0
- data/ext/pixo/ext/glm/glm/gtx/matrix_transform_2d.inl +69 -0
- data/ext/pixo/ext/glm/glm/gtx/mixed_product.hpp +37 -0
- data/ext/pixo/ext/glm/glm/gtx/mixed_product.inl +16 -0
- data/ext/pixo/ext/glm/glm/gtx/norm.hpp +86 -0
- data/ext/pixo/ext/glm/glm/gtx/norm.inl +106 -0
- data/ext/pixo/ext/glm/glm/gtx/normal.hpp +39 -0
- data/ext/pixo/ext/glm/glm/gtx/normal.inl +16 -0
- data/ext/pixo/ext/glm/glm/gtx/normalize_dot.hpp +45 -0
- data/ext/pixo/ext/glm/glm/gtx/normalize_dot.inl +17 -0
- data/ext/pixo/ext/glm/glm/gtx/number_precision.hpp +57 -0
- data/ext/pixo/ext/glm/glm/gtx/number_precision.inl +7 -0
- data/ext/pixo/ext/glm/glm/gtx/optimum_pow.hpp +50 -0
- data/ext/pixo/ext/glm/glm/gtx/optimum_pow.inl +23 -0
- data/ext/pixo/ext/glm/glm/gtx/orthonormalize.hpp +45 -0
- data/ext/pixo/ext/glm/glm/gtx/orthonormalize.inl +30 -0
- data/ext/pixo/ext/glm/glm/gtx/perpendicular.hpp +39 -0
- data/ext/pixo/ext/glm/glm/gtx/perpendicular.inl +15 -0
- data/ext/pixo/ext/glm/glm/gtx/polar_coordinates.hpp +44 -0
- data/ext/pixo/ext/glm/glm/gtx/polar_coordinates.inl +37 -0
- data/ext/pixo/ext/glm/glm/gtx/projection.hpp +36 -0
- data/ext/pixo/ext/glm/glm/gtx/projection.inl +11 -0
- data/ext/pixo/ext/glm/glm/gtx/quaternion.hpp +185 -0
- data/ext/pixo/ext/glm/glm/gtx/quaternion.inl +212 -0
- data/ext/pixo/ext/glm/glm/gtx/range.hpp +85 -0
- data/ext/pixo/ext/glm/glm/gtx/raw_data.hpp +47 -0
- data/ext/pixo/ext/glm/glm/gtx/raw_data.inl +2 -0
- data/ext/pixo/ext/glm/glm/gtx/rotate_normalized_axis.hpp +64 -0
- data/ext/pixo/ext/glm/glm/gtx/rotate_normalized_axis.inl +59 -0
- data/ext/pixo/ext/glm/glm/gtx/rotate_vector.hpp +117 -0
- data/ext/pixo/ext/glm/glm/gtx/rotate_vector.inl +188 -0
- data/ext/pixo/ext/glm/glm/gtx/scalar_multiplication.hpp +69 -0
- data/ext/pixo/ext/glm/glm/gtx/scalar_relational.hpp +32 -0
- data/ext/pixo/ext/glm/glm/gtx/scalar_relational.inl +89 -0
- data/ext/pixo/ext/glm/glm/gtx/spline.hpp +61 -0
- data/ext/pixo/ext/glm/glm/gtx/spline.inl +63 -0
- data/ext/pixo/ext/glm/glm/gtx/std_based_type.hpp +63 -0
- data/ext/pixo/ext/glm/glm/gtx/std_based_type.inl +7 -0
- data/ext/pixo/ext/glm/glm/gtx/string_cast.hpp +47 -0
- data/ext/pixo/ext/glm/glm/gtx/string_cast.inl +458 -0
- data/ext/pixo/ext/glm/glm/gtx/transform.hpp +56 -0
- data/ext/pixo/ext/glm/glm/gtx/transform.inl +24 -0
- data/ext/pixo/ext/glm/glm/gtx/transform2.hpp +107 -0
- data/ext/pixo/ext/glm/glm/gtx/transform2.inl +126 -0
- data/ext/pixo/ext/glm/glm/gtx/type_aligned.hpp +966 -0
- data/ext/pixo/ext/glm/glm/gtx/type_aligned.inl +7 -0
- data/ext/pixo/ext/glm/glm/gtx/type_trait.hpp +252 -0
- data/ext/pixo/ext/glm/glm/gtx/type_trait.inl +0 -0
- data/ext/pixo/ext/glm/glm/gtx/vector_angle.hpp +60 -0
- data/ext/pixo/ext/glm/glm/gtx/vector_angle.inl +58 -0
- data/ext/pixo/ext/glm/glm/gtx/vector_query.hpp +62 -0
- data/ext/pixo/ext/glm/glm/gtx/vector_query.inl +193 -0
- data/ext/pixo/ext/glm/glm/gtx/wrap.hpp +51 -0
- data/ext/pixo/ext/glm/glm/gtx/wrap.inl +58 -0
- data/ext/pixo/ext/glm/glm/integer.hpp +6 -0
- data/ext/pixo/ext/glm/glm/mat2x2.hpp +52 -0
- data/ext/pixo/ext/glm/glm/mat2x3.hpp +32 -0
- data/ext/pixo/ext/glm/glm/mat2x4.hpp +31 -0
- data/ext/pixo/ext/glm/glm/mat3x2.hpp +31 -0
- data/ext/pixo/ext/glm/glm/mat3x3.hpp +52 -0
- data/ext/pixo/ext/glm/glm/mat3x4.hpp +31 -0
- data/ext/pixo/ext/glm/glm/mat4x2.hpp +31 -0
- data/ext/pixo/ext/glm/glm/mat4x3.hpp +31 -0
- data/ext/pixo/ext/glm/glm/mat4x4.hpp +52 -0
- data/ext/pixo/ext/glm/glm/matrix.hpp +6 -0
- data/ext/pixo/ext/glm/glm/packing.hpp +6 -0
- data/ext/pixo/ext/glm/glm/simd/common.h +240 -0
- data/ext/pixo/ext/glm/glm/simd/exponential.h +20 -0
- data/ext/pixo/ext/glm/glm/simd/geometric.h +124 -0
- data/ext/pixo/ext/glm/glm/simd/integer.h +115 -0
- data/ext/pixo/ext/glm/glm/simd/matrix.h +1028 -0
- data/ext/pixo/ext/glm/glm/simd/packing.h +8 -0
- data/ext/pixo/ext/glm/glm/simd/platform.h +437 -0
- data/ext/pixo/ext/glm/glm/simd/trigonometric.h +9 -0
- data/ext/pixo/ext/glm/glm/simd/vector_relational.h +8 -0
- data/ext/pixo/ext/glm/glm/trigonometric.hpp +6 -0
- data/ext/pixo/ext/glm/glm/vec2.hpp +6 -0
- data/ext/pixo/ext/glm/glm/vec3.hpp +6 -0
- data/ext/pixo/ext/glm/glm/vec4.hpp +6 -0
- data/ext/pixo/ext/glm/glm/vector_relational.hpp +6 -0
- data/ext/pixo/ext/glm/readme.md +962 -0
- data/ext/pixo/ext/glm/test/CMakeLists.txt +17 -0
- data/ext/pixo/ext/glm/test/bug/CMakeLists.txt +0 -0
- data/ext/pixo/ext/glm/test/core/CMakeLists.txt +38 -0
- data/ext/pixo/ext/glm/test/core/core_func_common.cpp +1272 -0
- data/ext/pixo/ext/glm/test/core/core_func_exponential.cpp +128 -0
- data/ext/pixo/ext/glm/test/core/core_func_geometric.cpp +193 -0
- data/ext/pixo/ext/glm/test/core/core_func_integer.cpp +1554 -0
- data/ext/pixo/ext/glm/test/core/core_func_integer_bit_count.cpp +291 -0
- data/ext/pixo/ext/glm/test/core/core_func_integer_find_lsb.cpp +400 -0
- data/ext/pixo/ext/glm/test/core/core_func_integer_find_msb.cpp +438 -0
- data/ext/pixo/ext/glm/test/core/core_func_matrix.cpp +277 -0
- data/ext/pixo/ext/glm/test/core/core_func_noise.cpp +7 -0
- data/ext/pixo/ext/glm/test/core/core_func_packing.cpp +156 -0
- data/ext/pixo/ext/glm/test/core/core_func_swizzle.cpp +78 -0
- data/ext/pixo/ext/glm/test/core/core_func_trigonometric.cpp +10 -0
- data/ext/pixo/ext/glm/test/core/core_func_vector_relational.cpp +42 -0
- data/ext/pixo/ext/glm/test/core/core_setup_force_cxx98.cpp +10 -0
- data/ext/pixo/ext/glm/test/core/core_setup_message.cpp +263 -0
- data/ext/pixo/ext/glm/test/core/core_setup_precision.cpp +58 -0
- data/ext/pixo/ext/glm/test/core/core_type_aligned.cpp +128 -0
- data/ext/pixo/ext/glm/test/core/core_type_cast.cpp +144 -0
- data/ext/pixo/ext/glm/test/core/core_type_ctor.cpp +358 -0
- data/ext/pixo/ext/glm/test/core/core_type_float.cpp +31 -0
- data/ext/pixo/ext/glm/test/core/core_type_int.cpp +43 -0
- data/ext/pixo/ext/glm/test/core/core_type_length.cpp +79 -0
- data/ext/pixo/ext/glm/test/core/core_type_mat2x2.cpp +145 -0
- data/ext/pixo/ext/glm/test/core/core_type_mat2x3.cpp +118 -0
- data/ext/pixo/ext/glm/test/core/core_type_mat2x4.cpp +121 -0
- data/ext/pixo/ext/glm/test/core/core_type_mat3x2.cpp +124 -0
- data/ext/pixo/ext/glm/test/core/core_type_mat3x3.cpp +184 -0
- data/ext/pixo/ext/glm/test/core/core_type_mat3x4.cpp +123 -0
- data/ext/pixo/ext/glm/test/core/core_type_mat4x2.cpp +127 -0
- data/ext/pixo/ext/glm/test/core/core_type_mat4x3.cpp +128 -0
- data/ext/pixo/ext/glm/test/core/core_type_mat4x4.cpp +313 -0
- data/ext/pixo/ext/glm/test/core/core_type_vec1.cpp +147 -0
- data/ext/pixo/ext/glm/test/core/core_type_vec2.cpp +312 -0
- data/ext/pixo/ext/glm/test/core/core_type_vec3.cpp +486 -0
- data/ext/pixo/ext/glm/test/core/core_type_vec4.cpp +559 -0
- data/ext/pixo/ext/glm/test/external/gli/CMakeLists.txt +27 -0
- data/ext/pixo/ext/glm/test/external/gli/core/dummy.cpp +4 -0
- data/ext/pixo/ext/glm/test/external/gli/core/generate_mipmaps.hpp +25 -0
- data/ext/pixo/ext/glm/test/external/gli/core/generate_mipmaps.inl +69 -0
- data/ext/pixo/ext/glm/test/external/gli/core/image2d.hpp +169 -0
- data/ext/pixo/ext/glm/test/external/gli/core/image2d.inl +229 -0
- data/ext/pixo/ext/glm/test/external/gli/core/operation.hpp +82 -0
- data/ext/pixo/ext/glm/test/external/gli/core/operation.inl +233 -0
- data/ext/pixo/ext/glm/test/external/gli/core/operator.hpp +28 -0
- data/ext/pixo/ext/glm/test/external/gli/core/operator.inl +210 -0
- data/ext/pixo/ext/glm/test/external/gli/core/shared_array.hpp +48 -0
- data/ext/pixo/ext/glm/test/external/gli/core/shared_array.inl +151 -0
- data/ext/pixo/ext/glm/test/external/gli/core/shared_ptr.hpp +41 -0
- data/ext/pixo/ext/glm/test/external/gli/core/shared_ptr.inl +125 -0
- data/ext/pixo/ext/glm/test/external/gli/core/size.hpp +31 -0
- data/ext/pixo/ext/glm/test/external/gli/core/size.inl +47 -0
- data/ext/pixo/ext/glm/test/external/gli/core/texture2d.hpp +122 -0
- data/ext/pixo/ext/glm/test/external/gli/core/texture2d.inl +304 -0
- data/ext/pixo/ext/glm/test/external/gli/core/texture2d_array.hpp +59 -0
- data/ext/pixo/ext/glm/test/external/gli/core/texture2d_array.inl +78 -0
- data/ext/pixo/ext/glm/test/external/gli/core/texture_cube.hpp +65 -0
- data/ext/pixo/ext/glm/test/external/gli/core/texture_cube.inl +70 -0
- data/ext/pixo/ext/glm/test/external/gli/core/texture_cube_array.hpp +59 -0
- data/ext/pixo/ext/glm/test/external/gli/core/texture_cube_array.inl +72 -0
- data/ext/pixo/ext/glm/test/external/gli/gli.hpp +31 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/compression.hpp +27 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/compression.inl +8 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/fetch.hpp +46 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/fetch.inl +91 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/gl_texture2d.hpp +33 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/gl_texture2d.inl +210 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/gradient.hpp +38 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/gradient.inl +74 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/loader.hpp +37 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/loader.inl +46 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/loader_dds10.hpp +35 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/loader_dds10.inl +595 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/loader_dds9.hpp +39 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/loader_dds9.inl +790 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/loader_tga.hpp +36 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/loader_tga.inl +159 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/wavelet.hpp +27 -0
- data/ext/pixo/ext/glm/test/external/gli/gtx/wavelet.inl +8 -0
- data/ext/pixo/ext/glm/test/glm.cppcheck +6 -0
- data/ext/pixo/ext/glm/test/gtc/CMakeLists.txt +22 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_bitfield.cpp +642 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_color_encoding.cpp +51 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_color_space.cpp +50 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_constants.cpp +28 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_epsilon.cpp +77 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_functions.cpp +35 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_integer.cpp +232 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_matrix_access.cpp +381 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_matrix_integer.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_matrix_inverse.cpp +51 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_matrix_transform.cpp +54 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_noise.cpp +188 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_packing.cpp +682 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_quaternion.cpp +312 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_random.cpp +377 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_reciprocal.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_round.cpp +458 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_type_aligned.cpp +118 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_type_precision.cpp +890 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_type_ptr.cpp +252 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_ulp.cpp +96 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_user_defined_types.cpp +30 -0
- data/ext/pixo/ext/glm/test/gtc/gtc_vec1.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/CMakeLists.txt +49 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_associated_min_max.cpp +9 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_closest_point.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_color_space.cpp +19 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_color_space_YCoCg.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_common.cpp +127 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_compatibility.cpp +18 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_component_wise.cpp +115 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_dual_quaternion.cpp +188 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_euler_angle.cpp +328 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_extend.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_extended_min_max.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_extented_min_max.cpp +39 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_fast_exponential.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_fast_square_root.cpp +45 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_fast_trigonometry.cpp +445 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_gradient_paint.cpp +33 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_handed_coordinate_space.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_int_10_10_10_2.cpp +18 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_integer.cpp +64 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_intersect.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_io.cpp +175 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_log_base.cpp +53 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_matrix_cross_product.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_matrix_decompose.cpp +18 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_matrix_interpolation.cpp +10 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_matrix_major_storage.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_matrix_operation.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_matrix_query.cpp +65 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_matrix_transform_2d.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_mixed_product.cpp +18 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_norm.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_normal.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_normalize_dot.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_number_precision.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_optimum_pow.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_orthonormalize.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_perpendicular.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_polar_coordinates.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_projection.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_quaternion.cpp +102 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_random.cpp +99 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_range.cpp +52 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_rotate_normalized_axis.cpp +8 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_rotate_vector.cpp +75 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_scalar_multiplication.cpp +34 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_scalar_relational.cpp +170 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_simd_mat4.cpp +324 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_simd_vec4.cpp +71 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_spline.cpp +99 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_string_cast.cpp +128 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_type_aligned.cpp +113 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_type_trait.cpp +12 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_vector_angle.cpp +58 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_vector_query.cpp +81 -0
- data/ext/pixo/ext/glm/test/gtx/gtx_wrap.cpp +189 -0
- data/ext/pixo/ext/glm/util/autoexp.txt +28 -0
- data/ext/pixo/ext/glm/util/autoexp.vc2010.dat +3896 -0
- data/ext/pixo/ext/glm/util/glm.natvis +69 -0
- data/ext/pixo/ext/glm/util/usertype.dat +407 -0
- data/ext/pixo/ext/tinyobjloader/CMakeLists.txt +146 -0
- data/ext/pixo/ext/tinyobjloader/LICENSE +21 -0
- data/ext/pixo/ext/tinyobjloader/README.md +254 -0
- data/ext/pixo/ext/tinyobjloader/appveyor.yml +22 -0
- data/ext/pixo/ext/tinyobjloader/build.ninja +53 -0
- data/ext/pixo/ext/tinyobjloader/deps/cpplint.py +6323 -0
- data/ext/pixo/ext/tinyobjloader/examples/callback_api/Makefile +2 -0
- data/ext/pixo/ext/tinyobjloader/examples/callback_api/main.cc +166 -0
- data/ext/pixo/ext/tinyobjloader/examples/obj_sticher/obj_sticher.cc +110 -0
- data/ext/pixo/ext/tinyobjloader/examples/obj_sticher/obj_writer.cc +176 -0
- data/ext/pixo/ext/tinyobjloader/examples/obj_sticher/obj_writer.h +9 -0
- data/ext/pixo/ext/tinyobjloader/examples/obj_sticher/premake4.lua +38 -0
- data/ext/pixo/ext/tinyobjloader/examples/viewer/README.md +37 -0
- data/ext/pixo/ext/tinyobjloader/examples/viewer/premake4.lua +44 -0
- data/ext/pixo/ext/tinyobjloader/examples/viewer/stb_image.h +6755 -0
- data/ext/pixo/ext/tinyobjloader/examples/viewer/trackball.cc +292 -0
- data/ext/pixo/ext/tinyobjloader/examples/viewer/trackball.h +75 -0
- data/ext/pixo/ext/tinyobjloader/examples/viewer/viewer.cc +698 -0
- data/ext/pixo/ext/tinyobjloader/examples/voxelize/Makefile +2 -0
- data/ext/pixo/ext/tinyobjloader/examples/voxelize/README.md +5 -0
- data/ext/pixo/ext/tinyobjloader/examples/voxelize/main.cc +74 -0
- data/ext/pixo/ext/tinyobjloader/examples/voxelize/voxelizer.h +764 -0
- data/ext/pixo/ext/tinyobjloader/experimental/LICENSE.ltalloc +26 -0
- data/ext/pixo/ext/tinyobjloader/experimental/README.md +5 -0
- data/ext/pixo/ext/tinyobjloader/experimental/ltalloc.cc +973 -0
- data/ext/pixo/ext/tinyobjloader/experimental/ltalloc.h +14 -0
- data/ext/pixo/ext/tinyobjloader/experimental/ltalloc.hpp +59 -0
- data/ext/pixo/ext/tinyobjloader/experimental/premake5.lua +95 -0
- data/ext/pixo/ext/tinyobjloader/experimental/tinyobj_loader_opt.h +1678 -0
- data/ext/pixo/ext/tinyobjloader/experimental/trackball.cc +292 -0
- data/ext/pixo/ext/tinyobjloader/experimental/trackball.h +75 -0
- data/ext/pixo/ext/tinyobjloader/experimental/viewer.cc +748 -0
- data/ext/pixo/ext/tinyobjloader/images/rungholt.jpg +0 -0
- data/ext/pixo/ext/tinyobjloader/images/sanmugel.png +0 -0
- data/ext/pixo/ext/tinyobjloader/jni/Android.mk +12 -0
- data/ext/pixo/ext/tinyobjloader/jni/Application.mk +2 -0
- data/ext/pixo/ext/tinyobjloader/jni/Makefile +2 -0
- data/ext/pixo/ext/tinyobjloader/jni/README +1 -0
- data/ext/pixo/ext/tinyobjloader/loader_example.cc +419 -0
- data/ext/pixo/ext/tinyobjloader/models/catmark_torus_creases0.obj +101 -0
- data/ext/pixo/ext/tinyobjloader/models/cornell_box.mtl +24 -0
- data/ext/pixo/ext/tinyobjloader/models/cornell_box.obj +145 -0
- data/ext/pixo/ext/tinyobjloader/models/cornell_box_multimaterial.obj +146 -0
- data/ext/pixo/ext/tinyobjloader/models/cube.mtl +24 -0
- data/ext/pixo/ext/tinyobjloader/models/cube.obj +31 -0
- data/ext/pixo/ext/tinyobjloader/models/issue-92.mtl +6 -0
- data/ext/pixo/ext/tinyobjloader/models/issue-92.obj +7 -0
- data/ext/pixo/ext/tinyobjloader/models/issue-95-2.mtl +5 -0
- data/ext/pixo/ext/tinyobjloader/models/issue-95-2.obj +7 -0
- data/ext/pixo/ext/tinyobjloader/models/issue-95.mtl +5 -0
- data/ext/pixo/ext/tinyobjloader/models/issue-95.obj +7 -0
- data/ext/pixo/ext/tinyobjloader/models/missing_material_file.obj +145 -0
- data/ext/pixo/ext/tinyobjloader/models/mtllib-multiple-files-issue-112.mtl +6 -0
- data/ext/pixo/ext/tinyobjloader/models/mtllib-multiple-files-issue-112.obj +7 -0
- data/ext/pixo/ext/tinyobjloader/models/no_material.obj +133 -0
- data/ext/pixo/ext/tinyobjloader/models/pbr-mat-ext.mtl +19 -0
- data/ext/pixo/ext/tinyobjloader/models/pbr-mat-ext.obj +10 -0
- data/ext/pixo/ext/tinyobjloader/models/test-nan.obj +145 -0
- data/ext/pixo/ext/tinyobjloader/models/texture-options-issue-85.mtl +36 -0
- data/ext/pixo/ext/tinyobjloader/models/texture-options-issue-85.obj +7 -0
- data/ext/pixo/ext/tinyobjloader/models/tr-and-d-issue-43.mtl +13 -0
- data/ext/pixo/ext/tinyobjloader/models/tr-and-d-issue-43.obj +817 -0
- data/ext/pixo/ext/tinyobjloader/models/usemtl-issue-104.obj +30 -0
- data/ext/pixo/ext/tinyobjloader/models/usemtl-issue-68.mtl +9 -0
- data/ext/pixo/ext/tinyobjloader/models/usemtl-issue-68.obj +817 -0
- data/ext/pixo/ext/tinyobjloader/premake4.lua +29 -0
- data/ext/pixo/ext/tinyobjloader/python/TODO.md +2 -0
- data/ext/pixo/ext/tinyobjloader/python/cornell_box_multimaterial_output.json +581 -0
- data/ext/pixo/ext/tinyobjloader/python/howto.py +9 -0
- data/ext/pixo/ext/tinyobjloader/python/main.cpp +203 -0
- data/ext/pixo/ext/tinyobjloader/python/setup.py +13 -0
- data/ext/pixo/ext/tinyobjloader/tests/Makefile +16 -0
- data/ext/pixo/ext/tinyobjloader/tests/README.md +37 -0
- data/ext/pixo/ext/tinyobjloader/tests/catch.hpp +10445 -0
- data/ext/pixo/ext/tinyobjloader/tests/config-msvc.py +52 -0
- data/ext/pixo/ext/tinyobjloader/tests/config-posix.py +53 -0
- data/ext/pixo/ext/tinyobjloader/tests/kuroga.py +312 -0
- data/ext/pixo/ext/tinyobjloader/tests/tester.cc +588 -0
- data/ext/pixo/ext/tinyobjloader/tests/vcbuild.bat +4 -0
- data/ext/pixo/ext/tinyobjloader/tiny_obj_loader.cc +2 -0
- data/ext/pixo/ext/tinyobjloader/tiny_obj_loader.h +2029 -0
- data/ext/pixo/ext/tinyobjloader/tinyobjloader-config.cmake.in +9 -0
- data/ext/pixo/ext/tinyobjloader/tinyobjloader.pc.in +15 -0
- data/ext/pixo/ext/tinyobjloader/tools/travis_postbuild.sh +12 -0
- data/ext/pixo/ext/tinyobjloader/tools/windows/premake5.exe +0 -0
- data/ext/pixo/ext/tinyobjloader/vcsetup.bat +1 -0
- data/ext/pixo/ext/tinyobjloader/wercker.yml +10 -0
- data/ext/pixo/fadecandy_configs/4x4x4.json +21 -0
- data/ext/pixo/fadecandy_configs/8x8x8.json +18 -0
- data/ext/pixo/patterns/basic.glsl +20 -0
- data/ext/pixo/patterns/bendy_pipes.glsl +116 -0
- data/ext/pixo/patterns/blades.glsl +69 -0
- data/ext/pixo/patterns/blob_neon.glsl +71 -0
- data/ext/pixo/patterns/bubbles.glsl +58 -0
- data/ext/pixo/patterns/chevron.glsl +45 -0
- data/ext/pixo/patterns/clouds.glsl +382 -0
- data/ext/pixo/patterns/cnoise.glsl +162 -0
- data/ext/pixo/patterns/corrente_continua.glsl +51 -0
- data/ext/pixo/patterns/drain.glsl +32 -0
- data/ext/pixo/patterns/dual_spiral.glsl +21 -0
- data/ext/pixo/patterns/ether.glsl +35 -0
- data/ext/pixo/patterns/fire.glsl +56 -0
- data/ext/pixo/patterns/fireball.glsl +229 -0
- data/ext/pixo/patterns/flame.glsl +101 -0
- data/ext/pixo/patterns/flower.glsl +27 -0
- data/ext/pixo/patterns/galaxy.glsl +50 -0
- data/ext/pixo/patterns/goop.glsl +117 -0
- data/ext/pixo/patterns/hypno_rings.glsl +13 -0
- data/ext/pixo/patterns/lightning.glsl +111 -0
- data/ext/pixo/patterns/paint.glsl +39 -0
- data/ext/pixo/patterns/plad.glsl +22 -0
- data/ext/pixo/patterns/plasam.glsl +30 -0
- data/ext/pixo/patterns/plasma_globe.glsl +215 -0
- data/ext/pixo/patterns/pulse.glsl +44 -0
- data/ext/pixo/patterns/pulsing_circles.glsl +32 -0
- data/ext/pixo/patterns/rainbow_ribbon.glsl +41 -0
- data/ext/pixo/patterns/rings.glsl +62 -0
- data/ext/pixo/patterns/sauron.glsl +220 -0
- data/ext/pixo/patterns/scales.glsl +64 -0
- data/ext/pixo/patterns/soccer.glsl +737 -0
- data/ext/pixo/patterns/spherical_polyhedra.glsl +251 -0
- data/ext/pixo/patterns/spiral.glsl +23 -0
- data/ext/pixo/patterns/star.glsl +518 -0
- data/ext/pixo/patterns/tiedy.glsl +39 -0
- data/ext/pixo/patterns/tunnel.glsl +145 -0
- data/ext/pixo/patterns/warping_grid.glsl +50 -0
- data/ext/pixo/pixlib/CMakeLists.txt +34 -0
- data/ext/pixo/pixlib/include/opc_client.h +205 -0
- data/ext/pixo/pixlib/include/pixlib/app.hpp +41 -0
- data/ext/pixo/pixlib/include/pixlib/camera.hpp +78 -0
- data/ext/pixo/pixlib/include/pixlib/cube.hpp +46 -0
- data/ext/pixo/pixlib/include/pixlib/drawable.hpp +11 -0
- data/ext/pixo/pixlib/include/pixlib/fade_candy.hpp +38 -0
- data/ext/pixo/pixlib/include/pixlib/led_cluster.hpp +58 -0
- data/ext/pixo/pixlib/include/pixlib/led_mesh.hpp +60 -0
- data/ext/pixo/pixlib/include/pixlib/led_renderer.hpp +36 -0
- data/ext/pixo/pixlib/include/pixlib/mesh.hpp +56 -0
- data/ext/pixo/pixlib/include/pixlib/pattern.hpp +21 -0
- data/ext/pixo/pixlib/include/pixlib/pattern_renderer.hpp +28 -0
- data/ext/pixo/pixlib/include/pixlib/renderer.hpp +32 -0
- data/ext/pixo/pixlib/include/pixlib/scene.hpp +39 -0
- data/ext/pixo/pixlib/include/pixlib/shader.hpp +19 -0
- data/ext/pixo/pixlib/include/pixlib/texture.hpp +34 -0
- data/ext/pixo/pixlib/include/pixlib/timer.hpp +19 -0
- data/ext/pixo/pixlib/include/pixlib.hpp +6 -0
- data/ext/pixo/pixlib/src/app.cpp +59 -0
- data/ext/pixo/pixlib/src/camera.cpp +106 -0
- data/ext/pixo/pixlib/src/cube.cpp +100 -0
- data/ext/pixo/pixlib/src/fade_candy.cpp +70 -0
- data/ext/pixo/pixlib/src/led_cluster.cpp +78 -0
- data/ext/pixo/pixlib/src/led_mesh.cpp +123 -0
- data/ext/pixo/pixlib/src/led_renderer.cpp +135 -0
- data/ext/pixo/pixlib/src/mesh.cpp +146 -0
- data/ext/pixo/pixlib/src/pattern.cpp +32 -0
- data/ext/pixo/pixlib/src/pattern_renderer.cpp +103 -0
- data/ext/pixo/pixlib/src/renderer.cpp +127 -0
- data/ext/pixo/pixlib/src/scene.cpp +52 -0
- data/ext/pixo/pixlib/src/shader.cpp +59 -0
- data/ext/pixo/pixlib/src/texture.cpp +62 -0
- data/ext/pixo/pixlib/src/timer.cpp +39 -0
- data/ext/pixo/src/CMakeLists.txt +14 -0
- data/ext/pixo/src/main.cpp +244 -0
- data/ext/pixo/src/opengl.h +4 -0
- data/lib/pixo/version.rb +3 -0
- data/lib/pixo.rb +7 -0
- data/pixo.gemspec +34 -0
- data/pkg/pixo-0.1.0.gem +0 -0
- metadata +1539 -0
@@ -0,0 +1,2029 @@
|
|
1
|
+
/*
|
2
|
+
The MIT License (MIT)
|
3
|
+
|
4
|
+
Copyright (c) 2012-2016 Syoyo Fujita and many contributors.
|
5
|
+
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
8
|
+
in the Software without restriction, including without limitation the rights
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
11
|
+
furnished to do so, subject to the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
14
|
+
all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
THE SOFTWARE.
|
23
|
+
*/
|
24
|
+
|
25
|
+
//
|
26
|
+
// version 1.0.6 : Add TINYOBJLOADER_USE_DOUBLE option(#124)
|
27
|
+
// version 1.0.5 : Ignore `Tr` when `d` exists in MTL(#43)
|
28
|
+
// version 1.0.4 : Support multiple filenames for 'mtllib'(#112)
|
29
|
+
// version 1.0.3 : Support parsing texture options(#85)
|
30
|
+
// version 1.0.2 : Improve parsing speed by about a factor of 2 for large
|
31
|
+
// files(#105)
|
32
|
+
// version 1.0.1 : Fixes a shape is lost if obj ends with a 'usemtl'(#104)
|
33
|
+
// version 1.0.0 : Change data structure. Change license from BSD to MIT.
|
34
|
+
//
|
35
|
+
|
36
|
+
//
|
37
|
+
// Use this in *one* .cc
|
38
|
+
// #define TINYOBJLOADER_IMPLEMENTATION
|
39
|
+
// #include "tiny_obj_loader.h"
|
40
|
+
//
|
41
|
+
|
42
|
+
#ifndef TINY_OBJ_LOADER_H_
|
43
|
+
#define TINY_OBJ_LOADER_H_
|
44
|
+
|
45
|
+
#include <map>
|
46
|
+
#include <string>
|
47
|
+
#include <vector>
|
48
|
+
|
49
|
+
namespace tinyobj {
|
50
|
+
|
51
|
+
// https://en.wikipedia.org/wiki/Wavefront_.obj_file says ...
|
52
|
+
//
|
53
|
+
// -blendu on | off # set horizontal texture blending
|
54
|
+
// (default on)
|
55
|
+
// -blendv on | off # set vertical texture blending
|
56
|
+
// (default on)
|
57
|
+
// -boost real_value # boost mip-map sharpness
|
58
|
+
// -mm base_value gain_value # modify texture map values (default
|
59
|
+
// 0 1)
|
60
|
+
// # base_value = brightness,
|
61
|
+
// gain_value = contrast
|
62
|
+
// -o u [v [w]] # Origin offset (default
|
63
|
+
// 0 0 0)
|
64
|
+
// -s u [v [w]] # Scale (default
|
65
|
+
// 1 1 1)
|
66
|
+
// -t u [v [w]] # Turbulence (default
|
67
|
+
// 0 0 0)
|
68
|
+
// -texres resolution # texture resolution to create
|
69
|
+
// -clamp on | off # only render texels in the clamped
|
70
|
+
// 0-1 range (default off)
|
71
|
+
// # When unclamped, textures are
|
72
|
+
// repeated across a surface,
|
73
|
+
// # when clamped, only texels which
|
74
|
+
// fall within the 0-1
|
75
|
+
// # range are rendered.
|
76
|
+
// -bm mult_value # bump multiplier (for bump maps
|
77
|
+
// only)
|
78
|
+
//
|
79
|
+
// -imfchan r | g | b | m | l | z # specifies which channel of the file
|
80
|
+
// is used to
|
81
|
+
// # create a scalar or bump texture.
|
82
|
+
// r:red, g:green,
|
83
|
+
// # b:blue, m:matte, l:luminance,
|
84
|
+
// z:z-depth..
|
85
|
+
// # (the default for bump is 'l' and
|
86
|
+
// for decal is 'm')
|
87
|
+
// bump -imfchan r bumpmap.tga # says to use the red channel of
|
88
|
+
// bumpmap.tga as the bumpmap
|
89
|
+
//
|
90
|
+
// For reflection maps...
|
91
|
+
//
|
92
|
+
// -type sphere # specifies a sphere for a "refl"
|
93
|
+
// reflection map
|
94
|
+
// -type cube_top | cube_bottom | # when using a cube map, the texture
|
95
|
+
// file for each
|
96
|
+
// cube_front | cube_back | # side of the cube is specified
|
97
|
+
// separately
|
98
|
+
// cube_left | cube_right
|
99
|
+
|
100
|
+
#ifdef TINYOBJLOADER_USE_DOUBLE
|
101
|
+
//#pragma message "using double"
|
102
|
+
typedef double real_t;
|
103
|
+
#else
|
104
|
+
//#pragma message "using float"
|
105
|
+
typedef float real_t;
|
106
|
+
#endif
|
107
|
+
|
108
|
+
typedef enum {
|
109
|
+
TEXTURE_TYPE_NONE, // default
|
110
|
+
TEXTURE_TYPE_SPHERE,
|
111
|
+
TEXTURE_TYPE_CUBE_TOP,
|
112
|
+
TEXTURE_TYPE_CUBE_BOTTOM,
|
113
|
+
TEXTURE_TYPE_CUBE_FRONT,
|
114
|
+
TEXTURE_TYPE_CUBE_BACK,
|
115
|
+
TEXTURE_TYPE_CUBE_LEFT,
|
116
|
+
TEXTURE_TYPE_CUBE_RIGHT
|
117
|
+
} texture_type_t;
|
118
|
+
|
119
|
+
typedef struct {
|
120
|
+
texture_type_t type; // -type (default TEXTURE_TYPE_NONE)
|
121
|
+
real_t sharpness; // -boost (default 1.0?)
|
122
|
+
real_t brightness; // base_value in -mm option (default 0)
|
123
|
+
real_t contrast; // gain_value in -mm option (default 1)
|
124
|
+
real_t origin_offset[3]; // -o u [v [w]] (default 0 0 0)
|
125
|
+
real_t scale[3]; // -s u [v [w]] (default 1 1 1)
|
126
|
+
real_t turbulence[3]; // -t u [v [w]] (default 0 0 0)
|
127
|
+
// int texture_resolution; // -texres resolution (default = ?) TODO
|
128
|
+
bool clamp; // -clamp (default false)
|
129
|
+
char imfchan; // -imfchan (the default for bump is 'l' and for decal is 'm')
|
130
|
+
bool blendu; // -blendu (default on)
|
131
|
+
bool blendv; // -blendv (default on)
|
132
|
+
real_t bump_multiplier; // -bm (for bump maps only, default 1.0)
|
133
|
+
} texture_option_t;
|
134
|
+
|
135
|
+
typedef struct {
|
136
|
+
std::string name;
|
137
|
+
|
138
|
+
real_t ambient[3];
|
139
|
+
real_t diffuse[3];
|
140
|
+
real_t specular[3];
|
141
|
+
real_t transmittance[3];
|
142
|
+
real_t emission[3];
|
143
|
+
real_t shininess;
|
144
|
+
real_t ior; // index of refraction
|
145
|
+
real_t dissolve; // 1 == opaque; 0 == fully transparent
|
146
|
+
// illumination model (see http://www.fileformat.info/format/material/)
|
147
|
+
int illum;
|
148
|
+
|
149
|
+
int dummy; // Suppress padding warning.
|
150
|
+
|
151
|
+
std::string ambient_texname; // map_Ka
|
152
|
+
std::string diffuse_texname; // map_Kd
|
153
|
+
std::string specular_texname; // map_Ks
|
154
|
+
std::string specular_highlight_texname; // map_Ns
|
155
|
+
std::string bump_texname; // map_bump, bump
|
156
|
+
std::string displacement_texname; // disp
|
157
|
+
std::string alpha_texname; // map_d
|
158
|
+
|
159
|
+
texture_option_t ambient_texopt;
|
160
|
+
texture_option_t diffuse_texopt;
|
161
|
+
texture_option_t specular_texopt;
|
162
|
+
texture_option_t specular_highlight_texopt;
|
163
|
+
texture_option_t bump_texopt;
|
164
|
+
texture_option_t displacement_texopt;
|
165
|
+
texture_option_t alpha_texopt;
|
166
|
+
|
167
|
+
// PBR extension
|
168
|
+
// http://exocortex.com/blog/extending_wavefront_mtl_to_support_pbr
|
169
|
+
real_t roughness; // [0, 1] default 0
|
170
|
+
real_t metallic; // [0, 1] default 0
|
171
|
+
real_t sheen; // [0, 1] default 0
|
172
|
+
real_t clearcoat_thickness; // [0, 1] default 0
|
173
|
+
real_t clearcoat_roughness; // [0, 1] default 0
|
174
|
+
real_t anisotropy; // aniso. [0, 1] default 0
|
175
|
+
real_t anisotropy_rotation; // anisor. [0, 1] default 0
|
176
|
+
real_t pad0;
|
177
|
+
real_t pad1;
|
178
|
+
std::string roughness_texname; // map_Pr
|
179
|
+
std::string metallic_texname; // map_Pm
|
180
|
+
std::string sheen_texname; // map_Ps
|
181
|
+
std::string emissive_texname; // map_Ke
|
182
|
+
std::string normal_texname; // norm. For normal mapping.
|
183
|
+
|
184
|
+
texture_option_t roughness_texopt;
|
185
|
+
texture_option_t metallic_texopt;
|
186
|
+
texture_option_t sheen_texopt;
|
187
|
+
texture_option_t emissive_texopt;
|
188
|
+
texture_option_t normal_texopt;
|
189
|
+
|
190
|
+
int pad2;
|
191
|
+
|
192
|
+
std::map<std::string, std::string> unknown_parameter;
|
193
|
+
} material_t;
|
194
|
+
|
195
|
+
typedef struct {
|
196
|
+
std::string name;
|
197
|
+
|
198
|
+
std::vector<int> intValues;
|
199
|
+
std::vector<real_t> floatValues;
|
200
|
+
std::vector<std::string> stringValues;
|
201
|
+
} tag_t;
|
202
|
+
|
203
|
+
// Index struct to support different indices for vtx/normal/texcoord.
|
204
|
+
// -1 means not used.
|
205
|
+
typedef struct {
|
206
|
+
int vertex_index;
|
207
|
+
int normal_index;
|
208
|
+
int texcoord_index;
|
209
|
+
} index_t;
|
210
|
+
|
211
|
+
typedef struct {
|
212
|
+
std::vector<index_t> indices;
|
213
|
+
std::vector<unsigned char> num_face_vertices; // The number of vertices per
|
214
|
+
// face. 3 = polygon, 4 = quad,
|
215
|
+
// ... Up to 255.
|
216
|
+
std::vector<int> material_ids; // per-face material ID
|
217
|
+
std::vector<tag_t> tags; // SubD tag
|
218
|
+
} mesh_t;
|
219
|
+
|
220
|
+
typedef struct {
|
221
|
+
std::string name;
|
222
|
+
mesh_t mesh;
|
223
|
+
} shape_t;
|
224
|
+
|
225
|
+
// Vertex attributes
|
226
|
+
typedef struct {
|
227
|
+
std::vector<real_t> vertices; // 'v'
|
228
|
+
std::vector<real_t> normals; // 'vn'
|
229
|
+
std::vector<real_t> texcoords; // 'vt'
|
230
|
+
} attrib_t;
|
231
|
+
|
232
|
+
typedef struct callback_t_ {
|
233
|
+
// W is optional and set to 1 if there is no `w` item in `v` line
|
234
|
+
void (*vertex_cb)(void *user_data, real_t x, real_t y, real_t z, real_t w);
|
235
|
+
void (*normal_cb)(void *user_data, real_t x, real_t y, real_t z);
|
236
|
+
|
237
|
+
// y and z are optional and set to 0 if there is no `y` and/or `z` item(s) in
|
238
|
+
// `vt` line.
|
239
|
+
void (*texcoord_cb)(void *user_data, real_t x, real_t y, real_t z);
|
240
|
+
|
241
|
+
// called per 'f' line. num_indices is the number of face indices(e.g. 3 for
|
242
|
+
// triangle, 4 for quad)
|
243
|
+
// 0 will be passed for undefined index in index_t members.
|
244
|
+
void (*index_cb)(void *user_data, index_t *indices, int num_indices);
|
245
|
+
// `name` material name, `material_id` = the array index of material_t[]. -1
|
246
|
+
// if
|
247
|
+
// a material not found in .mtl
|
248
|
+
void (*usemtl_cb)(void *user_data, const char *name, int material_id);
|
249
|
+
// `materials` = parsed material data.
|
250
|
+
void (*mtllib_cb)(void *user_data, const material_t *materials,
|
251
|
+
int num_materials);
|
252
|
+
// There may be multiple group names
|
253
|
+
void (*group_cb)(void *user_data, const char **names, int num_names);
|
254
|
+
void (*object_cb)(void *user_data, const char *name);
|
255
|
+
|
256
|
+
callback_t_()
|
257
|
+
: vertex_cb(NULL),
|
258
|
+
normal_cb(NULL),
|
259
|
+
texcoord_cb(NULL),
|
260
|
+
index_cb(NULL),
|
261
|
+
usemtl_cb(NULL),
|
262
|
+
mtllib_cb(NULL),
|
263
|
+
group_cb(NULL),
|
264
|
+
object_cb(NULL) {}
|
265
|
+
} callback_t;
|
266
|
+
|
267
|
+
class MaterialReader {
|
268
|
+
public:
|
269
|
+
MaterialReader() {}
|
270
|
+
virtual ~MaterialReader();
|
271
|
+
|
272
|
+
virtual bool operator()(const std::string &matId,
|
273
|
+
std::vector<material_t> *materials,
|
274
|
+
std::map<std::string, int> *matMap,
|
275
|
+
std::string *err) = 0;
|
276
|
+
};
|
277
|
+
|
278
|
+
class MaterialFileReader : public MaterialReader {
|
279
|
+
public:
|
280
|
+
explicit MaterialFileReader(const std::string &mtl_basedir)
|
281
|
+
: m_mtlBaseDir(mtl_basedir) {}
|
282
|
+
virtual ~MaterialFileReader() {}
|
283
|
+
virtual bool operator()(const std::string &matId,
|
284
|
+
std::vector<material_t> *materials,
|
285
|
+
std::map<std::string, int> *matMap, std::string *err);
|
286
|
+
|
287
|
+
private:
|
288
|
+
std::string m_mtlBaseDir;
|
289
|
+
};
|
290
|
+
|
291
|
+
class MaterialStreamReader : public MaterialReader {
|
292
|
+
public:
|
293
|
+
explicit MaterialStreamReader(std::istream &inStream)
|
294
|
+
: m_inStream(inStream) {}
|
295
|
+
virtual ~MaterialStreamReader() {}
|
296
|
+
virtual bool operator()(const std::string &matId,
|
297
|
+
std::vector<material_t> *materials,
|
298
|
+
std::map<std::string, int> *matMap, std::string *err);
|
299
|
+
|
300
|
+
private:
|
301
|
+
std::istream &m_inStream;
|
302
|
+
};
|
303
|
+
|
304
|
+
/// Loads .obj from a file.
|
305
|
+
/// 'attrib', 'shapes' and 'materials' will be filled with parsed shape data
|
306
|
+
/// 'shapes' will be filled with parsed shape data
|
307
|
+
/// Returns true when loading .obj become success.
|
308
|
+
/// Returns warning and error message into `err`
|
309
|
+
/// 'mtl_basedir' is optional, and used for base directory for .mtl file.
|
310
|
+
/// In default(`NULL'), .mtl file is searched from an application's working
|
311
|
+
/// directory.
|
312
|
+
/// 'triangulate' is optional, and used whether triangulate polygon face in .obj
|
313
|
+
/// or not.
|
314
|
+
bool LoadObj(attrib_t *attrib, std::vector<shape_t> *shapes,
|
315
|
+
std::vector<material_t> *materials, std::string *err,
|
316
|
+
const char *filename, const char *mtl_basedir = NULL,
|
317
|
+
bool triangulate = true);
|
318
|
+
|
319
|
+
/// Loads .obj from a file with custom user callback.
|
320
|
+
/// .mtl is loaded as usual and parsed material_t data will be passed to
|
321
|
+
/// `callback.mtllib_cb`.
|
322
|
+
/// Returns true when loading .obj/.mtl become success.
|
323
|
+
/// Returns warning and error message into `err`
|
324
|
+
/// See `examples/callback_api/` for how to use this function.
|
325
|
+
bool LoadObjWithCallback(std::istream &inStream, const callback_t &callback,
|
326
|
+
void *user_data = NULL,
|
327
|
+
MaterialReader *readMatFn = NULL,
|
328
|
+
std::string *err = NULL);
|
329
|
+
|
330
|
+
/// Loads object from a std::istream, uses GetMtlIStreamFn to retrieve
|
331
|
+
/// std::istream for materials.
|
332
|
+
/// Returns true when loading .obj become success.
|
333
|
+
/// Returns warning and error message into `err`
|
334
|
+
bool LoadObj(attrib_t *attrib, std::vector<shape_t> *shapes,
|
335
|
+
std::vector<material_t> *materials, std::string *err,
|
336
|
+
std::istream *inStream, MaterialReader *readMatFn = NULL,
|
337
|
+
bool triangulate = true);
|
338
|
+
|
339
|
+
/// Loads materials into std::map
|
340
|
+
void LoadMtl(std::map<std::string, int> *material_map,
|
341
|
+
std::vector<material_t> *materials, std::istream *inStream,
|
342
|
+
std::string *warning);
|
343
|
+
|
344
|
+
} // namespace tinyobj
|
345
|
+
|
346
|
+
#endif // TINY_OBJ_LOADER_H_
|
347
|
+
|
348
|
+
#ifdef TINYOBJLOADER_IMPLEMENTATION
|
349
|
+
#include <cassert>
|
350
|
+
#include <cctype>
|
351
|
+
#include <cmath>
|
352
|
+
#include <cstddef>
|
353
|
+
#include <cstdlib>
|
354
|
+
#include <cstring>
|
355
|
+
#include <utility>
|
356
|
+
|
357
|
+
#include <fstream>
|
358
|
+
#include <sstream>
|
359
|
+
|
360
|
+
namespace tinyobj {
|
361
|
+
|
362
|
+
MaterialReader::~MaterialReader() {}
|
363
|
+
|
364
|
+
#define TINYOBJ_SSCANF_BUFFER_SIZE (4096)
|
365
|
+
|
366
|
+
struct vertex_index {
|
367
|
+
int v_idx, vt_idx, vn_idx;
|
368
|
+
vertex_index() : v_idx(-1), vt_idx(-1), vn_idx(-1) {}
|
369
|
+
explicit vertex_index(int idx) : v_idx(idx), vt_idx(idx), vn_idx(idx) {}
|
370
|
+
vertex_index(int vidx, int vtidx, int vnidx)
|
371
|
+
: v_idx(vidx), vt_idx(vtidx), vn_idx(vnidx) {}
|
372
|
+
};
|
373
|
+
|
374
|
+
struct tag_sizes {
|
375
|
+
tag_sizes() : num_ints(0), num_reals(0), num_strings(0) {}
|
376
|
+
int num_ints;
|
377
|
+
int num_reals;
|
378
|
+
int num_strings;
|
379
|
+
};
|
380
|
+
|
381
|
+
struct obj_shape {
|
382
|
+
std::vector<real_t> v;
|
383
|
+
std::vector<real_t> vn;
|
384
|
+
std::vector<real_t> vt;
|
385
|
+
};
|
386
|
+
|
387
|
+
// See
|
388
|
+
// http://stackoverflow.com/questions/6089231/getting-std-ifstream-to-handle-lf-cr-and-crlf
|
389
|
+
static std::istream &safeGetline(std::istream &is, std::string &t) {
|
390
|
+
t.clear();
|
391
|
+
|
392
|
+
// The characters in the stream are read one-by-one using a std::streambuf.
|
393
|
+
// That is faster than reading them one-by-one using the std::istream.
|
394
|
+
// Code that uses streambuf this way must be guarded by a sentry object.
|
395
|
+
// The sentry object performs various tasks,
|
396
|
+
// such as thread synchronization and updating the stream state.
|
397
|
+
|
398
|
+
std::istream::sentry se(is, true);
|
399
|
+
std::streambuf *sb = is.rdbuf();
|
400
|
+
|
401
|
+
for (;;) {
|
402
|
+
int c = sb->sbumpc();
|
403
|
+
switch (c) {
|
404
|
+
case '\n':
|
405
|
+
return is;
|
406
|
+
case '\r':
|
407
|
+
if (sb->sgetc() == '\n') sb->sbumpc();
|
408
|
+
return is;
|
409
|
+
case EOF:
|
410
|
+
// Also handle the case when the last line has no line ending
|
411
|
+
if (t.empty()) is.setstate(std::ios::eofbit);
|
412
|
+
return is;
|
413
|
+
default:
|
414
|
+
t += static_cast<char>(c);
|
415
|
+
}
|
416
|
+
}
|
417
|
+
}
|
418
|
+
|
419
|
+
#define IS_SPACE(x) (((x) == ' ') || ((x) == '\t'))
|
420
|
+
#define IS_DIGIT(x) \
|
421
|
+
(static_cast<unsigned int>((x) - '0') < static_cast<unsigned int>(10))
|
422
|
+
#define IS_NEW_LINE(x) (((x) == '\r') || ((x) == '\n') || ((x) == '\0'))
|
423
|
+
|
424
|
+
// Make index zero-base, and also support relative index.
|
425
|
+
static inline int fixIndex(int idx, int n) {
|
426
|
+
if (idx > 0) return idx - 1;
|
427
|
+
if (idx == 0) return 0;
|
428
|
+
return n + idx; // negative value = relative
|
429
|
+
}
|
430
|
+
|
431
|
+
static inline std::string parseString(const char **token) {
|
432
|
+
std::string s;
|
433
|
+
(*token) += strspn((*token), " \t");
|
434
|
+
size_t e = strcspn((*token), " \t\r");
|
435
|
+
s = std::string((*token), &(*token)[e]);
|
436
|
+
(*token) += e;
|
437
|
+
return s;
|
438
|
+
}
|
439
|
+
|
440
|
+
static inline int parseInt(const char **token) {
|
441
|
+
(*token) += strspn((*token), " \t");
|
442
|
+
int i = atoi((*token));
|
443
|
+
(*token) += strcspn((*token), " \t\r");
|
444
|
+
return i;
|
445
|
+
}
|
446
|
+
|
447
|
+
// Tries to parse a floating point number located at s.
|
448
|
+
//
|
449
|
+
// s_end should be a location in the string where reading should absolutely
|
450
|
+
// stop. For example at the end of the string, to prevent buffer overflows.
|
451
|
+
//
|
452
|
+
// Parses the following EBNF grammar:
|
453
|
+
// sign = "+" | "-" ;
|
454
|
+
// END = ? anything not in digit ?
|
455
|
+
// digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
|
456
|
+
// integer = [sign] , digit , {digit} ;
|
457
|
+
// decimal = integer , ["." , integer] ;
|
458
|
+
// float = ( decimal , END ) | ( decimal , ("E" | "e") , integer , END ) ;
|
459
|
+
//
|
460
|
+
// Valid strings are for example:
|
461
|
+
// -0 +3.1417e+2 -0.0E-3 1.0324 -1.41 11e2
|
462
|
+
//
|
463
|
+
// If the parsing is a success, result is set to the parsed value and true
|
464
|
+
// is returned.
|
465
|
+
//
|
466
|
+
// The function is greedy and will parse until any of the following happens:
|
467
|
+
// - a non-conforming character is encountered.
|
468
|
+
// - s_end is reached.
|
469
|
+
//
|
470
|
+
// The following situations triggers a failure:
|
471
|
+
// - s >= s_end.
|
472
|
+
// - parse failure.
|
473
|
+
//
|
474
|
+
static bool tryParseDouble(const char *s, const char *s_end, double *result) {
|
475
|
+
if (s >= s_end) {
|
476
|
+
return false;
|
477
|
+
}
|
478
|
+
|
479
|
+
double mantissa = 0.0;
|
480
|
+
// This exponent is base 2 rather than 10.
|
481
|
+
// However the exponent we parse is supposed to be one of ten,
|
482
|
+
// thus we must take care to convert the exponent/and or the
|
483
|
+
// mantissa to a * 2^E, where a is the mantissa and E is the
|
484
|
+
// exponent.
|
485
|
+
// To get the final double we will use ldexp, it requires the
|
486
|
+
// exponent to be in base 2.
|
487
|
+
int exponent = 0;
|
488
|
+
|
489
|
+
// NOTE: THESE MUST BE DECLARED HERE SINCE WE ARE NOT ALLOWED
|
490
|
+
// TO JUMP OVER DEFINITIONS.
|
491
|
+
char sign = '+';
|
492
|
+
char exp_sign = '+';
|
493
|
+
char const *curr = s;
|
494
|
+
|
495
|
+
// How many characters were read in a loop.
|
496
|
+
int read = 0;
|
497
|
+
// Tells whether a loop terminated due to reaching s_end.
|
498
|
+
bool end_not_reached = false;
|
499
|
+
|
500
|
+
/*
|
501
|
+
BEGIN PARSING.
|
502
|
+
*/
|
503
|
+
|
504
|
+
// Find out what sign we've got.
|
505
|
+
if (*curr == '+' || *curr == '-') {
|
506
|
+
sign = *curr;
|
507
|
+
curr++;
|
508
|
+
} else if (IS_DIGIT(*curr)) { /* Pass through. */
|
509
|
+
} else {
|
510
|
+
goto fail;
|
511
|
+
}
|
512
|
+
|
513
|
+
// Read the integer part.
|
514
|
+
end_not_reached = (curr != s_end);
|
515
|
+
while (end_not_reached && IS_DIGIT(*curr)) {
|
516
|
+
mantissa *= 10;
|
517
|
+
mantissa += static_cast<int>(*curr - 0x30);
|
518
|
+
curr++;
|
519
|
+
read++;
|
520
|
+
end_not_reached = (curr != s_end);
|
521
|
+
}
|
522
|
+
|
523
|
+
// We must make sure we actually got something.
|
524
|
+
if (read == 0) goto fail;
|
525
|
+
// We allow numbers of form "#", "###" etc.
|
526
|
+
if (!end_not_reached) goto assemble;
|
527
|
+
|
528
|
+
// Read the decimal part.
|
529
|
+
if (*curr == '.') {
|
530
|
+
curr++;
|
531
|
+
read = 1;
|
532
|
+
end_not_reached = (curr != s_end);
|
533
|
+
while (end_not_reached && IS_DIGIT(*curr)) {
|
534
|
+
static const double pow_lut[] = {
|
535
|
+
1.0, 0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001, 0.0000001,
|
536
|
+
};
|
537
|
+
const int lut_entries = sizeof pow_lut / sizeof pow_lut[0];
|
538
|
+
|
539
|
+
// NOTE: Don't use powf here, it will absolutely murder precision.
|
540
|
+
mantissa += static_cast<int>(*curr - 0x30) *
|
541
|
+
(read < lut_entries ? pow_lut[read] : std::pow(10.0, -read));
|
542
|
+
read++;
|
543
|
+
curr++;
|
544
|
+
end_not_reached = (curr != s_end);
|
545
|
+
}
|
546
|
+
} else if (*curr == 'e' || *curr == 'E') {
|
547
|
+
} else {
|
548
|
+
goto assemble;
|
549
|
+
}
|
550
|
+
|
551
|
+
if (!end_not_reached) goto assemble;
|
552
|
+
|
553
|
+
// Read the exponent part.
|
554
|
+
if (*curr == 'e' || *curr == 'E') {
|
555
|
+
curr++;
|
556
|
+
// Figure out if a sign is present and if it is.
|
557
|
+
end_not_reached = (curr != s_end);
|
558
|
+
if (end_not_reached && (*curr == '+' || *curr == '-')) {
|
559
|
+
exp_sign = *curr;
|
560
|
+
curr++;
|
561
|
+
} else if (IS_DIGIT(*curr)) { /* Pass through. */
|
562
|
+
} else {
|
563
|
+
// Empty E is not allowed.
|
564
|
+
goto fail;
|
565
|
+
}
|
566
|
+
|
567
|
+
read = 0;
|
568
|
+
end_not_reached = (curr != s_end);
|
569
|
+
while (end_not_reached && IS_DIGIT(*curr)) {
|
570
|
+
exponent *= 10;
|
571
|
+
exponent += static_cast<int>(*curr - 0x30);
|
572
|
+
curr++;
|
573
|
+
read++;
|
574
|
+
end_not_reached = (curr != s_end);
|
575
|
+
}
|
576
|
+
exponent *= (exp_sign == '+' ? 1 : -1);
|
577
|
+
if (read == 0) goto fail;
|
578
|
+
}
|
579
|
+
|
580
|
+
assemble:
|
581
|
+
*result =
|
582
|
+
(sign == '+' ? 1 : -1) *
|
583
|
+
(exponent ? std::ldexp(mantissa * std::pow(5.0, exponent), exponent) : mantissa);
|
584
|
+
return true;
|
585
|
+
fail:
|
586
|
+
return false;
|
587
|
+
}
|
588
|
+
|
589
|
+
static inline real_t parseReal(const char **token, double default_value = 0.0) {
|
590
|
+
(*token) += strspn((*token), " \t");
|
591
|
+
const char *end = (*token) + strcspn((*token), " \t\r");
|
592
|
+
double val = default_value;
|
593
|
+
tryParseDouble((*token), end, &val);
|
594
|
+
real_t f = static_cast<real_t>(val);
|
595
|
+
(*token) = end;
|
596
|
+
return f;
|
597
|
+
}
|
598
|
+
|
599
|
+
static inline void parseReal2(real_t *x, real_t *y, const char **token,
|
600
|
+
const double default_x = 0.0,
|
601
|
+
const double default_y = 0.0) {
|
602
|
+
(*x) = parseReal(token, default_x);
|
603
|
+
(*y) = parseReal(token, default_y);
|
604
|
+
}
|
605
|
+
|
606
|
+
static inline void parseReal3(real_t *x, real_t *y, real_t *z, const char **token,
|
607
|
+
const double default_x = 0.0,
|
608
|
+
const double default_y = 0.0,
|
609
|
+
const double default_z = 0.0) {
|
610
|
+
(*x) = parseReal(token, default_x);
|
611
|
+
(*y) = parseReal(token, default_y);
|
612
|
+
(*z) = parseReal(token, default_z);
|
613
|
+
}
|
614
|
+
|
615
|
+
static inline void parseV(real_t *x, real_t *y, real_t *z, real_t *w,
|
616
|
+
const char **token, const double default_x = 0.0,
|
617
|
+
const double default_y = 0.0,
|
618
|
+
const double default_z = 0.0,
|
619
|
+
const double default_w = 1.0) {
|
620
|
+
(*x) = parseReal(token, default_x);
|
621
|
+
(*y) = parseReal(token, default_y);
|
622
|
+
(*z) = parseReal(token, default_z);
|
623
|
+
(*w) = parseReal(token, default_w);
|
624
|
+
}
|
625
|
+
|
626
|
+
static inline bool parseOnOff(const char **token, bool default_value = true) {
|
627
|
+
(*token) += strspn((*token), " \t");
|
628
|
+
const char *end = (*token) + strcspn((*token), " \t\r");
|
629
|
+
|
630
|
+
bool ret = default_value;
|
631
|
+
if ((0 == strncmp((*token), "on", 2))) {
|
632
|
+
ret = true;
|
633
|
+
} else if ((0 == strncmp((*token), "off", 3))) {
|
634
|
+
ret = false;
|
635
|
+
}
|
636
|
+
|
637
|
+
(*token) = end;
|
638
|
+
return ret;
|
639
|
+
}
|
640
|
+
|
641
|
+
static inline texture_type_t parseTextureType(
|
642
|
+
const char **token, texture_type_t default_value = TEXTURE_TYPE_NONE) {
|
643
|
+
(*token) += strspn((*token), " \t");
|
644
|
+
const char *end = (*token) + strcspn((*token), " \t\r");
|
645
|
+
texture_type_t ty = default_value;
|
646
|
+
|
647
|
+
if ((0 == strncmp((*token), "cube_top", strlen("cube_top")))) {
|
648
|
+
ty = TEXTURE_TYPE_CUBE_TOP;
|
649
|
+
} else if ((0 == strncmp((*token), "cube_bottom", strlen("cube_bottom")))) {
|
650
|
+
ty = TEXTURE_TYPE_CUBE_BOTTOM;
|
651
|
+
} else if ((0 == strncmp((*token), "cube_left", strlen("cube_left")))) {
|
652
|
+
ty = TEXTURE_TYPE_CUBE_LEFT;
|
653
|
+
} else if ((0 == strncmp((*token), "cube_right", strlen("cube_right")))) {
|
654
|
+
ty = TEXTURE_TYPE_CUBE_RIGHT;
|
655
|
+
} else if ((0 == strncmp((*token), "cube_front", strlen("cube_front")))) {
|
656
|
+
ty = TEXTURE_TYPE_CUBE_FRONT;
|
657
|
+
} else if ((0 == strncmp((*token), "cube_back", strlen("cube_back")))) {
|
658
|
+
ty = TEXTURE_TYPE_CUBE_BACK;
|
659
|
+
} else if ((0 == strncmp((*token), "sphere", strlen("sphere")))) {
|
660
|
+
ty = TEXTURE_TYPE_SPHERE;
|
661
|
+
}
|
662
|
+
|
663
|
+
(*token) = end;
|
664
|
+
return ty;
|
665
|
+
}
|
666
|
+
|
667
|
+
static tag_sizes parseTagTriple(const char **token) {
|
668
|
+
tag_sizes ts;
|
669
|
+
|
670
|
+
ts.num_ints = atoi((*token));
|
671
|
+
(*token) += strcspn((*token), "/ \t\r");
|
672
|
+
if ((*token)[0] != '/') {
|
673
|
+
return ts;
|
674
|
+
}
|
675
|
+
(*token)++;
|
676
|
+
|
677
|
+
ts.num_reals = atoi((*token));
|
678
|
+
(*token) += strcspn((*token), "/ \t\r");
|
679
|
+
if ((*token)[0] != '/') {
|
680
|
+
return ts;
|
681
|
+
}
|
682
|
+
(*token)++;
|
683
|
+
|
684
|
+
ts.num_strings = atoi((*token));
|
685
|
+
(*token) += strcspn((*token), "/ \t\r") + 1;
|
686
|
+
|
687
|
+
return ts;
|
688
|
+
}
|
689
|
+
|
690
|
+
// Parse triples with index offsets: i, i/j/k, i//k, i/j
|
691
|
+
static vertex_index parseTriple(const char **token, int vsize, int vnsize,
|
692
|
+
int vtsize) {
|
693
|
+
vertex_index vi(-1);
|
694
|
+
|
695
|
+
vi.v_idx = fixIndex(atoi((*token)), vsize);
|
696
|
+
(*token) += strcspn((*token), "/ \t\r");
|
697
|
+
if ((*token)[0] != '/') {
|
698
|
+
return vi;
|
699
|
+
}
|
700
|
+
(*token)++;
|
701
|
+
|
702
|
+
// i//k
|
703
|
+
if ((*token)[0] == '/') {
|
704
|
+
(*token)++;
|
705
|
+
vi.vn_idx = fixIndex(atoi((*token)), vnsize);
|
706
|
+
(*token) += strcspn((*token), "/ \t\r");
|
707
|
+
return vi;
|
708
|
+
}
|
709
|
+
|
710
|
+
// i/j/k or i/j
|
711
|
+
vi.vt_idx = fixIndex(atoi((*token)), vtsize);
|
712
|
+
(*token) += strcspn((*token), "/ \t\r");
|
713
|
+
if ((*token)[0] != '/') {
|
714
|
+
return vi;
|
715
|
+
}
|
716
|
+
|
717
|
+
// i/j/k
|
718
|
+
(*token)++; // skip '/'
|
719
|
+
vi.vn_idx = fixIndex(atoi((*token)), vnsize);
|
720
|
+
(*token) += strcspn((*token), "/ \t\r");
|
721
|
+
return vi;
|
722
|
+
}
|
723
|
+
|
724
|
+
// Parse raw triples: i, i/j/k, i//k, i/j
|
725
|
+
static vertex_index parseRawTriple(const char **token) {
|
726
|
+
vertex_index vi(static_cast<int>(0)); // 0 is an invalid index in OBJ
|
727
|
+
|
728
|
+
vi.v_idx = atoi((*token));
|
729
|
+
(*token) += strcspn((*token), "/ \t\r");
|
730
|
+
if ((*token)[0] != '/') {
|
731
|
+
return vi;
|
732
|
+
}
|
733
|
+
(*token)++;
|
734
|
+
|
735
|
+
// i//k
|
736
|
+
if ((*token)[0] == '/') {
|
737
|
+
(*token)++;
|
738
|
+
vi.vn_idx = atoi((*token));
|
739
|
+
(*token) += strcspn((*token), "/ \t\r");
|
740
|
+
return vi;
|
741
|
+
}
|
742
|
+
|
743
|
+
// i/j/k or i/j
|
744
|
+
vi.vt_idx = atoi((*token));
|
745
|
+
(*token) += strcspn((*token), "/ \t\r");
|
746
|
+
if ((*token)[0] != '/') {
|
747
|
+
return vi;
|
748
|
+
}
|
749
|
+
|
750
|
+
// i/j/k
|
751
|
+
(*token)++; // skip '/'
|
752
|
+
vi.vn_idx = atoi((*token));
|
753
|
+
(*token) += strcspn((*token), "/ \t\r");
|
754
|
+
return vi;
|
755
|
+
}
|
756
|
+
|
757
|
+
static bool ParseTextureNameAndOption(std::string *texname,
|
758
|
+
texture_option_t *texopt,
|
759
|
+
const char *linebuf, const bool is_bump) {
|
760
|
+
// @todo { write more robust lexer and parser. }
|
761
|
+
bool found_texname = false;
|
762
|
+
std::string texture_name;
|
763
|
+
|
764
|
+
// Fill with default value for texopt.
|
765
|
+
if (is_bump) {
|
766
|
+
texopt->imfchan = 'l';
|
767
|
+
} else {
|
768
|
+
texopt->imfchan = 'm';
|
769
|
+
}
|
770
|
+
texopt->bump_multiplier = 1.0f;
|
771
|
+
texopt->clamp = false;
|
772
|
+
texopt->blendu = true;
|
773
|
+
texopt->blendv = true;
|
774
|
+
texopt->sharpness = 1.0f;
|
775
|
+
texopt->brightness = 0.0f;
|
776
|
+
texopt->contrast = 1.0f;
|
777
|
+
texopt->origin_offset[0] = 0.0f;
|
778
|
+
texopt->origin_offset[1] = 0.0f;
|
779
|
+
texopt->origin_offset[2] = 0.0f;
|
780
|
+
texopt->scale[0] = 1.0f;
|
781
|
+
texopt->scale[1] = 1.0f;
|
782
|
+
texopt->scale[2] = 1.0f;
|
783
|
+
texopt->turbulence[0] = 0.0f;
|
784
|
+
texopt->turbulence[1] = 0.0f;
|
785
|
+
texopt->turbulence[2] = 0.0f;
|
786
|
+
texopt->type = TEXTURE_TYPE_NONE;
|
787
|
+
|
788
|
+
const char *token = linebuf; // Assume line ends with NULL
|
789
|
+
|
790
|
+
while (!IS_NEW_LINE((*token))) {
|
791
|
+
if ((0 == strncmp(token, "-blendu", 7)) && IS_SPACE((token[7]))) {
|
792
|
+
token += 8;
|
793
|
+
texopt->blendu = parseOnOff(&token, /* default */ true);
|
794
|
+
} else if ((0 == strncmp(token, "-blendv", 7)) && IS_SPACE((token[7]))) {
|
795
|
+
token += 8;
|
796
|
+
texopt->blendv = parseOnOff(&token, /* default */ true);
|
797
|
+
} else if ((0 == strncmp(token, "-clamp", 6)) && IS_SPACE((token[6]))) {
|
798
|
+
token += 7;
|
799
|
+
texopt->clamp = parseOnOff(&token, /* default */ true);
|
800
|
+
} else if ((0 == strncmp(token, "-boost", 6)) && IS_SPACE((token[6]))) {
|
801
|
+
token += 7;
|
802
|
+
texopt->sharpness = parseReal(&token, 1.0);
|
803
|
+
} else if ((0 == strncmp(token, "-bm", 3)) && IS_SPACE((token[3]))) {
|
804
|
+
token += 4;
|
805
|
+
texopt->bump_multiplier = parseReal(&token, 1.0);
|
806
|
+
} else if ((0 == strncmp(token, "-o", 2)) && IS_SPACE((token[2]))) {
|
807
|
+
token += 3;
|
808
|
+
parseReal3(&(texopt->origin_offset[0]), &(texopt->origin_offset[1]),
|
809
|
+
&(texopt->origin_offset[2]), &token);
|
810
|
+
} else if ((0 == strncmp(token, "-s", 2)) && IS_SPACE((token[2]))) {
|
811
|
+
token += 3;
|
812
|
+
parseReal3(&(texopt->scale[0]), &(texopt->scale[1]), &(texopt->scale[2]),
|
813
|
+
&token, 1.0, 1.0, 1.0);
|
814
|
+
} else if ((0 == strncmp(token, "-t", 2)) && IS_SPACE((token[2]))) {
|
815
|
+
token += 3;
|
816
|
+
parseReal3(&(texopt->turbulence[0]), &(texopt->turbulence[1]),
|
817
|
+
&(texopt->turbulence[2]), &token);
|
818
|
+
} else if ((0 == strncmp(token, "-type", 5)) && IS_SPACE((token[5]))) {
|
819
|
+
token += 5;
|
820
|
+
texopt->type = parseTextureType((&token), TEXTURE_TYPE_NONE);
|
821
|
+
} else if ((0 == strncmp(token, "-imfchan", 8)) && IS_SPACE((token[8]))) {
|
822
|
+
token += 9;
|
823
|
+
token += strspn(token, " \t");
|
824
|
+
const char *end = token + strcspn(token, " \t\r");
|
825
|
+
if ((end - token) == 1) { // Assume one char for -imfchan
|
826
|
+
texopt->imfchan = (*token);
|
827
|
+
}
|
828
|
+
token = end;
|
829
|
+
} else if ((0 == strncmp(token, "-mm", 3)) && IS_SPACE((token[3]))) {
|
830
|
+
token += 4;
|
831
|
+
parseReal2(&(texopt->brightness), &(texopt->contrast), &token, 0.0, 1.0);
|
832
|
+
} else {
|
833
|
+
// Assume texture filename
|
834
|
+
token += strspn(token, " \t"); // skip space
|
835
|
+
size_t len = strcspn(token, " \t\r"); // untile next space
|
836
|
+
texture_name = std::string(token, token + len);
|
837
|
+
token += len;
|
838
|
+
|
839
|
+
token += strspn(token, " \t"); // skip space
|
840
|
+
|
841
|
+
found_texname = true;
|
842
|
+
}
|
843
|
+
}
|
844
|
+
|
845
|
+
if (found_texname) {
|
846
|
+
(*texname) = texture_name;
|
847
|
+
return true;
|
848
|
+
} else {
|
849
|
+
return false;
|
850
|
+
}
|
851
|
+
}
|
852
|
+
|
853
|
+
static void InitMaterial(material_t *material) {
|
854
|
+
material->name = "";
|
855
|
+
material->ambient_texname = "";
|
856
|
+
material->diffuse_texname = "";
|
857
|
+
material->specular_texname = "";
|
858
|
+
material->specular_highlight_texname = "";
|
859
|
+
material->bump_texname = "";
|
860
|
+
material->displacement_texname = "";
|
861
|
+
material->alpha_texname = "";
|
862
|
+
for (int i = 0; i < 3; i++) {
|
863
|
+
material->ambient[i] = 0.f;
|
864
|
+
material->diffuse[i] = 0.f;
|
865
|
+
material->specular[i] = 0.f;
|
866
|
+
material->transmittance[i] = 0.f;
|
867
|
+
material->emission[i] = 0.f;
|
868
|
+
}
|
869
|
+
material->illum = 0;
|
870
|
+
material->dissolve = 1.f;
|
871
|
+
material->shininess = 1.f;
|
872
|
+
material->ior = 1.f;
|
873
|
+
|
874
|
+
material->roughness = 0.f;
|
875
|
+
material->metallic = 0.f;
|
876
|
+
material->sheen = 0.f;
|
877
|
+
material->clearcoat_thickness = 0.f;
|
878
|
+
material->clearcoat_roughness = 0.f;
|
879
|
+
material->anisotropy_rotation = 0.f;
|
880
|
+
material->anisotropy = 0.f;
|
881
|
+
material->roughness_texname = "";
|
882
|
+
material->metallic_texname = "";
|
883
|
+
material->sheen_texname = "";
|
884
|
+
material->emissive_texname = "";
|
885
|
+
material->normal_texname = "";
|
886
|
+
|
887
|
+
material->unknown_parameter.clear();
|
888
|
+
}
|
889
|
+
|
890
|
+
static bool exportFaceGroupToShape(
|
891
|
+
shape_t *shape, const std::vector<std::vector<vertex_index> > &faceGroup,
|
892
|
+
const std::vector<tag_t> &tags, const int material_id,
|
893
|
+
const std::string &name, bool triangulate) {
|
894
|
+
if (faceGroup.empty()) {
|
895
|
+
return false;
|
896
|
+
}
|
897
|
+
|
898
|
+
// Flatten vertices and indices
|
899
|
+
for (size_t i = 0; i < faceGroup.size(); i++) {
|
900
|
+
const std::vector<vertex_index> &face = faceGroup[i];
|
901
|
+
|
902
|
+
vertex_index i0 = face[0];
|
903
|
+
vertex_index i1(-1);
|
904
|
+
vertex_index i2 = face[1];
|
905
|
+
|
906
|
+
size_t npolys = face.size();
|
907
|
+
|
908
|
+
if (triangulate) {
|
909
|
+
// Polygon -> triangle fan conversion
|
910
|
+
for (size_t k = 2; k < npolys; k++) {
|
911
|
+
i1 = i2;
|
912
|
+
i2 = face[k];
|
913
|
+
|
914
|
+
index_t idx0, idx1, idx2;
|
915
|
+
idx0.vertex_index = i0.v_idx;
|
916
|
+
idx0.normal_index = i0.vn_idx;
|
917
|
+
idx0.texcoord_index = i0.vt_idx;
|
918
|
+
idx1.vertex_index = i1.v_idx;
|
919
|
+
idx1.normal_index = i1.vn_idx;
|
920
|
+
idx1.texcoord_index = i1.vt_idx;
|
921
|
+
idx2.vertex_index = i2.v_idx;
|
922
|
+
idx2.normal_index = i2.vn_idx;
|
923
|
+
idx2.texcoord_index = i2.vt_idx;
|
924
|
+
|
925
|
+
shape->mesh.indices.push_back(idx0);
|
926
|
+
shape->mesh.indices.push_back(idx1);
|
927
|
+
shape->mesh.indices.push_back(idx2);
|
928
|
+
|
929
|
+
shape->mesh.num_face_vertices.push_back(3);
|
930
|
+
shape->mesh.material_ids.push_back(material_id);
|
931
|
+
}
|
932
|
+
} else {
|
933
|
+
for (size_t k = 0; k < npolys; k++) {
|
934
|
+
index_t idx;
|
935
|
+
idx.vertex_index = face[k].v_idx;
|
936
|
+
idx.normal_index = face[k].vn_idx;
|
937
|
+
idx.texcoord_index = face[k].vt_idx;
|
938
|
+
shape->mesh.indices.push_back(idx);
|
939
|
+
}
|
940
|
+
|
941
|
+
shape->mesh.num_face_vertices.push_back(
|
942
|
+
static_cast<unsigned char>(npolys));
|
943
|
+
shape->mesh.material_ids.push_back(material_id); // per face
|
944
|
+
}
|
945
|
+
}
|
946
|
+
|
947
|
+
shape->name = name;
|
948
|
+
shape->mesh.tags = tags;
|
949
|
+
|
950
|
+
return true;
|
951
|
+
}
|
952
|
+
|
953
|
+
// Split a string with specified delimiter character.
|
954
|
+
// http://stackoverflow.com/questions/236129/split-a-string-in-c
|
955
|
+
static void SplitString(const std::string &s, char delim,
|
956
|
+
std::vector<std::string> &elems) {
|
957
|
+
std::stringstream ss;
|
958
|
+
ss.str(s);
|
959
|
+
std::string item;
|
960
|
+
while (std::getline(ss, item, delim)) {
|
961
|
+
elems.push_back(item);
|
962
|
+
}
|
963
|
+
}
|
964
|
+
|
965
|
+
void LoadMtl(std::map<std::string, int> *material_map,
|
966
|
+
std::vector<material_t> *materials, std::istream *inStream,
|
967
|
+
std::string *warning) {
|
968
|
+
// Create a default material anyway.
|
969
|
+
material_t material;
|
970
|
+
InitMaterial(&material);
|
971
|
+
|
972
|
+
// Issue 43. `d` wins against `Tr` since `Tr` is not in the MTL specification.
|
973
|
+
bool has_d = false;
|
974
|
+
bool has_tr = false;
|
975
|
+
|
976
|
+
std::stringstream ss;
|
977
|
+
|
978
|
+
std::string linebuf;
|
979
|
+
while (inStream->peek() != -1) {
|
980
|
+
safeGetline(*inStream, linebuf);
|
981
|
+
|
982
|
+
// Trim trailing whitespace.
|
983
|
+
if (linebuf.size() > 0) {
|
984
|
+
linebuf = linebuf.substr(0, linebuf.find_last_not_of(" \t") + 1);
|
985
|
+
}
|
986
|
+
|
987
|
+
// Trim newline '\r\n' or '\n'
|
988
|
+
if (linebuf.size() > 0) {
|
989
|
+
if (linebuf[linebuf.size() - 1] == '\n')
|
990
|
+
linebuf.erase(linebuf.size() - 1);
|
991
|
+
}
|
992
|
+
if (linebuf.size() > 0) {
|
993
|
+
if (linebuf[linebuf.size() - 1] == '\r')
|
994
|
+
linebuf.erase(linebuf.size() - 1);
|
995
|
+
}
|
996
|
+
|
997
|
+
// Skip if empty line.
|
998
|
+
if (linebuf.empty()) {
|
999
|
+
continue;
|
1000
|
+
}
|
1001
|
+
|
1002
|
+
// Skip leading space.
|
1003
|
+
const char *token = linebuf.c_str();
|
1004
|
+
token += strspn(token, " \t");
|
1005
|
+
|
1006
|
+
assert(token);
|
1007
|
+
if (token[0] == '\0') continue; // empty line
|
1008
|
+
|
1009
|
+
if (token[0] == '#') continue; // comment line
|
1010
|
+
|
1011
|
+
// new mtl
|
1012
|
+
if ((0 == strncmp(token, "newmtl", 6)) && IS_SPACE((token[6]))) {
|
1013
|
+
// flush previous material.
|
1014
|
+
if (!material.name.empty()) {
|
1015
|
+
material_map->insert(std::pair<std::string, int>(
|
1016
|
+
material.name, static_cast<int>(materials->size())));
|
1017
|
+
materials->push_back(material);
|
1018
|
+
}
|
1019
|
+
|
1020
|
+
// initial temporary material
|
1021
|
+
InitMaterial(&material);
|
1022
|
+
|
1023
|
+
has_d = false;
|
1024
|
+
has_tr = false;
|
1025
|
+
|
1026
|
+
// set new mtl name
|
1027
|
+
char namebuf[TINYOBJ_SSCANF_BUFFER_SIZE];
|
1028
|
+
token += 7;
|
1029
|
+
#ifdef _MSC_VER
|
1030
|
+
sscanf_s(token, "%s", namebuf, (unsigned)_countof(namebuf));
|
1031
|
+
#else
|
1032
|
+
std::sscanf(token, "%s", namebuf);
|
1033
|
+
#endif
|
1034
|
+
material.name = namebuf;
|
1035
|
+
continue;
|
1036
|
+
}
|
1037
|
+
|
1038
|
+
// ambient
|
1039
|
+
if (token[0] == 'K' && token[1] == 'a' && IS_SPACE((token[2]))) {
|
1040
|
+
token += 2;
|
1041
|
+
real_t r, g, b;
|
1042
|
+
parseReal3(&r, &g, &b, &token);
|
1043
|
+
material.ambient[0] = r;
|
1044
|
+
material.ambient[1] = g;
|
1045
|
+
material.ambient[2] = b;
|
1046
|
+
continue;
|
1047
|
+
}
|
1048
|
+
|
1049
|
+
// diffuse
|
1050
|
+
if (token[0] == 'K' && token[1] == 'd' && IS_SPACE((token[2]))) {
|
1051
|
+
token += 2;
|
1052
|
+
real_t r, g, b;
|
1053
|
+
parseReal3(&r, &g, &b, &token);
|
1054
|
+
material.diffuse[0] = r;
|
1055
|
+
material.diffuse[1] = g;
|
1056
|
+
material.diffuse[2] = b;
|
1057
|
+
continue;
|
1058
|
+
}
|
1059
|
+
|
1060
|
+
// specular
|
1061
|
+
if (token[0] == 'K' && token[1] == 's' && IS_SPACE((token[2]))) {
|
1062
|
+
token += 2;
|
1063
|
+
real_t r, g, b;
|
1064
|
+
parseReal3(&r, &g, &b, &token);
|
1065
|
+
material.specular[0] = r;
|
1066
|
+
material.specular[1] = g;
|
1067
|
+
material.specular[2] = b;
|
1068
|
+
continue;
|
1069
|
+
}
|
1070
|
+
|
1071
|
+
// transmittance
|
1072
|
+
if ((token[0] == 'K' && token[1] == 't' && IS_SPACE((token[2]))) ||
|
1073
|
+
(token[0] == 'T' && token[1] == 'f' && IS_SPACE((token[2])))) {
|
1074
|
+
token += 2;
|
1075
|
+
real_t r, g, b;
|
1076
|
+
parseReal3(&r, &g, &b, &token);
|
1077
|
+
material.transmittance[0] = r;
|
1078
|
+
material.transmittance[1] = g;
|
1079
|
+
material.transmittance[2] = b;
|
1080
|
+
continue;
|
1081
|
+
}
|
1082
|
+
|
1083
|
+
// ior(index of refraction)
|
1084
|
+
if (token[0] == 'N' && token[1] == 'i' && IS_SPACE((token[2]))) {
|
1085
|
+
token += 2;
|
1086
|
+
material.ior = parseReal(&token);
|
1087
|
+
continue;
|
1088
|
+
}
|
1089
|
+
|
1090
|
+
// emission
|
1091
|
+
if (token[0] == 'K' && token[1] == 'e' && IS_SPACE(token[2])) {
|
1092
|
+
token += 2;
|
1093
|
+
real_t r, g, b;
|
1094
|
+
parseReal3(&r, &g, &b, &token);
|
1095
|
+
material.emission[0] = r;
|
1096
|
+
material.emission[1] = g;
|
1097
|
+
material.emission[2] = b;
|
1098
|
+
continue;
|
1099
|
+
}
|
1100
|
+
|
1101
|
+
// shininess
|
1102
|
+
if (token[0] == 'N' && token[1] == 's' && IS_SPACE(token[2])) {
|
1103
|
+
token += 2;
|
1104
|
+
material.shininess = parseReal(&token);
|
1105
|
+
continue;
|
1106
|
+
}
|
1107
|
+
|
1108
|
+
// illum model
|
1109
|
+
if (0 == strncmp(token, "illum", 5) && IS_SPACE(token[5])) {
|
1110
|
+
token += 6;
|
1111
|
+
material.illum = parseInt(&token);
|
1112
|
+
continue;
|
1113
|
+
}
|
1114
|
+
|
1115
|
+
// dissolve
|
1116
|
+
if ((token[0] == 'd' && IS_SPACE(token[1]))) {
|
1117
|
+
token += 1;
|
1118
|
+
material.dissolve = parseReal(&token);
|
1119
|
+
|
1120
|
+
if (has_tr) {
|
1121
|
+
ss << "WARN: Both `d` and `Tr` parameters defined for \""
|
1122
|
+
<< material.name << "\". Use the value of `d` for dissolve."
|
1123
|
+
<< std::endl;
|
1124
|
+
}
|
1125
|
+
has_d = true;
|
1126
|
+
continue;
|
1127
|
+
}
|
1128
|
+
if (token[0] == 'T' && token[1] == 'r' && IS_SPACE(token[2])) {
|
1129
|
+
token += 2;
|
1130
|
+
if (has_d) {
|
1131
|
+
// `d` wins. Ignore `Tr` value.
|
1132
|
+
ss << "WARN: Both `d` and `Tr` parameters defined for \""
|
1133
|
+
<< material.name << "\". Use the value of `d` for dissolve."
|
1134
|
+
<< std::endl;
|
1135
|
+
} else {
|
1136
|
+
// We invert value of Tr(assume Tr is in range [0, 1])
|
1137
|
+
// NOTE: Interpretation of Tr is application(exporter) dependent. For
|
1138
|
+
// some application(e.g. 3ds max obj exporter), Tr = d(Issue 43)
|
1139
|
+
material.dissolve = 1.0f - parseReal(&token);
|
1140
|
+
}
|
1141
|
+
has_tr = true;
|
1142
|
+
continue;
|
1143
|
+
}
|
1144
|
+
|
1145
|
+
// PBR: roughness
|
1146
|
+
if (token[0] == 'P' && token[1] == 'r' && IS_SPACE(token[2])) {
|
1147
|
+
token += 2;
|
1148
|
+
material.roughness = parseReal(&token);
|
1149
|
+
continue;
|
1150
|
+
}
|
1151
|
+
|
1152
|
+
// PBR: metallic
|
1153
|
+
if (token[0] == 'P' && token[1] == 'm' && IS_SPACE(token[2])) {
|
1154
|
+
token += 2;
|
1155
|
+
material.metallic = parseReal(&token);
|
1156
|
+
continue;
|
1157
|
+
}
|
1158
|
+
|
1159
|
+
// PBR: sheen
|
1160
|
+
if (token[0] == 'P' && token[1] == 's' && IS_SPACE(token[2])) {
|
1161
|
+
token += 2;
|
1162
|
+
material.sheen = parseReal(&token);
|
1163
|
+
continue;
|
1164
|
+
}
|
1165
|
+
|
1166
|
+
// PBR: clearcoat thickness
|
1167
|
+
if (token[0] == 'P' && token[1] == 'c' && IS_SPACE(token[2])) {
|
1168
|
+
token += 2;
|
1169
|
+
material.clearcoat_thickness = parseReal(&token);
|
1170
|
+
continue;
|
1171
|
+
}
|
1172
|
+
|
1173
|
+
// PBR: clearcoat roughness
|
1174
|
+
if ((0 == strncmp(token, "Pcr", 3)) && IS_SPACE(token[3])) {
|
1175
|
+
token += 4;
|
1176
|
+
material.clearcoat_roughness = parseReal(&token);
|
1177
|
+
continue;
|
1178
|
+
}
|
1179
|
+
|
1180
|
+
// PBR: anisotropy
|
1181
|
+
if ((0 == strncmp(token, "aniso", 5)) && IS_SPACE(token[5])) {
|
1182
|
+
token += 6;
|
1183
|
+
material.anisotropy = parseReal(&token);
|
1184
|
+
continue;
|
1185
|
+
}
|
1186
|
+
|
1187
|
+
// PBR: anisotropy rotation
|
1188
|
+
if ((0 == strncmp(token, "anisor", 6)) && IS_SPACE(token[6])) {
|
1189
|
+
token += 7;
|
1190
|
+
material.anisotropy_rotation = parseReal(&token);
|
1191
|
+
continue;
|
1192
|
+
}
|
1193
|
+
|
1194
|
+
// ambient texture
|
1195
|
+
if ((0 == strncmp(token, "map_Ka", 6)) && IS_SPACE(token[6])) {
|
1196
|
+
token += 7;
|
1197
|
+
ParseTextureNameAndOption(&(material.ambient_texname),
|
1198
|
+
&(material.ambient_texopt), token,
|
1199
|
+
/* is_bump */ false);
|
1200
|
+
continue;
|
1201
|
+
}
|
1202
|
+
|
1203
|
+
// diffuse texture
|
1204
|
+
if ((0 == strncmp(token, "map_Kd", 6)) && IS_SPACE(token[6])) {
|
1205
|
+
token += 7;
|
1206
|
+
ParseTextureNameAndOption(&(material.diffuse_texname),
|
1207
|
+
&(material.diffuse_texopt), token,
|
1208
|
+
/* is_bump */ false);
|
1209
|
+
continue;
|
1210
|
+
}
|
1211
|
+
|
1212
|
+
// specular texture
|
1213
|
+
if ((0 == strncmp(token, "map_Ks", 6)) && IS_SPACE(token[6])) {
|
1214
|
+
token += 7;
|
1215
|
+
ParseTextureNameAndOption(&(material.specular_texname),
|
1216
|
+
&(material.specular_texopt), token,
|
1217
|
+
/* is_bump */ false);
|
1218
|
+
continue;
|
1219
|
+
}
|
1220
|
+
|
1221
|
+
// specular highlight texture
|
1222
|
+
if ((0 == strncmp(token, "map_Ns", 6)) && IS_SPACE(token[6])) {
|
1223
|
+
token += 7;
|
1224
|
+
ParseTextureNameAndOption(&(material.specular_highlight_texname),
|
1225
|
+
&(material.specular_highlight_texopt), token,
|
1226
|
+
/* is_bump */ false);
|
1227
|
+
continue;
|
1228
|
+
}
|
1229
|
+
|
1230
|
+
// bump texture
|
1231
|
+
if ((0 == strncmp(token, "map_bump", 8)) && IS_SPACE(token[8])) {
|
1232
|
+
token += 9;
|
1233
|
+
ParseTextureNameAndOption(&(material.bump_texname),
|
1234
|
+
&(material.bump_texopt), token,
|
1235
|
+
/* is_bump */ true);
|
1236
|
+
continue;
|
1237
|
+
}
|
1238
|
+
|
1239
|
+
// bump texture
|
1240
|
+
if ((0 == strncmp(token, "bump", 4)) && IS_SPACE(token[4])) {
|
1241
|
+
token += 5;
|
1242
|
+
ParseTextureNameAndOption(&(material.bump_texname),
|
1243
|
+
&(material.bump_texopt), token,
|
1244
|
+
/* is_bump */ true);
|
1245
|
+
continue;
|
1246
|
+
}
|
1247
|
+
|
1248
|
+
// alpha texture
|
1249
|
+
if ((0 == strncmp(token, "map_d", 5)) && IS_SPACE(token[5])) {
|
1250
|
+
token += 6;
|
1251
|
+
material.alpha_texname = token;
|
1252
|
+
ParseTextureNameAndOption(&(material.alpha_texname),
|
1253
|
+
&(material.alpha_texopt), token,
|
1254
|
+
/* is_bump */ false);
|
1255
|
+
continue;
|
1256
|
+
}
|
1257
|
+
|
1258
|
+
// displacement texture
|
1259
|
+
if ((0 == strncmp(token, "disp", 4)) && IS_SPACE(token[4])) {
|
1260
|
+
token += 5;
|
1261
|
+
ParseTextureNameAndOption(&(material.displacement_texname),
|
1262
|
+
&(material.displacement_texopt), token,
|
1263
|
+
/* is_bump */ false);
|
1264
|
+
continue;
|
1265
|
+
}
|
1266
|
+
|
1267
|
+
// PBR: roughness texture
|
1268
|
+
if ((0 == strncmp(token, "map_Pr", 6)) && IS_SPACE(token[6])) {
|
1269
|
+
token += 7;
|
1270
|
+
ParseTextureNameAndOption(&(material.roughness_texname),
|
1271
|
+
&(material.roughness_texopt), token,
|
1272
|
+
/* is_bump */ false);
|
1273
|
+
continue;
|
1274
|
+
}
|
1275
|
+
|
1276
|
+
// PBR: metallic texture
|
1277
|
+
if ((0 == strncmp(token, "map_Pm", 6)) && IS_SPACE(token[6])) {
|
1278
|
+
token += 7;
|
1279
|
+
ParseTextureNameAndOption(&(material.metallic_texname),
|
1280
|
+
&(material.metallic_texopt), token,
|
1281
|
+
/* is_bump */ false);
|
1282
|
+
continue;
|
1283
|
+
}
|
1284
|
+
|
1285
|
+
// PBR: sheen texture
|
1286
|
+
if ((0 == strncmp(token, "map_Ps", 6)) && IS_SPACE(token[6])) {
|
1287
|
+
token += 7;
|
1288
|
+
ParseTextureNameAndOption(&(material.sheen_texname),
|
1289
|
+
&(material.sheen_texopt), token,
|
1290
|
+
/* is_bump */ false);
|
1291
|
+
continue;
|
1292
|
+
}
|
1293
|
+
|
1294
|
+
// PBR: emissive texture
|
1295
|
+
if ((0 == strncmp(token, "map_Ke", 6)) && IS_SPACE(token[6])) {
|
1296
|
+
token += 7;
|
1297
|
+
ParseTextureNameAndOption(&(material.emissive_texname),
|
1298
|
+
&(material.emissive_texopt), token,
|
1299
|
+
/* is_bump */ false);
|
1300
|
+
continue;
|
1301
|
+
}
|
1302
|
+
|
1303
|
+
// PBR: normal map texture
|
1304
|
+
if ((0 == strncmp(token, "norm", 4)) && IS_SPACE(token[4])) {
|
1305
|
+
token += 5;
|
1306
|
+
ParseTextureNameAndOption(
|
1307
|
+
&(material.normal_texname), &(material.normal_texopt), token,
|
1308
|
+
/* is_bump */ false); // @fixme { is_bump will be true? }
|
1309
|
+
continue;
|
1310
|
+
}
|
1311
|
+
|
1312
|
+
// unknown parameter
|
1313
|
+
const char *_space = strchr(token, ' ');
|
1314
|
+
if (!_space) {
|
1315
|
+
_space = strchr(token, '\t');
|
1316
|
+
}
|
1317
|
+
if (_space) {
|
1318
|
+
std::ptrdiff_t len = _space - token;
|
1319
|
+
std::string key(token, static_cast<size_t>(len));
|
1320
|
+
std::string value = _space + 1;
|
1321
|
+
material.unknown_parameter.insert(
|
1322
|
+
std::pair<std::string, std::string>(key, value));
|
1323
|
+
}
|
1324
|
+
}
|
1325
|
+
// flush last material.
|
1326
|
+
material_map->insert(std::pair<std::string, int>(
|
1327
|
+
material.name, static_cast<int>(materials->size())));
|
1328
|
+
materials->push_back(material);
|
1329
|
+
|
1330
|
+
if (warning) {
|
1331
|
+
(*warning) = ss.str();
|
1332
|
+
}
|
1333
|
+
}
|
1334
|
+
|
1335
|
+
bool MaterialFileReader::operator()(const std::string &matId,
|
1336
|
+
std::vector<material_t> *materials,
|
1337
|
+
std::map<std::string, int> *matMap,
|
1338
|
+
std::string *err) {
|
1339
|
+
std::string filepath;
|
1340
|
+
|
1341
|
+
if (!m_mtlBaseDir.empty()) {
|
1342
|
+
filepath = std::string(m_mtlBaseDir) + matId;
|
1343
|
+
} else {
|
1344
|
+
filepath = matId;
|
1345
|
+
}
|
1346
|
+
|
1347
|
+
std::ifstream matIStream(filepath.c_str());
|
1348
|
+
if (!matIStream) {
|
1349
|
+
std::stringstream ss;
|
1350
|
+
ss << "WARN: Material file [ " << filepath << " ] not found." << std::endl;
|
1351
|
+
if (err) {
|
1352
|
+
(*err) += ss.str();
|
1353
|
+
}
|
1354
|
+
return false;
|
1355
|
+
}
|
1356
|
+
|
1357
|
+
std::string warning;
|
1358
|
+
LoadMtl(matMap, materials, &matIStream, &warning);
|
1359
|
+
|
1360
|
+
if (!warning.empty()) {
|
1361
|
+
if (err) {
|
1362
|
+
(*err) += warning;
|
1363
|
+
}
|
1364
|
+
}
|
1365
|
+
|
1366
|
+
return true;
|
1367
|
+
}
|
1368
|
+
|
1369
|
+
bool MaterialStreamReader::operator()(const std::string &matId,
|
1370
|
+
std::vector<material_t> *materials,
|
1371
|
+
std::map<std::string, int> *matMap,
|
1372
|
+
std::string *err) {
|
1373
|
+
(void)matId;
|
1374
|
+
if (!m_inStream) {
|
1375
|
+
std::stringstream ss;
|
1376
|
+
ss << "WARN: Material stream in error state. " << std::endl;
|
1377
|
+
if (err) {
|
1378
|
+
(*err) += ss.str();
|
1379
|
+
}
|
1380
|
+
return false;
|
1381
|
+
}
|
1382
|
+
|
1383
|
+
std::string warning;
|
1384
|
+
LoadMtl(matMap, materials, &m_inStream, &warning);
|
1385
|
+
|
1386
|
+
if (!warning.empty()) {
|
1387
|
+
if (err) {
|
1388
|
+
(*err) += warning;
|
1389
|
+
}
|
1390
|
+
}
|
1391
|
+
|
1392
|
+
return true;
|
1393
|
+
}
|
1394
|
+
|
1395
|
+
bool LoadObj(attrib_t *attrib, std::vector<shape_t> *shapes,
|
1396
|
+
std::vector<material_t> *materials, std::string *err,
|
1397
|
+
const char *filename, const char *mtl_basedir, bool trianglulate) {
|
1398
|
+
attrib->vertices.clear();
|
1399
|
+
attrib->normals.clear();
|
1400
|
+
attrib->texcoords.clear();
|
1401
|
+
shapes->clear();
|
1402
|
+
|
1403
|
+
std::stringstream errss;
|
1404
|
+
|
1405
|
+
std::ifstream ifs(filename);
|
1406
|
+
if (!ifs) {
|
1407
|
+
errss << "Cannot open file [" << filename << "]" << std::endl;
|
1408
|
+
if (err) {
|
1409
|
+
(*err) = errss.str();
|
1410
|
+
}
|
1411
|
+
return false;
|
1412
|
+
}
|
1413
|
+
|
1414
|
+
std::string baseDir;
|
1415
|
+
if (mtl_basedir) {
|
1416
|
+
baseDir = mtl_basedir;
|
1417
|
+
}
|
1418
|
+
MaterialFileReader matFileReader(baseDir);
|
1419
|
+
|
1420
|
+
return LoadObj(attrib, shapes, materials, err, &ifs, &matFileReader,
|
1421
|
+
trianglulate);
|
1422
|
+
}
|
1423
|
+
|
1424
|
+
bool LoadObj(attrib_t *attrib, std::vector<shape_t> *shapes,
|
1425
|
+
std::vector<material_t> *materials, std::string *err,
|
1426
|
+
std::istream *inStream, MaterialReader *readMatFn /*= NULL*/,
|
1427
|
+
bool triangulate) {
|
1428
|
+
std::stringstream errss;
|
1429
|
+
|
1430
|
+
std::vector<real_t> v;
|
1431
|
+
std::vector<real_t> vn;
|
1432
|
+
std::vector<real_t> vt;
|
1433
|
+
std::vector<tag_t> tags;
|
1434
|
+
std::vector<std::vector<vertex_index> > faceGroup;
|
1435
|
+
std::string name;
|
1436
|
+
|
1437
|
+
// material
|
1438
|
+
std::map<std::string, int> material_map;
|
1439
|
+
int material = -1;
|
1440
|
+
|
1441
|
+
shape_t shape;
|
1442
|
+
|
1443
|
+
std::string linebuf;
|
1444
|
+
while (inStream->peek() != -1) {
|
1445
|
+
safeGetline(*inStream, linebuf);
|
1446
|
+
|
1447
|
+
// Trim newline '\r\n' or '\n'
|
1448
|
+
if (linebuf.size() > 0) {
|
1449
|
+
if (linebuf[linebuf.size() - 1] == '\n')
|
1450
|
+
linebuf.erase(linebuf.size() - 1);
|
1451
|
+
}
|
1452
|
+
if (linebuf.size() > 0) {
|
1453
|
+
if (linebuf[linebuf.size() - 1] == '\r')
|
1454
|
+
linebuf.erase(linebuf.size() - 1);
|
1455
|
+
}
|
1456
|
+
|
1457
|
+
// Skip if empty line.
|
1458
|
+
if (linebuf.empty()) {
|
1459
|
+
continue;
|
1460
|
+
}
|
1461
|
+
|
1462
|
+
// Skip leading space.
|
1463
|
+
const char *token = linebuf.c_str();
|
1464
|
+
token += strspn(token, " \t");
|
1465
|
+
|
1466
|
+
assert(token);
|
1467
|
+
if (token[0] == '\0') continue; // empty line
|
1468
|
+
|
1469
|
+
if (token[0] == '#') continue; // comment line
|
1470
|
+
|
1471
|
+
// vertex
|
1472
|
+
if (token[0] == 'v' && IS_SPACE((token[1]))) {
|
1473
|
+
token += 2;
|
1474
|
+
real_t x, y, z;
|
1475
|
+
parseReal3(&x, &y, &z, &token);
|
1476
|
+
v.push_back(x);
|
1477
|
+
v.push_back(y);
|
1478
|
+
v.push_back(z);
|
1479
|
+
continue;
|
1480
|
+
}
|
1481
|
+
|
1482
|
+
// normal
|
1483
|
+
if (token[0] == 'v' && token[1] == 'n' && IS_SPACE((token[2]))) {
|
1484
|
+
token += 3;
|
1485
|
+
real_t x, y, z;
|
1486
|
+
parseReal3(&x, &y, &z, &token);
|
1487
|
+
vn.push_back(x);
|
1488
|
+
vn.push_back(y);
|
1489
|
+
vn.push_back(z);
|
1490
|
+
continue;
|
1491
|
+
}
|
1492
|
+
|
1493
|
+
// texcoord
|
1494
|
+
if (token[0] == 'v' && token[1] == 't' && IS_SPACE((token[2]))) {
|
1495
|
+
token += 3;
|
1496
|
+
real_t x, y;
|
1497
|
+
parseReal2(&x, &y, &token);
|
1498
|
+
vt.push_back(x);
|
1499
|
+
vt.push_back(y);
|
1500
|
+
continue;
|
1501
|
+
}
|
1502
|
+
|
1503
|
+
// face
|
1504
|
+
if (token[0] == 'f' && IS_SPACE((token[1]))) {
|
1505
|
+
token += 2;
|
1506
|
+
token += strspn(token, " \t");
|
1507
|
+
|
1508
|
+
std::vector<vertex_index> face;
|
1509
|
+
face.reserve(3);
|
1510
|
+
|
1511
|
+
while (!IS_NEW_LINE(token[0])) {
|
1512
|
+
vertex_index vi = parseTriple(&token, static_cast<int>(v.size() / 3),
|
1513
|
+
static_cast<int>(vn.size() / 3),
|
1514
|
+
static_cast<int>(vt.size() / 2));
|
1515
|
+
face.push_back(vi);
|
1516
|
+
size_t n = strspn(token, " \t\r");
|
1517
|
+
token += n;
|
1518
|
+
}
|
1519
|
+
|
1520
|
+
// replace with emplace_back + std::move on C++11
|
1521
|
+
faceGroup.push_back(std::vector<vertex_index>());
|
1522
|
+
faceGroup[faceGroup.size() - 1].swap(face);
|
1523
|
+
|
1524
|
+
continue;
|
1525
|
+
}
|
1526
|
+
|
1527
|
+
// use mtl
|
1528
|
+
if ((0 == strncmp(token, "usemtl", 6)) && IS_SPACE((token[6]))) {
|
1529
|
+
char namebuf[TINYOBJ_SSCANF_BUFFER_SIZE];
|
1530
|
+
token += 7;
|
1531
|
+
#ifdef _MSC_VER
|
1532
|
+
sscanf_s(token, "%s", namebuf, (unsigned)_countof(namebuf));
|
1533
|
+
#else
|
1534
|
+
std::sscanf(token, "%s", namebuf);
|
1535
|
+
#endif
|
1536
|
+
|
1537
|
+
int newMaterialId = -1;
|
1538
|
+
if (material_map.find(namebuf) != material_map.end()) {
|
1539
|
+
newMaterialId = material_map[namebuf];
|
1540
|
+
} else {
|
1541
|
+
// { error!! material not found }
|
1542
|
+
}
|
1543
|
+
|
1544
|
+
if (newMaterialId != material) {
|
1545
|
+
// Create per-face material. Thus we don't add `shape` to `shapes` at
|
1546
|
+
// this time.
|
1547
|
+
// just clear `faceGroup` after `exportFaceGroupToShape()` call.
|
1548
|
+
exportFaceGroupToShape(&shape, faceGroup, tags, material, name,
|
1549
|
+
triangulate);
|
1550
|
+
faceGroup.clear();
|
1551
|
+
material = newMaterialId;
|
1552
|
+
}
|
1553
|
+
|
1554
|
+
continue;
|
1555
|
+
}
|
1556
|
+
|
1557
|
+
// load mtl
|
1558
|
+
if ((0 == strncmp(token, "mtllib", 6)) && IS_SPACE((token[6]))) {
|
1559
|
+
if (readMatFn) {
|
1560
|
+
token += 7;
|
1561
|
+
|
1562
|
+
std::vector<std::string> filenames;
|
1563
|
+
SplitString(std::string(token), ' ', filenames);
|
1564
|
+
|
1565
|
+
if (filenames.empty()) {
|
1566
|
+
if (err) {
|
1567
|
+
(*err) +=
|
1568
|
+
"WARN: Looks like empty filename for mtllib. Use default "
|
1569
|
+
"material. \n";
|
1570
|
+
}
|
1571
|
+
} else {
|
1572
|
+
bool found = false;
|
1573
|
+
for (size_t s = 0; s < filenames.size(); s++) {
|
1574
|
+
std::string err_mtl;
|
1575
|
+
bool ok = (*readMatFn)(filenames[s].c_str(), materials,
|
1576
|
+
&material_map, &err_mtl);
|
1577
|
+
if (err && (!err_mtl.empty())) {
|
1578
|
+
(*err) += err_mtl; // This should be warn message.
|
1579
|
+
}
|
1580
|
+
|
1581
|
+
if (ok) {
|
1582
|
+
found = true;
|
1583
|
+
break;
|
1584
|
+
}
|
1585
|
+
}
|
1586
|
+
|
1587
|
+
if (!found) {
|
1588
|
+
if (err) {
|
1589
|
+
(*err) +=
|
1590
|
+
"WARN: Failed to load material file(s). Use default "
|
1591
|
+
"material.\n";
|
1592
|
+
}
|
1593
|
+
}
|
1594
|
+
}
|
1595
|
+
}
|
1596
|
+
|
1597
|
+
continue;
|
1598
|
+
}
|
1599
|
+
|
1600
|
+
// group name
|
1601
|
+
if (token[0] == 'g' && IS_SPACE((token[1]))) {
|
1602
|
+
// flush previous face group.
|
1603
|
+
bool ret = exportFaceGroupToShape(&shape, faceGroup, tags, material, name,
|
1604
|
+
triangulate);
|
1605
|
+
if (ret) {
|
1606
|
+
shapes->push_back(shape);
|
1607
|
+
}
|
1608
|
+
|
1609
|
+
shape = shape_t();
|
1610
|
+
|
1611
|
+
// material = -1;
|
1612
|
+
faceGroup.clear();
|
1613
|
+
|
1614
|
+
std::vector<std::string> names;
|
1615
|
+
names.reserve(2);
|
1616
|
+
|
1617
|
+
while (!IS_NEW_LINE(token[0])) {
|
1618
|
+
std::string str = parseString(&token);
|
1619
|
+
names.push_back(str);
|
1620
|
+
token += strspn(token, " \t\r"); // skip tag
|
1621
|
+
}
|
1622
|
+
|
1623
|
+
assert(names.size() > 0);
|
1624
|
+
|
1625
|
+
// names[0] must be 'g', so skip the 0th element.
|
1626
|
+
if (names.size() > 1) {
|
1627
|
+
name = names[1];
|
1628
|
+
} else {
|
1629
|
+
name = "";
|
1630
|
+
}
|
1631
|
+
|
1632
|
+
continue;
|
1633
|
+
}
|
1634
|
+
|
1635
|
+
// object name
|
1636
|
+
if (token[0] == 'o' && IS_SPACE((token[1]))) {
|
1637
|
+
// flush previous face group.
|
1638
|
+
bool ret = exportFaceGroupToShape(&shape, faceGroup, tags, material, name,
|
1639
|
+
triangulate);
|
1640
|
+
if (ret) {
|
1641
|
+
shapes->push_back(shape);
|
1642
|
+
}
|
1643
|
+
|
1644
|
+
// material = -1;
|
1645
|
+
faceGroup.clear();
|
1646
|
+
shape = shape_t();
|
1647
|
+
|
1648
|
+
// @todo { multiple object name? }
|
1649
|
+
char namebuf[TINYOBJ_SSCANF_BUFFER_SIZE];
|
1650
|
+
token += 2;
|
1651
|
+
#ifdef _MSC_VER
|
1652
|
+
sscanf_s(token, "%s", namebuf, (unsigned)_countof(namebuf));
|
1653
|
+
#else
|
1654
|
+
std::sscanf(token, "%s", namebuf);
|
1655
|
+
#endif
|
1656
|
+
name = std::string(namebuf);
|
1657
|
+
|
1658
|
+
continue;
|
1659
|
+
}
|
1660
|
+
|
1661
|
+
if (token[0] == 't' && IS_SPACE(token[1])) {
|
1662
|
+
tag_t tag;
|
1663
|
+
|
1664
|
+
char namebuf[4096];
|
1665
|
+
token += 2;
|
1666
|
+
#ifdef _MSC_VER
|
1667
|
+
sscanf_s(token, "%s", namebuf, (unsigned)_countof(namebuf));
|
1668
|
+
#else
|
1669
|
+
std::sscanf(token, "%s", namebuf);
|
1670
|
+
#endif
|
1671
|
+
tag.name = std::string(namebuf);
|
1672
|
+
|
1673
|
+
token += tag.name.size() + 1;
|
1674
|
+
|
1675
|
+
tag_sizes ts = parseTagTriple(&token);
|
1676
|
+
|
1677
|
+
tag.intValues.resize(static_cast<size_t>(ts.num_ints));
|
1678
|
+
|
1679
|
+
for (size_t i = 0; i < static_cast<size_t>(ts.num_ints); ++i) {
|
1680
|
+
tag.intValues[i] = atoi(token);
|
1681
|
+
token += strcspn(token, "/ \t\r") + 1;
|
1682
|
+
}
|
1683
|
+
|
1684
|
+
tag.floatValues.resize(static_cast<size_t>(ts.num_reals));
|
1685
|
+
for (size_t i = 0; i < static_cast<size_t>(ts.num_reals); ++i) {
|
1686
|
+
tag.floatValues[i] = parseReal(&token);
|
1687
|
+
token += strcspn(token, "/ \t\r") + 1;
|
1688
|
+
}
|
1689
|
+
|
1690
|
+
tag.stringValues.resize(static_cast<size_t>(ts.num_strings));
|
1691
|
+
for (size_t i = 0; i < static_cast<size_t>(ts.num_strings); ++i) {
|
1692
|
+
char stringValueBuffer[4096];
|
1693
|
+
|
1694
|
+
#ifdef _MSC_VER
|
1695
|
+
sscanf_s(token, "%s", stringValueBuffer,
|
1696
|
+
(unsigned)_countof(stringValueBuffer));
|
1697
|
+
#else
|
1698
|
+
std::sscanf(token, "%s", stringValueBuffer);
|
1699
|
+
#endif
|
1700
|
+
tag.stringValues[i] = stringValueBuffer;
|
1701
|
+
token += tag.stringValues[i].size() + 1;
|
1702
|
+
}
|
1703
|
+
|
1704
|
+
tags.push_back(tag);
|
1705
|
+
}
|
1706
|
+
|
1707
|
+
// Ignore unknown command.
|
1708
|
+
}
|
1709
|
+
|
1710
|
+
bool ret = exportFaceGroupToShape(&shape, faceGroup, tags, material, name,
|
1711
|
+
triangulate);
|
1712
|
+
// exportFaceGroupToShape return false when `usemtl` is called in the last
|
1713
|
+
// line.
|
1714
|
+
// we also add `shape` to `shapes` when `shape.mesh` has already some
|
1715
|
+
// faces(indices)
|
1716
|
+
if (ret || shape.mesh.indices.size()) {
|
1717
|
+
shapes->push_back(shape);
|
1718
|
+
}
|
1719
|
+
faceGroup.clear(); // for safety
|
1720
|
+
|
1721
|
+
if (err) {
|
1722
|
+
(*err) += errss.str();
|
1723
|
+
}
|
1724
|
+
|
1725
|
+
attrib->vertices.swap(v);
|
1726
|
+
attrib->normals.swap(vn);
|
1727
|
+
attrib->texcoords.swap(vt);
|
1728
|
+
|
1729
|
+
return true;
|
1730
|
+
}
|
1731
|
+
|
1732
|
+
bool LoadObjWithCallback(std::istream &inStream, const callback_t &callback,
|
1733
|
+
void *user_data /*= NULL*/,
|
1734
|
+
MaterialReader *readMatFn /*= NULL*/,
|
1735
|
+
std::string *err /*= NULL*/) {
|
1736
|
+
std::stringstream errss;
|
1737
|
+
|
1738
|
+
// material
|
1739
|
+
std::map<std::string, int> material_map;
|
1740
|
+
int material_id = -1; // -1 = invalid
|
1741
|
+
|
1742
|
+
std::vector<index_t> indices;
|
1743
|
+
std::vector<material_t> materials;
|
1744
|
+
std::vector<std::string> names;
|
1745
|
+
names.reserve(2);
|
1746
|
+
std::string name;
|
1747
|
+
std::vector<const char *> names_out;
|
1748
|
+
|
1749
|
+
std::string linebuf;
|
1750
|
+
while (inStream.peek() != -1) {
|
1751
|
+
safeGetline(inStream, linebuf);
|
1752
|
+
|
1753
|
+
// Trim newline '\r\n' or '\n'
|
1754
|
+
if (linebuf.size() > 0) {
|
1755
|
+
if (linebuf[linebuf.size() - 1] == '\n')
|
1756
|
+
linebuf.erase(linebuf.size() - 1);
|
1757
|
+
}
|
1758
|
+
if (linebuf.size() > 0) {
|
1759
|
+
if (linebuf[linebuf.size() - 1] == '\r')
|
1760
|
+
linebuf.erase(linebuf.size() - 1);
|
1761
|
+
}
|
1762
|
+
|
1763
|
+
// Skip if empty line.
|
1764
|
+
if (linebuf.empty()) {
|
1765
|
+
continue;
|
1766
|
+
}
|
1767
|
+
|
1768
|
+
// Skip leading space.
|
1769
|
+
const char *token = linebuf.c_str();
|
1770
|
+
token += strspn(token, " \t");
|
1771
|
+
|
1772
|
+
assert(token);
|
1773
|
+
if (token[0] == '\0') continue; // empty line
|
1774
|
+
|
1775
|
+
if (token[0] == '#') continue; // comment line
|
1776
|
+
|
1777
|
+
// vertex
|
1778
|
+
if (token[0] == 'v' && IS_SPACE((token[1]))) {
|
1779
|
+
token += 2;
|
1780
|
+
real_t x, y, z, w; // w is optional. default = 1.0
|
1781
|
+
parseV(&x, &y, &z, &w, &token);
|
1782
|
+
if (callback.vertex_cb) {
|
1783
|
+
callback.vertex_cb(user_data, x, y, z, w);
|
1784
|
+
}
|
1785
|
+
continue;
|
1786
|
+
}
|
1787
|
+
|
1788
|
+
// normal
|
1789
|
+
if (token[0] == 'v' && token[1] == 'n' && IS_SPACE((token[2]))) {
|
1790
|
+
token += 3;
|
1791
|
+
real_t x, y, z;
|
1792
|
+
parseReal3(&x, &y, &z, &token);
|
1793
|
+
if (callback.normal_cb) {
|
1794
|
+
callback.normal_cb(user_data, x, y, z);
|
1795
|
+
}
|
1796
|
+
continue;
|
1797
|
+
}
|
1798
|
+
|
1799
|
+
// texcoord
|
1800
|
+
if (token[0] == 'v' && token[1] == 't' && IS_SPACE((token[2]))) {
|
1801
|
+
token += 3;
|
1802
|
+
real_t x, y, z; // y and z are optional. default = 0.0
|
1803
|
+
parseReal3(&x, &y, &z, &token);
|
1804
|
+
if (callback.texcoord_cb) {
|
1805
|
+
callback.texcoord_cb(user_data, x, y, z);
|
1806
|
+
}
|
1807
|
+
continue;
|
1808
|
+
}
|
1809
|
+
|
1810
|
+
// face
|
1811
|
+
if (token[0] == 'f' && IS_SPACE((token[1]))) {
|
1812
|
+
token += 2;
|
1813
|
+
token += strspn(token, " \t");
|
1814
|
+
|
1815
|
+
indices.clear();
|
1816
|
+
while (!IS_NEW_LINE(token[0])) {
|
1817
|
+
vertex_index vi = parseRawTriple(&token);
|
1818
|
+
|
1819
|
+
index_t idx;
|
1820
|
+
idx.vertex_index = vi.v_idx;
|
1821
|
+
idx.normal_index = vi.vn_idx;
|
1822
|
+
idx.texcoord_index = vi.vt_idx;
|
1823
|
+
|
1824
|
+
indices.push_back(idx);
|
1825
|
+
size_t n = strspn(token, " \t\r");
|
1826
|
+
token += n;
|
1827
|
+
}
|
1828
|
+
|
1829
|
+
if (callback.index_cb && indices.size() > 0) {
|
1830
|
+
callback.index_cb(user_data, &indices.at(0),
|
1831
|
+
static_cast<int>(indices.size()));
|
1832
|
+
}
|
1833
|
+
|
1834
|
+
continue;
|
1835
|
+
}
|
1836
|
+
|
1837
|
+
// use mtl
|
1838
|
+
if ((0 == strncmp(token, "usemtl", 6)) && IS_SPACE((token[6]))) {
|
1839
|
+
char namebuf[TINYOBJ_SSCANF_BUFFER_SIZE];
|
1840
|
+
token += 7;
|
1841
|
+
#ifdef _MSC_VER
|
1842
|
+
sscanf_s(token, "%s", namebuf,
|
1843
|
+
static_cast<unsigned int>(_countof(namebuf)));
|
1844
|
+
#else
|
1845
|
+
std::sscanf(token, "%s", namebuf);
|
1846
|
+
#endif
|
1847
|
+
|
1848
|
+
int newMaterialId = -1;
|
1849
|
+
if (material_map.find(namebuf) != material_map.end()) {
|
1850
|
+
newMaterialId = material_map[namebuf];
|
1851
|
+
} else {
|
1852
|
+
// { error!! material not found }
|
1853
|
+
}
|
1854
|
+
|
1855
|
+
if (newMaterialId != material_id) {
|
1856
|
+
material_id = newMaterialId;
|
1857
|
+
}
|
1858
|
+
|
1859
|
+
if (callback.usemtl_cb) {
|
1860
|
+
callback.usemtl_cb(user_data, namebuf, material_id);
|
1861
|
+
}
|
1862
|
+
|
1863
|
+
continue;
|
1864
|
+
}
|
1865
|
+
|
1866
|
+
// load mtl
|
1867
|
+
if ((0 == strncmp(token, "mtllib", 6)) && IS_SPACE((token[6]))) {
|
1868
|
+
if (readMatFn) {
|
1869
|
+
token += 7;
|
1870
|
+
|
1871
|
+
std::vector<std::string> filenames;
|
1872
|
+
SplitString(std::string(token), ' ', filenames);
|
1873
|
+
|
1874
|
+
if (filenames.empty()) {
|
1875
|
+
if (err) {
|
1876
|
+
(*err) +=
|
1877
|
+
"WARN: Looks like empty filename for mtllib. Use default "
|
1878
|
+
"material. \n";
|
1879
|
+
}
|
1880
|
+
} else {
|
1881
|
+
bool found = false;
|
1882
|
+
for (size_t s = 0; s < filenames.size(); s++) {
|
1883
|
+
std::string err_mtl;
|
1884
|
+
bool ok = (*readMatFn)(filenames[s].c_str(), &materials,
|
1885
|
+
&material_map, &err_mtl);
|
1886
|
+
if (err && (!err_mtl.empty())) {
|
1887
|
+
(*err) += err_mtl; // This should be warn message.
|
1888
|
+
}
|
1889
|
+
|
1890
|
+
if (ok) {
|
1891
|
+
found = true;
|
1892
|
+
break;
|
1893
|
+
}
|
1894
|
+
}
|
1895
|
+
|
1896
|
+
if (!found) {
|
1897
|
+
if (err) {
|
1898
|
+
(*err) +=
|
1899
|
+
"WARN: Failed to load material file(s). Use default "
|
1900
|
+
"material.\n";
|
1901
|
+
}
|
1902
|
+
} else {
|
1903
|
+
if (callback.mtllib_cb) {
|
1904
|
+
callback.mtllib_cb(user_data, &materials.at(0),
|
1905
|
+
static_cast<int>(materials.size()));
|
1906
|
+
}
|
1907
|
+
}
|
1908
|
+
}
|
1909
|
+
}
|
1910
|
+
|
1911
|
+
continue;
|
1912
|
+
}
|
1913
|
+
|
1914
|
+
// group name
|
1915
|
+
if (token[0] == 'g' && IS_SPACE((token[1]))) {
|
1916
|
+
names.clear();
|
1917
|
+
|
1918
|
+
while (!IS_NEW_LINE(token[0])) {
|
1919
|
+
std::string str = parseString(&token);
|
1920
|
+
names.push_back(str);
|
1921
|
+
token += strspn(token, " \t\r"); // skip tag
|
1922
|
+
}
|
1923
|
+
|
1924
|
+
assert(names.size() > 0);
|
1925
|
+
|
1926
|
+
// names[0] must be 'g', so skip the 0th element.
|
1927
|
+
if (names.size() > 1) {
|
1928
|
+
name = names[1];
|
1929
|
+
} else {
|
1930
|
+
name.clear();
|
1931
|
+
}
|
1932
|
+
|
1933
|
+
if (callback.group_cb) {
|
1934
|
+
if (names.size() > 1) {
|
1935
|
+
// create const char* array.
|
1936
|
+
names_out.resize(names.size() - 1);
|
1937
|
+
for (size_t j = 0; j < names_out.size(); j++) {
|
1938
|
+
names_out[j] = names[j + 1].c_str();
|
1939
|
+
}
|
1940
|
+
callback.group_cb(user_data, &names_out.at(0),
|
1941
|
+
static_cast<int>(names_out.size()));
|
1942
|
+
|
1943
|
+
} else {
|
1944
|
+
callback.group_cb(user_data, NULL, 0);
|
1945
|
+
}
|
1946
|
+
}
|
1947
|
+
|
1948
|
+
continue;
|
1949
|
+
}
|
1950
|
+
|
1951
|
+
// object name
|
1952
|
+
if (token[0] == 'o' && IS_SPACE((token[1]))) {
|
1953
|
+
// @todo { multiple object name? }
|
1954
|
+
char namebuf[TINYOBJ_SSCANF_BUFFER_SIZE];
|
1955
|
+
token += 2;
|
1956
|
+
#ifdef _MSC_VER
|
1957
|
+
sscanf_s(token, "%s", namebuf, (unsigned)_countof(namebuf));
|
1958
|
+
#else
|
1959
|
+
std::sscanf(token, "%s", namebuf);
|
1960
|
+
#endif
|
1961
|
+
std::string object_name = std::string(namebuf);
|
1962
|
+
|
1963
|
+
if (callback.object_cb) {
|
1964
|
+
callback.object_cb(user_data, object_name.c_str());
|
1965
|
+
}
|
1966
|
+
|
1967
|
+
continue;
|
1968
|
+
}
|
1969
|
+
|
1970
|
+
#if 0 // @todo
|
1971
|
+
if (token[0] == 't' && IS_SPACE(token[1])) {
|
1972
|
+
tag_t tag;
|
1973
|
+
|
1974
|
+
char namebuf[4096];
|
1975
|
+
token += 2;
|
1976
|
+
#ifdef _MSC_VER
|
1977
|
+
sscanf_s(token, "%s", namebuf, (unsigned)_countof(namebuf));
|
1978
|
+
#else
|
1979
|
+
std::sscanf(token, "%s", namebuf);
|
1980
|
+
#endif
|
1981
|
+
tag.name = std::string(namebuf);
|
1982
|
+
|
1983
|
+
token += tag.name.size() + 1;
|
1984
|
+
|
1985
|
+
tag_sizes ts = parseTagTriple(&token);
|
1986
|
+
|
1987
|
+
tag.intValues.resize(static_cast<size_t>(ts.num_ints));
|
1988
|
+
|
1989
|
+
for (size_t i = 0; i < static_cast<size_t>(ts.num_ints); ++i) {
|
1990
|
+
tag.intValues[i] = atoi(token);
|
1991
|
+
token += strcspn(token, "/ \t\r") + 1;
|
1992
|
+
}
|
1993
|
+
|
1994
|
+
tag.floatValues.resize(static_cast<size_t>(ts.num_reals));
|
1995
|
+
for (size_t i = 0; i < static_cast<size_t>(ts.num_reals); ++i) {
|
1996
|
+
tag.floatValues[i] = parseReal(&token);
|
1997
|
+
token += strcspn(token, "/ \t\r") + 1;
|
1998
|
+
}
|
1999
|
+
|
2000
|
+
tag.stringValues.resize(static_cast<size_t>(ts.num_strings));
|
2001
|
+
for (size_t i = 0; i < static_cast<size_t>(ts.num_strings); ++i) {
|
2002
|
+
char stringValueBuffer[4096];
|
2003
|
+
|
2004
|
+
#ifdef _MSC_VER
|
2005
|
+
sscanf_s(token, "%s", stringValueBuffer,
|
2006
|
+
(unsigned)_countof(stringValueBuffer));
|
2007
|
+
#else
|
2008
|
+
std::sscanf(token, "%s", stringValueBuffer);
|
2009
|
+
#endif
|
2010
|
+
tag.stringValues[i] = stringValueBuffer;
|
2011
|
+
token += tag.stringValues[i].size() + 1;
|
2012
|
+
}
|
2013
|
+
|
2014
|
+
tags.push_back(tag);
|
2015
|
+
}
|
2016
|
+
#endif
|
2017
|
+
|
2018
|
+
// Ignore unknown command.
|
2019
|
+
}
|
2020
|
+
|
2021
|
+
if (err) {
|
2022
|
+
(*err) += errss.str();
|
2023
|
+
}
|
2024
|
+
|
2025
|
+
return true;
|
2026
|
+
}
|
2027
|
+
} // namespace tinyobj
|
2028
|
+
|
2029
|
+
#endif
|