├── .clang-format ├── .cmake-format.py ├── .gitattributes ├── .github ├── dependabot.yml └── workflows │ └── ci.yml ├── .gitignore ├── .gitmodules ├── AUTHORS ├── BUILDING.md ├── CMAKE.md ├── CMakeLists.txt ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── cmake ├── draco-config.cmake.template ├── draco.pc.template ├── draco_build_definitions.cmake ├── draco_cpu_detection.cmake ├── draco_dependencies.cmake ├── draco_emscripten.cmake ├── draco_flags.cmake ├── draco_helpers.cmake ├── draco_install.cmake ├── draco_intrinsics.cmake ├── draco_options.cmake ├── draco_sanitizer.cmake ├── draco_targets.cmake ├── draco_test_config.h.cmake ├── draco_tests.cmake ├── draco_variables.cmake └── toolchains │ ├── aarch64-linux-gnu.cmake │ ├── android-ndk-common.cmake │ ├── android.cmake │ ├── arm-ios-common.cmake │ ├── arm-linux-gnueabihf.cmake │ ├── arm64-android-ndk-libcpp.cmake │ ├── arm64-ios.cmake │ ├── arm64-linux-gcc.cmake │ ├── armv7-android-ndk-libcpp.cmake │ ├── armv7-ios.cmake │ ├── armv7-linux-gcc.cmake │ ├── armv7s-ios.cmake │ ├── i386-ios.cmake │ ├── x86-android-ndk-libcpp.cmake │ ├── x86_64-android-ndk-libcpp.cmake │ └── x86_64-ios.cmake ├── docs ├── .ruby-version ├── DracoLogo.jpeg ├── Gemfile ├── Gemfile.lock ├── _config.yml ├── _includes │ ├── analytics.html │ └── footer.html ├── _layouts │ ├── home.html │ ├── spec-page.html │ └── spec.html ├── artwork │ ├── draco-favicon-src.png │ ├── draco-favicon-src.svg │ ├── draco3d-horiz-320x79.png │ ├── draco3d-horiz-640x158.png │ ├── draco3d-horiz.ai │ ├── draco3d-horiz.svg │ ├── draco3d-mark-180x180.png │ ├── draco3d-mark-360x360.png │ ├── draco3d-mark.ai │ ├── draco3d-mark.svg │ ├── draco3d-vert-180x137.png │ ├── draco3d-vert-360x274.png │ ├── draco3d-vert-452x344.png │ ├── draco3d-vert.ai │ ├── draco3d-vert.svg │ └── favicon │ │ ├── android-icon-144x144.png │ │ ├── android-icon-192x192.png │ │ ├── android-icon-36x36.png │ │ ├── android-icon-48x48.png │ │ ├── android-icon-72x72.png │ │ ├── android-icon-96x96.png │ │ ├── apple-icon-114x114.png │ │ ├── apple-icon-120x120.png │ │ ├── apple-icon-144x144.png │ │ ├── apple-icon-152x152.png │ │ ├── apple-icon-180x180.png │ │ ├── apple-icon-57x57.png │ │ ├── apple-icon-60x60.png │ │ ├── apple-icon-72x72.png │ │ ├── apple-icon-76x76.png │ │ ├── apple-icon-precomposed.png │ │ ├── apple-icon.png │ │ ├── browserconfig.xml │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon-96x96.png │ │ ├── favicon.ico │ │ ├── manifest.json │ │ ├── ms-icon-144x144.png │ │ ├── ms-icon-150x150.png │ │ ├── ms-icon-310x310.png │ │ └── ms-icon-70x70.png ├── assets │ ├── css │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ ├── ie10-viewport-bug-workaround.css │ │ ├── navbar-fixed-top.css │ │ ├── pygments │ │ │ ├── README.md │ │ │ ├── UNLICENSE.txt │ │ │ ├── autumn.css │ │ │ ├── borland.css │ │ │ ├── bw.css │ │ │ ├── colorful.css │ │ │ ├── default.css │ │ │ ├── emacs.css │ │ │ ├── friendly.css │ │ │ ├── fruity.css │ │ │ ├── github.css │ │ │ ├── manni.css │ │ │ ├── monokai.css │ │ │ ├── murphy.css │ │ │ ├── native.css │ │ │ ├── pastie.css │ │ │ ├── perldoc.css │ │ │ ├── tango.css │ │ │ ├── trac.css │ │ │ ├── vim.css │ │ │ ├── vs.css │ │ │ └── zenburn.css │ │ ├── spec-style.sass │ │ └── sticky-footer.css │ └── js │ │ ├── ASCIIMathML.js │ │ ├── bootstrap.min.js │ │ └── ie10-viewport-bug-workaround.js ├── index.md ├── package-lock.json ├── spec │ ├── 00.00.00.title.md │ ├── 00.00.01.version.md │ ├── 00.00.02.authors.md │ ├── 00.00.03.last.modified.md │ ├── 00.00.04.abstract.md │ ├── 00.00.05.toc.md │ ├── 01.00.00.scope.md │ ├── 03.00.00.symbols.md │ ├── 04.00.00.conventions.md │ ├── README.md │ ├── attributes.decoder.md │ ├── boundary.decoder.md │ ├── connectivity.decoder.md │ ├── core.functions.md │ ├── corner.md │ ├── draco.decoder.md │ ├── edgebreaker.decoder.md │ ├── edgebreaker.traversal.md │ ├── edgebreaker.traversal.prediction.degree.md │ ├── edgebreaker.traversal.valence.md │ ├── images │ │ ├── attributes.png │ │ ├── draco_file.png │ │ ├── edgebreaker_connectivity.png │ │ ├── edgebreaker_valence_connectivity.png │ │ └── sequential_connectivity.png │ ├── index.md │ ├── metadata.decoder.md │ ├── prediction.decoder.md │ ├── prediction.multi.parallelogram.decoder.md │ ├── prediction.normal.decoder.md │ ├── prediction.normal.transform.md │ ├── prediction.parallelogram.decoder.md │ ├── prediction.texcoords.decoder.md │ ├── prediction.wrap.transform.md │ ├── rans.decoding.md │ ├── sequential.decoder.md │ ├── sequential.integer.attribute.decoder.md │ ├── sequential.normal.attribute.decoder.md │ ├── sequential.quantization.attribute.decoder.md │ ├── variable.descriptions.md │ └── vector.md └── unity │ ├── UNITY.md │ └── images │ ├── add_component.png │ ├── add_light.png │ ├── add_material.png │ ├── add_mesh_filter_component.png │ ├── add_mesh_renderer_component.png │ ├── allow_unsafe_windows_1.png │ ├── allow_unsafe_windows_2.png │ ├── attach_draco_decode_object.png │ ├── black_bunny.png │ ├── create_empty_game_object_windows.png │ ├── default_material.png │ ├── light_position.png │ ├── lit_bunny.png │ ├── mesh_filter_added.png │ ├── mesh_renderer_added.png │ ├── new_project_windows_1.png │ ├── new_project_windows_2.png │ ├── pink_bunny.png │ ├── select_material.png │ ├── set_camera_position.png │ └── unity_empty.png ├── javascript ├── draco_decoder.js ├── draco_decoder.wasm ├── draco_decoder_gltf.js ├── draco_decoder_gltf.wasm ├── draco_encoder.js ├── draco_encoder.wasm ├── draco_encoder_wrapper.js ├── draco_wasm_wrapper.js ├── draco_wasm_wrapper_gltf.js ├── example │ ├── DRACOLoader.js │ ├── README.md │ ├── geometry_helper.js │ ├── models │ │ └── bunny.drc │ ├── webgl_loader_draco.html │ └── webgl_loader_draco_advanced.html ├── npm │ ├── draco3d │ │ ├── README.md │ │ ├── bunny.drc │ │ ├── draco3d.js │ │ ├── draco_decoder.wasm │ │ ├── draco_decoder_nodejs.js │ │ ├── draco_encoder.wasm │ │ ├── draco_encoder_nodejs.js │ │ ├── draco_minimal_decoder_example.js │ │ ├── draco_minimal_encoder_decoder_example.js │ │ ├── draco_minimal_encoder_example.js │ │ ├── draco_nodejs_example.js │ │ └── package.json │ └── draco3dgltf │ │ ├── README.md │ │ ├── bunny.drc │ │ ├── draco3dgltf.js │ │ ├── draco_decoder_gltf.wasm │ │ ├── draco_decoder_gltf_nodejs.js │ │ ├── draco_encoder.wasm │ │ ├── draco_encoder_gltf_nodejs.js │ │ ├── draco_nodejs_example.js │ │ └── package.json ├── time_draco_decode.html └── with_asserts │ ├── draco_decoder.js │ ├── draco_decoder.wasm │ ├── draco_encoder.js │ ├── draco_encoder.wasm │ ├── draco_encoder_wrapper.js │ └── draco_wasm_wrapper.js ├── maya ├── .gitignore ├── draco_maya_wrapper_macos.tar.bz └── draco_maya_wrapper_windows.tar.bz ├── src └── draco │ ├── animation │ ├── animation.cc │ ├── animation.h │ ├── animation_test.cc │ ├── keyframe_animation.cc │ ├── keyframe_animation.h │ ├── keyframe_animation_decoder.cc │ ├── keyframe_animation_decoder.h │ ├── keyframe_animation_encoder.cc │ ├── keyframe_animation_encoder.h │ ├── keyframe_animation_encoding_test.cc │ ├── keyframe_animation_test.cc │ ├── node_animation_data.h │ ├── skin.cc │ └── skin.h │ ├── attributes │ ├── attribute_octahedron_transform.cc │ ├── attribute_octahedron_transform.h │ ├── attribute_quantization_transform.cc │ ├── attribute_quantization_transform.h │ ├── attribute_transform.cc │ ├── attribute_transform.h │ ├── attribute_transform_data.h │ ├── attribute_transform_type.h │ ├── geometry_attribute.cc │ ├── geometry_attribute.h │ ├── geometry_indices.h │ ├── point_attribute.cc │ ├── point_attribute.h │ └── point_attribute_test.cc │ ├── compression │ ├── attributes │ │ ├── attributes_decoder.cc │ │ ├── attributes_decoder.h │ │ ├── attributes_decoder_interface.h │ │ ├── attributes_encoder.cc │ │ ├── attributes_encoder.h │ │ ├── kd_tree_attributes_decoder.cc │ │ ├── kd_tree_attributes_decoder.h │ │ ├── kd_tree_attributes_encoder.cc │ │ ├── kd_tree_attributes_encoder.h │ │ ├── kd_tree_attributes_shared.h │ │ ├── linear_sequencer.h │ │ ├── mesh_attribute_indices_encoding_data.h │ │ ├── normal_compression_utils.h │ │ ├── point_d_vector.h │ │ ├── point_d_vector_test.cc │ │ ├── points_sequencer.h │ │ ├── prediction_schemes │ │ │ ├── mesh_prediction_scheme_constrained_multi_parallelogram_decoder.h │ │ │ ├── mesh_prediction_scheme_constrained_multi_parallelogram_encoder.h │ │ │ ├── mesh_prediction_scheme_constrained_multi_parallelogram_shared.h │ │ │ ├── mesh_prediction_scheme_data.h │ │ │ ├── mesh_prediction_scheme_decoder.h │ │ │ ├── mesh_prediction_scheme_encoder.h │ │ │ ├── mesh_prediction_scheme_geometric_normal_decoder.h │ │ │ ├── mesh_prediction_scheme_geometric_normal_encoder.h │ │ │ ├── mesh_prediction_scheme_geometric_normal_predictor_area.h │ │ │ ├── mesh_prediction_scheme_geometric_normal_predictor_base.h │ │ │ ├── mesh_prediction_scheme_multi_parallelogram_decoder.h │ │ │ ├── mesh_prediction_scheme_multi_parallelogram_encoder.h │ │ │ ├── mesh_prediction_scheme_parallelogram_decoder.h │ │ │ ├── mesh_prediction_scheme_parallelogram_encoder.h │ │ │ ├── mesh_prediction_scheme_parallelogram_shared.h │ │ │ ├── mesh_prediction_scheme_tex_coords_decoder.h │ │ │ ├── mesh_prediction_scheme_tex_coords_encoder.h │ │ │ ├── mesh_prediction_scheme_tex_coords_portable_decoder.h │ │ │ ├── mesh_prediction_scheme_tex_coords_portable_encoder.h │ │ │ ├── mesh_prediction_scheme_tex_coords_portable_predictor.h │ │ │ ├── prediction_scheme_decoder.h │ │ │ ├── prediction_scheme_decoder_factory.h │ │ │ ├── prediction_scheme_decoder_interface.h │ │ │ ├── prediction_scheme_decoding_transform.h │ │ │ ├── prediction_scheme_delta_decoder.h │ │ │ ├── prediction_scheme_delta_encoder.h │ │ │ ├── prediction_scheme_encoder.h │ │ │ ├── prediction_scheme_encoder_factory.cc │ │ │ ├── prediction_scheme_encoder_factory.h │ │ │ ├── prediction_scheme_encoder_interface.h │ │ │ ├── prediction_scheme_encoding_transform.h │ │ │ ├── prediction_scheme_factory.h │ │ │ ├── prediction_scheme_interface.h │ │ │ ├── prediction_scheme_normal_octahedron_canonicalized_decoding_transform.h │ │ │ ├── prediction_scheme_normal_octahedron_canonicalized_encoding_transform.h │ │ │ ├── prediction_scheme_normal_octahedron_canonicalized_transform_base.h │ │ │ ├── prediction_scheme_normal_octahedron_canonicalized_transform_test.cc │ │ │ ├── prediction_scheme_normal_octahedron_decoding_transform.h │ │ │ ├── prediction_scheme_normal_octahedron_encoding_transform.h │ │ │ ├── prediction_scheme_normal_octahedron_transform_base.h │ │ │ ├── prediction_scheme_normal_octahedron_transform_test.cc │ │ │ ├── prediction_scheme_wrap_decoding_transform.h │ │ │ ├── prediction_scheme_wrap_encoding_transform.h │ │ │ └── prediction_scheme_wrap_transform_base.h │ │ ├── sequential_attribute_decoder.cc │ │ ├── sequential_attribute_decoder.h │ │ ├── sequential_attribute_decoders_controller.cc │ │ ├── sequential_attribute_decoders_controller.h │ │ ├── sequential_attribute_encoder.cc │ │ ├── sequential_attribute_encoder.h │ │ ├── sequential_attribute_encoders_controller.cc │ │ ├── sequential_attribute_encoders_controller.h │ │ ├── sequential_integer_attribute_decoder.cc │ │ ├── sequential_integer_attribute_decoder.h │ │ ├── sequential_integer_attribute_encoder.cc │ │ ├── sequential_integer_attribute_encoder.h │ │ ├── sequential_integer_attribute_encoding_test.cc │ │ ├── sequential_normal_attribute_decoder.cc │ │ ├── sequential_normal_attribute_decoder.h │ │ ├── sequential_normal_attribute_encoder.cc │ │ ├── sequential_normal_attribute_encoder.h │ │ ├── sequential_quantization_attribute_decoder.cc │ │ ├── sequential_quantization_attribute_decoder.h │ │ ├── sequential_quantization_attribute_encoder.cc │ │ └── sequential_quantization_attribute_encoder.h │ ├── bit_coders │ │ ├── adaptive_rans_bit_coding_shared.h │ │ ├── adaptive_rans_bit_decoder.cc │ │ ├── adaptive_rans_bit_decoder.h │ │ ├── adaptive_rans_bit_encoder.cc │ │ ├── adaptive_rans_bit_encoder.h │ │ ├── direct_bit_decoder.cc │ │ ├── direct_bit_decoder.h │ │ ├── direct_bit_encoder.cc │ │ ├── direct_bit_encoder.h │ │ ├── folded_integer_bit_decoder.h │ │ ├── folded_integer_bit_encoder.h │ │ ├── rans_bit_decoder.cc │ │ ├── rans_bit_decoder.h │ │ ├── rans_bit_encoder.cc │ │ ├── rans_bit_encoder.h │ │ ├── rans_coding_test.cc │ │ ├── symbol_bit_decoder.cc │ │ ├── symbol_bit_decoder.h │ │ ├── symbol_bit_encoder.cc │ │ └── symbol_bit_encoder.h │ ├── config │ │ ├── compression_shared.h │ │ ├── decoder_options.h │ │ ├── decoder_options_test.cc │ │ ├── draco_options.h │ │ ├── encoder_options.h │ │ └── encoding_features.h │ ├── decode.cc │ ├── decode.h │ ├── decode_test.cc │ ├── draco_compression_options.cc │ ├── draco_compression_options.h │ ├── draco_compression_options_test.cc │ ├── encode.cc │ ├── encode.h │ ├── encode_base.h │ ├── encode_test.cc │ ├── entropy │ │ ├── ans.h │ │ ├── rans_symbol_coding.h │ │ ├── rans_symbol_decoder.h │ │ ├── rans_symbol_encoder.h │ │ ├── shannon_entropy.cc │ │ ├── shannon_entropy.h │ │ ├── shannon_entropy_test.cc │ │ ├── symbol_coding_test.cc │ │ ├── symbol_decoding.cc │ │ ├── symbol_decoding.h │ │ ├── symbol_encoding.cc │ │ └── symbol_encoding.h │ ├── expert_encode.cc │ ├── expert_encode.h │ ├── mesh │ │ ├── mesh_decoder.cc │ │ ├── mesh_decoder.h │ │ ├── mesh_edgebreaker_decoder.cc │ │ ├── mesh_edgebreaker_decoder.h │ │ ├── mesh_edgebreaker_decoder_impl.cc │ │ ├── mesh_edgebreaker_decoder_impl.h │ │ ├── mesh_edgebreaker_decoder_impl_interface.h │ │ ├── mesh_edgebreaker_encoder.cc │ │ ├── mesh_edgebreaker_encoder.h │ │ ├── mesh_edgebreaker_encoder_impl.cc │ │ ├── mesh_edgebreaker_encoder_impl.h │ │ ├── mesh_edgebreaker_encoder_impl_interface.h │ │ ├── mesh_edgebreaker_encoding_test.cc │ │ ├── mesh_edgebreaker_shared.h │ │ ├── mesh_edgebreaker_traversal_decoder.h │ │ ├── mesh_edgebreaker_traversal_encoder.h │ │ ├── mesh_edgebreaker_traversal_predictive_decoder.h │ │ ├── mesh_edgebreaker_traversal_predictive_encoder.h │ │ ├── mesh_edgebreaker_traversal_valence_decoder.h │ │ ├── mesh_edgebreaker_traversal_valence_encoder.h │ │ ├── mesh_encoder.cc │ │ ├── mesh_encoder.h │ │ ├── mesh_encoder_test.cc │ │ ├── mesh_sequential_decoder.cc │ │ ├── mesh_sequential_decoder.h │ │ ├── mesh_sequential_encoder.cc │ │ ├── mesh_sequential_encoder.h │ │ └── traverser │ │ │ ├── depth_first_traverser.h │ │ │ ├── max_prediction_degree_traverser.h │ │ │ ├── mesh_attribute_indices_encoding_observer.h │ │ │ ├── mesh_traversal_sequencer.h │ │ │ └── traverser_base.h │ └── point_cloud │ │ ├── algorithms │ │ ├── dynamic_integer_points_kd_tree_decoder.cc │ │ ├── dynamic_integer_points_kd_tree_decoder.h │ │ ├── dynamic_integer_points_kd_tree_encoder.cc │ │ ├── dynamic_integer_points_kd_tree_encoder.h │ │ ├── float_points_tree_decoder.cc │ │ ├── float_points_tree_decoder.h │ │ ├── float_points_tree_encoder.cc │ │ ├── float_points_tree_encoder.h │ │ ├── integer_points_kd_tree_decoder.cc │ │ ├── integer_points_kd_tree_decoder.h │ │ ├── integer_points_kd_tree_encoder.cc │ │ ├── integer_points_kd_tree_encoder.h │ │ ├── point_cloud_compression_method.h │ │ ├── point_cloud_types.h │ │ ├── quantize_points_3.h │ │ └── queuing_policy.h │ │ ├── point_cloud_decoder.cc │ │ ├── point_cloud_decoder.h │ │ ├── point_cloud_encoder.cc │ │ ├── point_cloud_encoder.h │ │ ├── point_cloud_kd_tree_decoder.cc │ │ ├── point_cloud_kd_tree_decoder.h │ │ ├── point_cloud_kd_tree_encoder.cc │ │ ├── point_cloud_kd_tree_encoder.h │ │ ├── point_cloud_kd_tree_encoding_test.cc │ │ ├── point_cloud_sequential_decoder.cc │ │ ├── point_cloud_sequential_decoder.h │ │ ├── point_cloud_sequential_encoder.cc │ │ ├── point_cloud_sequential_encoder.h │ │ └── point_cloud_sequential_encoding_test.cc │ ├── core │ ├── bit_utils.cc │ ├── bit_utils.h │ ├── bounding_box.cc │ ├── bounding_box.h │ ├── buffer_bit_coding_test.cc │ ├── constants.h │ ├── cycle_timer.cc │ ├── cycle_timer.h │ ├── data_buffer.cc │ ├── data_buffer.h │ ├── decoder_buffer.cc │ ├── decoder_buffer.h │ ├── divide.cc │ ├── divide.h │ ├── draco_index_type.h │ ├── draco_index_type_vector.h │ ├── draco_test_base.h │ ├── draco_test_utils.cc │ ├── draco_test_utils.h │ ├── draco_types.cc │ ├── draco_types.h │ ├── draco_version.h │ ├── encoder_buffer.cc │ ├── encoder_buffer.h │ ├── hash_utils.cc │ ├── hash_utils.h │ ├── macros.h │ ├── math_utils.h │ ├── math_utils_test.cc │ ├── options.cc │ ├── options.h │ ├── quantization_utils.cc │ ├── quantization_utils.h │ ├── quantization_utils_test.cc │ ├── status.cc │ ├── status.h │ ├── status_or.h │ ├── status_test.cc │ ├── varint_decoding.h │ ├── varint_encoding.h │ ├── vector_d.h │ └── vector_d_test.cc │ ├── io │ ├── file_reader_factory.cc │ ├── file_reader_factory.h │ ├── file_reader_factory_test.cc │ ├── file_reader_interface.h │ ├── file_reader_test_common.h │ ├── file_utils.cc │ ├── file_utils.h │ ├── file_utils_test.cc │ ├── file_writer_factory.cc │ ├── file_writer_factory.h │ ├── file_writer_factory_test.cc │ ├── file_writer_interface.h │ ├── file_writer_utils.cc │ ├── file_writer_utils.h │ ├── file_writer_utils_test.cc │ ├── gltf_decoder.cc │ ├── gltf_decoder.h │ ├── gltf_decoder_test.cc │ ├── gltf_encoder.cc │ ├── gltf_encoder.h │ ├── gltf_encoder_test.cc │ ├── gltf_test_helper.cc │ ├── gltf_test_helper.h │ ├── gltf_utils.cc │ ├── gltf_utils.h │ ├── gltf_utils_test.cc │ ├── image_compression_options.h │ ├── mesh_io.cc │ ├── mesh_io.h │ ├── obj_decoder.cc │ ├── obj_decoder.h │ ├── obj_decoder_test.cc │ ├── obj_encoder.cc │ ├── obj_encoder.h │ ├── obj_encoder_test.cc │ ├── parser_utils.cc │ ├── parser_utils.h │ ├── ply_decoder.cc │ ├── ply_decoder.h │ ├── ply_decoder_test.cc │ ├── ply_encoder.cc │ ├── ply_encoder.h │ ├── ply_property_reader.h │ ├── ply_property_writer.h │ ├── ply_reader.cc │ ├── ply_reader.h │ ├── ply_reader_test.cc │ ├── point_cloud_io.cc │ ├── point_cloud_io.h │ ├── point_cloud_io_test.cc │ ├── scene_io.cc │ ├── scene_io.h │ ├── scene_io_test.cc │ ├── stdio_file_reader.cc │ ├── stdio_file_reader.h │ ├── stdio_file_reader_test.cc │ ├── stdio_file_writer.cc │ ├── stdio_file_writer.h │ ├── stdio_file_writer_test.cc │ ├── stl_decoder.cc │ ├── stl_decoder.h │ ├── stl_decoder_test.cc │ ├── stl_encoder.cc │ ├── stl_encoder.h │ ├── stl_encoder_test.cc │ ├── texture_io.cc │ ├── texture_io.h │ ├── texture_io_test.cc │ ├── tiny_gltf_utils.cc │ └── tiny_gltf_utils.h │ ├── javascript │ └── emscripten │ │ ├── decoder_functions.js │ │ ├── decoder_webidl_wrapper.cc │ │ ├── decoder_webidl_wrapper.h │ │ ├── draco_decoder_glue_wrapper.cc │ │ ├── draco_encoder_glue_wrapper.cc │ │ ├── draco_web_decoder.idl │ │ ├── draco_web_encoder.idl │ │ ├── encoder_webidl_wrapper.cc │ │ ├── encoder_webidl_wrapper.h │ │ ├── finalize.js │ │ ├── prepareCallbacks.js │ │ └── version.js │ ├── material │ ├── material.cc │ ├── material.h │ ├── material_library.cc │ ├── material_library.h │ ├── material_library_test.cc │ ├── material_test.cc │ ├── material_utils.cc │ ├── material_utils.h │ └── material_utils_test.cc │ ├── maya │ ├── draco_maya_plugin.cc │ └── draco_maya_plugin.h │ ├── mesh │ ├── corner_table.cc │ ├── corner_table.h │ ├── corner_table_iterators.h │ ├── corner_table_test.cc │ ├── mesh.cc │ ├── mesh.h │ ├── mesh_are_equivalent.cc │ ├── mesh_are_equivalent.h │ ├── mesh_are_equivalent_test.cc │ ├── mesh_attribute_corner_table.cc │ ├── mesh_attribute_corner_table.h │ ├── mesh_cleanup.cc │ ├── mesh_cleanup.h │ ├── mesh_cleanup_test.cc │ ├── mesh_connected_components.h │ ├── mesh_features.cc │ ├── mesh_features.h │ ├── mesh_features_test.cc │ ├── mesh_indices.h │ ├── mesh_misc_functions.cc │ ├── mesh_misc_functions.h │ ├── mesh_splitter.cc │ ├── mesh_splitter.h │ ├── mesh_splitter_test.cc │ ├── mesh_stripifier.cc │ ├── mesh_stripifier.h │ ├── mesh_test.cc │ ├── mesh_utils.cc │ ├── mesh_utils.h │ ├── mesh_utils_test.cc │ ├── triangle_soup_mesh_builder.cc │ ├── triangle_soup_mesh_builder.h │ ├── triangle_soup_mesh_builder_test.cc │ └── valence_cache.h │ ├── metadata │ ├── geometry_metadata.cc │ ├── geometry_metadata.h │ ├── metadata.cc │ ├── metadata.h │ ├── metadata_decoder.cc │ ├── metadata_decoder.h │ ├── metadata_encoder.cc │ ├── metadata_encoder.h │ ├── metadata_encoder_test.cc │ ├── metadata_test.cc │ ├── property_attribute.cc │ ├── property_attribute.h │ ├── property_attribute_test.cc │ ├── property_table.cc │ ├── property_table.h │ ├── property_table_test.cc │ ├── structural_metadata.cc │ ├── structural_metadata.h │ ├── structural_metadata_schema.cc │ ├── structural_metadata_schema.h │ ├── structural_metadata_schema_test.cc │ └── structural_metadata_test.cc │ ├── point_cloud │ ├── point_cloud.cc │ ├── point_cloud.h │ ├── point_cloud_builder.cc │ ├── point_cloud_builder.h │ ├── point_cloud_builder_test.cc │ └── point_cloud_test.cc │ ├── scene │ ├── instance_array.cc │ ├── instance_array.h │ ├── instance_array_test.cc │ ├── light.cc │ ├── light.h │ ├── light_test.cc │ ├── mesh_group.h │ ├── mesh_group_test.cc │ ├── scene.cc │ ├── scene.h │ ├── scene_are_equivalent.cc │ ├── scene_are_equivalent.h │ ├── scene_are_equivalent_test.cc │ ├── scene_indices.h │ ├── scene_node.h │ ├── scene_test.cc │ ├── scene_utils.cc │ ├── scene_utils.h │ ├── scene_utils_test.cc │ ├── trs_matrix.cc │ ├── trs_matrix.h │ └── trs_matrix_test.cc │ ├── texture │ ├── source_image.cc │ ├── source_image.h │ ├── texture.h │ ├── texture_library.cc │ ├── texture_library.h │ ├── texture_library_test.cc │ ├── texture_map.cc │ ├── texture_map.h │ ├── texture_map_test.cc │ ├── texture_transform.cc │ ├── texture_transform.h │ ├── texture_transform_test.cc │ ├── texture_utils.cc │ ├── texture_utils.h │ └── texture_utils_test.cc │ ├── tools │ ├── draco_decoder.cc │ ├── draco_encoder.cc │ ├── draco_transcoder.cc │ ├── draco_transcoder_lib.cc │ ├── draco_transcoder_lib.h │ ├── draco_transcoder_lib_test.cc │ ├── fuzz │ │ ├── build.sh │ │ ├── draco_mesh_decoder_fuzzer.cc │ │ ├── draco_mesh_decoder_without_dequantization_fuzzer.cc │ │ ├── draco_pc_decoder_fuzzer.cc │ │ └── draco_pc_decoder_without_dequantization_fuzzer.cc │ └── install_test │ │ ├── CMakeLists.txt │ │ ├── main.cc │ │ └── test.py │ └── unity │ ├── draco_unity_plugin.cc │ ├── draco_unity_plugin.h │ └── draco_unity_plugin_test.cc ├── testdata ├── Box.ply ├── Box │ ├── glTF │ │ ├── Box.gltf │ │ └── Box0.bin │ └── glTF_Binary │ │ ├── Box.glb │ │ └── Box_Draco.glb ├── BoxMeta │ └── glTF │ │ ├── BoxMeta.gltf │ │ ├── Texture0_MeshFeatures.png │ │ ├── Texture1_MeshFeatures.png │ │ └── buffer0.bin ├── BoxMetaDraco │ └── glTF │ │ ├── BoxMetaDraco.gltf │ │ ├── Texture0_MeshFeatures.png │ │ ├── Texture1_MeshFeatures.png │ │ └── buffer0.bin ├── BoxesMeta │ └── glTF │ │ ├── BoxesMeta.gltf │ │ ├── Texture0_MeshFeatures.png │ │ ├── Texture1_MeshFeatures.png │ │ └── buffer0.bin ├── CesiumMan │ ├── glTF │ │ ├── CesiumMan.gltf │ │ ├── CesiumMan.jpg │ │ └── CesiumMan0.bin │ └── glTF_Binary │ │ └── CesiumMan.glb ├── CesiumMilkTruck │ └── glTF │ │ ├── CesiumMilkTruck.gltf │ │ ├── CesiumMilkTruck.png │ │ └── CesiumMilkTruck0.bin ├── CubeScaledInstances │ └── glTF │ │ ├── buffer0.bin │ │ └── cube_att.gltf ├── DuplicateMeshes │ ├── Texture0_BaseColor.png │ ├── Texture0_Normal.png │ ├── buffer0.bin │ └── duplicate_meshes.gltf ├── Fox │ └── glTF │ │ ├── Fox.bin │ │ ├── Fox.gltf │ │ └── Texture.png ├── InterpolationTest │ └── glTF │ │ ├── InterpolationTest.gltf │ │ ├── interpolation.bin │ │ └── l.jpg ├── KhronosSampleModels │ ├── AnimatedMorphCube │ │ └── glTF │ │ │ ├── AnimatedMorphCube.bin │ │ │ └── AnimatedMorphCube.gltf │ ├── DragonAttenuation │ │ ├── glTF │ │ │ ├── DragonAttenuation.bin │ │ │ ├── DragonAttenuation.gltf │ │ │ ├── Dragon_ThicknessMap.jpg │ │ │ └── checkerboard.jpg │ │ └── glTF_Binary │ │ │ └── DragonAttenuation.glb │ ├── Duck │ │ ├── glTF │ │ │ ├── Duck.gltf │ │ │ ├── Duck0.bin │ │ │ └── DuckCM.png │ │ └── glTF_Binary │ │ │ └── Duck.glb │ ├── SheenCloth │ │ ├── glTF │ │ │ ├── SheenCloth.bin │ │ │ ├── SheenCloth.gltf │ │ │ ├── technicalFabricSmall_basecolor_256.png │ │ │ ├── technicalFabricSmall_normal_256.png │ │ │ ├── technicalFabricSmall_orm_256.png │ │ │ └── technicalFabricSmall_sheen_256.png │ │ └── glTF_Binary │ │ │ └── SheenCloth.glb │ ├── SimpleSparseAccessor │ │ └── glTF │ │ │ ├── SimpleSparseAccessor.bin │ │ │ └── SimpleSparseAccessor.gltf │ ├── SpecGlossVsMetalRough │ │ └── glTF │ │ │ ├── SpecGlossVsMetalRough.gltf │ │ │ ├── SpecGlossVsMetalRough.png │ │ │ ├── SpecGlossVsMetalRoughLabel.bin │ │ │ ├── WaterBottle.bin │ │ │ ├── WaterBottle_baseColor.png │ │ │ ├── WaterBottle_diffuse.png │ │ │ ├── WaterBottle_emissive.png │ │ │ ├── WaterBottle_normal.png │ │ │ ├── WaterBottle_occlusion.png │ │ │ ├── WaterBottle_roughnessMetallic.png │ │ │ └── WaterBottle_specularGlossiness.png │ ├── TextureSettingsTest │ │ └── glTF │ │ │ ├── CheckAndX.png │ │ │ ├── CheckAndX_V.png │ │ │ ├── TextureSettingsTest.gltf │ │ │ ├── TextureSettingsTest0.bin │ │ │ └── TextureTestLabels.png │ ├── TextureTransformTest │ │ └── glTF │ │ │ ├── Arrow.png │ │ │ ├── Correct.png │ │ │ ├── Error.png │ │ │ ├── NotSupported.png │ │ │ ├── TextureTransformTest.bin │ │ │ ├── TextureTransformTest.gltf │ │ │ └── UV.png │ └── UnlitTest │ │ └── glTF │ │ ├── UnlitTest.bin │ │ └── UnlitTest.gltf ├── Lantern │ └── glTF │ │ ├── Lantern.bin │ │ ├── Lantern.gltf │ │ ├── Lantern_baseColor.png │ │ ├── Lantern_emissive.png │ │ ├── Lantern_normal.png │ │ └── Lantern_roughnessMetallic.png ├── MultiUVTest │ └── glTF │ │ ├── MultiUVTest.bin │ │ ├── MultiUVTest.gltf │ │ ├── uv0.png │ │ └── uv1.png ├── STL │ ├── bunny.stl │ ├── test_sphere.stl │ └── test_sphere_ascii.stl ├── SphereAllSame │ ├── 256x256_all_blue.png │ ├── 256x256_all_green.png │ ├── 256x256_all_orange.png │ ├── 256x256_all_red.png │ ├── buffer0.bin │ └── sphere_texture_all.gltf ├── SphereTwoMaterials │ ├── Texture0_BaseColor.png │ ├── Texture0_Normal.png │ ├── buffer0.bin │ ├── sphere_two_materials_mesh_and_point_cloud.gltf │ └── sphere_two_materials_point_cloud.gltf ├── SphereWithCircleTexture │ ├── sphere_with_circle_texture.bin │ ├── sphere_with_circle_texture.gltf │ └── test_color.png ├── SpheresScaledInstances │ └── glTF │ │ ├── buffer0.bin │ │ └── spheres_scaled_instances.gltf ├── Triangle │ └── glTF │ │ ├── Triangle.gltf │ │ ├── Triangle_identity_matrix.gltf │ │ ├── Triangle_translation_only_matrix.gltf │ │ └── simpleTriangle.bin ├── TwoSidedPlane │ └── glTF │ │ ├── TwoSidedPlane.bin │ │ ├── TwoSidedPlane.gltf │ │ ├── TwoSidedPlane_BaseColor.png │ │ ├── TwoSidedPlane_MetallicRoughness.png │ │ └── TwoSidedPlane_Normal.png ├── UnlitWithFallback │ ├── one_material_all_fallback │ │ ├── BoxTextured0.bin │ │ ├── CesiumLogoFlat.png │ │ └── one_material_all_fallback.gltf │ ├── three_materials_all_fallback │ │ ├── Texture0_BaseColor.png │ │ ├── semicube.bin │ │ ├── sphere_text.png │ │ └── three_materials_all_fallback.gltf │ └── three_materials_one_fallback │ │ ├── Texture0_BaseColor.png │ │ ├── semicube.bin │ │ ├── sphere_text.png │ │ └── three_materials_one_fallback.gltf ├── UnusedTexCoords │ ├── MultiUVTest.bin │ ├── MultiUVTest.gltf │ ├── NoTextures.gltf │ ├── TexCoord0InvalidTexCoord1Valid.gltf │ ├── TexCoord0ValidTexCoord1Invalid.gltf │ ├── TexCoord2.gltf │ ├── uv0.png │ └── uv1.png ├── VertexColorTest │ └── glTF │ │ ├── VertexColorChecks.png │ │ ├── VertexColorTest.bin │ │ ├── VertexColorTest.gltf │ │ └── VertexColorTestLabels.png ├── ZeroLengthBufferView │ ├── ZeroLengthBufferView.bin │ └── ZeroLengthBufferView.gltf ├── bun_zipper.ply ├── bunny_gltf.drc ├── bunny_norm.obj ├── car.drc ├── cube_att.drc ├── cube_att.obj ├── cube_att.obj.edgebreaker.cl10.2.2.drc ├── cube_att.obj.edgebreaker.cl4.2.2.drc ├── cube_att.obj.sequential.cl3.2.2.drc ├── cube_att.ply ├── cube_att_partial.obj ├── cube_att_sub_o.obj ├── cube_att_sub_o_2.drc ├── cube_att_sub_o_2.obj ├── cube_att_sub_o_no_metadata.drc ├── cube_pc.drc ├── cube_quads.obj ├── cube_quads.ply ├── cube_subd.obj ├── deg_faces.obj ├── degenerate_mesh.obj ├── delim_test.ply ├── empty_name.obj ├── eof_test.obj ├── extra_vertex.obj ├── float_inf_point_cloud.ply ├── float_two_att_point_cloud.ply ├── glTF │ ├── KhrTextureTransformWithFallback │ │ ├── KhrTextureTransformWithFallback.gltf │ │ ├── MultiUVTest.bin │ │ ├── uv0.png │ │ └── uv1.png │ └── TextureTransformTestWithRequired │ │ ├── Arrow.png │ │ ├── Correct.png │ │ ├── Error.png │ │ ├── NotSupported.png │ │ ├── TextureTransformTest.bin │ │ ├── TextureTransformTestWithRequired.gltf │ │ └── UV.png ├── inf_nan.obj ├── int_point_cloud.ply ├── mat_test.mtl ├── mat_test.obj ├── multiple_isolated_triangles.obj ├── multiple_tetrahedrons.obj ├── non_manifold_wrap.obj ├── octagon.obj ├── octagon_preserved.drc ├── octagon_preserved.obj ├── one_face_123.gltf ├── one_face_123.obj ├── one_face_123_buffer0.bin ├── one_face_123_mirror.gltf ├── one_face_123_translated.gltf ├── one_face_312.obj ├── one_face_321.obj ├── pbr_next │ └── sphere │ │ └── glTF │ │ ├── sphere.gltf │ │ ├── sphere_buffer0.bin │ │ ├── texture_BaseColor.png │ │ ├── texture_Clearcoat.png │ │ ├── texture_ClearcoatNormal.jpg │ │ ├── texture_ClearcoatRoughness.png │ │ ├── texture_Normal.png │ │ ├── texture_SheenColor.png │ │ ├── texture_SheenRoughness.png │ │ ├── texture_Specular.png │ │ ├── texture_SpecularColor.png │ │ ├── texture_Thickness.jpg │ │ └── texture_Transmission.jpg ├── pc_color.drc ├── pc_kd_color.drc ├── point_cloud_no_qp.drc ├── point_cloud_test_pos.obj ├── point_cloud_test_pos.ply ├── point_cloud_test_pos_norm.obj ├── point_cloud_test_pos_norm.ply ├── simple_skin.gltf ├── sphere.gltf ├── sphere.obj ├── sphere_Texture0_Normal.png ├── sphere_Texture1_BaseColor.png ├── sphere_buffer0.bin ├── sphere_lights.gltf ├── sphere_no_tangents.gltf ├── sphere_two_tex_coords.gltf ├── test.png ├── test_extra_whitespace.ply ├── test_generic.ply ├── test_generic_golden.bin ├── test_lines.obj ├── test_more_datatypes.ply ├── test_nm.obj ├── test_nm.obj.edgebreaker.0.10.0.drc ├── test_nm.obj.edgebreaker.0.9.1.drc ├── test_nm.obj.edgebreaker.1.0.0.drc ├── test_nm.obj.edgebreaker.1.1.0.drc ├── test_nm.obj.edgebreaker.cl10.2.2.drc ├── test_nm.obj.edgebreaker.cl4.2.2.drc ├── test_nm.obj.sequential.0.10.0.drc ├── test_nm.obj.sequential.0.9.1.drc ├── test_nm.obj.sequential.1.0.0.drc ├── test_nm.obj.sequential.1.1.0.drc ├── test_nm.obj.sequential.cl3.2.2.drc ├── test_nm_quant.0.9.0.drc ├── test_nm_trans.obj ├── test_pos_color.gltf ├── test_pos_color.ply ├── test_pos_color_ascii.ply ├── test_pos_color_buffer0.bin ├── test_sphere.obj ├── test_wrong_attribute_mapping.obj ├── this_is_png.jpg ├── three_faces_123.obj ├── three_faces_312.obj ├── three_meshes_two_materials_one_no_material │ ├── Texture0_BaseColor.png │ ├── semicube.bin │ ├── sphere_text.png │ └── three_meshes_two_materials_one_no_material.gltf ├── trailing_zero.jpg ├── triangle.obj ├── triangle_with_degenerate_tex_coords.obj ├── two_faces_123.obj ├── two_faces_312.obj ├── two_objects_inverse_materials.bin └── two_objects_inverse_materials.gltf └── unity ├── BUILDING.md ├── DracoDecodingObject.cs ├── DracoMeshLoader.cs ├── Editor └── DracoFileImporter.cs ├── Plugin ├── libdracodec_unity_android.tar.bz ├── libdracodec_unity_ios.tar.bz ├── libdracodec_unity_macos.tar.bz └── libdracodec_unity_windows.tar.bz ├── README.md └── Resources └── bunny.drc.bytes /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | BasedOnStyle: Google 4 | PointerAlignment: Right 5 | ... 6 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.obj eol=lf -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 2 | 3 | version: 2 4 | updates: 5 | - package-ecosystem: "bundler" 6 | directory: "/docs" 7 | schedule: 8 | interval: "monthly" 9 | groups: 10 | doc-gems-security: 11 | applies-to: "security-updates" 12 | patterns: 13 | - "*" 14 | commit-message: 15 | include: "scope" 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | docs/_site 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "third_party/googletest"] 2 | path = third_party/googletest 3 | url = https://github.com/google/googletest.git 4 | [submodule "third_party/eigen"] 5 | path = third_party/eigen 6 | url = https://gitlab.com/libeigen/eigen.git 7 | [submodule "third_party/tinygltf"] 8 | path = third_party/tinygltf 9 | url = https://github.com/syoyo/tinygltf.git 10 | [submodule "third_party/filesystem"] 11 | path = third_party/filesystem 12 | url = https://github.com/gulrak/filesystem 13 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the list of Draco authors for copyright purposes. 2 | # 3 | # This does not necessarily list everyone who has contributed code, since in 4 | # some cases, their employer may be the copyright holder. To see the full list 5 | # of contributors, see the revision history in source control. 6 | Google Inc. 7 | and other contributors 8 | -------------------------------------------------------------------------------- /cmake/draco-config.cmake.template: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | include("${CMAKE_CURRENT_LIST_DIR}/draco-targets.cmake") 4 | -------------------------------------------------------------------------------- /cmake/draco.pc.template: -------------------------------------------------------------------------------- 1 | Name: @PROJECT_NAME@ 2 | Description: Draco geometry de(com)pression library. 3 | Version: @DRACO_VERSION@ 4 | Cflags: -I@includes_path@ 5 | Libs: -L@libs_path@ -ldraco 6 | Libs.private: @CMAKE_THREAD_LIBS_INIT@ 7 | -------------------------------------------------------------------------------- /cmake/draco_test_config.h.cmake: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Draco Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef DRACO_TESTING_DRACO_TEST_CONFIG_H_ 16 | #define DRACO_TESTING_DRACO_TEST_CONFIG_H_ 17 | 18 | // If this file is named draco_test_config.h.cmake: 19 | // This file is used as input at cmake generation time. 20 | 21 | // If this file is named draco_test_config.h: 22 | // GENERATED FILE, DO NOT EDIT. SEE ABOVE. 23 | 24 | #define DRACO_TEST_DATA_DIR "${DRACO_TEST_DATA_DIR}" 25 | #define DRACO_TEST_TEMP_DIR "${DRACO_TEST_TEMP_DIR}" 26 | #define DRACO_TEST_ROOT_DIR "${DRACO_TEST_ROOT_DIR}" 27 | 28 | #endif // DRACO_TESTING_DRACO_TEST_CONFIG_H_ 29 | -------------------------------------------------------------------------------- /cmake/toolchains/aarch64-linux-gnu.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Draco Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | # use this file except in compliance with the License. You may obtain a copy of 5 | # the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | if(DRACO_CMAKE_TOOLCHAINS_AARCH64_LINUX_GNU_CMAKE_) 16 | return() 17 | endif() # DRACO_CMAKE_TOOLCHAINS_AARCH64_LINUX_GNU_CMAKE_ 18 | set(DRACO_CMAKE_TOOLCHAINS_AARCH64_LINUX_GNU_CMAKE_ 1) 19 | 20 | set(CMAKE_SYSTEM_NAME "Linux") 21 | 22 | if("${CROSS}" STREQUAL "") 23 | set(CROSS aarch64-linux-gnu-) 24 | endif() 25 | 26 | set(CMAKE_CXX_COMPILER ${CROSS}g++) 27 | set(CMAKE_CXX_FLAGS_INIT "-march=armv8-a") 28 | set(CMAKE_SYSTEM_PROCESSOR "aarch64") 29 | -------------------------------------------------------------------------------- /cmake/toolchains/android-ndk-common.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Draco Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | # use this file except in compliance with the License. You may obtain a copy of 5 | # the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | if(DRACO_CMAKE_TOOLCHAINS_ANDROID_NDK_COMMON_CMAKE_) 16 | return() 17 | endif() 18 | set(DRACO_CMAKE_TOOLCHAINS_ANDROID_NDK_COMMON_CMAKE_ 1) 19 | 20 | # Toolchain files do not have access to cached variables: 21 | # https://gitlab.kitware.com/cmake/cmake/issues/16170. Set an intermediate 22 | # environment variable when loaded the first time. 23 | if(DRACO_ANDROID_NDK_PATH) 24 | set(ENV{DRACO_ANDROID_NDK_PATH} "${DRACO_ANDROID_NDK_PATH}") 25 | else() 26 | set(DRACO_ANDROID_NDK_PATH "$ENV{DRACO_ANDROID_NDK_PATH}") 27 | endif() 28 | 29 | set(CMAKE_SYSTEM_NAME Android) 30 | 31 | if(NOT CMAKE_ANDROID_STL_TYPE) 32 | set(CMAKE_ANDROID_STL_TYPE c++_static) 33 | endif() 34 | 35 | if(NOT CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION) 36 | set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang) 37 | endif() 38 | -------------------------------------------------------------------------------- /cmake/toolchains/arm-ios-common.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Draco Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | # use this file except in compliance with the License. You may obtain a copy of 5 | # the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | if(DRACO_CMAKE_TOOLCHAINS_ARM_IOS_COMMON_CMAKE_) 16 | return() 17 | endif() 18 | set(DRACO_CMAKE_ARM_IOS_COMMON_CMAKE_ 1) 19 | 20 | set(CMAKE_SYSTEM_NAME "Darwin") 21 | if(CMAKE_OSX_SDK) 22 | set(CMAKE_OSX_SYSROOT ${CMAKE_OSX_SDK}) 23 | else() 24 | set(CMAKE_OSX_SYSROOT iphoneos) 25 | endif() 26 | set(CMAKE_C_COMPILER clang) 27 | set(CMAKE_C_COMPILER_ARG1 "-arch ${CMAKE_SYSTEM_PROCESSOR}") 28 | set(CMAKE_CXX_COMPILER clang++) 29 | set(CMAKE_CXX_COMPILER_ARG1 "-arch ${CMAKE_SYSTEM_PROCESSOR}") 30 | -------------------------------------------------------------------------------- /cmake/toolchains/arm-linux-gnueabihf.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Draco Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | # use this file except in compliance with the License. You may obtain a copy of 5 | # the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | if(DRACO_CMAKE_TOOLCHAINS_ARM_LINUX_GNUEABIHF_CMAKE_) 16 | return() 17 | endif() # DRACO_CMAKE_TOOLCHAINS_ARM_LINUX_GNUEABIHF_CMAKE_ 18 | set(DRACO_CMAKE_TOOLCHAINS_ARM_LINUX_GNUEABIHF_CMAKE_ 1) 19 | 20 | set(CMAKE_SYSTEM_NAME "Linux") 21 | 22 | if("${CROSS}" STREQUAL "") 23 | set(CROSS arm-linux-gnueabihf-) 24 | endif() 25 | 26 | set(CMAKE_CXX_COMPILER ${CROSS}g++) 27 | set(CMAKE_CXX_FLAGS_INIT "-march=armv7-a -marm") 28 | set(CMAKE_SYSTEM_PROCESSOR "armv7") 29 | set(DRACO_NEON_INTRINSICS_FLAG "-mfpu=neon") 30 | -------------------------------------------------------------------------------- /cmake/toolchains/arm64-android-ndk-libcpp.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Draco Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | # use this file except in compliance with the License. You may obtain a copy of 5 | # the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | if(DRACO_CMAKE_TOOLCHAINS_ARM64_ANDROID_NDK_LIBCPP_CMAKE_) 16 | return() 17 | endif() 18 | set(DRACO_CMAKE_TOOLCHAINS_ARM64_ANDROID_NDK_LIBCPP_CMAKE_ 1) 19 | 20 | include("${CMAKE_CURRENT_LIST_DIR}/android-ndk-common.cmake") 21 | 22 | if(NOT ANDROID_PLATFORM) 23 | set(ANROID_PLATFORM android-21) 24 | endif() 25 | 26 | if(NOT ANDROID_ABI) 27 | set(ANDROID_ABI arm64-v8a) 28 | endif() 29 | 30 | include("${DRACO_ANDROID_NDK_PATH}/build/cmake/android.toolchain.cmake") 31 | -------------------------------------------------------------------------------- /cmake/toolchains/arm64-ios.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Draco Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | # use this file except in compliance with the License. You may obtain a copy of 5 | # the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | if(DRACO_CMAKE_TOOLCHAINS_ARM64_IOS_CMAKE_) 16 | return() 17 | endif() 18 | set(DRACO_CMAKE_TOOLCHAINS_ARM64_IOS_CMAKE_ 1) 19 | 20 | if(XCODE) 21 | message(FATAL_ERROR "This toolchain does not support Xcode.") 22 | endif() 23 | 24 | set(CMAKE_SYSTEM_PROCESSOR "arm64") 25 | set(CMAKE_OSX_ARCHITECTURES "arm64") 26 | 27 | include("${CMAKE_CURRENT_LIST_DIR}/arm-ios-common.cmake") 28 | -------------------------------------------------------------------------------- /cmake/toolchains/arm64-linux-gcc.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Draco Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | # use this file except in compliance with the License. You may obtain a copy of 5 | # the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | if(DRACO_CMAKE_TOOLCHAINS_ARM64_LINUX_GCC_CMAKE_) 16 | return() 17 | endif() 18 | set(DRACO_CMAKE_TOOLCHAINS_ARM64_LINUX_GCC_CMAKE_ 1) 19 | 20 | set(CMAKE_SYSTEM_NAME "Linux") 21 | 22 | if("${CROSS}" STREQUAL "") 23 | # Default the cross compiler prefix to something known to work. 24 | set(CROSS aarch64-linux-gnu-) 25 | endif() 26 | 27 | set(CMAKE_C_COMPILER ${CROSS}gcc) 28 | set(CMAKE_CXX_COMPILER ${CROSS}g++) 29 | set(AS_EXECUTABLE ${CROSS}as) 30 | set(CMAKE_C_COMPILER_ARG1 "-march=armv8-a") 31 | set(CMAKE_CXX_COMPILER_ARG1 "-march=armv8-a") 32 | set(CMAKE_SYSTEM_PROCESSOR "arm64") 33 | -------------------------------------------------------------------------------- /cmake/toolchains/armv7-android-ndk-libcpp.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Draco Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | # use this file except in compliance with the License. You may obtain a copy of 5 | # the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | if(DRACO_CMAKE_TOOLCHAINS_ARMV7_ANDROID_NDK_LIBCPP_CMAKE_) 16 | return() 17 | endif() 18 | set(DRACO_CMAKE_TOOLCHAINS_ARMV7_ANDROID_NDK_LIBCPP_CMAKE_ 1) 19 | 20 | include("${CMAKE_CURRENT_LIST_DIR}/android-ndk-common.cmake") 21 | 22 | if(NOT ANDROID_PLATFORM) 23 | set(ANDROID_PLATFORM android-18) 24 | endif() 25 | 26 | if(NOT ANDROID_ABI) 27 | set(ANDROID_ABI armeabi-v7a) 28 | endif() 29 | 30 | include("${DRACO_ANDROID_NDK_PATH}/build/cmake/android.toolchain.cmake") 31 | -------------------------------------------------------------------------------- /cmake/toolchains/armv7-ios.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Draco Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | # use this file except in compliance with the License. You may obtain a copy of 5 | # the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | if(DRACO_CMAKE_TOOLCHAINS_ARMV7_IOS_CMAKE_) 16 | return() 17 | endif() 18 | set(DRACO_CMAKE_TOOLCHAINS_ARMV7_IOS_CMAKE_ 1) 19 | 20 | if(XCODE) 21 | message(FATAL_ERROR "This toolchain does not support Xcode.") 22 | endif() 23 | 24 | set(CMAKE_SYSTEM_PROCESSOR "armv7") 25 | set(CMAKE_OSX_ARCHITECTURES "armv7") 26 | 27 | include("${CMAKE_CURRENT_LIST_DIR}/arm-ios-common.cmake") 28 | -------------------------------------------------------------------------------- /cmake/toolchains/armv7-linux-gcc.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Draco Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | # use this file except in compliance with the License. You may obtain a copy of 5 | # the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | if(DRACO_CMAKE_TOOLCHAINS_ARMV7_LINUX_GCC_CMAKE_) 16 | return() 17 | endif() 18 | set(DRACO_CMAKE_TOOLCHAINS_ARMV7_LINUX_GCC_CMAKE_ 1) 19 | 20 | set(CMAKE_SYSTEM_NAME "Linux") 21 | 22 | if("${CROSS}" STREQUAL "") 23 | # Default the cross compiler prefix to something known to work. 24 | set(CROSS arm-linux-gnueabihf-) 25 | endif() 26 | 27 | if(NOT ${CROSS} MATCHES hf-$) 28 | set(DRACO_EXTRA_TOOLCHAIN_FLAGS "-mfloat-abi=softfp") 29 | endif() 30 | 31 | set(CMAKE_C_COMPILER ${CROSS}gcc) 32 | set(CMAKE_CXX_COMPILER ${CROSS}g++) 33 | set(AS_EXECUTABLE ${CROSS}as) 34 | set(CMAKE_C_COMPILER_ARG1 35 | "-march=armv7-a -mfpu=neon ${DRACO_EXTRA_TOOLCHAIN_FLAGS}") 36 | set(CMAKE_CXX_COMPILER_ARG1 37 | "-march=armv7-a -mfpu=neon ${DRACO_EXTRA_TOOLCHAIN_FLAGS}") 38 | set(CMAKE_SYSTEM_PROCESSOR "armv7") 39 | -------------------------------------------------------------------------------- /cmake/toolchains/armv7s-ios.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Draco Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | # use this file except in compliance with the License. You may obtain a copy of 5 | # the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | if(DRACO_CMAKE_TOOLCHAINS_ARMV7S_IOS_CMAKE_) 16 | return() 17 | endif() 18 | set(DRACO_CMAKE_TOOLCHAINS_ARMV7S_IOS_CMAKE_ 1) 19 | 20 | if(XCODE) 21 | message(FATAL_ERROR "This toolchain does not support Xcode.") 22 | endif() 23 | 24 | set(CMAKE_SYSTEM_PROCESSOR "armv7s") 25 | set(CMAKE_OSX_ARCHITECTURES "armv7s") 26 | 27 | include("${CMAKE_CURRENT_LIST_DIR}/arm-ios-common.cmake") 28 | -------------------------------------------------------------------------------- /cmake/toolchains/i386-ios.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Draco Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | # use this file except in compliance with the License. You may obtain a copy of 5 | # the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | if(DRACO_CMAKE_TOOLCHAINS_i386_IOS_CMAKE_) 16 | return() 17 | endif() 18 | set(DRACO_CMAKE_TOOLCHAINS_i386_IOS_CMAKE_ 1) 19 | 20 | if(XCODE) 21 | message(FATAL_ERROR "This toolchain does not support Xcode.") 22 | endif() 23 | 24 | set(CMAKE_SYSTEM_PROCESSOR "i386") 25 | set(CMAKE_OSX_ARCHITECTURES "i386") 26 | set(CMAKE_OSX_SDK "iphonesimulator") 27 | 28 | include("${CMAKE_CURRENT_LIST_DIR}/arm-ios-common.cmake") 29 | -------------------------------------------------------------------------------- /cmake/toolchains/x86-android-ndk-libcpp.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Draco Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | # use this file except in compliance with the License. You may obtain a copy of 5 | # the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | if(DRACO_CMAKE_TOOLCHAINS_X86_ANDROID_NDK_LIBCPP_CMAKE_) 16 | return() 17 | endif() 18 | set(DRACO_CMAKE_TOOLCHAINS_X86_ANDROID_NDK_LIBCPP_CMAKE_ 1) 19 | 20 | include("${CMAKE_CURRENT_LIST_DIR}/android-ndk-common.cmake") 21 | 22 | if(NOT ANDROID_PLATFORM) 23 | set(ANDROID_PLATFORM android-18) 24 | endif() 25 | 26 | if(NOT ANDROID_ABI) 27 | set(ANDROID_ABI x86) 28 | endif() 29 | 30 | include("${DRACO_ANDROID_NDK_PATH}/build/cmake/android.toolchain.cmake") 31 | -------------------------------------------------------------------------------- /cmake/toolchains/x86_64-android-ndk-libcpp.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Draco Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | # use this file except in compliance with the License. You may obtain a copy of 5 | # the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | if(DRACO_CMAKE_TOOLCHAINS_X86_64_ANDROID_NDK_LIBCPP_CMAKE_) 16 | return() 17 | endif() 18 | set(DRACO_CMAKE_TOOLCHAINS_X86_64_ANDROID_NDK_LIBCPP_CMAKE_ 1) 19 | 20 | include("${CMAKE_CURRENT_LIST_DIR}/android-ndk-common.cmake") 21 | 22 | if(NOT ANDROID_PLATFORM) 23 | set(ANDROID_PLATFORM android-21) 24 | endif() 25 | 26 | if(NOT ANDROID_ABI) 27 | set(ANDROID_ABI x86_64) 28 | endif() 29 | 30 | include("${DRACO_ANDROID_NDK_PATH}/build/cmake/android.toolchain.cmake") 31 | -------------------------------------------------------------------------------- /cmake/toolchains/x86_64-ios.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Draco Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | # use this file except in compliance with the License. You may obtain a copy of 5 | # the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | if(DRACO_CMAKE_TOOLCHAINS_X86_64_IOS_CMAKE_) 16 | return() 17 | endif() 18 | set(DRACO_CMAKE_TOOLCHAINS_X86_64_IOS_CMAKE_ 1) 19 | 20 | if(XCODE) 21 | message(FATAL_ERROR "This toolchain does not support Xcode.") 22 | endif() 23 | 24 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 25 | set(CMAKE_OSX_ARCHITECTURES "x86_64") 26 | set(CMAKE_OSX_SDK "iphonesimulator") 27 | 28 | include("${CMAKE_CURRENT_LIST_DIR}/arm-ios-common.cmake") 29 | -------------------------------------------------------------------------------- /docs/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.5.0 2 | -------------------------------------------------------------------------------- /docs/DracoLogo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/DracoLogo.jpeg -------------------------------------------------------------------------------- /docs/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | gem 'github-pages', group: :jekyll_plugins -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | # Welcome to Jekyll! 2 | # 3 | # This config file is meant for settings that affect your whole blog, values 4 | # which you are expected to set up once and rarely edit after that. If you find 5 | # yourself editing this file very often, consider using Jekyll's data files 6 | # feature for the data you need to update frequently. 7 | # 8 | # For technical reasons, this file is *NOT* reloaded automatically when you use 9 | # 'bundle exec jekyll serve'. If you change this file, please restart the server process. 10 | 11 | # Site settings 12 | # These are used to personalize your new site. If you look in the HTML files, 13 | # you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. 14 | # You can create any custom variable you would like, and they will be accessible 15 | # in the templates via {{ site.myvariable }}. 16 | title: Draco 3D Data Compression 17 | 18 | email: webmaster@webmproject.org 19 | description: > 20 | Draco 3D Data Compression 21 | baseurl: "/draco" 22 | url: "" # the base hostname & protocol for your site, e.g. http://example.com 23 | twitter_username: webm 24 | github_username: webmproject 25 | timezone: America/Los_Angeles 26 | 27 | # Build settings 28 | markdown: kramdown 29 | gems: 30 | exclude: 31 | - Gemfile 32 | - Gemfile.lock 33 | - docs/_site 34 | sass: 35 | style: compressed 36 | -------------------------------------------------------------------------------- /docs/_includes/analytics.html: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /docs/_includes/footer.html: -------------------------------------------------------------------------------- 1 |
2 | 6 |
7 | -------------------------------------------------------------------------------- /docs/_layouts/spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ page.title }} 6 | 7 | 34 | 35 | 36 | 37 | {{ content }} 38 | 39 | {% include analytics.html%} 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /docs/artwork/draco-favicon-src.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/draco-favicon-src.png -------------------------------------------------------------------------------- /docs/artwork/draco3d-horiz-320x79.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/draco3d-horiz-320x79.png -------------------------------------------------------------------------------- /docs/artwork/draco3d-horiz-640x158.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/draco3d-horiz-640x158.png -------------------------------------------------------------------------------- /docs/artwork/draco3d-horiz.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/draco3d-horiz.ai -------------------------------------------------------------------------------- /docs/artwork/draco3d-mark-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/draco3d-mark-180x180.png -------------------------------------------------------------------------------- /docs/artwork/draco3d-mark-360x360.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/draco3d-mark-360x360.png -------------------------------------------------------------------------------- /docs/artwork/draco3d-mark.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/draco3d-mark.ai -------------------------------------------------------------------------------- /docs/artwork/draco3d-vert-180x137.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/draco3d-vert-180x137.png -------------------------------------------------------------------------------- /docs/artwork/draco3d-vert-360x274.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/draco3d-vert-360x274.png -------------------------------------------------------------------------------- /docs/artwork/draco3d-vert-452x344.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/draco3d-vert-452x344.png -------------------------------------------------------------------------------- /docs/artwork/draco3d-vert.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/draco3d-vert.ai -------------------------------------------------------------------------------- /docs/artwork/favicon/android-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/android-icon-144x144.png -------------------------------------------------------------------------------- /docs/artwork/favicon/android-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/android-icon-192x192.png -------------------------------------------------------------------------------- /docs/artwork/favicon/android-icon-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/android-icon-36x36.png -------------------------------------------------------------------------------- /docs/artwork/favicon/android-icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/android-icon-48x48.png -------------------------------------------------------------------------------- /docs/artwork/favicon/android-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/android-icon-72x72.png -------------------------------------------------------------------------------- /docs/artwork/favicon/android-icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/android-icon-96x96.png -------------------------------------------------------------------------------- /docs/artwork/favicon/apple-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/apple-icon-114x114.png -------------------------------------------------------------------------------- /docs/artwork/favicon/apple-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/apple-icon-120x120.png -------------------------------------------------------------------------------- /docs/artwork/favicon/apple-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/apple-icon-144x144.png -------------------------------------------------------------------------------- /docs/artwork/favicon/apple-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/apple-icon-152x152.png -------------------------------------------------------------------------------- /docs/artwork/favicon/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/apple-icon-180x180.png -------------------------------------------------------------------------------- /docs/artwork/favicon/apple-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/apple-icon-57x57.png -------------------------------------------------------------------------------- /docs/artwork/favicon/apple-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/apple-icon-60x60.png -------------------------------------------------------------------------------- /docs/artwork/favicon/apple-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/apple-icon-72x72.png -------------------------------------------------------------------------------- /docs/artwork/favicon/apple-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/apple-icon-76x76.png -------------------------------------------------------------------------------- /docs/artwork/favicon/apple-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/apple-icon-precomposed.png -------------------------------------------------------------------------------- /docs/artwork/favicon/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/apple-icon.png -------------------------------------------------------------------------------- /docs/artwork/favicon/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | #ffffff -------------------------------------------------------------------------------- /docs/artwork/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /docs/artwork/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /docs/artwork/favicon/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/favicon-96x96.png -------------------------------------------------------------------------------- /docs/artwork/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/favicon.ico -------------------------------------------------------------------------------- /docs/artwork/favicon/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "App", 3 | "icons": [ 4 | { 5 | "src": "\/android-icon-36x36.png", 6 | "sizes": "36x36", 7 | "type": "image\/png", 8 | "density": "0.75" 9 | }, 10 | { 11 | "src": "\/android-icon-48x48.png", 12 | "sizes": "48x48", 13 | "type": "image\/png", 14 | "density": "1.0" 15 | }, 16 | { 17 | "src": "\/android-icon-72x72.png", 18 | "sizes": "72x72", 19 | "type": "image\/png", 20 | "density": "1.5" 21 | }, 22 | { 23 | "src": "\/android-icon-96x96.png", 24 | "sizes": "96x96", 25 | "type": "image\/png", 26 | "density": "2.0" 27 | }, 28 | { 29 | "src": "\/android-icon-144x144.png", 30 | "sizes": "144x144", 31 | "type": "image\/png", 32 | "density": "3.0" 33 | }, 34 | { 35 | "src": "\/android-icon-192x192.png", 36 | "sizes": "192x192", 37 | "type": "image\/png", 38 | "density": "4.0" 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /docs/artwork/favicon/ms-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/ms-icon-144x144.png -------------------------------------------------------------------------------- /docs/artwork/favicon/ms-icon-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/ms-icon-150x150.png -------------------------------------------------------------------------------- /docs/artwork/favicon/ms-icon-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/ms-icon-310x310.png -------------------------------------------------------------------------------- /docs/artwork/favicon/ms-icon-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/artwork/favicon/ms-icon-70x70.png -------------------------------------------------------------------------------- /docs/assets/css/ie10-viewport-bug-workaround.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * IE10 viewport hack for Surface/desktop Windows 8 bug 3 | * Copyright 2014-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | /* 8 | * See the Getting Started docs for more information: 9 | * http://getbootstrap.com/getting-started/#support-ie10-width 10 | */ 11 | @-ms-viewport { width: device-width; } 12 | @-o-viewport { width: device-width; } 13 | @viewport { width: device-width; } 14 | -------------------------------------------------------------------------------- /docs/assets/css/navbar-fixed-top.css: -------------------------------------------------------------------------------- 1 | body { 2 | min-height: 2000px; 3 | padding-top: 70px; 4 | } 5 | -------------------------------------------------------------------------------- /docs/assets/css/pygments/README.md: -------------------------------------------------------------------------------- 1 | # jekyll-pygments-themes 2 | 3 | A set of CSS theme files for Pygments (Python-based code highlighting tool) 4 | created from the original built-in Pygments styles, ready for use with Jekyll. 5 | 6 | ## Theme Previews and Custom Theme Builder 7 | - 8 | 9 | ## Using Themes Without Jekyll 10 | If you want to use the themes with something other than Jekyll, you may need to 11 | remove or change the CSS style prefix of `.highlight`. 12 | 13 | ## Links 14 | 15 | - [Jekyll](http://jekyllrb.com/) ([direct link to code highlighting documentation](http://jekyllrb.com/docs/templates/#code-snippet-highlighting)) 16 | - [Pygments](http://pygments.org) 17 | 18 | ## Hacking 19 | 20 | If you want to hack on the site, check out the [gh-pages](https://github.com/jwarby/jekyll-pygments-themes/tree/gh-pages) branch. 21 | 22 | ## Acknowledgements 23 | Forked from [richleland/pygments-css](https://github.com/richleland/pygments-css). 24 | -------------------------------------------------------------------------------- /docs/assets/css/pygments/UNLICENSE.txt: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /docs/assets/css/sticky-footer.css: -------------------------------------------------------------------------------- 1 | /* Sticky footer styles 2 | -------------------------------------------------- */ 3 | html { 4 | position: relative; 5 | min-height: 100%; 6 | } 7 | body { 8 | /* Margin bottom by footer height */ 9 | margin-bottom: 60px; 10 | } 11 | .footer { 12 | position: absolute; 13 | bottom: 0; 14 | width: 100%; 15 | /* Set the fixed height of the footer here */ 16 | height: 60px; 17 | background-color: #f5f5f5; 18 | } 19 | 20 | 21 | /* Custom page CSS 22 | -------------------------------------------------- */ 23 | /* Not required for template or sticky footer method. */ 24 | 25 | .container { 26 | width: auto; 27 | max-width: 680px; 28 | padding: 0 15px; 29 | } 30 | .container .text-muted { 31 | margin: 20px 0; 32 | } 33 | -------------------------------------------------------------------------------- /docs/assets/js/ie10-viewport-bug-workaround.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * IE10 viewport hack for Surface/desktop Windows 8 bug 3 | * Copyright 2014-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | // See the Getting Started docs for more information: 8 | // http://getbootstrap.com/getting-started/#support-ie10-width 9 | 10 | (function () { 11 | 'use strict'; 12 | 13 | if (navigator.userAgent.match(/IEMobile\/10\.0/)) { 14 | var msViewportStyle = document.createElement('style') 15 | msViewportStyle.appendChild( 16 | document.createTextNode( 17 | '@-ms-viewport{width:auto!important}' 18 | ) 19 | ) 20 | document.querySelector('head').appendChild(msViewportStyle) 21 | } 22 | 23 | })(); 24 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: home 3 | title: Draco 3D Graphics Compression 4 | --- 5 | -------------------------------------------------------------------------------- /docs/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1 3 | } 4 | -------------------------------------------------------------------------------- /docs/spec/00.00.00.title.md: -------------------------------------------------------------------------------- 1 | 2 | # {{ page.title }} 3 | {:.no_toc} 4 | -------------------------------------------------------------------------------- /docs/spec/00.00.01.version.md: -------------------------------------------------------------------------------- 1 | 2 | _{{ page.version }}_ 3 | _{{ page.version_date }}_ 4 | -------------------------------------------------------------------------------- /docs/spec/00.00.02.authors.md: -------------------------------------------------------------------------------- 1 | 2 | _Frank Galligan, Google_ 3 | -------------------------------------------------------------------------------- /docs/spec/00.00.03.last.modified.md: -------------------------------------------------------------------------------- 1 | 2 | _Last modified: {{ site.time }}_ 3 | -------------------------------------------------------------------------------- /docs/spec/00.00.04.abstract.md: -------------------------------------------------------------------------------- 1 | 2 | ## Abstract 3 | {:.no_toc .nocount} 4 | 5 | This **document** defines the bitstream format and decoding process 6 | for the Draco 3D Data Compression scheme. Contributing authors should consult the 7 | document's [**README**](README.html) file. 8 | -------------------------------------------------------------------------------- /docs/spec/00.00.05.toc.md: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | * TOC 6 | {:toc} 7 | 8 |
-------------------------------------------------------------------------------- /docs/spec/01.00.00.scope.md: -------------------------------------------------------------------------------- 1 | 2 | ## Scope 3 | 4 | This document specifies the open-source Draco 3D Data Compression bitstream 5 | format and decoding process. 6 | -------------------------------------------------------------------------------- /docs/spec/03.00.00.symbols.md: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | 3 | ## Symbols (and abbreviated terms) 4 | 5 | **DCT:** Discrete Cosine Transform 6 | 7 | FIXME 8 | 9 | The specification makes use of a number of constant integers. Constants that 10 | relate to the semantics of a particular syntax element are defined in section 11 | 7. 12 | 13 | Additional constants are defined below: 14 | 15 | 16 | | Symbol name | Value | Description | 17 | | ------------------------ |:-----:| ----------- | 18 | | `SYMBOL` | | 19 | 20 | {% endcomment %} 21 | -------------------------------------------------------------------------------- /docs/spec/connectivity.decoder.md: -------------------------------------------------------------------------------- 1 | 2 | ## Connectivity Decoder 3 | 4 | ### DecodeConnectivityData() 5 | 6 | ~~~~~ 7 | void DecodeConnectivityData() { 8 | if (encoder_method == MESH_SEQUENTIAL_ENCODING) 9 | DecodeSequentialConnectivityData(); 10 | else if (encoder_method == MESH_EDGEBREAKER_ENCODING) 11 | DecodeEdgebreakerConnectivityData(); 12 | } 13 | 14 | ~~~~~ 15 | {:.draco-syntax } 16 | -------------------------------------------------------------------------------- /docs/spec/core.functions.md: -------------------------------------------------------------------------------- 1 | 2 | ## Core Functions 3 | 4 | ### LEB128 5 | 6 | ~~~~~ 7 | uint64_t LEB128() { 8 | result = 0; 9 | shift = 0; 10 | while(true) { 11 | in UI8 12 | result |= (low order 7 bits of in) << shift; 13 | if (high order bit of in == 0) 14 | break; 15 | shift += 7; 16 | } 17 | return result; 18 | } 19 | ~~~~~ 20 | {:.draco-syntax } 21 | 22 | 23 | ### mem_get_le16 24 | 25 | ~~~~~ 26 | uint32_t mem_get_le16(mem) { 27 | val = mem[1] << 8; 28 | val |= mem[0]; 29 | return val; 30 | } 31 | ~~~~~ 32 | {:.draco-syntax } 33 | 34 | 35 | ### mem_get_le24 36 | 37 | ~~~~~ 38 | uint32_t mem_get_le24(mem) { 39 | val = mem[2] << 16; 40 | val |= mem[1] << 8; 41 | val |= mem[0]; 42 | return val; 43 | } 44 | ~~~~~ 45 | {:.draco-syntax } 46 | 47 | 48 | ### mem_get_le32 49 | 50 | ~~~~~ 51 | uint32_t mem_get_le32(mem) { 52 | val = mem[3] << 24; 53 | val |= mem[2] << 16; 54 | val |= mem[1] << 8; 55 | val |= mem[0]; 56 | return val; 57 | } 58 | ~~~~~ 59 | {:.draco-syntax } 60 | -------------------------------------------------------------------------------- /docs/spec/draco.decoder.md: -------------------------------------------------------------------------------- 1 | ## Draco Decoder 2 | 3 | ### Decode() 4 | 5 | ~~~~~ 6 | void Decode() { 7 | ParseHeader(); 8 | if (flags & METADATA_FLAG_MASK) 9 | DecodeMetadata(); 10 | DecodeConnectivityData(); 11 | DecodeAttributeData(); 12 | } 13 | ~~~~~ 14 | {:.draco-syntax} 15 | 16 | 17 | ### ParseHeader() 18 | 19 | ~~~~~ 20 | ParseHeader() { 21 | draco_string UI8[5] 22 | major_version UI8 23 | minor_version UI8 24 | encoder_type UI8 25 | encoder_method UI8 26 | flags UI16 27 | } 28 | ~~~~~ 29 | {:.draco-syntax} 30 | 31 | -------------------------------------------------------------------------------- /docs/spec/edgebreaker.traversal.valence.md: -------------------------------------------------------------------------------- 1 | 2 | ## EdgeBreaker Traversal Valence 3 | 4 | ### ParseValenceContextCounters() 5 | 6 | ~~~~~ 7 | void ParseValenceContextCounters(index) { 8 | ebv_context_counters[index] varUI32 9 | } 10 | ~~~~~ 11 | {:.draco-syntax } 12 | 13 | 14 | 15 | ### EdgeBreakerTraversalValenceStart() 16 | 17 | ~~~~~ 18 | void EdgeBreakerTraversalValenceStart() { 19 | ParseEdgebreakerTraversalStandardFaceData() 20 | ParseEdgebreakerTraversalStandardAttributeConnectivityData() 21 | vertex_valences_.assign(num_encoded_vertices + num_encoded_split_symbols, 0); 22 | for (i = 0; i < NUM_UNIQUE_VALENCES; ++i) { 23 | ParseValenceContextCounters(i); 24 | if (ebv_context_counters[i] > 0) { 25 | DecodeSymbols(ebv_context_counters[i], 1, &ebv_context_symbols[i]); 26 | } 27 | } 28 | } 29 | ~~~~~ 30 | {:.draco-syntax } 31 | 32 | 33 | 34 | ### EdgebreakerValenceDecodeSymbol() 35 | 36 | ~~~~~ 37 | void EdgebreakerValenceDecodeSymbol() { 38 | if (active_context_ != -1) { 39 | symbol_id = ebv_context_symbols[active_context_] 40 | [--ebv_context_counters[active_context_]]; 41 | last_symbol_ = edge_breaker_symbol_to_topology_id[symbol_id]; 42 | } else { 43 | last_symbol_ = TOPOLOGY_E; 44 | } 45 | } 46 | ~~~~~ 47 | {:.draco-syntax } 48 | 49 | -------------------------------------------------------------------------------- /docs/spec/images/attributes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/spec/images/attributes.png -------------------------------------------------------------------------------- /docs/spec/images/draco_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/spec/images/draco_file.png -------------------------------------------------------------------------------- /docs/spec/images/edgebreaker_connectivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/spec/images/edgebreaker_connectivity.png -------------------------------------------------------------------------------- /docs/spec/images/edgebreaker_valence_connectivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/spec/images/edgebreaker_valence_connectivity.png -------------------------------------------------------------------------------- /docs/spec/images/sequential_connectivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/spec/images/sequential_connectivity.png -------------------------------------------------------------------------------- /docs/unity/images/add_component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/add_component.png -------------------------------------------------------------------------------- /docs/unity/images/add_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/add_light.png -------------------------------------------------------------------------------- /docs/unity/images/add_material.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/add_material.png -------------------------------------------------------------------------------- /docs/unity/images/add_mesh_filter_component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/add_mesh_filter_component.png -------------------------------------------------------------------------------- /docs/unity/images/add_mesh_renderer_component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/add_mesh_renderer_component.png -------------------------------------------------------------------------------- /docs/unity/images/allow_unsafe_windows_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/allow_unsafe_windows_1.png -------------------------------------------------------------------------------- /docs/unity/images/allow_unsafe_windows_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/allow_unsafe_windows_2.png -------------------------------------------------------------------------------- /docs/unity/images/attach_draco_decode_object.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/attach_draco_decode_object.png -------------------------------------------------------------------------------- /docs/unity/images/black_bunny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/black_bunny.png -------------------------------------------------------------------------------- /docs/unity/images/create_empty_game_object_windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/create_empty_game_object_windows.png -------------------------------------------------------------------------------- /docs/unity/images/default_material.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/default_material.png -------------------------------------------------------------------------------- /docs/unity/images/light_position.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/light_position.png -------------------------------------------------------------------------------- /docs/unity/images/lit_bunny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/lit_bunny.png -------------------------------------------------------------------------------- /docs/unity/images/mesh_filter_added.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/mesh_filter_added.png -------------------------------------------------------------------------------- /docs/unity/images/mesh_renderer_added.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/mesh_renderer_added.png -------------------------------------------------------------------------------- /docs/unity/images/new_project_windows_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/new_project_windows_1.png -------------------------------------------------------------------------------- /docs/unity/images/new_project_windows_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/new_project_windows_2.png -------------------------------------------------------------------------------- /docs/unity/images/pink_bunny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/pink_bunny.png -------------------------------------------------------------------------------- /docs/unity/images/select_material.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/select_material.png -------------------------------------------------------------------------------- /docs/unity/images/set_camera_position.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/set_camera_position.png -------------------------------------------------------------------------------- /docs/unity/images/unity_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/docs/unity/images/unity_empty.png -------------------------------------------------------------------------------- /javascript/draco_decoder.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/javascript/draco_decoder.wasm -------------------------------------------------------------------------------- /javascript/draco_decoder_gltf.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/javascript/draco_decoder_gltf.wasm -------------------------------------------------------------------------------- /javascript/draco_encoder.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/javascript/draco_encoder.wasm -------------------------------------------------------------------------------- /javascript/example/models/bunny.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/javascript/example/models/bunny.drc -------------------------------------------------------------------------------- /javascript/npm/draco3d/bunny.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/javascript/npm/draco3d/bunny.drc -------------------------------------------------------------------------------- /javascript/npm/draco3d/draco3d.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview Main file for draco3d package. 3 | */ 4 | 5 | var createEncoderModule = require('./draco_encoder_nodejs'); 6 | var createDecoderModule = require('./draco_decoder_nodejs'); 7 | 8 | module.exports = { 9 | createEncoderModule, 10 | createDecoderModule 11 | } 12 | -------------------------------------------------------------------------------- /javascript/npm/draco3d/draco_decoder.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/javascript/npm/draco3d/draco_decoder.wasm -------------------------------------------------------------------------------- /javascript/npm/draco3d/draco_encoder.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/javascript/npm/draco3d/draco_encoder.wasm -------------------------------------------------------------------------------- /javascript/npm/draco3d/draco_minimal_decoder_example.js: -------------------------------------------------------------------------------- 1 | // This is a minimal example showing how to create the Draco decoder module. 2 | // The decoder module is created asynchronously, so you need to set a 3 | // callback to make sure it is initialized before you try and call the module. 4 | 5 | 'use_strict'; 6 | 7 | const draco3d = require('./draco3d'); 8 | 9 | let decoderModule = null; 10 | 11 | // The code to create the encoder and decoder modules is asynchronous. 12 | // draco3d.createDecoderModule will return a promise to a funciton with a 13 | // module as a parameter when the module has been fully initialized. 14 | // Create and set the decoder module. 15 | draco3d.createDecoderModule({}).then(function(module) { 16 | // This is reached when everything is ready, and you can call methods on 17 | // Module. 18 | decoderModule = module; 19 | console.log('Decoder Module Initialized!'); 20 | moduleInitialized(); 21 | }); 22 | 23 | function moduleInitialized() { 24 | let decoder = new decoderModule.Decoder(); 25 | // Do the actual decoding here. See 'draco_nodejs_example.js' for a more 26 | // comprehensive example. 27 | cleanup(decoder); 28 | } 29 | 30 | function cleanup(decoder) { 31 | decoderModule.destroy(decoder); 32 | } 33 | -------------------------------------------------------------------------------- /javascript/npm/draco3d/draco_minimal_encoder_example.js: -------------------------------------------------------------------------------- 1 | // This is a minimal example showing how to create the Draco encoder module. 2 | // The encoder module is created asynchronously, so you need to set a 3 | // callback to make sure it is initialized before you try and call the module. 4 | 5 | 'use_strict'; 6 | 7 | const draco3d = require('./draco3d'); 8 | 9 | let encoderModule = null; 10 | 11 | // The code to create the encoder module is asynchronous. 12 | // draco3d.createEncoderModule will return a promise to a funciton with a 13 | // module as a parameter when the module has been fully initialized. 14 | draco3d.createEncoderModule({}).then(function(module) { 15 | // This is reached when everything is ready, and you can call methods on 16 | // Module. 17 | encoderModule = module; 18 | console.log('Encoder Module Initialized!'); 19 | moduleInitialized(); 20 | }); 21 | 22 | function moduleInitialized() { 23 | let encoder = new encoderModule.Encoder(); 24 | // Do the actual encoding here. See 'draco_nodejs_example.js' for a more 25 | // comprehensive example. 26 | cleanup(encoder); 27 | } 28 | 29 | function cleanup(encoder) { 30 | encoderModule.destroy(encoder); 31 | } 32 | -------------------------------------------------------------------------------- /javascript/npm/draco3d/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "draco3d", 3 | "version": "1.5.7", 4 | "description": "Draco is a library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.", 5 | "main": "draco3d.js", 6 | "scripts": { 7 | "test": "nodejs draco_nodejs_example.js" 8 | }, 9 | "keywords": [ 10 | "geometry", 11 | "compression", 12 | "mesh", 13 | "point cloud" 14 | ], 15 | "author": "Google Draco Team", 16 | "license": "Apache-2.0", 17 | "repository": { 18 | "type": "git", 19 | "url": "git+https://github.com/google/draco.git" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /javascript/npm/draco3dgltf/bunny.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/javascript/npm/draco3dgltf/bunny.drc -------------------------------------------------------------------------------- /javascript/npm/draco3dgltf/draco3dgltf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview Main file for draco3d package. 3 | */ 4 | 5 | var createEncoderModule = require('./draco_encoder_gltf_nodejs'); 6 | var createDecoderModule = require('./draco_decoder_gltf_nodejs'); 7 | 8 | module.exports = { 9 | createEncoderModule, 10 | createDecoderModule 11 | } 12 | -------------------------------------------------------------------------------- /javascript/npm/draco3dgltf/draco_decoder_gltf.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/javascript/npm/draco3dgltf/draco_decoder_gltf.wasm -------------------------------------------------------------------------------- /javascript/npm/draco3dgltf/draco_encoder.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/javascript/npm/draco3dgltf/draco_encoder.wasm -------------------------------------------------------------------------------- /javascript/npm/draco3dgltf/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "draco3dgltf", 3 | "version": "1.5.7", 4 | "description": "This package contains a specific version of Draco 3D geometric compression library that is used for glTF Draco mesh compression extension.", 5 | "main": "draco3dgltf.js", 6 | "scripts": { 7 | "test": "nodejs draco_nodejs_example.js" 8 | }, 9 | "keywords": [ 10 | "geometry", 11 | "compression", 12 | "mesh", 13 | "point cloud" 14 | ], 15 | "author": "Google Draco Team", 16 | "license": "Apache-2.0", 17 | "repository": { 18 | "type": "git", 19 | "url": "git+https://github.com/google/draco.git" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /javascript/with_asserts/draco_decoder.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/javascript/with_asserts/draco_decoder.wasm -------------------------------------------------------------------------------- /javascript/with_asserts/draco_encoder.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/javascript/with_asserts/draco_encoder.wasm -------------------------------------------------------------------------------- /maya/.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | *.pyc -------------------------------------------------------------------------------- /maya/draco_maya_wrapper_macos.tar.bz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/maya/draco_maya_wrapper_macos.tar.bz -------------------------------------------------------------------------------- /maya/draco_maya_wrapper_windows.tar.bz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/maya/draco_maya_wrapper_windows.tar.bz -------------------------------------------------------------------------------- /src/draco/animation/keyframe_animation_decoder.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #include "draco/animation/keyframe_animation_decoder.h" 16 | 17 | namespace draco { 18 | 19 | Status KeyframeAnimationDecoder::Decode(const DecoderOptions &options, 20 | DecoderBuffer *in_buffer, 21 | KeyframeAnimation *animation) { 22 | const auto status = PointCloudSequentialDecoder::Decode( 23 | options, in_buffer, static_cast(animation)); 24 | if (!status.ok()) { 25 | return status; 26 | } 27 | return OkStatus(); 28 | } 29 | 30 | } // namespace draco 31 | -------------------------------------------------------------------------------- /src/draco/animation/keyframe_animation_decoder.h: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #ifndef DRACO_ANIMATION_KEYFRAME_ANIMATION_DECODER_H_ 16 | #define DRACO_ANIMATION_KEYFRAME_ANIMATION_DECODER_H_ 17 | 18 | #include "draco/animation/keyframe_animation.h" 19 | #include "draco/compression/point_cloud/point_cloud_sequential_decoder.h" 20 | 21 | namespace draco { 22 | 23 | // Class for decoding keyframe animation. 24 | class KeyframeAnimationDecoder : private PointCloudSequentialDecoder { 25 | public: 26 | KeyframeAnimationDecoder(){}; 27 | 28 | Status Decode(const DecoderOptions &options, DecoderBuffer *in_buffer, 29 | KeyframeAnimation *animation); 30 | }; 31 | 32 | } // namespace draco 33 | 34 | #endif // DRACO_ANIMATION_KEYFRAME_ANIMATION_DECODER_H_ 35 | -------------------------------------------------------------------------------- /src/draco/animation/keyframe_animation_encoder.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #include "draco/animation/keyframe_animation_encoder.h" 16 | 17 | namespace draco { 18 | 19 | KeyframeAnimationEncoder::KeyframeAnimationEncoder() {} 20 | 21 | Status KeyframeAnimationEncoder::EncodeKeyframeAnimation( 22 | const KeyframeAnimation &animation, const EncoderOptions &options, 23 | EncoderBuffer *out_buffer) { 24 | SetPointCloud(animation); 25 | return Encode(options, out_buffer); 26 | } 27 | 28 | } // namespace draco 29 | -------------------------------------------------------------------------------- /src/draco/animation/skin.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #include "draco/animation/skin.h" 16 | 17 | #ifdef DRACO_TRANSCODER_SUPPORTED 18 | 19 | namespace draco { 20 | 21 | void Skin::Copy(const Skin &s) { 22 | inverse_bind_matrices_.Copy(s.GetInverseBindMatrices()); 23 | joints_ = s.GetJoints(); 24 | joint_root_index_ = s.GetJointRoot(); 25 | } 26 | 27 | } // namespace draco 28 | 29 | #endif // DRACO_TRANSCODER_SUPPORTED 30 | -------------------------------------------------------------------------------- /src/draco/attributes/attribute_transform_type.h: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #ifndef DRACO_ATTRIBUTES_ATTRIBUTE_TRANSFORM_TYPE_H_ 16 | #define DRACO_ATTRIBUTES_ATTRIBUTE_TRANSFORM_TYPE_H_ 17 | 18 | namespace draco { 19 | 20 | // List of all currently supported attribute transforms. 21 | enum AttributeTransformType { 22 | ATTRIBUTE_INVALID_TRANSFORM = -1, 23 | ATTRIBUTE_NO_TRANSFORM = 0, 24 | ATTRIBUTE_QUANTIZATION_TRANSFORM = 1, 25 | ATTRIBUTE_OCTAHEDRON_TRANSFORM = 2, 26 | }; 27 | 28 | } // namespace draco 29 | 30 | #endif // DRACO_ATTRIBUTES_ATTRIBUTE_TRANSFORM_TYPE_H_ 31 | -------------------------------------------------------------------------------- /src/draco/compression/attributes/kd_tree_attributes_shared.h: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #ifndef DRACO_COMPRESSION_ATTRIBUTES_KD_TREE_ATTRIBUTES_SHARED_H_ 16 | #define DRACO_COMPRESSION_ATTRIBUTES_KD_TREE_ATTRIBUTES_SHARED_H_ 17 | 18 | namespace draco { 19 | 20 | // Defines types of kD-tree compression 21 | enum KdTreeAttributesEncodingMethod { 22 | kKdTreeQuantizationEncoding = 0, 23 | kKdTreeIntegerEncoding 24 | }; 25 | 26 | } // namespace draco 27 | 28 | #endif // DRACO_COMPRESSION_ATTRIBUTES_KD_TREE_ATTRIBUTES_SHARED_H_ 29 | -------------------------------------------------------------------------------- /src/draco/compression/bit_coders/direct_bit_encoder.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #include "draco/compression/bit_coders/direct_bit_encoder.h" 16 | 17 | namespace draco { 18 | 19 | DirectBitEncoder::DirectBitEncoder() : local_bits_(0), num_local_bits_(0) {} 20 | 21 | DirectBitEncoder::~DirectBitEncoder() { Clear(); } 22 | 23 | void DirectBitEncoder::StartEncoding() { Clear(); } 24 | 25 | void DirectBitEncoder::EndEncoding(EncoderBuffer *target_buffer) { 26 | bits_.push_back(local_bits_); 27 | const uint32_t size_in_byte = static_cast(bits_.size()) * 4; 28 | target_buffer->Encode(size_in_byte); 29 | target_buffer->Encode(bits_.data(), size_in_byte); 30 | Clear(); 31 | } 32 | 33 | void DirectBitEncoder::Clear() { 34 | bits_.clear(); 35 | local_bits_ = 0; 36 | num_local_bits_ = 0; 37 | } 38 | 39 | } // namespace draco 40 | -------------------------------------------------------------------------------- /src/draco/compression/bit_coders/rans_coding_test.cc: -------------------------------------------------------------------------------- 1 | #include "draco/compression/bit_coders/adaptive_rans_bit_decoder.h" 2 | #include "draco/compression/bit_coders/adaptive_rans_bit_encoder.h" 3 | #include "draco/compression/bit_coders/rans_bit_decoder.h" 4 | #include "draco/compression/bit_coders/rans_bit_encoder.h" 5 | #include "draco/core/draco_test_base.h" 6 | 7 | // Just including rans_coding.h and adaptive_rans_coding.h gets an asan error 8 | // when compiling (blaze test :rans_coding_test --config=asan) 9 | TEST(RansCodingTest, LinkerTest) {} 10 | -------------------------------------------------------------------------------- /src/draco/compression/bit_coders/symbol_bit_decoder.cc: -------------------------------------------------------------------------------- 1 | #include "draco/compression/bit_coders/symbol_bit_decoder.h" 2 | 3 | #include "draco/compression/entropy/symbol_decoding.h" 4 | 5 | namespace draco { 6 | 7 | bool SymbolBitDecoder::StartDecoding(DecoderBuffer *source_buffer) { 8 | uint32_t size; 9 | if (!source_buffer->Decode(&size)) { 10 | return false; 11 | } 12 | 13 | symbols_.resize(size); 14 | if (!DecodeSymbols(size, 1, source_buffer, symbols_.data())) { 15 | return false; 16 | } 17 | std::reverse(symbols_.begin(), symbols_.end()); 18 | return true; 19 | } 20 | 21 | bool SymbolBitDecoder::DecodeNextBit() { 22 | uint32_t symbol; 23 | DecodeLeastSignificantBits32(1, &symbol); 24 | DRACO_DCHECK(symbol == 0 || symbol == 1); 25 | return symbol == 1; 26 | } 27 | 28 | void SymbolBitDecoder::DecodeLeastSignificantBits32(int nbits, 29 | uint32_t *value) { 30 | DRACO_DCHECK_LE(1, nbits); 31 | DRACO_DCHECK_LE(nbits, 32); 32 | DRACO_DCHECK_NE(value, nullptr); 33 | // Testing: check to make sure there is something to decode. 34 | DRACO_DCHECK_GT(symbols_.size(), 0); 35 | 36 | (*value) = symbols_.back(); 37 | symbols_.pop_back(); 38 | 39 | const int discarded_bits = 32 - nbits; 40 | (*value) <<= discarded_bits; 41 | (*value) >>= discarded_bits; 42 | } 43 | 44 | void SymbolBitDecoder::Clear() { 45 | symbols_.clear(); 46 | symbols_.shrink_to_fit(); 47 | } 48 | 49 | } // namespace draco 50 | -------------------------------------------------------------------------------- /src/draco/compression/bit_coders/symbol_bit_decoder.h: -------------------------------------------------------------------------------- 1 | #ifndef DRACO_COMPRESSION_BIT_CODERS_SYMBOL_BIT_DECODER_H_ 2 | #define DRACO_COMPRESSION_BIT_CODERS_SYMBOL_BIT_DECODER_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include "draco/core/decoder_buffer.h" 8 | 9 | namespace draco { 10 | 11 | // Class for decoding bits using the symbol entropy encoding. Wraps 12 | // |DecodeSymbols|. Note that this uses a symbol-based encoding scheme for 13 | // encoding bits. 14 | class SymbolBitDecoder { 15 | public: 16 | // Sets |source_buffer| as the buffer to decode bits from. 17 | bool StartDecoding(DecoderBuffer *source_buffer); 18 | 19 | // Decode one bit. Returns true if the bit is a 1, otherwise false. 20 | bool DecodeNextBit(); 21 | 22 | // Decode the next |nbits| and return the sequence in |value|. |nbits| must be 23 | // > 0 and <= 32. 24 | void DecodeLeastSignificantBits32(int nbits, uint32_t *value); 25 | 26 | void EndDecoding() { Clear(); } 27 | 28 | private: 29 | void Clear(); 30 | 31 | std::vector symbols_; 32 | }; 33 | 34 | } // namespace draco 35 | 36 | #endif // DRACO_COMPRESSION_BIT_CODERS_SYMBOL_BIT_DECODER_H_ 37 | -------------------------------------------------------------------------------- /src/draco/compression/bit_coders/symbol_bit_encoder.cc: -------------------------------------------------------------------------------- 1 | #include "draco/compression/bit_coders/symbol_bit_encoder.h" 2 | 3 | #include "draco/compression/entropy/symbol_encoding.h" 4 | 5 | namespace draco { 6 | 7 | void SymbolBitEncoder::EncodeLeastSignificantBits32(int nbits, uint32_t value) { 8 | DRACO_DCHECK_LE(1, nbits); 9 | DRACO_DCHECK_LE(nbits, 32); 10 | 11 | const int discarded_bits = 32 - nbits; 12 | value <<= discarded_bits; 13 | value >>= discarded_bits; 14 | 15 | symbols_.push_back(value); 16 | } 17 | 18 | void SymbolBitEncoder::EndEncoding(EncoderBuffer *target_buffer) { 19 | target_buffer->Encode(static_cast(symbols_.size())); 20 | EncodeSymbols(symbols_.data(), static_cast(symbols_.size()), 1, nullptr, 21 | target_buffer); 22 | Clear(); 23 | } 24 | 25 | void SymbolBitEncoder::Clear() { 26 | symbols_.clear(); 27 | symbols_.shrink_to_fit(); 28 | } 29 | 30 | } // namespace draco 31 | -------------------------------------------------------------------------------- /src/draco/compression/bit_coders/symbol_bit_encoder.h: -------------------------------------------------------------------------------- 1 | #ifndef DRACO_COMPRESSION_BIT_CODERS_SYMBOL_BIT_ENCODER_H_ 2 | #define DRACO_COMPRESSION_BIT_CODERS_SYMBOL_BIT_ENCODER_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include "draco/core/encoder_buffer.h" 8 | 9 | namespace draco { 10 | 11 | // Class for encoding bits using the symbol entropy encoding. Wraps 12 | // |EncodeSymbols|. Note that this uses a symbol-based encoding scheme for 13 | // encoding bits. 14 | class SymbolBitEncoder { 15 | public: 16 | // Must be called before any Encode* function is called. 17 | void StartEncoding() { Clear(); } 18 | 19 | // Encode one bit. If |bit| is true encode a 1, otherwise encode a 0. 20 | void EncodeBit(bool bit) { EncodeLeastSignificantBits32(1, bit ? 1 : 0); } 21 | 22 | // Encode |nbits| LSBs of |value| as a symbol. |nbits| must be > 0 and <= 32. 23 | void EncodeLeastSignificantBits32(int nbits, uint32_t value); 24 | 25 | // Ends the bit encoding and stores the result into the target_buffer. 26 | void EndEncoding(EncoderBuffer *target_buffer); 27 | 28 | private: 29 | void Clear(); 30 | 31 | std::vector symbols_; 32 | }; 33 | 34 | } // namespace draco 35 | 36 | #endif // DRACO_COMPRESSION_BIT_CODERS_SYMBOL_BIT_ENCODER_H_ 37 | -------------------------------------------------------------------------------- /src/draco/compression/config/decoder_options.h: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #ifndef DRACO_COMPRESSION_CONFIG_DECODER_OPTIONS_H_ 16 | #define DRACO_COMPRESSION_CONFIG_DECODER_OPTIONS_H_ 17 | 18 | #include 19 | #include 20 | 21 | #include "draco/attributes/geometry_attribute.h" 22 | #include "draco/compression/config/draco_options.h" 23 | 24 | namespace draco { 25 | 26 | // Class containing options that can be passed to PointCloudDecoder to control 27 | // decoding of the input geometry. The options can be specified either for the 28 | // whole geometry or for a specific attribute type. Each option is identified 29 | // by a unique name stored as an std::string. 30 | typedef DracoOptions DecoderOptions; 31 | 32 | } // namespace draco 33 | 34 | #endif // DRACO_COMPRESSION_CONFIG_DECODER_OPTIONS_H_ 35 | -------------------------------------------------------------------------------- /src/draco/compression/entropy/symbol_decoding.h: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #ifndef DRACO_COMPRESSION_ENTROPY_SYMBOL_DECODING_H_ 16 | #define DRACO_COMPRESSION_ENTROPY_SYMBOL_DECODING_H_ 17 | 18 | #include "draco/core/decoder_buffer.h" 19 | 20 | namespace draco { 21 | 22 | // Decodes an array of symbols that was previously encoded with an entropy code. 23 | // Returns false on error. 24 | bool DecodeSymbols(uint32_t num_values, int num_components, 25 | DecoderBuffer *src_buffer, uint32_t *out_values); 26 | 27 | } // namespace draco 28 | 29 | #endif // DRACO_COMPRESSION_ENTROPY_SYMBOL_DECODING_H_ 30 | -------------------------------------------------------------------------------- /src/draco/compression/mesh/mesh_decoder.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #include "draco/compression/mesh/mesh_decoder.h" 16 | 17 | namespace draco { 18 | 19 | MeshDecoder::MeshDecoder() : mesh_(nullptr) {} 20 | 21 | Status MeshDecoder::Decode(const DecoderOptions &options, 22 | DecoderBuffer *in_buffer, Mesh *out_mesh) { 23 | mesh_ = out_mesh; 24 | return PointCloudDecoder::Decode(options, in_buffer, out_mesh); 25 | } 26 | 27 | bool MeshDecoder::DecodeGeometryData() { 28 | if (mesh_ == nullptr) { 29 | return false; 30 | } 31 | if (!DecodeConnectivity()) { 32 | return false; 33 | } 34 | return PointCloudDecoder::DecodeGeometryData(); 35 | } 36 | 37 | } // namespace draco 38 | -------------------------------------------------------------------------------- /src/draco/compression/mesh/mesh_encoder.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #include "draco/compression/mesh/mesh_encoder.h" 16 | 17 | namespace draco { 18 | 19 | MeshEncoder::MeshEncoder() : mesh_(nullptr), num_encoded_faces_(0) {} 20 | 21 | void MeshEncoder::SetMesh(const Mesh &m) { 22 | mesh_ = &m; 23 | SetPointCloud(m); 24 | } 25 | 26 | Status MeshEncoder::EncodeGeometryData() { 27 | DRACO_RETURN_IF_ERROR(EncodeConnectivity()); 28 | if (options()->GetGlobalBool("store_number_of_encoded_faces", false)) { 29 | ComputeNumberOfEncodedFaces(); 30 | } 31 | return OkStatus(); 32 | } 33 | 34 | } // namespace draco 35 | -------------------------------------------------------------------------------- /src/draco/compression/mesh/mesh_sequential_decoder.h: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #ifndef DRACO_COMPRESSION_MESH_MESH_SEQUENTIAL_DECODER_H_ 16 | #define DRACO_COMPRESSION_MESH_MESH_SEQUENTIAL_DECODER_H_ 17 | 18 | #include "draco/compression/mesh/mesh_decoder.h" 19 | 20 | namespace draco { 21 | 22 | // Class for decoding data encoded by MeshSequentialEncoder. 23 | class MeshSequentialDecoder : public MeshDecoder { 24 | public: 25 | MeshSequentialDecoder(); 26 | 27 | protected: 28 | bool DecodeConnectivity() override; 29 | bool CreateAttributesDecoder(int32_t att_decoder_id) override; 30 | 31 | private: 32 | // Decodes face indices that were compressed with an entropy code. 33 | // Returns false on error. 34 | bool DecodeAndDecompressIndices(uint32_t num_faces); 35 | }; 36 | 37 | } // namespace draco 38 | 39 | #endif // DRACO_COMPRESSION_MESH_MESH_SEQUENTIAL_DECODER_H_ 40 | -------------------------------------------------------------------------------- /src/draco/compression/point_cloud/algorithms/dynamic_integer_points_kd_tree_decoder.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #include "draco/compression/point_cloud/algorithms/dynamic_integer_points_kd_tree_decoder.h" 16 | 17 | #include "draco/compression/point_cloud/algorithms/point_cloud_types.h" 18 | 19 | namespace draco { 20 | 21 | template class DynamicIntegerPointsKdTreeDecoder<0>; 22 | template class DynamicIntegerPointsKdTreeDecoder<2>; 23 | template class DynamicIntegerPointsKdTreeDecoder<4>; 24 | template class DynamicIntegerPointsKdTreeDecoder<6>; 25 | 26 | } // namespace draco 27 | -------------------------------------------------------------------------------- /src/draco/compression/point_cloud/algorithms/dynamic_integer_points_kd_tree_encoder.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #include "draco/compression/point_cloud/algorithms/dynamic_integer_points_kd_tree_encoder.h" 16 | 17 | #include "draco/compression/point_cloud/algorithms/point_cloud_types.h" 18 | 19 | namespace draco { 20 | 21 | template class DynamicIntegerPointsKdTreeEncoder<0>; 22 | template class DynamicIntegerPointsKdTreeEncoder<2>; 23 | template class DynamicIntegerPointsKdTreeEncoder<4>; 24 | template class DynamicIntegerPointsKdTreeEncoder<6>; 25 | 26 | } // namespace draco 27 | -------------------------------------------------------------------------------- /src/draco/compression/point_cloud/point_cloud_kd_tree_decoder.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #include "draco/compression/point_cloud/point_cloud_kd_tree_decoder.h" 16 | 17 | #include "draco/compression/attributes/kd_tree_attributes_decoder.h" 18 | 19 | namespace draco { 20 | 21 | bool PointCloudKdTreeDecoder::DecodeGeometryData() { 22 | int32_t num_points; 23 | if (!buffer()->Decode(&num_points)) { 24 | return false; 25 | } 26 | if (num_points < 0) { 27 | return false; 28 | } 29 | point_cloud()->set_num_points(num_points); 30 | return true; 31 | } 32 | 33 | bool PointCloudKdTreeDecoder::CreateAttributesDecoder(int32_t att_decoder_id) { 34 | // Always create the basic attribute decoder. 35 | return SetAttributesDecoder( 36 | att_decoder_id, 37 | std::unique_ptr(new KdTreeAttributesDecoder())); 38 | } 39 | 40 | } // namespace draco 41 | -------------------------------------------------------------------------------- /src/draco/compression/point_cloud/point_cloud_kd_tree_decoder.h: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #ifndef DRACO_COMPRESSION_POINT_CLOUD_POINT_CLOUD_KD_TREE_DECODER_H_ 16 | #define DRACO_COMPRESSION_POINT_CLOUD_POINT_CLOUD_KD_TREE_DECODER_H_ 17 | 18 | #include "draco/compression/point_cloud/point_cloud_decoder.h" 19 | 20 | namespace draco { 21 | 22 | // Decodes PointCloud encoded with the PointCloudKdTreeEncoder. 23 | class PointCloudKdTreeDecoder : public PointCloudDecoder { 24 | protected: 25 | bool DecodeGeometryData() override; 26 | bool CreateAttributesDecoder(int32_t att_decoder_id) override; 27 | }; 28 | 29 | } // namespace draco 30 | 31 | #endif // DRACO_COMPRESSION_POINT_CLOUD_POINT_CLOUD_KD_TREE_DECODER_H_ 32 | -------------------------------------------------------------------------------- /src/draco/compression/point_cloud/point_cloud_sequential_decoder.h: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #ifndef DRACO_COMPRESSION_POINT_CLOUD_POINT_CLOUD_SEQUENTIAL_DECODER_H_ 16 | #define DRACO_COMPRESSION_POINT_CLOUD_POINT_CLOUD_SEQUENTIAL_DECODER_H_ 17 | 18 | #include "draco/compression/point_cloud/point_cloud_decoder.h" 19 | 20 | namespace draco { 21 | 22 | // Point cloud decoder for data encoded by the PointCloudSequentialEncoder. 23 | // All attribute values are decoded using an identity mapping between point ids 24 | // and attribute value ids. 25 | class PointCloudSequentialDecoder : public PointCloudDecoder { 26 | protected: 27 | bool DecodeGeometryData() override; 28 | bool CreateAttributesDecoder(int32_t att_decoder_id) override; 29 | }; 30 | 31 | } // namespace draco 32 | 33 | #endif // DRACO_COMPRESSION_POINT_CLOUD_POINT_CLOUD_SEQUENTIAL_DECODER_H_ 34 | -------------------------------------------------------------------------------- /src/draco/core/bit_utils.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #include "draco/core/bit_utils.h" 16 | 17 | namespace draco { 18 | 19 | void ConvertSignedIntsToSymbols(const int32_t *in, int in_values, 20 | uint32_t *out) { 21 | // Convert the quantized values into a format more suitable for entropy 22 | // encoding. 23 | // Put the sign bit into LSB pos and shift the rest one bit left. 24 | for (int i = 0; i < in_values; ++i) { 25 | out[i] = ConvertSignedIntToSymbol(in[i]); 26 | } 27 | } 28 | 29 | void ConvertSymbolsToSignedInts(const uint32_t *in, int in_values, 30 | int32_t *out) { 31 | for (int i = 0; i < in_values; ++i) { 32 | out[i] = ConvertSymbolToSignedInt(in[i]); 33 | } 34 | } 35 | 36 | } // namespace draco 37 | -------------------------------------------------------------------------------- /src/draco/core/constants.h: -------------------------------------------------------------------------------- 1 | #ifndef DRACO_CORE_CONSTANTS_H_ 2 | #define DRACO_CORE_CONSTANTS_H_ 3 | 4 | #define DRACO_PI 3.14159265358979323846 5 | 6 | #endif // DRACO_CORE_CONSTANTS_H_ 7 | -------------------------------------------------------------------------------- /src/draco/core/cycle_timer.h: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #ifndef DRACO_CORE_CYCLE_TIMER_H_ 16 | #define DRACO_CORE_CYCLE_TIMER_H_ 17 | 18 | #ifdef _WIN32 19 | #ifndef WIN32_LEAN_AND_MEAN 20 | #define WIN32_LEAN_AND_MEAN 21 | #endif 22 | #include 23 | typedef LARGE_INTEGER DracoTimeVal; 24 | #else 25 | #include 26 | typedef timeval DracoTimeVal; 27 | #endif 28 | 29 | #include 30 | #include 31 | 32 | namespace draco { 33 | 34 | class DracoTimer { 35 | public: 36 | DracoTimer() {} 37 | ~DracoTimer() {} 38 | void Start(); 39 | void Stop(); 40 | int64_t GetInMs(); 41 | 42 | private: 43 | DracoTimeVal tv_start_; 44 | DracoTimeVal tv_end_; 45 | }; 46 | 47 | typedef DracoTimer CycleTimer; 48 | 49 | } // namespace draco 50 | 51 | #endif // DRACO_CORE_CYCLE_TIMER_H_ 52 | -------------------------------------------------------------------------------- /src/draco/core/divide.h: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #ifndef DRACO_CORE_DIVIDE_H_ 16 | #define DRACO_CORE_DIVIDE_H_ 17 | // An implementation of the divide by multiply algorithm 18 | // https://gmplib.org/~tege/divcnst-pldi94.pdf 19 | // This file is based off libvpx's divide.h. 20 | 21 | #include 22 | 23 | #include 24 | 25 | namespace draco { 26 | 27 | struct fastdiv_elem { 28 | unsigned mult; 29 | unsigned shift; 30 | }; 31 | 32 | extern const struct fastdiv_elem vp10_fastdiv_tab[256]; 33 | 34 | static inline unsigned fastdiv(unsigned x, int y) { 35 | unsigned t = 36 | ((uint64_t)x * vp10_fastdiv_tab[y].mult) >> (sizeof(x) * CHAR_BIT); 37 | return (t + x) >> vp10_fastdiv_tab[y].shift; 38 | } 39 | 40 | } // namespace draco 41 | 42 | #endif // DRACO_CORE_DIVIDE_H_ 43 | -------------------------------------------------------------------------------- /src/draco/core/draco_test_base.h: -------------------------------------------------------------------------------- 1 | // Wrapper for including googletest indirectly. Useful when the location of the 2 | // googletest sources must change depending on build environment and repository 3 | // source location. 4 | #ifndef DRACO_CORE_DRACO_TEST_BASE_H_ 5 | #define DRACO_CORE_DRACO_TEST_BASE_H_ 6 | 7 | static bool FLAGS_update_golden_files; 8 | #include "gtest/gtest.h" 9 | #include "testing/draco_test_config.h" 10 | 11 | #endif // DRACO_CORE_DRACO_TEST_BASE_H_ 12 | -------------------------------------------------------------------------------- /src/draco/core/draco_version.h: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #ifndef DRACO_CORE_DRACO_VERSION_H_ 16 | #define DRACO_CORE_DRACO_VERSION_H_ 17 | 18 | namespace draco { 19 | 20 | // Draco version is comprised of ... 21 | static const char kDracoVersion[] = "1.5.7"; 22 | 23 | } // namespace draco 24 | 25 | #endif // DRACO_CORE_DRACO_VERSION_H_ 26 | -------------------------------------------------------------------------------- /src/draco/core/math_utils_test.cc: -------------------------------------------------------------------------------- 1 | #include "draco/core/math_utils.h" 2 | 3 | #include 4 | #include 5 | 6 | #include "draco/core/draco_test_base.h" 7 | 8 | namespace draco { 9 | 10 | TEST(MathUtils, Mod) { EXPECT_EQ(DRACO_INCREMENT_MOD(1, 1 << 1), 0); } 11 | 12 | TEST(MathUtils, IntSqrt) { 13 | ASSERT_EQ(IntSqrt(0), 0); 14 | // 64-bit pseudo random number generator seeded with a predefined number. 15 | std::mt19937_64 generator(109); 16 | std::uniform_int_distribution distribution(0, 1ull << 60); 17 | 18 | for (int i = 0; i < 10000; ++i) { 19 | const uint64_t number = distribution(generator); 20 | ASSERT_EQ(IntSqrt(number), static_cast(floor(std::sqrt(number)))); 21 | } 22 | } 23 | 24 | } // namespace draco 25 | -------------------------------------------------------------------------------- /src/draco/core/quantization_utils.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #include "draco/core/quantization_utils.h" 16 | 17 | namespace draco { 18 | 19 | Quantizer::Quantizer() : inverse_delta_(1.f) {} 20 | 21 | void Quantizer::Init(float range, int32_t max_quantized_value) { 22 | inverse_delta_ = static_cast(max_quantized_value) / range; 23 | } 24 | 25 | void Quantizer::Init(float delta) { inverse_delta_ = 1.f / delta; } 26 | 27 | Dequantizer::Dequantizer() : delta_(1.f) {} 28 | 29 | bool Dequantizer::Init(float range, int32_t max_quantized_value) { 30 | if (max_quantized_value <= 0) { 31 | return false; 32 | } 33 | delta_ = range / static_cast(max_quantized_value); 34 | return true; 35 | } 36 | 37 | bool Dequantizer::Init(float delta) { 38 | delta_ = delta; 39 | return true; 40 | } 41 | 42 | } // namespace draco 43 | -------------------------------------------------------------------------------- /src/draco/core/status.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | #include "draco/core/status.h" 15 | 16 | #include 17 | 18 | namespace draco { 19 | 20 | std::string Status::code_string() const { 21 | switch (code_) { 22 | case Code::OK: 23 | return "OK"; 24 | case Code::DRACO_ERROR: 25 | return "DRACO_ERROR"; 26 | case Code::IO_ERROR: 27 | return "IO_ERROR"; 28 | case Code::INVALID_PARAMETER: 29 | return "INVALID_PARAMETER"; 30 | case Code::UNSUPPORTED_VERSION: 31 | return "UNSUPPORTED_VERSION"; 32 | case Code::UNKNOWN_VERSION: 33 | return "UNKNOWN_VERSION"; 34 | case Code::UNSUPPORTED_FEATURE: 35 | return "UNSUPPORTED_FEATURE"; 36 | } 37 | return "UNKNOWN_STATUS_VALUE"; 38 | } 39 | 40 | std::string Status::code_and_error_string() const { 41 | return code_string() + ": " + error_msg_string(); 42 | } 43 | 44 | } // namespace draco 45 | -------------------------------------------------------------------------------- /src/draco/io/file_reader_factory.cc: -------------------------------------------------------------------------------- 1 | #include "draco/io/file_reader_factory.h" 2 | 3 | #include 4 | #include 5 | 6 | namespace draco { 7 | namespace { 8 | 9 | #define FILEREADER_LOG_ERROR(error_string) \ 10 | do { \ 11 | fprintf(stderr, "%s:%d (%s): %s.\n", __FILE__, __LINE__, __func__, \ 12 | error_string); \ 13 | } while (false) 14 | 15 | std::vector *GetFileReaderOpenFunctions() { 16 | static auto open_functions = 17 | new (std::nothrow) std::vector(); 18 | return open_functions; 19 | } 20 | 21 | } // namespace 22 | 23 | bool FileReaderFactory::RegisterReader(OpenFunction open_function) { 24 | if (open_function == nullptr) { 25 | return false; 26 | } 27 | auto open_functions = GetFileReaderOpenFunctions(); 28 | const size_t num_readers = open_functions->size(); 29 | open_functions->push_back(open_function); 30 | return open_functions->size() == num_readers + 1; 31 | } 32 | 33 | std::unique_ptr FileReaderFactory::OpenReader( 34 | const std::string &file_name) { 35 | for (auto open_function : *GetFileReaderOpenFunctions()) { 36 | auto reader = open_function(file_name); 37 | if (reader == nullptr) { 38 | continue; 39 | } 40 | return reader; 41 | } 42 | return nullptr; 43 | } 44 | 45 | } // namespace draco 46 | -------------------------------------------------------------------------------- /src/draco/io/file_reader_factory.h: -------------------------------------------------------------------------------- 1 | #ifndef DRACO_IO_FILE_READER_FACTORY_H_ 2 | #define DRACO_IO_FILE_READER_FACTORY_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include "draco/io/file_reader_interface.h" 8 | 9 | namespace draco { 10 | 11 | class FileReaderFactory { 12 | public: 13 | using OpenFunction = 14 | std::unique_ptr (*)(const std::string &file_name); 15 | 16 | FileReaderFactory() = delete; 17 | FileReaderFactory(const FileReaderFactory &) = delete; 18 | FileReaderFactory &operator=(const FileReaderFactory &) = delete; 19 | ~FileReaderFactory() = default; 20 | 21 | // Registers the OpenFunction for a FileReaderInterface and returns true when 22 | // registration succeeds. 23 | static bool RegisterReader(OpenFunction open_function); 24 | 25 | // Passes |file_name| to each OpenFunction until one succeeds. Returns nullptr 26 | // when no reader is found for |file_name|. Otherwise a FileReaderInterface is 27 | // returned. 28 | static std::unique_ptr OpenReader( 29 | const std::string &file_name); 30 | }; 31 | 32 | } // namespace draco 33 | 34 | #endif // DRACO_IO_FILE_READER_FACTORY_H_ 35 | -------------------------------------------------------------------------------- /src/draco/io/file_reader_interface.h: -------------------------------------------------------------------------------- 1 | #ifndef DRACO_IO_FILE_READER_INTERFACE_H_ 2 | #define DRACO_IO_FILE_READER_INTERFACE_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace draco { 9 | 10 | class FileReaderInterface { 11 | public: 12 | FileReaderInterface() = default; 13 | FileReaderInterface(const FileReaderInterface &) = delete; 14 | FileReaderInterface &operator=(const FileReaderInterface &) = delete; 15 | 16 | FileReaderInterface(FileReaderInterface &&) = default; 17 | FileReaderInterface &operator=(FileReaderInterface &&) = default; 18 | 19 | // Closes the file. 20 | virtual ~FileReaderInterface() = default; 21 | 22 | // Reads the entire contents of the input file into |buffer| and returns true. 23 | virtual bool ReadFileToBuffer(std::vector *buffer) = 0; 24 | virtual bool ReadFileToBuffer(std::vector *buffer) = 0; 25 | 26 | // Returns the size of the file. 27 | virtual size_t GetFileSize() = 0; 28 | }; 29 | 30 | } // namespace draco 31 | 32 | #endif // DRACO_IO_FILE_READER_INTERFACE_H_ 33 | -------------------------------------------------------------------------------- /src/draco/io/file_reader_test_common.h: -------------------------------------------------------------------------------- 1 | #ifndef DRACO_IO_FILE_READER_TEST_COMMON_H_ 2 | #define DRACO_IO_FILE_READER_TEST_COMMON_H_ 3 | 4 | #include 5 | 6 | namespace draco { 7 | 8 | const size_t kFileSizeCarDrc = 69892; 9 | const size_t kFileSizeCubePcDrc = 224; 10 | 11 | } // namespace draco 12 | 13 | #endif // DRACO_IO_FILE_READER_TEST_COMMON_H_ 14 | -------------------------------------------------------------------------------- /src/draco/io/file_writer_factory.h: -------------------------------------------------------------------------------- 1 | #ifndef DRACO_IO_FILE_WRITER_FACTORY_H_ 2 | #define DRACO_IO_FILE_WRITER_FACTORY_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include "draco/io/file_writer_interface.h" 8 | 9 | namespace draco { 10 | 11 | class FileWriterFactory { 12 | public: 13 | using OpenFunction = 14 | std::unique_ptr (*)(const std::string &file_name); 15 | 16 | FileWriterFactory() = delete; 17 | FileWriterFactory(const FileWriterFactory &) = delete; 18 | FileWriterFactory &operator=(const FileWriterFactory &) = delete; 19 | ~FileWriterFactory() = default; 20 | 21 | // Registers the OpenFunction for a FileWriterInterface and returns true when 22 | // registration succeeds. 23 | static bool RegisterWriter(OpenFunction open_function); 24 | 25 | // Passes |file_name| to each OpenFunction until one succeeds. Returns nullptr 26 | // when no writer is found for |file_name|. Otherwise a FileWriterInterface is 27 | // returned. 28 | static std::unique_ptr OpenWriter( 29 | const std::string &file_name); 30 | }; 31 | 32 | } // namespace draco 33 | 34 | #endif // DRACO_IO_FILE_WRITER_FACTORY_H_ 35 | -------------------------------------------------------------------------------- /src/draco/io/file_writer_interface.h: -------------------------------------------------------------------------------- 1 | #ifndef DRACO_IO_FILE_WRITER_INTERFACE_H_ 2 | #define DRACO_IO_FILE_WRITER_INTERFACE_H_ 3 | 4 | #include 5 | 6 | namespace draco { 7 | 8 | class FileWriterInterface { 9 | public: 10 | FileWriterInterface() = default; 11 | FileWriterInterface(const FileWriterInterface &) = delete; 12 | FileWriterInterface &operator=(const FileWriterInterface &) = delete; 13 | 14 | FileWriterInterface(FileWriterInterface &&) = default; 15 | FileWriterInterface &operator=(FileWriterInterface &&) = default; 16 | 17 | // Closes the file. 18 | virtual ~FileWriterInterface() = default; 19 | 20 | // Writes |size| bytes from |buffer| to file. 21 | virtual bool Write(const char *buffer, size_t size) = 0; 22 | }; 23 | 24 | } // namespace draco 25 | 26 | #endif // DRACO_IO_FILE_WRITER_INTERFACE_H_ 27 | -------------------------------------------------------------------------------- /src/draco/io/image_compression_options.h: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #ifndef DRACO_IO_IMAGE_COMPRESSION_OPTIONS_H_ 16 | #define DRACO_IO_IMAGE_COMPRESSION_OPTIONS_H_ 17 | 18 | #include "draco/draco_features.h" 19 | 20 | #ifdef DRACO_TRANSCODER_SUPPORTED 21 | #include 22 | 23 | namespace draco { 24 | 25 | // Enum defining image compression formats. 26 | enum class ImageFormat { 27 | NONE, 28 | PNG, 29 | JPEG, 30 | BASIS, 31 | WEBP, 32 | }; 33 | 34 | } // namespace draco 35 | 36 | #endif // DRACO_TRANSCODER_SUPPORTED 37 | #endif // DRACO_IO_IMAGE_COMPRESSION_OPTIONS_H_ 38 | -------------------------------------------------------------------------------- /src/draco/io/stdio_file_writer.h: -------------------------------------------------------------------------------- 1 | #ifndef DRACO_IO_STDIO_FILE_WRITER_H_ 2 | #define DRACO_IO_STDIO_FILE_WRITER_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "draco/io/file_writer_interface.h" 10 | 11 | namespace draco { 12 | 13 | class StdioFileWriter : public FileWriterInterface { 14 | public: 15 | // Creates and returns a StdioFileWriter that writes to |file_name|. 16 | // Returns nullptr when |file_name| cannot be opened for writing. 17 | static std::unique_ptr Open( 18 | const std::string &file_name); 19 | 20 | StdioFileWriter() = delete; 21 | StdioFileWriter(const StdioFileWriter &) = delete; 22 | StdioFileWriter &operator=(const StdioFileWriter &) = delete; 23 | 24 | StdioFileWriter(StdioFileWriter &&) = default; 25 | StdioFileWriter &operator=(StdioFileWriter &&) = default; 26 | 27 | // Closes |file_|. 28 | ~StdioFileWriter() override; 29 | 30 | // Writes |size| bytes to |file_| from |buffer|. Returns true for success. 31 | bool Write(const char *buffer, size_t size) override; 32 | 33 | private: 34 | StdioFileWriter(FILE *file) : file_(file) {} 35 | 36 | FILE *file_ = nullptr; 37 | static bool registered_in_factory_; 38 | }; 39 | 40 | } // namespace draco 41 | 42 | #endif // DRACO_IO_STDIO_FILE_WRITER_H_ 43 | -------------------------------------------------------------------------------- /src/draco/io/stdio_file_writer_test.cc: -------------------------------------------------------------------------------- 1 | #include "draco/io/stdio_file_writer.h" 2 | 3 | #include 4 | #include 5 | 6 | #include "draco/core/draco_test_base.h" 7 | #include "draco/core/draco_test_utils.h" 8 | 9 | namespace draco { 10 | namespace { 11 | 12 | void CheckFileWriter(const std::string &data, const std::string &filename) { 13 | auto writer = StdioFileWriter::Open(filename); 14 | ASSERT_NE(writer, nullptr); 15 | ASSERT_TRUE(writer->Write(data.data(), data.size())); 16 | writer.reset(); 17 | std::unique_ptr file(fopen(filename.c_str(), "r"), 18 | fclose); 19 | ASSERT_NE(file, nullptr); 20 | std::string read_buffer(data.size(), ' '); 21 | ASSERT_EQ(fread(reinterpret_cast(&read_buffer[0]), 1, data.size(), 22 | file.get()), 23 | data.size()); 24 | ASSERT_EQ(read_buffer, data); 25 | } 26 | 27 | TEST(StdioFileWriterTest, FailOpen) { 28 | EXPECT_EQ(StdioFileWriter::Open(""), nullptr); 29 | } 30 | 31 | TEST(StdioFileWriterTest, BasicWrite) { 32 | const std::string kWriteString = "Hello"; 33 | const std::string kTempFilePath = GetTestTempFileFullPath("hello"); 34 | CheckFileWriter(kWriteString, kTempFilePath); 35 | } 36 | 37 | } // namespace 38 | } // namespace draco 39 | -------------------------------------------------------------------------------- /src/draco/io/stl_decoder.h: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #ifndef DRACO_IO_STL_DECODER_H_ 16 | #define DRACO_IO_STL_DECODER_H_ 17 | 18 | #include 19 | 20 | #include "draco/core/decoder_buffer.h" 21 | #include "draco/core/status.h" 22 | #include "draco/core/status_or.h" 23 | #include "draco/draco_features.h" 24 | #include "draco/mesh/mesh.h" 25 | 26 | namespace draco { 27 | 28 | // Decodes an STL file into draco::Mesh (or draco::PointCloud if the 29 | // connectivity data is not needed). 30 | class StlDecoder { 31 | public: 32 | StatusOr> DecodeFromFile(const std::string &file_name); 33 | StatusOr> DecodeFromBuffer(DecoderBuffer *buffer); 34 | }; 35 | 36 | } // namespace draco 37 | 38 | #endif // DRACO_IO_STL_DECODER_H_ 39 | -------------------------------------------------------------------------------- /src/draco/javascript/emscripten/draco_decoder_glue_wrapper.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | // This file is used by emscripten's WebIDL Binder. 16 | // http://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/WebIDL-Binder.html 17 | #include "draco/attributes/attribute_octahedron_transform.h" 18 | #include "draco/attributes/attribute_quantization_transform.h" 19 | #include "draco/attributes/geometry_attribute.h" 20 | #include "draco/attributes/point_attribute.h" 21 | #include "draco/compression/decode.h" 22 | #include "draco/core/decoder_buffer.h" 23 | #include "draco/javascript/emscripten/decoder_webidl_wrapper.h" 24 | #include "draco/mesh/mesh.h" 25 | #include "draco/point_cloud/point_cloud.h" 26 | 27 | // glue.cpp is generated by Makefile.emcc build_glue target. 28 | #include "glue_decoder.cpp" 29 | -------------------------------------------------------------------------------- /src/draco/javascript/emscripten/draco_encoder_glue_wrapper.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | // This file is used by emscripten's WebIDL Binder. 16 | // http://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/WebIDL-Binder.html 17 | #include "draco/attributes/geometry_attribute.h" 18 | #include "draco/attributes/point_attribute.h" 19 | #include "draco/compression/encode.h" 20 | #include "draco/javascript/emscripten/encoder_webidl_wrapper.h" 21 | #include "draco/mesh/mesh.h" 22 | #include "draco/point_cloud/point_cloud.h" 23 | 24 | // glue.cpp is generated by Makefile.emcc build_glue target. 25 | #include "glue_encoder.cpp" 26 | -------------------------------------------------------------------------------- /src/draco/javascript/emscripten/finalize.js: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Calls the 'onModuleParsed' callback if provided. This file is included as the 16 | // last one in the generated javascript and it gives the caller a way to check 17 | // that all previous content was successfully processed. 18 | // Note: emscripten's |onRuntimeInitialized| is called before any --post-js 19 | // files are included which is not equivalent to this callback. 20 | if (typeof Module['onModuleParsed'] === 'function') { 21 | Module['onModuleParsed'](); 22 | } 23 | -------------------------------------------------------------------------------- /src/draco/javascript/emscripten/prepareCallbacks.js: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Prepares callbacks that can be used to inform the caller that the module has 16 | // been fully loaded. 17 | var isRuntimeInitialized = false; 18 | var isModuleParsed = false; 19 | 20 | // These two callbacks can be called in arbitrary order. We call the final 21 | // function |onModuleLoaded| after both of these callbacks have been called. 22 | Module['onRuntimeInitialized'] = function() { 23 | isRuntimeInitialized = true; 24 | if (isModuleParsed) { 25 | if (typeof Module['onModuleLoaded'] === 'function') { 26 | Module['onModuleLoaded'](Module); 27 | } 28 | } 29 | }; 30 | 31 | Module['onModuleParsed'] = function() { 32 | isModuleParsed = true; 33 | if (isRuntimeInitialized) { 34 | if (typeof Module['onModuleLoaded'] === 'function') { 35 | Module['onModuleLoaded'](Module); 36 | } 37 | } 38 | }; 39 | -------------------------------------------------------------------------------- /src/draco/javascript/emscripten/version.js: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Returns true if the specified Draco version is supported by this decoder. 16 | function isVersionSupported(versionString) { 17 | if (typeof versionString !== 'string') 18 | return false; 19 | const version = versionString.split('.'); 20 | if (version.length < 2 || version.length > 3) 21 | return false; // Unexpected version string. 22 | if (version[0] == 1 && version[1] >= 0 && version[1] <= 5) 23 | return true; 24 | if (version[0] != 0 || version[1] > 10) 25 | return false; 26 | return true; 27 | } 28 | 29 | Module['isVersionSupported'] = isVersionSupported; 30 | -------------------------------------------------------------------------------- /src/draco/material/material_utils.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | -------------------------------------------------------------------------------- /src/draco/material/material_utils.h: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | -------------------------------------------------------------------------------- /src/draco/material/material_utils_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #include "draco/material/material_utils.h" 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | #include "draco/core/draco_test_utils.h" 22 | #include "draco/io/texture_io.h" 23 | 24 | namespace {} // namespace 25 | -------------------------------------------------------------------------------- /src/draco/mesh/mesh_indices.h: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #ifdef DRACO_TRANSCODER_SUPPORTED 16 | #ifndef DRACO_MESH_MESH_INDICES_H_ 17 | #define DRACO_MESH_MESH_INDICES_H_ 18 | 19 | #include 20 | 21 | #include 22 | 23 | #include "draco/core/draco_index_type.h" 24 | 25 | namespace draco { 26 | 27 | // Index of a mesh feature ID set. 28 | DEFINE_NEW_DRACO_INDEX_TYPE(uint32_t, MeshFeaturesIndex) 29 | 30 | // Constants denoting invalid indices. 31 | static constexpr MeshFeaturesIndex kInvalidMeshFeaturesIndex( 32 | std::numeric_limits::max()); 33 | 34 | } // namespace draco 35 | 36 | #endif // DRACO_MESH_MESH_INDICES_H_ 37 | #endif // DRACO_TRANSCODER_SUPPORTED 38 | -------------------------------------------------------------------------------- /src/draco/mesh/mesh_splitter_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #include "draco/mesh/mesh_splitter.h" 16 | 17 | #ifdef DRACO_TRANSCODER_SUPPORTED 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #include "draco/attributes/geometry_attribute.h" 25 | #include "draco/core/draco_test_base.h" 26 | #include "draco/core/draco_test_utils.h" 27 | #include "draco/core/draco_types.h" 28 | #include "draco/core/vector_d.h" 29 | #include "draco/io/mesh_io.h" 30 | #include "draco/material/material.h" 31 | #include "draco/mesh/mesh_misc_functions.h" 32 | #include "draco/point_cloud/point_cloud_builder.h" 33 | 34 | namespace {} // namespace 35 | #endif // DRACO_TRANSCODER_SUPPORTED 36 | -------------------------------------------------------------------------------- /src/draco/scene/light.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #include "draco/scene/light.h" 16 | 17 | #ifdef DRACO_TRANSCODER_SUPPORTED 18 | 19 | #include 20 | 21 | #include "draco/core/constants.h" 22 | 23 | namespace draco { 24 | 25 | Light::Light() 26 | : color_(1.0f, 1.0f, 1.0f), 27 | intensity_(1.0), 28 | type_(POINT), 29 | range_(std::numeric_limits::max()), // Infinity. 30 | inner_cone_angle_(0.0), 31 | outer_cone_angle_(DRACO_PI / 4.0) {} 32 | 33 | void Light::Copy(const Light &light) { 34 | name_ = light.name_; 35 | color_ = light.color_; 36 | intensity_ = light.intensity_; 37 | type_ = light.type_; 38 | range_ = light.range_; 39 | inner_cone_angle_ = light.inner_cone_angle_; 40 | outer_cone_angle_ = light.outer_cone_angle_; 41 | } 42 | 43 | } // namespace draco 44 | 45 | #endif // DRACO_TRANSCODER_SUPPORTED 46 | -------------------------------------------------------------------------------- /src/draco/texture/source_image.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #include "draco/texture/source_image.h" 16 | 17 | #ifdef DRACO_TRANSCODER_SUPPORTED 18 | 19 | namespace draco { 20 | 21 | void SourceImage::Copy(const SourceImage &src) { 22 | mime_type_ = src.mime_type_; 23 | filename_ = src.filename_; 24 | encoded_data_ = src.encoded_data_; 25 | } 26 | 27 | } // namespace draco 28 | 29 | #endif // DRACO_TRANSCODER_SUPPORTED 30 | -------------------------------------------------------------------------------- /src/draco/texture/texture_library_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Draco Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | #include "draco/texture/texture_library.h" 16 | 17 | #include 18 | 19 | #include "draco/core/draco_test_utils.h" 20 | #include "draco/io/texture_io.h" 21 | 22 | namespace {} // namespace 23 | -------------------------------------------------------------------------------- /src/draco/texture/texture_map_test.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/src/draco/texture/texture_map_test.cc -------------------------------------------------------------------------------- /src/draco/texture/texture_transform_test.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/src/draco/texture/texture_transform_test.cc -------------------------------------------------------------------------------- /src/draco/tools/fuzz/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eu 2 | # Copyright 2020 Google Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | ################################################################################ 17 | 18 | # build project 19 | cmake $SRC/draco 20 | # The draco_decoder and draco_encoder binaries don't build nicely with OSS-Fuzz 21 | # options, so just build the Draco shared libraries. 22 | make -j$(nproc) 23 | 24 | # build fuzzers 25 | for fuzzer in $(find $SRC/draco/src/draco/tools/fuzz -name '*.cc'); do 26 | fuzzer_basename=$(basename -s .cc $fuzzer) 27 | $CXX $CXXFLAGS \ 28 | -I $SRC/ \ 29 | -I $SRC/draco/src \ 30 | -I $WORK/ \ 31 | $LIB_FUZZING_ENGINE \ 32 | $fuzzer \ 33 | $WORK/libdraco.a \ 34 | -o $OUT/$fuzzer_basename 35 | done 36 | -------------------------------------------------------------------------------- /src/draco/tools/fuzz/draco_mesh_decoder_fuzzer.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #include 16 | 17 | #include "draco/src/draco/compression/decode.h" 18 | #include "draco/src/draco/core/decoder_buffer.h" 19 | #include "draco/src/draco/mesh/mesh.h" 20 | 21 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { 22 | draco::DecoderBuffer buffer; 23 | buffer.Init(reinterpret_cast(data), size); 24 | 25 | draco::Decoder decoder; 26 | decoder.DecodeMeshFromBuffer(&buffer); 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /src/draco/tools/fuzz/draco_mesh_decoder_without_dequantization_fuzzer.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #include 16 | 17 | #include "draco/src/draco/compression/decode.h" 18 | #include "draco/src/draco/core/decoder_buffer.h" 19 | #include "draco/src/draco/mesh/mesh.h" 20 | 21 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { 22 | draco::DecoderBuffer buffer; 23 | buffer.Init(reinterpret_cast(data), size); 24 | 25 | draco::Decoder decoder; 26 | decoder.SetSkipAttributeTransform(draco::GeometryAttribute::POSITION); 27 | decoder.DecodeMeshFromBuffer(&buffer); 28 | 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /src/draco/tools/fuzz/draco_pc_decoder_fuzzer.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #include 16 | 17 | #include "draco/src/draco/compression/decode.h" 18 | #include "draco/src/draco/core/decoder_buffer.h" 19 | #include "draco/src/draco/point_cloud/point_cloud.h" 20 | 21 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { 22 | draco::DecoderBuffer buffer; 23 | buffer.Init(reinterpret_cast(data), size); 24 | 25 | draco::Decoder decoder; 26 | decoder.DecodePointCloudFromBuffer(&buffer); 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /src/draco/tools/fuzz/draco_pc_decoder_without_dequantization_fuzzer.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #include 16 | 17 | #include "draco/src/draco/compression/decode.h" 18 | #include "draco/src/draco/core/decoder_buffer.h" 19 | #include "draco/src/draco/point_cloud/point_cloud.h" 20 | 21 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { 22 | draco::DecoderBuffer buffer; 23 | buffer.Init(reinterpret_cast(data), size); 24 | 25 | draco::Decoder decoder; 26 | decoder.SetSkipAttributeTransform(draco::GeometryAttribute::POSITION); 27 | decoder.DecodePointCloudFromBuffer(&buffer); 28 | 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /src/draco/tools/install_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Draco Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | # use this file except in compliance with the License. You may obtain a copy of 5 | # the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | cmake_minimum_required(VERSION 3.12) 16 | project(install_test C CXX) 17 | 18 | include(GNUInstallDirs) 19 | 20 | find_package(draco REQUIRED CONFIG) 21 | 22 | add_executable(install_check main.cc) 23 | target_link_libraries(install_check PRIVATE draco::draco) 24 | 25 | install(TARGETS install_check DESTINATION ${CMAKE_INSTALL_BINDIR}) 26 | -------------------------------------------------------------------------------- /testdata/Box.ply: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/Box.ply -------------------------------------------------------------------------------- /testdata/Box/glTF/Box0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/Box/glTF/Box0.bin -------------------------------------------------------------------------------- /testdata/Box/glTF_Binary/Box.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/Box/glTF_Binary/Box.glb -------------------------------------------------------------------------------- /testdata/Box/glTF_Binary/Box_Draco.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/Box/glTF_Binary/Box_Draco.glb -------------------------------------------------------------------------------- /testdata/BoxMeta/glTF/Texture0_MeshFeatures.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/BoxMeta/glTF/Texture0_MeshFeatures.png -------------------------------------------------------------------------------- /testdata/BoxMeta/glTF/Texture1_MeshFeatures.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/BoxMeta/glTF/Texture1_MeshFeatures.png -------------------------------------------------------------------------------- /testdata/BoxMeta/glTF/buffer0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/BoxMeta/glTF/buffer0.bin -------------------------------------------------------------------------------- /testdata/BoxMetaDraco/glTF/Texture0_MeshFeatures.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/BoxMetaDraco/glTF/Texture0_MeshFeatures.png -------------------------------------------------------------------------------- /testdata/BoxMetaDraco/glTF/Texture1_MeshFeatures.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/BoxMetaDraco/glTF/Texture1_MeshFeatures.png -------------------------------------------------------------------------------- /testdata/BoxMetaDraco/glTF/buffer0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/BoxMetaDraco/glTF/buffer0.bin -------------------------------------------------------------------------------- /testdata/BoxesMeta/glTF/Texture0_MeshFeatures.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/BoxesMeta/glTF/Texture0_MeshFeatures.png -------------------------------------------------------------------------------- /testdata/BoxesMeta/glTF/Texture1_MeshFeatures.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/BoxesMeta/glTF/Texture1_MeshFeatures.png -------------------------------------------------------------------------------- /testdata/BoxesMeta/glTF/buffer0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/BoxesMeta/glTF/buffer0.bin -------------------------------------------------------------------------------- /testdata/CesiumMan/glTF/CesiumMan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/CesiumMan/glTF/CesiumMan.jpg -------------------------------------------------------------------------------- /testdata/CesiumMan/glTF/CesiumMan0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/CesiumMan/glTF/CesiumMan0.bin -------------------------------------------------------------------------------- /testdata/CesiumMan/glTF_Binary/CesiumMan.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/CesiumMan/glTF_Binary/CesiumMan.glb -------------------------------------------------------------------------------- /testdata/CesiumMilkTruck/glTF/CesiumMilkTruck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/CesiumMilkTruck/glTF/CesiumMilkTruck.png -------------------------------------------------------------------------------- /testdata/CesiumMilkTruck/glTF/CesiumMilkTruck0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/CesiumMilkTruck/glTF/CesiumMilkTruck0.bin -------------------------------------------------------------------------------- /testdata/CubeScaledInstances/glTF/buffer0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/CubeScaledInstances/glTF/buffer0.bin -------------------------------------------------------------------------------- /testdata/DuplicateMeshes/Texture0_BaseColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/DuplicateMeshes/Texture0_BaseColor.png -------------------------------------------------------------------------------- /testdata/DuplicateMeshes/Texture0_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/DuplicateMeshes/Texture0_Normal.png -------------------------------------------------------------------------------- /testdata/DuplicateMeshes/buffer0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/DuplicateMeshes/buffer0.bin -------------------------------------------------------------------------------- /testdata/Fox/glTF/Fox.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/Fox/glTF/Fox.bin -------------------------------------------------------------------------------- /testdata/Fox/glTF/Texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/Fox/glTF/Texture.png -------------------------------------------------------------------------------- /testdata/InterpolationTest/glTF/interpolation.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/InterpolationTest/glTF/interpolation.bin -------------------------------------------------------------------------------- /testdata/InterpolationTest/glTF/l.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/InterpolationTest/glTF/l.jpg -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/AnimatedMorphCube/glTF/AnimatedMorphCube.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/AnimatedMorphCube/glTF/AnimatedMorphCube.bin -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/DragonAttenuation/glTF/DragonAttenuation.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/DragonAttenuation/glTF/DragonAttenuation.bin -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/DragonAttenuation/glTF/Dragon_ThicknessMap.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/DragonAttenuation/glTF/Dragon_ThicknessMap.jpg -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/DragonAttenuation/glTF/checkerboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/DragonAttenuation/glTF/checkerboard.jpg -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/DragonAttenuation/glTF_Binary/DragonAttenuation.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/DragonAttenuation/glTF_Binary/DragonAttenuation.glb -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/Duck/glTF/Duck0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/Duck/glTF/Duck0.bin -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/Duck/glTF/DuckCM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/Duck/glTF/DuckCM.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/Duck/glTF_Binary/Duck.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/Duck/glTF_Binary/Duck.glb -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SheenCloth/glTF/SheenCloth.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SheenCloth/glTF/SheenCloth.bin -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SheenCloth/glTF/technicalFabricSmall_basecolor_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SheenCloth/glTF/technicalFabricSmall_basecolor_256.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SheenCloth/glTF/technicalFabricSmall_normal_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SheenCloth/glTF/technicalFabricSmall_normal_256.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SheenCloth/glTF/technicalFabricSmall_orm_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SheenCloth/glTF/technicalFabricSmall_orm_256.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SheenCloth/glTF/technicalFabricSmall_sheen_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SheenCloth/glTF/technicalFabricSmall_sheen_256.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SheenCloth/glTF_Binary/SheenCloth.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SheenCloth/glTF_Binary/SheenCloth.glb -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SimpleSparseAccessor/glTF/SimpleSparseAccessor.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SimpleSparseAccessor/glTF/SimpleSparseAccessor.bin -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/SpecGlossVsMetalRough.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/SpecGlossVsMetalRough.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/SpecGlossVsMetalRoughLabel.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/SpecGlossVsMetalRoughLabel.bin -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/WaterBottle.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/WaterBottle.bin -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/WaterBottle_baseColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/WaterBottle_baseColor.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/WaterBottle_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/WaterBottle_diffuse.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/WaterBottle_emissive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/WaterBottle_emissive.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/WaterBottle_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/WaterBottle_normal.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/WaterBottle_occlusion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/WaterBottle_occlusion.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/WaterBottle_roughnessMetallic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/WaterBottle_roughnessMetallic.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/WaterBottle_specularGlossiness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/SpecGlossVsMetalRough/glTF/WaterBottle_specularGlossiness.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/TextureSettingsTest/glTF/CheckAndX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/TextureSettingsTest/glTF/CheckAndX.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/TextureSettingsTest/glTF/CheckAndX_V.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/TextureSettingsTest/glTF/CheckAndX_V.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/TextureSettingsTest/glTF/TextureSettingsTest0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/TextureSettingsTest/glTF/TextureSettingsTest0.bin -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/TextureSettingsTest/glTF/TextureTestLabels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/TextureSettingsTest/glTF/TextureTestLabels.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/TextureTransformTest/glTF/Arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/TextureTransformTest/glTF/Arrow.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/TextureTransformTest/glTF/Correct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/TextureTransformTest/glTF/Correct.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/TextureTransformTest/glTF/Error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/TextureTransformTest/glTF/Error.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/TextureTransformTest/glTF/NotSupported.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/TextureTransformTest/glTF/NotSupported.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/TextureTransformTest/glTF/TextureTransformTest.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/TextureTransformTest/glTF/TextureTransformTest.bin -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/TextureTransformTest/glTF/UV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/TextureTransformTest/glTF/UV.png -------------------------------------------------------------------------------- /testdata/KhronosSampleModels/UnlitTest/glTF/UnlitTest.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/KhronosSampleModels/UnlitTest/glTF/UnlitTest.bin -------------------------------------------------------------------------------- /testdata/Lantern/glTF/Lantern.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/Lantern/glTF/Lantern.bin -------------------------------------------------------------------------------- /testdata/Lantern/glTF/Lantern_baseColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/Lantern/glTF/Lantern_baseColor.png -------------------------------------------------------------------------------- /testdata/Lantern/glTF/Lantern_emissive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/Lantern/glTF/Lantern_emissive.png -------------------------------------------------------------------------------- /testdata/Lantern/glTF/Lantern_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/Lantern/glTF/Lantern_normal.png -------------------------------------------------------------------------------- /testdata/Lantern/glTF/Lantern_roughnessMetallic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/Lantern/glTF/Lantern_roughnessMetallic.png -------------------------------------------------------------------------------- /testdata/MultiUVTest/glTF/MultiUVTest.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/MultiUVTest/glTF/MultiUVTest.bin -------------------------------------------------------------------------------- /testdata/MultiUVTest/glTF/uv0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/MultiUVTest/glTF/uv0.png -------------------------------------------------------------------------------- /testdata/MultiUVTest/glTF/uv1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/MultiUVTest/glTF/uv1.png -------------------------------------------------------------------------------- /testdata/STL/bunny.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/STL/bunny.stl -------------------------------------------------------------------------------- /testdata/STL/test_sphere.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/STL/test_sphere.stl -------------------------------------------------------------------------------- /testdata/SphereAllSame/256x256_all_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/SphereAllSame/256x256_all_blue.png -------------------------------------------------------------------------------- /testdata/SphereAllSame/256x256_all_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/SphereAllSame/256x256_all_green.png -------------------------------------------------------------------------------- /testdata/SphereAllSame/256x256_all_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/SphereAllSame/256x256_all_orange.png -------------------------------------------------------------------------------- /testdata/SphereAllSame/256x256_all_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/SphereAllSame/256x256_all_red.png -------------------------------------------------------------------------------- /testdata/SphereAllSame/buffer0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/SphereAllSame/buffer0.bin -------------------------------------------------------------------------------- /testdata/SphereTwoMaterials/Texture0_BaseColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/SphereTwoMaterials/Texture0_BaseColor.png -------------------------------------------------------------------------------- /testdata/SphereTwoMaterials/Texture0_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/SphereTwoMaterials/Texture0_Normal.png -------------------------------------------------------------------------------- /testdata/SphereTwoMaterials/buffer0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/SphereTwoMaterials/buffer0.bin -------------------------------------------------------------------------------- /testdata/SphereWithCircleTexture/sphere_with_circle_texture.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/SphereWithCircleTexture/sphere_with_circle_texture.bin -------------------------------------------------------------------------------- /testdata/SphereWithCircleTexture/test_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/SphereWithCircleTexture/test_color.png -------------------------------------------------------------------------------- /testdata/SpheresScaledInstances/glTF/buffer0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/SpheresScaledInstances/glTF/buffer0.bin -------------------------------------------------------------------------------- /testdata/Triangle/glTF/Triangle.gltf: -------------------------------------------------------------------------------- 1 | { 2 | "scenes" : [ 3 | { 4 | "nodes" : [ 0 ] 5 | } 6 | ], 7 | 8 | "nodes" : [ 9 | { 10 | "mesh" : 0 11 | } 12 | ], 13 | 14 | "meshes" : [ 15 | { 16 | "primitives" : [ { 17 | "attributes" : { 18 | "POSITION" : 1 19 | }, 20 | "indices" : 0 21 | } ] 22 | } 23 | ], 24 | 25 | "buffers" : [ 26 | { 27 | "uri" : "simpleTriangle.bin", 28 | "byteLength" : 44 29 | } 30 | ], 31 | "bufferViews" : [ 32 | { 33 | "buffer" : 0, 34 | "byteOffset" : 0, 35 | "byteLength" : 6, 36 | "target" : 34963 37 | }, 38 | { 39 | "buffer" : 0, 40 | "byteOffset" : 8, 41 | "byteLength" : 36, 42 | "target" : 34962 43 | } 44 | ], 45 | "accessors" : [ 46 | { 47 | "bufferView" : 0, 48 | "byteOffset" : 0, 49 | "componentType" : 5123, 50 | "count" : 3, 51 | "type" : "SCALAR", 52 | "max" : [ 2 ], 53 | "min" : [ 0 ] 54 | }, 55 | { 56 | "bufferView" : 1, 57 | "byteOffset" : 0, 58 | "componentType" : 5126, 59 | "count" : 3, 60 | "type" : "VEC3", 61 | "max" : [ 1.0, 1.0, 0.0 ], 62 | "min" : [ 0.0, 0.0, 0.0 ] 63 | } 64 | ], 65 | 66 | "asset" : { 67 | "version" : "2.0" 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /testdata/Triangle/glTF/Triangle_identity_matrix.gltf: -------------------------------------------------------------------------------- 1 | { 2 | "scenes" : [ 3 | { 4 | "nodes" : [ 0 ] 5 | } 6 | ], 7 | "nodes" : [ 8 | { 9 | "mesh" : 0, 10 | "matrix": [ 11 | 1, 0, 0, 0, 12 | 0, 1, 0, 0, 13 | 0, 0, 1, 0, 14 | 0, 0, 0, 1 15 | ] 16 | } 17 | ], 18 | "meshes" : [ 19 | { 20 | "primitives" : [ { 21 | "attributes" : { 22 | "POSITION" : 1 23 | }, 24 | "indices" : 0 25 | } ] 26 | } 27 | ], 28 | "buffers" : [ 29 | { 30 | "uri" : "simpleTriangle.bin", 31 | "byteLength" : 44 32 | } 33 | ], 34 | "bufferViews" : [ 35 | { 36 | "buffer" : 0, 37 | "byteOffset" : 0, 38 | "byteLength" : 6, 39 | "target" : 34963 40 | }, 41 | { 42 | "buffer" : 0, 43 | "byteOffset" : 8, 44 | "byteLength" : 36, 45 | "target" : 34962 46 | } 47 | ], 48 | "accessors" : [ 49 | { 50 | "bufferView" : 0, 51 | "byteOffset" : 0, 52 | "componentType" : 5123, 53 | "count" : 3, 54 | "type" : "SCALAR", 55 | "max" : [ 2 ], 56 | "min" : [ 0 ] 57 | }, 58 | { 59 | "bufferView" : 1, 60 | "byteOffset" : 0, 61 | "componentType" : 5126, 62 | "count" : 3, 63 | "type" : "VEC3", 64 | "max" : [ 1.0, 1.0, 0.0 ], 65 | "min" : [ 0.0, 0.0, 0.0 ] 66 | } 67 | ], 68 | "asset" : { 69 | "version" : "2.0" 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /testdata/Triangle/glTF/Triangle_translation_only_matrix.gltf: -------------------------------------------------------------------------------- 1 | { 2 | "scenes" : [ 3 | { 4 | "nodes" : [ 0 ] 5 | } 6 | ], 7 | "nodes" : [ 8 | { 9 | "mesh" : 0, 10 | "matrix": [ 11 | 1, 0, 0, 0, 12 | 0, 1, 0, 0, 13 | 0, 0, 1, 0, 14 | 1, 0, 0, 1 15 | ] 16 | } 17 | ], 18 | "meshes" : [ 19 | { 20 | "primitives" : [ { 21 | "attributes" : { 22 | "POSITION" : 1 23 | }, 24 | "indices" : 0 25 | } ] 26 | } 27 | ], 28 | "buffers" : [ 29 | { 30 | "uri" : "simpleTriangle.bin", 31 | "byteLength" : 44 32 | } 33 | ], 34 | "bufferViews" : [ 35 | { 36 | "buffer" : 0, 37 | "byteOffset" : 0, 38 | "byteLength" : 6, 39 | "target" : 34963 40 | }, 41 | { 42 | "buffer" : 0, 43 | "byteOffset" : 8, 44 | "byteLength" : 36, 45 | "target" : 34962 46 | } 47 | ], 48 | "accessors" : [ 49 | { 50 | "bufferView" : 0, 51 | "byteOffset" : 0, 52 | "componentType" : 5123, 53 | "count" : 3, 54 | "type" : "SCALAR", 55 | "max" : [ 2 ], 56 | "min" : [ 0 ] 57 | }, 58 | { 59 | "bufferView" : 1, 60 | "byteOffset" : 0, 61 | "componentType" : 5126, 62 | "count" : 3, 63 | "type" : "VEC3", 64 | "max" : [ 1.0, 1.0, 0.0 ], 65 | "min" : [ 0.0, 0.0, 0.0 ] 66 | } 67 | ], 68 | "asset" : { 69 | "version" : "2.0" 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /testdata/Triangle/glTF/simpleTriangle.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/Triangle/glTF/simpleTriangle.bin -------------------------------------------------------------------------------- /testdata/TwoSidedPlane/glTF/TwoSidedPlane.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/TwoSidedPlane/glTF/TwoSidedPlane.bin -------------------------------------------------------------------------------- /testdata/TwoSidedPlane/glTF/TwoSidedPlane_BaseColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/TwoSidedPlane/glTF/TwoSidedPlane_BaseColor.png -------------------------------------------------------------------------------- /testdata/TwoSidedPlane/glTF/TwoSidedPlane_MetallicRoughness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/TwoSidedPlane/glTF/TwoSidedPlane_MetallicRoughness.png -------------------------------------------------------------------------------- /testdata/TwoSidedPlane/glTF/TwoSidedPlane_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/TwoSidedPlane/glTF/TwoSidedPlane_Normal.png -------------------------------------------------------------------------------- /testdata/UnlitWithFallback/one_material_all_fallback/BoxTextured0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/UnlitWithFallback/one_material_all_fallback/BoxTextured0.bin -------------------------------------------------------------------------------- /testdata/UnlitWithFallback/one_material_all_fallback/CesiumLogoFlat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/UnlitWithFallback/one_material_all_fallback/CesiumLogoFlat.png -------------------------------------------------------------------------------- /testdata/UnlitWithFallback/three_materials_all_fallback/Texture0_BaseColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/UnlitWithFallback/three_materials_all_fallback/Texture0_BaseColor.png -------------------------------------------------------------------------------- /testdata/UnlitWithFallback/three_materials_all_fallback/semicube.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/UnlitWithFallback/three_materials_all_fallback/semicube.bin -------------------------------------------------------------------------------- /testdata/UnlitWithFallback/three_materials_all_fallback/sphere_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/UnlitWithFallback/three_materials_all_fallback/sphere_text.png -------------------------------------------------------------------------------- /testdata/UnlitWithFallback/three_materials_one_fallback/Texture0_BaseColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/UnlitWithFallback/three_materials_one_fallback/Texture0_BaseColor.png -------------------------------------------------------------------------------- /testdata/UnlitWithFallback/three_materials_one_fallback/semicube.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/UnlitWithFallback/three_materials_one_fallback/semicube.bin -------------------------------------------------------------------------------- /testdata/UnlitWithFallback/three_materials_one_fallback/sphere_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/UnlitWithFallback/three_materials_one_fallback/sphere_text.png -------------------------------------------------------------------------------- /testdata/UnusedTexCoords/MultiUVTest.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/UnusedTexCoords/MultiUVTest.bin -------------------------------------------------------------------------------- /testdata/UnusedTexCoords/uv0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/UnusedTexCoords/uv0.png -------------------------------------------------------------------------------- /testdata/UnusedTexCoords/uv1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/UnusedTexCoords/uv1.png -------------------------------------------------------------------------------- /testdata/VertexColorTest/glTF/VertexColorChecks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/VertexColorTest/glTF/VertexColorChecks.png -------------------------------------------------------------------------------- /testdata/VertexColorTest/glTF/VertexColorTest.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/VertexColorTest/glTF/VertexColorTest.bin -------------------------------------------------------------------------------- /testdata/VertexColorTest/glTF/VertexColorTestLabels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/VertexColorTest/glTF/VertexColorTestLabels.png -------------------------------------------------------------------------------- /testdata/ZeroLengthBufferView/ZeroLengthBufferView.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/ZeroLengthBufferView/ZeroLengthBufferView.bin -------------------------------------------------------------------------------- /testdata/bunny_gltf.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/bunny_gltf.drc -------------------------------------------------------------------------------- /testdata/car.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/car.drc -------------------------------------------------------------------------------- /testdata/cube_att.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/cube_att.drc -------------------------------------------------------------------------------- /testdata/cube_att.obj: -------------------------------------------------------------------------------- 1 | v 0.0 0.0 0.0 2 | v 0.0 0.0 1.0 3 | v 0.0 1.0 0.0 4 | v 0.0 1.0 1.0 5 | v 1.0 0.0 0.0 6 | v 1.0 0.0 1.0 7 | v 1.0 1.0 0.0 8 | v 1.0 1.0 1.0 9 | 10 | vn 0.0 0.0 1.0 11 | vn 0.0 0.0 -1.0 12 | vn 0.0 1.0 0.0 13 | vn 0.0 -1.0 0.0 14 | vn 1.0 0.0 0.0 15 | vn -1.0 0.0 0.0 16 | 17 | vt 0.0 0.0 18 | vt 0.0 1.0 19 | vt 1.0 0.0 20 | vt 1.0 1.0 21 | 22 | f 1/4/2 7/1/2 5/2/2 23 | f 1/4/2 3/3/2 7/1/2 24 | f 1/2/6 4/3/6 3/1/6 25 | f 1/2/6 2/4/6 4/3/6 26 | f 3/1/3 8/4/3 7/3/3 27 | f 3/1/3 4/2/3 8/4/3 28 | f 5/4/5 7/3/5 8/1/5 29 | f 5/4/5 8/1/5 6/2/5 30 | f 1/2/4 5/4/4 6/3/4 31 | f 1/2/4 6/3/4 2/1/4 32 | f 2/2/1 6/4/1 8/3/1 33 | f 2/2/1 8/3/1 4/1/1 34 | -------------------------------------------------------------------------------- /testdata/cube_att.obj.edgebreaker.cl10.2.2.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/cube_att.obj.edgebreaker.cl10.2.2.drc -------------------------------------------------------------------------------- /testdata/cube_att.obj.edgebreaker.cl4.2.2.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/cube_att.obj.edgebreaker.cl4.2.2.drc -------------------------------------------------------------------------------- /testdata/cube_att.obj.sequential.cl3.2.2.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/cube_att.obj.sequential.cl3.2.2.drc -------------------------------------------------------------------------------- /testdata/cube_att.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment VCGLIB generated 4 | element vertex 24 5 | property float x 6 | property float y 7 | property float z 8 | property float nx 9 | property float ny 10 | property float nz 11 | element face 12 12 | property list uchar int vertex_indices 13 | property list uchar float texcoord 14 | end_header 15 | 0 0 0 -1 0 0 16 | 0 0 1 0 0 1 17 | 0 1 0 0 1 0 18 | 0 1 1 0 1 0 19 | 1 0 0 0 -1 0 20 | 1 0 1 0 -1 0 21 | 1 1 0 1 0 0 22 | 1 1 1 1 0 0 23 | 0 0 0 0 -1 0 24 | 0 0 0 0 0 -1 25 | 1 1 0 0 1 0 26 | 1 1 0 0 0 -1 27 | 1 0 0 1 0 0 28 | 1 0 0 0 0 -1 29 | 0 1 0 -1 0 0 30 | 0 1 0 0 0 -1 31 | 0 1 1 0 0 1 32 | 0 1 1 -1 0 0 33 | 0 0 1 0 -1 0 34 | 0 0 1 -1 0 0 35 | 1 1 1 0 0 1 36 | 1 1 1 0 1 0 37 | 1 0 1 0 0 1 38 | 1 0 1 1 0 0 39 | 3 9 11 13 6 1 1 0 0 0 1 40 | 3 9 15 11 6 1 1 1 0 0 0 41 | 3 0 17 14 6 0 1 1 0 0 0 42 | 3 0 19 17 6 0 1 1 1 1 0 43 | 3 2 21 10 6 0 0 1 1 1 0 44 | 3 2 3 21 6 0 0 0 1 1 1 45 | 3 12 6 7 6 1 1 1 0 0 0 46 | 3 12 7 23 6 1 1 0 0 0 1 47 | 3 8 4 5 6 0 1 1 1 1 0 48 | 3 8 5 18 6 0 1 1 0 0 0 49 | 3 1 22 20 6 0 1 1 1 1 0 50 | 3 1 20 16 6 0 1 1 0 0 0 51 | -------------------------------------------------------------------------------- /testdata/cube_att_partial.obj: -------------------------------------------------------------------------------- 1 | # Attributes are only partially specified on the faces. 2 | 3 | v 0.0 0.0 0.0 4 | v 0.0 0.0 1.0 5 | v 0.0 1.0 0.0 6 | v 0.0 1.0 1.0 7 | v 1.0 0.0 0.0 8 | v 1.0 0.0 1.0 9 | v 1.0 1.0 0.0 10 | v 1.0 1.0 1.0 11 | 12 | vn 0.0 0.0 1.0 13 | vn 0.0 0.0 -1.0 14 | vn 0.0 1.0 0.0 15 | vn 0.0 -1.0 0.0 16 | vn 1.0 0.0 0.0 17 | vn -1.0 0.0 0.0 18 | 19 | vt 0.0 0.0 20 | vt 0.0 1.0 21 | vt 1.0 0.0 22 | vt 1.0 1.0 23 | 24 | f 1/4 7/1 5/2 25 | f 1/4/2 3/3/2 7/1/2 26 | f 1/2 4/3 3/1 27 | f 1//6 2//6 4//6 28 | f 3/1/3 8/4/3 7/3/3 29 | f 3/1/3 4/2/3 8/4/3 30 | f 5//5 7//5 8//5 31 | f 5/4/5 8/1/5 6/2/5 32 | f 1/2/4 5/4/4 6/3/4 33 | f 1/2/4 6/3/4 2/1/4 34 | f 2 6 8 35 | f 2 8 4 36 | -------------------------------------------------------------------------------- /testdata/cube_att_sub_o.obj: -------------------------------------------------------------------------------- 1 | v 0.0 0.0 0.0 2 | v 0.0 0.0 1.0 3 | v 0.0 1.0 0.0 4 | v 0.0 1.0 1.0 5 | v 1.0 0.0 0.0 6 | v 1.0 0.0 1.0 7 | v 1.0 1.0 0.0 8 | v 1.0 1.0 1.0 9 | 10 | vn 0.0 0.0 1.0 11 | vn 0.0 0.0 -1.0 12 | vn 0.0 1.0 0.0 13 | vn 0.0 -1.0 0.0 14 | vn 1.0 0.0 0.0 15 | vn -1.0 0.0 0.0 16 | 17 | vt 0.0 0.0 18 | vt 0.0 1.0 19 | vt 1.0 0.0 20 | vt 1.0 1.0 21 | 22 | o obj0 23 | f 1/4/2 7/1/2 5/2/2 24 | f 1/4/2 3/3/2 7/1/2 25 | f 1/2/6 4/3/6 3/1/6 26 | f 1/2/6 2/4/6 4/3/6 27 | o obj1 28 | f 3/1/3 8/4/3 7/3/3 29 | f 3/1/3 4/2/3 8/4/3 30 | f 5/4/5 7/3/5 8/1/5 31 | f 5/4/5 8/1/5 6/2/5 32 | f 1/2/4 5/4/4 6/3/4 33 | o obj2 34 | f 1/2/4 6/3/4 2/1/4 35 | f 2/2/1 6/4/1 8/3/1 36 | f 2/2/1 8/3/1 4/1/1 37 | -------------------------------------------------------------------------------- /testdata/cube_att_sub_o_2.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/cube_att_sub_o_2.drc -------------------------------------------------------------------------------- /testdata/cube_att_sub_o_2.obj: -------------------------------------------------------------------------------- 1 | v 0.0 0.0 0.0 2 | v 0.0 0.0 1.0 3 | v 0.0 1.0 0.0 4 | v 0.0 1.0 1.0 5 | v 1.0 0.0 0.0 6 | v 1.0 0.0 1.0 7 | v 1.0 1.0 0.0 8 | v 1.0 1.0 1.0 9 | 10 | vn 0.0 0.0 1.0 11 | vn 0.0 0.0 -1.0 12 | vn 0.0 1.0 0.0 13 | vn 0.0 -1.0 0.0 14 | vn 1.0 0.0 0.0 15 | vn -1.0 0.0 0.0 16 | 17 | vt 0.0 0.0 18 | vt 0.0 1.0 19 | vt 1.0 0.0 20 | vt 1.0 1.0 21 | 22 | o nam 23 | f 1/4/2 7/1/2 5/2/2 24 | f 1/4/2 3/3/2 7/1/2 25 | f 1/2/6 4/3/6 3/1/6 26 | f 1/2/6 2/4/6 4/3/6 27 | o name1 28 | f 3/1/3 8/4/3 7/3/3 29 | f 3/1/3 4/2/3 8/4/3 30 | f 5/4/5 7/3/5 8/1/5 31 | f 5/4/5 8/1/5 6/2/5 32 | f 1/2/4 5/4/4 6/3/4 33 | o name_ 34 | f 1/2/4 6/3/4 2/1/4 35 | f 2/2/1 6/4/1 8/3/1 36 | f 2/2/1 8/3/1 4/1/1 37 | -------------------------------------------------------------------------------- /testdata/cube_att_sub_o_no_metadata.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/cube_att_sub_o_no_metadata.drc -------------------------------------------------------------------------------- /testdata/cube_pc.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/cube_pc.drc -------------------------------------------------------------------------------- /testdata/cube_quads.obj: -------------------------------------------------------------------------------- 1 | v 0.0 0.0 0.0 2 | v 0.0 0.0 1.0 3 | v 0.0 1.0 0.0 4 | v 0.0 1.0 1.0 5 | v 1.0 0.0 0.0 6 | v 1.0 0.0 1.0 7 | v 1.0 1.0 0.0 8 | v 1.0 1.0 1.0 9 | 10 | vn 0.0 0.0 1.0 11 | vn 0.0 0.0 -1.0 12 | vn 0.0 1.0 0.0 13 | vn 0.0 -1.0 0.0 14 | vn 1.0 0.0 0.0 15 | vn -1.0 0.0 0.0 16 | 17 | vt 0.0 0.0 18 | vt 0.0 1.0 19 | vt 1.0 0.0 20 | vt 1.0 1.0 21 | 22 | f 1/4/2 3/3/2 7/1/2 5/2/2 23 | f 1/2/6 2/4/6 4/3/6 3/1/6 24 | f 3/1/3 4/2/3 8/4/3 7/3/3 25 | f 5/4/5 7/3/5 8/1/5 6/2/5 26 | f 1/2/4 5/4/4 6/3/4 2/1/4 27 | f 2/2/1 6/4/1 8/3/1 4/1/1 28 | -------------------------------------------------------------------------------- /testdata/cube_quads.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 8 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 6 8 | property list uint8 int32 vertex_index 9 | end_header 10 | 0 0 0 11 | 0 0 1 12 | 0 1 1 13 | 0 1 0 14 | 1 0 0 15 | 1 0 1 16 | 1 1 1 17 | 1 1 0 18 | 4 0 1 2 3 19 | 4 7 6 5 4 20 | 4 0 4 5 1 21 | 4 1 5 6 2 22 | 4 2 6 7 3 23 | 4 3 7 4 0 -------------------------------------------------------------------------------- /testdata/deg_faces.obj: -------------------------------------------------------------------------------- 1 | v 0.123 0.6514 0.000001 2 | v 0.342 0.1234 0.000002 3 | v 0.156 0.8422 0.000003 4 | v 0.252 0.2344 0.000004 5 | v 0.782 4.2515 0.000005 6 | v 0.127 1.2715 0.000006 7 | 8 | # 6 vertices, 0 vertices normals 9 | 10 | f 1 2 3 11 | f 3 2 6 12 | f 4 6 2 13 | f 1 1 3 14 | 15 | # 4 faces, 0 coords texture 16 | 17 | # End of File 18 | -------------------------------------------------------------------------------- /testdata/degenerate_mesh.obj: -------------------------------------------------------------------------------- 1 | v 0 0 0 2 | v 0 0 0 3 | v 0 0 0 4 | f 3 2 1 5 | -------------------------------------------------------------------------------- /testdata/delim_test.ply: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/delim_test.ply -------------------------------------------------------------------------------- /testdata/empty_name.obj: -------------------------------------------------------------------------------- 1 | o 2 | v -1.3264260292053223 -0.3829360008239746 -0.8749939799308777 3 | v -1.3262399435043335 -0.3956040143966675 -0.8693050146102905 4 | v -1.3313590288162231 -0.38378798961639404 -0.8686969876289368 5 | f 1 2 3 6 | -------------------------------------------------------------------------------- /testdata/eof_test.obj: -------------------------------------------------------------------------------- 1 | v 1.00 0.10 0.00 2 | v 2.00 0.01 0.00 3 | v 3.00 0.11 0.00 4 | f 1 2 3 -------------------------------------------------------------------------------- /testdata/extra_vertex.obj: -------------------------------------------------------------------------------- 1 | #### 2 | # 3 | # OBJ File Generated by Meshlab 4 | # 5 | #### 6 | # Object test_nm.obj 7 | # 8 | # Vertices: 10 9 | # Faces: 3 10 | # 11 | #### 12 | vn 0.000000 0.000000 0.000000 13 | v 0.382683 0.923880 0.000000 14 | vn 0.000000 0.000000 0.000000 15 | v 0.353553 0.923880 0.146447 16 | vn 0.000000 0.000000 0.000000 17 | v 0.270598 0.923880 0.270598 18 | vn 0.000000 0.000000 0.000000 19 | v 0.146447 0.923880 0.353553 20 | vn 0.000000 0.000000 0.000000 21 | v 0.000000 0.923880 0.382683 22 | vn 0.000000 0.000000 0.000000 23 | v -0.146447 0.923880 0.353553 24 | vn 0.000000 0.000000 0.000000 25 | v -0.270598 0.923880 0.270598 26 | vn 0.000000 0.000000 0.000000 27 | v -0.353553 0.923880 0.146447 28 | vn 0.000000 0.000000 0.000000 29 | v -0.382683 0.923880 0.000000 30 | vn 0.000000 0.000000 0.000000 31 | v -0.382683 0.923880 0.000023 32 | 33 | 34 | # 10 vertices, 0 vertices normals 35 | 36 | f 1//1 2//2 3//3 37 | f 4//4 5//5 6//6 38 | f 7//7 8//8 9//9 39 | 40 | # 3 faces, 0 coords texture 41 | 42 | # End of File -------------------------------------------------------------------------------- /testdata/float_inf_point_cloud.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 16 4 | property float x 5 | property float y 6 | property float z 7 | end_header 8 | -409 249 +inf 9 | -427 279 -inf 10 | -431 296 -inf 11 | -479 276 2 12 | -511 278 1 13 | -491 355 3 14 | -542 315 4 15 | -544 372 4 16 | -588 361 4 17 | -602 392 5 18 | -667 370 2 19 | -642 462 6 20 | -713 418 5 21 | -714 487 7 22 | -772 477 7 23 | -797 517 8 24 | -------------------------------------------------------------------------------- /testdata/float_two_att_point_cloud.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 3 4 | property float x 5 | property float y 6 | property float z 7 | property float nx 8 | property float ny 9 | property float nz 10 | end_header 11 | 4.9 2.9 3.8 1 0 0 12 | 4.7 2.9 7.7 0 1 0 13 | 4.1 2.6 1.4 0 0 1 14 | -------------------------------------------------------------------------------- /testdata/glTF/KhrTextureTransformWithFallback/MultiUVTest.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/glTF/KhrTextureTransformWithFallback/MultiUVTest.bin -------------------------------------------------------------------------------- /testdata/glTF/KhrTextureTransformWithFallback/uv0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/glTF/KhrTextureTransformWithFallback/uv0.png -------------------------------------------------------------------------------- /testdata/glTF/KhrTextureTransformWithFallback/uv1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/glTF/KhrTextureTransformWithFallback/uv1.png -------------------------------------------------------------------------------- /testdata/glTF/TextureTransformTestWithRequired/Arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/glTF/TextureTransformTestWithRequired/Arrow.png -------------------------------------------------------------------------------- /testdata/glTF/TextureTransformTestWithRequired/Correct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/glTF/TextureTransformTestWithRequired/Correct.png -------------------------------------------------------------------------------- /testdata/glTF/TextureTransformTestWithRequired/Error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/glTF/TextureTransformTestWithRequired/Error.png -------------------------------------------------------------------------------- /testdata/glTF/TextureTransformTestWithRequired/NotSupported.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/glTF/TextureTransformTestWithRequired/NotSupported.png -------------------------------------------------------------------------------- /testdata/glTF/TextureTransformTestWithRequired/TextureTransformTest.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/glTF/TextureTransformTestWithRequired/TextureTransformTest.bin -------------------------------------------------------------------------------- /testdata/glTF/TextureTransformTestWithRequired/UV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/glTF/TextureTransformTestWithRequired/UV.png -------------------------------------------------------------------------------- /testdata/inf_nan.obj: -------------------------------------------------------------------------------- 1 | v inf nan +inf 2 | v nan -nan -Inf 3 | v 3.00 NaN -NaN 4 | 5 | # 3 vertices, 0 vertices normals 6 | 7 | f 1 2 3 8 | 9 | # 1 faces, 0 coords texture 10 | 11 | # End of File -------------------------------------------------------------------------------- /testdata/int_point_cloud.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 16 4 | property int x 5 | property int y 6 | property int z 7 | end_header 8 | -409 249 4 9 | -427 279 1 10 | -431 296 5 11 | -479 276 2 12 | -511 278 1 13 | -491 355 3 14 | -542 315 4 15 | -544 372 4 16 | -588 361 4 17 | -602 392 5 18 | -667 370 2 19 | -642 462 6 20 | -713 418 5 21 | -714 487 7 22 | -772 477 7 23 | -797 517 8 24 | -------------------------------------------------------------------------------- /testdata/multiple_isolated_triangles.obj: -------------------------------------------------------------------------------- 1 | v 0.1 0.1 0 2 | v 0.2 0.1 0 3 | v 0.15 0.2 0 4 | v 1.1 1.1 0 5 | v 1.2 1.1 0 6 | v 1.15 1.2 0 7 | v 2.1 2.1 0 8 | v 2.2 2.1 0 9 | v 2.15 2.2 0 10 | v 3.1 3.1 0 11 | v 3.2 3.1 0 12 | v 3.15 3.2 0 13 | v 4.1 4.1 0 14 | v 4.2 4.1 0 15 | v 4.15 4.2 0 16 | 17 | # 15 vertices, 0 vertices normals 18 | 19 | f 3 2 1 20 | f 6 5 4 21 | f 9 8 7 22 | f 12 11 10 23 | f 15 14 13 24 | 25 | # 5 faces, 0 coords texture 26 | 27 | # End of File 28 | -------------------------------------------------------------------------------- /testdata/multiple_tetrahedrons.obj: -------------------------------------------------------------------------------- 1 | v 0.1 0.1 0 2 | v 0.2 0.1 0 3 | v 0.15 0.2 0 4 | v 0.15 0.1 0.1 5 | v 1.1 1.1 0 6 | v 1.2 1.1 0 7 | v 1.15 1.2 0 8 | v 1.15 1.1 0.1 9 | v 2.1 2.1 0 10 | v 2.2 2.1 0 11 | v 2.15 2.2 0 12 | v 2.15 2.1 0.1 13 | v 3.1 3.1 0 14 | v 3.2 3.1 0 15 | v 3.15 3.2 0 16 | v 3.15 3.1 0.1 17 | v 4.1 4.1 0 18 | v 4.2 4.1 0 19 | v 4.15 4.2 0 20 | v 4.15 4.1 0.1 21 | 22 | # 20 vertices, 0 vertices normals 23 | 24 | f 1 3 2 25 | f 2 3 4 26 | f 4 3 1 27 | f 1 2 4 28 | f 5 7 6 29 | f 6 7 8 30 | f 8 7 5 31 | f 5 6 8 32 | f 9 11 10 33 | f 10 11 12 34 | f 12 11 9 35 | f 9 10 12 36 | f 13 15 14 37 | f 14 15 16 38 | f 16 15 13 39 | f 13 14 16 40 | f 17 19 18 41 | f 18 19 20 42 | f 20 19 17 43 | f 17 18 20 44 | 45 | # 20 faces, 0 coords texture 46 | 47 | # End of File 48 | -------------------------------------------------------------------------------- /testdata/non_manifold_wrap.obj: -------------------------------------------------------------------------------- 1 | 2 | v 0 0 0 3 | v 1 0 0 4 | v 0.5 1 0 5 | v 0.5 -1 0 6 | v 0.5 0 -1 7 | v 0.5 0 1 8 | v -0.5 0.2 0 9 | v 1.5 0.2 0 10 | v -0.5 -0.2 0 11 | v 1.5 -0.2 0 12 | 13 | f 1 2 3 14 | f 1 2 5 15 | f 2 1 4 16 | f 2 1 6 17 | 18 | f 2 6 8 19 | f 2 8 3 20 | f 2 4 10 21 | f 2 10 5 22 | 23 | f 6 1 7 24 | f 7 1 3 25 | f 4 1 9 26 | f 9 1 5 27 | -------------------------------------------------------------------------------- /testdata/octagon.obj: -------------------------------------------------------------------------------- 1 | v 0.0 1.0 1.0 2 | v 0.0 2.0 2.0 3 | v 1.0 3.0 4.0 4 | v 2.0 3.0 5.0 5 | v 3.0 2.0 5.0 6 | v 3.0 1.0 4.0 7 | v 2.0 0.0 2.0 8 | v 1.0 0.0 1.0 9 | 10 | f 1 2 3 4 5 6 7 8 11 | 12 | -------------------------------------------------------------------------------- /testdata/octagon_preserved.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/octagon_preserved.drc -------------------------------------------------------------------------------- /testdata/octagon_preserved.obj: -------------------------------------------------------------------------------- 1 | v 0.000000 1.000489 1.000000 2 | v 2.000977 0.000000 2.000489 3 | v 1.000489 0.000000 1.000000 4 | v 2.999511 1.000489 3.999511 5 | v 2.999511 2.000977 5.000000 6 | v 2.000977 2.999511 5.000000 7 | v 1.000489 2.999511 3.999511 8 | v 0.000000 2.000977 2.000489 9 | f 8 7 6 5 4 2 3 1 10 | -------------------------------------------------------------------------------- /testdata/one_face_123.obj: -------------------------------------------------------------------------------- 1 | v 1.00 0.10 0.00 2 | v 2.00 0.01 0.00 3 | v 3.00 0.11 0.00 4 | 5 | # 3 vertices, 0 vertices normals 6 | 7 | f 1 2 3 8 | 9 | # 1 faces, 0 coords texture 10 | 11 | # End of File -------------------------------------------------------------------------------- /testdata/one_face_123_buffer0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/one_face_123_buffer0.bin -------------------------------------------------------------------------------- /testdata/one_face_312.obj: -------------------------------------------------------------------------------- 1 | v 1.00 0.10 0.00 2 | v 2.00 0.01 0.00 3 | v 3.00 0.11 0.00 4 | 5 | # 3 vertices, 0 vertices normals 6 | 7 | f 3 1 2 8 | 9 | # 1 faces, 0 coords texture 10 | 11 | # End of File -------------------------------------------------------------------------------- /testdata/one_face_321.obj: -------------------------------------------------------------------------------- 1 | v 1.00 0.10 0.00 2 | v 2.00 0.01 0.00 3 | v 3.00 0.11 0.00 4 | 5 | # 3 vertices, 0 vertices normals 6 | 7 | f 3 2 1 8 | 9 | # 1 faces, 0 coords texture 10 | 11 | # End of File -------------------------------------------------------------------------------- /testdata/pbr_next/sphere/glTF/sphere_buffer0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/pbr_next/sphere/glTF/sphere_buffer0.bin -------------------------------------------------------------------------------- /testdata/pbr_next/sphere/glTF/texture_BaseColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/pbr_next/sphere/glTF/texture_BaseColor.png -------------------------------------------------------------------------------- /testdata/pbr_next/sphere/glTF/texture_Clearcoat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/pbr_next/sphere/glTF/texture_Clearcoat.png -------------------------------------------------------------------------------- /testdata/pbr_next/sphere/glTF/texture_ClearcoatNormal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/pbr_next/sphere/glTF/texture_ClearcoatNormal.jpg -------------------------------------------------------------------------------- /testdata/pbr_next/sphere/glTF/texture_ClearcoatRoughness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/pbr_next/sphere/glTF/texture_ClearcoatRoughness.png -------------------------------------------------------------------------------- /testdata/pbr_next/sphere/glTF/texture_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/pbr_next/sphere/glTF/texture_Normal.png -------------------------------------------------------------------------------- /testdata/pbr_next/sphere/glTF/texture_SheenColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/pbr_next/sphere/glTF/texture_SheenColor.png -------------------------------------------------------------------------------- /testdata/pbr_next/sphere/glTF/texture_SheenRoughness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/pbr_next/sphere/glTF/texture_SheenRoughness.png -------------------------------------------------------------------------------- /testdata/pbr_next/sphere/glTF/texture_Specular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/pbr_next/sphere/glTF/texture_Specular.png -------------------------------------------------------------------------------- /testdata/pbr_next/sphere/glTF/texture_SpecularColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/pbr_next/sphere/glTF/texture_SpecularColor.png -------------------------------------------------------------------------------- /testdata/pbr_next/sphere/glTF/texture_Thickness.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/pbr_next/sphere/glTF/texture_Thickness.jpg -------------------------------------------------------------------------------- /testdata/pbr_next/sphere/glTF/texture_Transmission.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/pbr_next/sphere/glTF/texture_Transmission.jpg -------------------------------------------------------------------------------- /testdata/pc_color.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/pc_color.drc -------------------------------------------------------------------------------- /testdata/pc_kd_color.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/pc_kd_color.drc -------------------------------------------------------------------------------- /testdata/point_cloud_no_qp.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/point_cloud_no_qp.drc -------------------------------------------------------------------------------- /testdata/point_cloud_test_pos.obj: -------------------------------------------------------------------------------- 1 | 2 | #### 3 | # 4 | # OBJ File Generated by Meshlab 5 | # 6 | #### 7 | # Object point_cloud_test_pos.obj 8 | # 9 | # Vertices: 4 10 | # Faces: 2 11 | # 12 | #### 13 | v 38.638046 19.293715 1.344739 14 | v 37.934464 16.675100 3.278329 15 | v 43.772350 8.421069 3.516231 16 | v 44.082806 8.826009 3.492609 17 | # 4 vertices, 0 vertices normals 18 | f 1 2 3 19 | f 2 3 4 20 | # 2 faces, 0 coords texture 21 | 22 | # End of File -------------------------------------------------------------------------------- /testdata/point_cloud_test_pos.ply: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/point_cloud_test_pos.ply -------------------------------------------------------------------------------- /testdata/point_cloud_test_pos_norm.obj: -------------------------------------------------------------------------------- 1 | 2 | #### 3 | # 4 | # OBJ File Generated by Meshlab 5 | # 6 | #### 7 | # Object point_cloud_test_pos_norm.obj 8 | # 9 | # Vertices: 4 10 | # Faces: 2 11 | # 12 | #### 13 | v 38.638046 19.293715 1.344739 14 | vn 38.638046 19.293715 1.344739 15 | v 37.934464 16.675100 3.278329 16 | vn 37.934464 16.675100 3.278329 17 | v 43.772350 8.421069 3.516231 18 | vn 43.772350 8.421069 3.516231 19 | v 44.082806 8.826009 3.492609 20 | vn 44.082806 8.826009 3.492609 21 | # 4 vertices, 4 vertices normals 22 | f 1//1 2//2 3//3 23 | f 2//2 3//3 4//4 24 | # 2 faces, 0 coords texture 25 | 26 | # End of File -------------------------------------------------------------------------------- /testdata/point_cloud_test_pos_norm.ply: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/point_cloud_test_pos_norm.ply -------------------------------------------------------------------------------- /testdata/sphere_Texture0_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/sphere_Texture0_Normal.png -------------------------------------------------------------------------------- /testdata/sphere_Texture1_BaseColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/sphere_Texture1_BaseColor.png -------------------------------------------------------------------------------- /testdata/sphere_buffer0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/sphere_buffer0.bin -------------------------------------------------------------------------------- /testdata/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test.png -------------------------------------------------------------------------------- /testdata/test_extra_whitespace.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment manual generated 4 | element vertex 3 5 | property float x 6 | property float y 7 | property float z 8 | property uchar red 9 | property uchar green 10 | property uchar blue 11 | property uchar alpha 12 | element face 1 13 | property list uchar int vertex_indices 14 | end_header 15 | 0.25 0.1 0 209 0 122 255 16 | 0.5 0.9 0 77 0 205 255 17 | 0.75 0.1 0 0 0 255 255 18 | 3 0 1 2 19 | -------------------------------------------------------------------------------- /testdata/test_generic.ply: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test_generic.ply -------------------------------------------------------------------------------- /testdata/test_generic_golden.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test_generic_golden.bin -------------------------------------------------------------------------------- /testdata/test_more_datatypes.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment manual generated 4 | element vertex 3 5 | property float32 x 6 | property float32 y 7 | property float z 8 | property uchar red 9 | property uint8 green 10 | property uchar blue 11 | property uint8 alpha 12 | element face 1 13 | property list uchar int32 vertex_indices 14 | end_header 15 | 0.25 0.1 0 209 0 122 255 16 | 0.5 0.9 0 77 0 205 255 17 | 0.75 0.1 0 0 0 255 255 18 | 3 0 1 2 19 | -------------------------------------------------------------------------------- /testdata/test_nm.obj.edgebreaker.0.10.0.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test_nm.obj.edgebreaker.0.10.0.drc -------------------------------------------------------------------------------- /testdata/test_nm.obj.edgebreaker.0.9.1.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test_nm.obj.edgebreaker.0.9.1.drc -------------------------------------------------------------------------------- /testdata/test_nm.obj.edgebreaker.1.0.0.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test_nm.obj.edgebreaker.1.0.0.drc -------------------------------------------------------------------------------- /testdata/test_nm.obj.edgebreaker.1.1.0.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test_nm.obj.edgebreaker.1.1.0.drc -------------------------------------------------------------------------------- /testdata/test_nm.obj.edgebreaker.cl10.2.2.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test_nm.obj.edgebreaker.cl10.2.2.drc -------------------------------------------------------------------------------- /testdata/test_nm.obj.edgebreaker.cl4.2.2.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test_nm.obj.edgebreaker.cl4.2.2.drc -------------------------------------------------------------------------------- /testdata/test_nm.obj.sequential.0.10.0.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test_nm.obj.sequential.0.10.0.drc -------------------------------------------------------------------------------- /testdata/test_nm.obj.sequential.0.9.1.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test_nm.obj.sequential.0.9.1.drc -------------------------------------------------------------------------------- /testdata/test_nm.obj.sequential.1.0.0.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test_nm.obj.sequential.1.0.0.drc -------------------------------------------------------------------------------- /testdata/test_nm.obj.sequential.1.1.0.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test_nm.obj.sequential.1.1.0.drc -------------------------------------------------------------------------------- /testdata/test_nm.obj.sequential.cl3.2.2.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test_nm.obj.sequential.cl3.2.2.drc -------------------------------------------------------------------------------- /testdata/test_nm_quant.0.9.0.drc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test_nm_quant.0.9.0.drc -------------------------------------------------------------------------------- /testdata/test_pos_color.ply: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test_pos_color.ply -------------------------------------------------------------------------------- /testdata/test_pos_color_buffer0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/test_pos_color_buffer0.bin -------------------------------------------------------------------------------- /testdata/test_wrong_attribute_mapping.obj: -------------------------------------------------------------------------------- 1 | v -2123.6666666666665 4247.3333333333285 -2123.6662124922086 2 | v -2123.6666666666665 4057.111265328756 -578.4722681813771 3 | v -578.4721995601915 4057.1112017592336 -2123.6661341002864 4 | f 1//1 2//2 3//3 5 | -------------------------------------------------------------------------------- /testdata/this_is_png.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/this_is_png.jpg -------------------------------------------------------------------------------- /testdata/three_faces_123.obj: -------------------------------------------------------------------------------- 1 | v 0.123 0.6514 0.000001 2 | v 0.342 0.1234 0.000002 3 | v 0.156 0.8422 0.000003 4 | v 0.252 0.2344 0.000004 5 | v 0.782 4.2515 0.000005 6 | v 0.127 1.2715 0.000006 7 | 8 | # 6 vertices, 0 vertices normals 9 | 10 | f 1 2 3 11 | f 4 5 6 12 | f 3 6 2 13 | 14 | # 3 faces, 0 coords texture 15 | 16 | # End of File -------------------------------------------------------------------------------- /testdata/three_faces_312.obj: -------------------------------------------------------------------------------- 1 | v 0.123 0.6514 0.000001 2 | v 0.342 0.1234 0.000002 3 | v 0.156 0.8422 0.000003 4 | v 0.252 0.2344 0.000004 5 | v 0.782 4.2515 0.000005 6 | v 0.127 1.2715 0.000006 7 | 8 | # 6 vertices, 0 vertices normals 9 | 10 | f 5 6 4 11 | f 3 1 2 12 | f 2 3 6 13 | 14 | # 3 faces, 0 coords texture 15 | 16 | # End of File -------------------------------------------------------------------------------- /testdata/three_meshes_two_materials_one_no_material/Texture0_BaseColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/three_meshes_two_materials_one_no_material/Texture0_BaseColor.png -------------------------------------------------------------------------------- /testdata/three_meshes_two_materials_one_no_material/semicube.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/three_meshes_two_materials_one_no_material/semicube.bin -------------------------------------------------------------------------------- /testdata/three_meshes_two_materials_one_no_material/sphere_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/three_meshes_two_materials_one_no_material/sphere_text.png -------------------------------------------------------------------------------- /testdata/trailing_zero.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/trailing_zero.jpg -------------------------------------------------------------------------------- /testdata/triangle.obj: -------------------------------------------------------------------------------- 1 | v 0.123 0.6514 0.000001 2 | v 0.342 0.1234 0.000002 3 | v 0.156 0.8422 0.000003 4 | 5 | f 1 2 3 6 | -------------------------------------------------------------------------------- /testdata/triangle_with_degenerate_tex_coords.obj: -------------------------------------------------------------------------------- 1 | v 0.123 0.6514 0.000001 2 | v 0.342 0.1234 0.000002 3 | v 0.156 0.8422 0.000003 4 | vt 0.0 0.0 0.0 5 | 6 | f 1/1 2/1 3/1 7 | -------------------------------------------------------------------------------- /testdata/two_faces_123.obj: -------------------------------------------------------------------------------- 1 | v 0.123 0.6514 0.000001 2 | v 0.342 0.1234 0.000002 3 | v 0.156 0.8422 0.000003 4 | v 0.252 0.2344 0.000004 5 | v 0.782 4.2515 0.000005 6 | v 0.127 1.2715 0.000006 7 | 8 | # 6 vertices, 0 vertices normals 9 | 10 | f 1 2 3 11 | f 4 5 6 12 | 13 | # 2 faces, 0 coords texture 14 | 15 | # End of File -------------------------------------------------------------------------------- /testdata/two_faces_312.obj: -------------------------------------------------------------------------------- 1 | v 0.123 0.6514 0.000001 2 | v 0.342 0.1234 0.000002 3 | v 0.156 0.8422 0.000003 4 | v 0.252 0.2344 0.000004 5 | v 0.782 4.2515 0.000005 6 | v 0.127 1.2715 0.000006 7 | 8 | # 6 vertices, 0 vertices normals 9 | 10 | f 5 6 4 11 | f 3 1 2 12 | 13 | # 1 faces, 0 coords texture 14 | 15 | # End of File -------------------------------------------------------------------------------- /testdata/two_objects_inverse_materials.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/testdata/two_objects_inverse_materials.bin -------------------------------------------------------------------------------- /unity/Plugin/libdracodec_unity_android.tar.bz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/unity/Plugin/libdracodec_unity_android.tar.bz -------------------------------------------------------------------------------- /unity/Plugin/libdracodec_unity_ios.tar.bz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/unity/Plugin/libdracodec_unity_ios.tar.bz -------------------------------------------------------------------------------- /unity/Plugin/libdracodec_unity_macos.tar.bz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/unity/Plugin/libdracodec_unity_macos.tar.bz -------------------------------------------------------------------------------- /unity/Plugin/libdracodec_unity_windows.tar.bz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/unity/Plugin/libdracodec_unity_windows.tar.bz -------------------------------------------------------------------------------- /unity/Resources/bunny.drc.bytes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/draco/4e12ab27d0fe690cf98e96dc33c2bd52e1485163/unity/Resources/bunny.drc.bytes --------------------------------------------------------------------------------