├── .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 |
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 | Contents
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