mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-07-21 12:24:23 +08:00
Updated snapshot to 1.3.5
* Added option to build Draco for Universal Scene Description * Code cleanup * Bug fixes
This commit is contained in:
parent
e9337d1faa
commit
8833cf878e
@ -1,4 +1,13 @@
|
|||||||
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
|
||||||
|
|
||||||
|
if (NOT CMAKE_BUILD_TYPE AND NOT IGNORE_EMPTY_BUILD_TYPE)
|
||||||
|
if (CMAKE_CURRENT_LIST_FILE STREQUAL CMAKE_PARENT_LIST_FILE)
|
||||||
|
message(INFO "|Draco: ignoring empty build type, forcing release mode.")
|
||||||
|
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Draco overridden build type"
|
||||||
|
FORCE)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
project(draco C CXX)
|
project(draco C CXX)
|
||||||
|
|
||||||
set(draco_root "${CMAKE_CURRENT_SOURCE_DIR}")
|
set(draco_root "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
@ -41,10 +50,11 @@ option(ENABLE_WASM "" OFF)
|
|||||||
option(ENABLE_WERROR "" OFF)
|
option(ENABLE_WERROR "" OFF)
|
||||||
option(ENABLE_WEXTRA "" OFF)
|
option(ENABLE_WEXTRA "" OFF)
|
||||||
option(IGNORE_EMPTY_BUILD_TYPE "" OFF)
|
option(IGNORE_EMPTY_BUILD_TYPE "" OFF)
|
||||||
option(BUILD_UNITY_PLUGIN "Build plugin library for Unity" OFF)
|
option(BUILD_UNITY_PLUGIN "Build plugin library for Unity." OFF)
|
||||||
option(BUILD_ANIMATION_ENCODING "" OFF)
|
option(BUILD_ANIMATION_ENCODING "" OFF)
|
||||||
option(BUILD_FOR_GLTF "" OFF)
|
option(BUILD_FOR_GLTF "" OFF)
|
||||||
option(BUILD_MAYA_PLUGIN "Build plugin library for Maya" OFF)
|
option(BUILD_MAYA_PLUGIN "Build plugin library for Maya." OFF)
|
||||||
|
option(BUILD_USD_PLUGIN "Build plugin library for USD." OFF)
|
||||||
|
|
||||||
if (WIN32 AND BUILD_SHARED_LIBS)
|
if (WIN32 AND BUILD_SHARED_LIBS)
|
||||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
|
||||||
@ -54,6 +64,7 @@ endif ()
|
|||||||
if (BUILD_FOR_GLTF)
|
if (BUILD_FOR_GLTF)
|
||||||
# Override settings when building for GLTF.
|
# Override settings when building for GLTF.
|
||||||
draco_enable_feature(FEATURE "DRACO_MESH_COMPRESSION_SUPPORTED")
|
draco_enable_feature(FEATURE "DRACO_MESH_COMPRESSION_SUPPORTED")
|
||||||
|
draco_enable_feature(FEATURE "DRACO_NORMAL_ENCODING_SUPPORTED")
|
||||||
draco_enable_feature(FEATURE "DRACO_STANDARD_EDGEBREAKER_SUPPORTED")
|
draco_enable_feature(FEATURE "DRACO_STANDARD_EDGEBREAKER_SUPPORTED")
|
||||||
else ()
|
else ()
|
||||||
if (ENABLE_POINT_CLOUD_COMPRESSION)
|
if (ENABLE_POINT_CLOUD_COMPRESSION)
|
||||||
@ -61,6 +72,7 @@ else ()
|
|||||||
endif ()
|
endif ()
|
||||||
if (ENABLE_MESH_COMPRESSION)
|
if (ENABLE_MESH_COMPRESSION)
|
||||||
draco_enable_feature(FEATURE "DRACO_MESH_COMPRESSION_SUPPORTED")
|
draco_enable_feature(FEATURE "DRACO_MESH_COMPRESSION_SUPPORTED")
|
||||||
|
draco_enable_feature(FEATURE "DRACO_NORMAL_ENCODING_SUPPORTED")
|
||||||
|
|
||||||
if (ENABLE_STANDARD_EDGEBREAKER)
|
if (ENABLE_STANDARD_EDGEBREAKER)
|
||||||
draco_enable_feature(FEATURE "DRACO_STANDARD_EDGEBREAKER_SUPPORTED")
|
draco_enable_feature(FEATURE "DRACO_STANDARD_EDGEBREAKER_SUPPORTED")
|
||||||
@ -120,6 +132,10 @@ if (BUILD_MAYA_PLUGIN)
|
|||||||
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared library for maya plugin.")
|
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared library for maya plugin.")
|
||||||
draco_enable_feature(FEATURE "BUILD_MAYA_PLUGIN")
|
draco_enable_feature(FEATURE "BUILD_MAYA_PLUGIN")
|
||||||
endif ()
|
endif ()
|
||||||
|
if (BUILD_USD_PLUGIN)
|
||||||
|
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared library for USD plugin.")
|
||||||
|
draco_enable_feature(FEATURE "BUILD_USD_PLUGIN")
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (ENABLE_EXTRA_SPEED)
|
if (ENABLE_EXTRA_SPEED)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
@ -164,17 +180,6 @@ configure_file("${draco_root}/cmake/draco_version.cc.cmake"
|
|||||||
configure_file("${draco_root}/cmake/draco_version.h.cmake"
|
configure_file("${draco_root}/cmake/draco_version.h.cmake"
|
||||||
"${draco_build_dir}/draco_version.h" COPYONLY)
|
"${draco_build_dir}/draco_version.h" COPYONLY)
|
||||||
|
|
||||||
# When a build type is not specified, default to producing a release mode Draco
|
|
||||||
# library to avoid benchmarking shenanigans, but only when Draco is not being
|
|
||||||
# pulled in via another cmake file.
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "" AND NOT IGNORE_EMPTY_BUILD_TYPE)
|
|
||||||
if (CMAKE_CURRENT_LIST_FILE STREQUAL CMAKE_PARENT_LIST_FILE)
|
|
||||||
message(INFO "|Draco: ignoring empty build type, forcing release mode.")
|
|
||||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Draco overridden build type"
|
|
||||||
FORCE)
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (EMSCRIPTEN)
|
if (EMSCRIPTEN)
|
||||||
include(FindPythonInterp)
|
include(FindPythonInterp)
|
||||||
if (NOT PYTHONINTERP_FOUND)
|
if (NOT PYTHONINTERP_FOUND)
|
||||||
@ -468,12 +473,14 @@ set(draco_core_sources
|
|||||||
"${draco_src_root}/core/quantization_utils.cc"
|
"${draco_src_root}/core/quantization_utils.cc"
|
||||||
"${draco_src_root}/core/quantization_utils.h"
|
"${draco_src_root}/core/quantization_utils.h"
|
||||||
"${draco_src_root}/core/status.h"
|
"${draco_src_root}/core/status.h"
|
||||||
"${draco_src_root}/core/statusor.h"
|
"${draco_src_root}/core/status_or.h"
|
||||||
"${draco_src_root}/core/varint_decoding.h"
|
"${draco_src_root}/core/varint_decoding.h"
|
||||||
"${draco_src_root}/core/varint_encoding.h"
|
"${draco_src_root}/core/varint_encoding.h"
|
||||||
"${draco_src_root}/core/vector_d.h")
|
"${draco_src_root}/core/vector_d.h")
|
||||||
|
|
||||||
set(draco_io_sources
|
set(draco_io_sources
|
||||||
|
"${draco_src_root}/io/file_utils.cc"
|
||||||
|
"${draco_src_root}/io/file_utils.h"
|
||||||
"${draco_src_root}/io/mesh_io.cc"
|
"${draco_src_root}/io/mesh_io.cc"
|
||||||
"${draco_src_root}/io/mesh_io.h"
|
"${draco_src_root}/io/mesh_io.h"
|
||||||
"${draco_src_root}/io/obj_decoder.cc"
|
"${draco_src_root}/io/obj_decoder.cc"
|
||||||
@ -798,10 +805,14 @@ if (EMSCRIPTEN AND ENABLE_JS_GLUE)
|
|||||||
append_link_flag_to_target(draco_encoder
|
append_link_flag_to_target(draco_encoder
|
||||||
"-s EXPORT_NAME=\"'DracoEncoderModule'\"")
|
"-s EXPORT_NAME=\"'DracoEncoderModule'\"")
|
||||||
|
|
||||||
draco_enable_feature(FEATURE DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
|
draco_enable_feature(FEATURE DRACO_ATTRIBUTE_INDICES_DEDUPLICATION_SUPPORTED
|
||||||
|
TARGETS draco_encoder)
|
||||||
|
draco_enable_feature(FEATURE DRACO_ATTRIBUTE_VALUES_DEDUPLICATION_SUPPORTED
|
||||||
TARGETS draco_encoder)
|
TARGETS draco_encoder)
|
||||||
if (ENABLE_DECODER_ATTRIBUTE_DEDUPLICATION)
|
if (ENABLE_DECODER_ATTRIBUTE_DEDUPLICATION)
|
||||||
draco_enable_feature(FEATURE DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
|
draco_enable_feature(FEATURE DRACO_ATTRIBUTE_INDICES_DEDUPLICATION_SUPPORTED
|
||||||
|
TARGETS draco_decoder)
|
||||||
|
draco_enable_feature(FEATURE DRACO_ATTRIBUTE_VALUES_DEDUPLICATION_SUPPORTED
|
||||||
TARGETS draco_decoder)
|
TARGETS draco_decoder)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
@ -1059,7 +1070,8 @@ else ()
|
|||||||
# For now, enable deduplication for both encoder and decoder.
|
# For now, enable deduplication for both encoder and decoder.
|
||||||
# TODO(ostava): Support for disabling attribute deduplication for the C++
|
# TODO(ostava): Support for disabling attribute deduplication for the C++
|
||||||
# decoder is planned in future releases.
|
# decoder is planned in future releases.
|
||||||
draco_enable_feature(FEATURE DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED)
|
draco_enable_feature(FEATURE DRACO_ATTRIBUTE_INDICES_DEDUPLICATION_SUPPORTED)
|
||||||
|
draco_enable_feature(FEATURE DRACO_ATTRIBUTE_VALUES_DEDUPLICATION_SUPPORTED)
|
||||||
|
|
||||||
if (BUILD_SHARED_LIBS)
|
if (BUILD_SHARED_LIBS)
|
||||||
set_target_properties(dracodec PROPERTIES SOVERSION 1)
|
set_target_properties(dracodec PROPERTIES SOVERSION 1)
|
||||||
|
@ -18,7 +18,7 @@ frustration later on.
|
|||||||
### Code reviews
|
### Code reviews
|
||||||
All submissions, including submissions by project members, require review. We
|
All submissions, including submissions by project members, require review. We
|
||||||
use GitHub pull requests for this purpose.
|
use GitHub pull requests for this purpose.
|
||||||
Please make sure that your code is conform with our
|
Please make sure that your code conforms with our
|
||||||
[coding style guidelines](https://google.github.io/styleguide/cppguide.html).
|
[coding style guidelines](https://google.github.io/styleguide/cppguide.html).
|
||||||
|
|
||||||
### The small print
|
### The small print
|
||||||
|
@ -5,6 +5,11 @@
|
|||||||
|
|
||||||
News
|
News
|
||||||
=======
|
=======
|
||||||
|
### Version 1.3.5 release
|
||||||
|
* Added option to build Draco for Universal Scene Description
|
||||||
|
* Code cleanup
|
||||||
|
* Bug fixes
|
||||||
|
|
||||||
### Version 1.3.4 release
|
### Version 1.3.4 release
|
||||||
* Released Draco Animation code
|
* Released Draco Animation code
|
||||||
* Fixes for Unity
|
* Fixes for Unity
|
||||||
|
@ -101,24 +101,4 @@ macro(draco_check_source_compiles test_name test_source result_var)
|
|||||||
endif ()
|
endif ()
|
||||||
endmacro ()
|
endmacro ()
|
||||||
|
|
||||||
# When inline support is detected for the current compiler the supported
|
|
||||||
# inlining keyword is written to $result in caller scope.
|
|
||||||
macro (draco_get_inline result)
|
|
||||||
draco_check_source_compiles("inline_check_1"
|
|
||||||
"static inline void macro(void) {}"
|
|
||||||
HAVE_INLINE_1)
|
|
||||||
if (HAVE_INLINE_1 EQUAL 1)
|
|
||||||
set(${result} "inline")
|
|
||||||
return()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# Check __inline.
|
|
||||||
draco_check_source_compiles("inline_check_2"
|
|
||||||
"static __inline void macro(void) {}"
|
|
||||||
HAVE_INLINE_2)
|
|
||||||
if (HAVE_INLINE_2 EQUAL 1)
|
|
||||||
set(${result} "__inline")
|
|
||||||
endif ()
|
|
||||||
endmacro ()
|
|
||||||
|
|
||||||
endif () # DRACO_CMAKE_COMPILER_TESTS_CMAKE_
|
endif () # DRACO_CMAKE_COMPILER_TESTS_CMAKE_
|
||||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -4,48 +4,48 @@ $jscomp.polyfill("Math.clz32",function(d){return d?d:function(d){d=Number(d)>>>0
|
|||||||
$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var d=0;return function(k){return $jscomp.SYMBOL_PREFIX+(k||"")+d++}}();
|
$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var d=0;return function(k){return $jscomp.SYMBOL_PREFIX+(k||"")+d++}}();
|
||||||
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var d=$jscomp.global.Symbol.iterator;d||(d=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[d]&&$jscomp.defineProperty(Array.prototype,d,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(d){var k=0;return $jscomp.iteratorPrototype(function(){return k<d.length?{done:!1,value:d[k++]}:{done:!0}})};
|
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var d=$jscomp.global.Symbol.iterator;d||(d=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[d]&&$jscomp.defineProperty(Array.prototype,d,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(d){var k=0;return $jscomp.iteratorPrototype(function(){return k<d.length?{done:!1,value:d[k++]}:{done:!0}})};
|
||||||
$jscomp.iteratorPrototype=function(d){$jscomp.initSymbolIterator();d={next:d};d[$jscomp.global.Symbol.iterator]=function(){return this};return d};$jscomp.makeIterator=function(d){$jscomp.initSymbolIterator();var k=d[Symbol.iterator];return k?k.call(d):$jscomp.arrayIterator(d)};$jscomp.FORCE_POLYFILL_PROMISE=!1;
|
$jscomp.iteratorPrototype=function(d){$jscomp.initSymbolIterator();d={next:d};d[$jscomp.global.Symbol.iterator]=function(){return this};return d};$jscomp.makeIterator=function(d){$jscomp.initSymbolIterator();var k=d[Symbol.iterator];return k?k.call(d):$jscomp.arrayIterator(d)};$jscomp.FORCE_POLYFILL_PROMISE=!1;
|
||||||
$jscomp.polyfill("Promise",function(d){function k(){this.batch_=null}function f(d){return d instanceof h?d:new h(function(r,f){r(d)})}if(d&&!$jscomp.FORCE_POLYFILL_PROMISE)return d;k.prototype.asyncExecute=function(d){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(d);return this};k.prototype.asyncExecuteBatch_=function(){var d=this;this.asyncExecuteFunction(function(){d.executeBatch_()})};var v=$jscomp.global.setTimeout;k.prototype.asyncExecuteFunction=function(d){v(d,
|
$jscomp.polyfill("Promise",function(d){function k(){this.batch_=null}function f(d){return d instanceof h?d:new h(function(q,f){q(d)})}if(d&&!$jscomp.FORCE_POLYFILL_PROMISE)return d;k.prototype.asyncExecute=function(d){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(d);return this};k.prototype.asyncExecuteBatch_=function(){var d=this;this.asyncExecuteFunction(function(){d.executeBatch_()})};var v=$jscomp.global.setTimeout;k.prototype.asyncExecuteFunction=function(d){v(d,
|
||||||
0)};k.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var d=this.batch_;this.batch_=[];for(var B=0;B<d.length;++B){var f=d[B];delete d[B];try{f()}catch(w){this.asyncThrow_(w)}}}this.batch_=null};k.prototype.asyncThrow_=function(d){this.asyncExecuteFunction(function(){throw d;})};var h=function(d){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var r=this.createResolveAndReject_();try{d(r.resolve,r.reject)}catch(Y){r.reject(Y)}};h.prototype.createResolveAndReject_=
|
0)};k.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var d=this.batch_;this.batch_=[];for(var B=0;B<d.length;++B){var f=d[B];delete d[B];try{f()}catch(w){this.asyncThrow_(w)}}}this.batch_=null};k.prototype.asyncThrow_=function(d){this.asyncExecuteFunction(function(){throw d;})};var h=function(d){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var q=this.createResolveAndReject_();try{d(q.resolve,q.reject)}catch(X){q.reject(X)}};h.prototype.createResolveAndReject_=
|
||||||
function(){function d(d){return function(r){h||(h=!0,d.call(f,r))}}var f=this,h=!1;return{resolve:d(this.resolveTo_),reject:d(this.reject_)}};h.prototype.resolveTo_=function(d){if(d===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(d instanceof h)this.settleSameAsPromise_(d);else{a:switch(typeof d){case "object":var f=null!=d;break a;case "function":f=!0;break a;default:f=!1}f?this.resolveToNonPromiseObj_(d):this.fulfill_(d)}};h.prototype.resolveToNonPromiseObj_=function(d){var f=
|
function(){function d(d){return function(q){h||(h=!0,d.call(f,q))}}var f=this,h=!1;return{resolve:d(this.resolveTo_),reject:d(this.reject_)}};h.prototype.resolveTo_=function(d){if(d===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(d instanceof h)this.settleSameAsPromise_(d);else{a:switch(typeof d){case "object":var f=null!=d;break a;case "function":f=!0;break a;default:f=!1}f?this.resolveToNonPromiseObj_(d):this.fulfill_(d)}};h.prototype.resolveToNonPromiseObj_=function(d){var f=
|
||||||
void 0;try{f=d.then}catch(Y){this.reject_(Y);return}"function"==typeof f?this.settleSameAsThenable_(f,d):this.fulfill_(d)};h.prototype.reject_=function(d){this.settle_(2,d)};h.prototype.fulfill_=function(d){this.settle_(1,d)};h.prototype.settle_=function(d,f){if(0!=this.state_)throw Error("Cannot settle("+d+", "+f|"): Promise already settled in state"+this.state_);this.state_=d;this.result_=f;this.executeOnSettledCallbacks_()};h.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var d=
|
void 0;try{f=d.then}catch(X){this.reject_(X);return}"function"==typeof f?this.settleSameAsThenable_(f,d):this.fulfill_(d)};h.prototype.reject_=function(d){this.settle_(2,d)};h.prototype.fulfill_=function(d){this.settle_(1,d)};h.prototype.settle_=function(d,f){if(0!=this.state_)throw Error("Cannot settle("+d+", "+f|"): Promise already settled in state"+this.state_);this.state_=d;this.result_=f;this.executeOnSettledCallbacks_()};h.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var d=
|
||||||
this.onSettledCallbacks_,f=0;f<d.length;++f)d[f].call(),d[f]=null;this.onSettledCallbacks_=null}};var ha=new k;h.prototype.settleSameAsPromise_=function(d){var f=this.createResolveAndReject_();d.callWhenSettled_(f.resolve,f.reject)};h.prototype.settleSameAsThenable_=function(d,f){var h=this.createResolveAndReject_();try{d.call(f,h.resolve,h.reject)}catch(w){h.reject(w)}};h.prototype.then=function(d,f){function k(d,f){return"function"==typeof d?function(f){try{w(d(f))}catch(O){r(O)}}:f}var w,r,B=new h(function(d,
|
this.onSettledCallbacks_,f=0;f<d.length;++f)d[f].call(),d[f]=null;this.onSettledCallbacks_=null}};var ha=new k;h.prototype.settleSameAsPromise_=function(d){var f=this.createResolveAndReject_();d.callWhenSettled_(f.resolve,f.reject)};h.prototype.settleSameAsThenable_=function(d,f){var h=this.createResolveAndReject_();try{d.call(f,h.resolve,h.reject)}catch(w){h.reject(w)}};h.prototype.then=function(d,f){function k(d,f){return"function"==typeof d?function(f){try{w(d(f))}catch(O){q(O)}}:f}var w,q,B=new h(function(d,
|
||||||
f){w=d;r=f});this.callWhenSettled_(k(d,w),k(f,r));return B};h.prototype.catch=function(d){return this.then(void 0,d)};h.prototype.callWhenSettled_=function(d,f){function h(){switch(k.state_){case 1:d(k.result_);break;case 2:f(k.result_);break;default:throw Error("Unexpected state: "+k.state_);}}var k=this;null==this.onSettledCallbacks_?ha.asyncExecute(h):this.onSettledCallbacks_.push(function(){ha.asyncExecute(h)})};h.resolve=f;h.reject=function(d){return new h(function(f,h){h(d)})};h.race=function(d){return new h(function(h,
|
f){w=d;q=f});this.callWhenSettled_(k(d,w),k(f,q));return B};h.prototype.catch=function(d){return this.then(void 0,d)};h.prototype.callWhenSettled_=function(d,f){function h(){switch(k.state_){case 1:d(k.result_);break;case 2:f(k.result_);break;default:throw Error("Unexpected state: "+k.state_);}}var k=this;null==this.onSettledCallbacks_?ha.asyncExecute(h):this.onSettledCallbacks_.push(function(){ha.asyncExecute(h)})};h.resolve=f;h.reject=function(d){return new h(function(f,h){h(d)})};h.race=function(d){return new h(function(h,
|
||||||
k){for(var w=$jscomp.makeIterator(d),r=w.next();!r.done;r=w.next())f(r.value).callWhenSettled_(h,k)})};h.all=function(d){var k=$jscomp.makeIterator(d),r=k.next();return r.done?f([]):new h(function(d,h){function w(f){return function(h){v[f]=h;B--;0==B&&d(v)}}var v=[],B=0;do v.push(void 0),B++,f(r.value).callWhenSettled_(w(v.length-1),h),r=k.next();while(!r.done)})};return h},"es6","es3");
|
k){for(var w=$jscomp.makeIterator(d),q=w.next();!q.done;q=w.next())f(q.value).callWhenSettled_(h,k)})};h.all=function(d){var k=$jscomp.makeIterator(d),q=k.next();return q.done?f([]):new h(function(d,h){function w(f){return function(h){v[f]=h;B--;0==B&&d(v)}}var v=[],B=0;do v.push(void 0),B++,f(q.value).callWhenSettled_(w(v.length-1),h),q=k.next();while(!q.done)})};return h},"es6","es3");
|
||||||
var DracoDecoderModule=function(d){function k(a,b){b||(b=16);return Math.ceil(a/b)*b}function f(a,b){a||O("Assertion failed: "+b)}function v(a,b){if(0===b||!a)return"";for(var c=0,e,d=0;;){e=W[a+d>>0];c|=e;if(0==e&&!b)break;d++;if(b&&d==b)break}b||(b=d);e="";if(128>c){for(;0<b;)c=String.fromCharCode.apply(String,W.subarray(a,a+Math.min(b,1024))),e=e?e+c:c,a+=1024,b-=1024;return e}return h(W,a)}function h(a,b){for(var c=b;a[c];)++c;if(16<c-b&&a.subarray&&Ia)return Ia.decode(a.subarray(b,c));for(c=
|
var DracoDecoderModule=function(d){function k(a,b){b||(b=16);return Math.ceil(a/b)*b}function f(a,b){a||O("Assertion failed: "+b)}function v(a,b){if(0===b||!a)return"";for(var c=0,e,d=0;;){e=V[a+d>>0];c|=e;if(0==e&&!b)break;d++;if(b&&d==b)break}b||(b=d);e="";if(128>c){for(;0<b;)c=String.fromCharCode.apply(String,V.subarray(a,a+Math.min(b,1024))),e=e?e+c:c,a+=1024,b-=1024;return e}return h(V,a)}function h(a,b){for(var c=b;a[c];)++c;if(16<c-b&&a.subarray&&Ia)return Ia.decode(a.subarray(b,c));for(c=
|
||||||
"";;){var e=a[b++];if(!e)return c;if(e&128){var d=a[b++]&63;if(192==(e&224))c+=String.fromCharCode((e&31)<<6|d);else{var f=a[b++]&63;if(224==(e&240))e=(e&15)<<12|d<<6|f;else{var g=a[b++]&63;if(240==(e&248))e=(e&7)<<18|d<<12|f<<6|g;else{var h=a[b++]&63;if(248==(e&252))e=(e&3)<<24|d<<18|f<<12|g<<6|h;else{var k=a[b++]&63;e=(e&1)<<30|d<<24|f<<18|g<<12|h<<6|k}}}65536>e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else c+=String.fromCharCode(e)}}function ha(a,b){0<
|
"";;){var e=a[b++];if(!e)return c;if(e&128){var d=a[b++]&63;if(192==(e&224))c+=String.fromCharCode((e&31)<<6|d);else{var f=a[b++]&63;if(224==(e&240))e=(e&15)<<12|d<<6|f;else{var g=a[b++]&63;if(240==(e&248))e=(e&7)<<18|d<<12|f<<6|g;else{var h=a[b++]&63;if(248==(e&252))e=(e&3)<<24|d<<18|f<<12|g<<6|h;else{var k=a[b++]&63;e=(e&1)<<30|d<<24|f<<18|g<<12|h<<6|k}}}65536>e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else c+=String.fromCharCode(e)}}function ha(a,b){0<
|
||||||
a%b&&(a+=b-a%b);return a}function r(){a.HEAP8=ia=new Int8Array(D);a.HEAP16=Ja=new Int16Array(D);a.HEAP32=E=new Int32Array(D);a.HEAPU8=W=new Uint8Array(D);a.HEAPU16=new Uint16Array(D);a.HEAPU32=new Uint32Array(D);a.HEAPF32=new Float32Array(D);a.HEAPF64=new Float64Array(D)}function B(e){for(;0<e.length;){var b=e.shift();if("function"==typeof b)b();else{var c=b.func;"number"===typeof c?void 0===b.arg?a.dynCall_v(c):a.dynCall_vi(c,b.arg):c(void 0===b.arg?null:b.arg)}}}function Y(a){return String.prototype.startsWith?
|
a%b&&(a+=b-a%b);return a}function q(){a.HEAP8=ia=new Int8Array(D);a.HEAP16=Ja=new Int16Array(D);a.HEAP32=E=new Int32Array(D);a.HEAPU8=V=new Uint8Array(D);a.HEAPU16=new Uint16Array(D);a.HEAPU32=new Uint32Array(D);a.HEAPF32=new Float32Array(D);a.HEAPF64=new Float64Array(D)}function B(e){for(;0<e.length;){var b=e.shift();if("function"==typeof b)b();else{var c=b.func;"number"===typeof c?void 0===b.arg?a.dynCall_v(c):a.dynCall_vi(c,b.arg):c(void 0===b.arg?null:b.arg)}}}function X(a){return String.prototype.startsWith?
|
||||||
a.startsWith("data:application/octet-stream;base64,"):0===a.indexOf("data:application/octet-stream;base64,")}function w(){return!!w.uncaught_exception}function la(){var e=y.last;if(!e)return(sa(0),0)|0;var b=y.infos[e],c=b.type;if(!c)return(sa(0),e)|0;var p=Array.prototype.slice.call(arguments);a.___cxa_is_pointer_type(c);la.buffer||(la.buffer=Ka(4));E[la.buffer>>2]=e;e=la.buffer;for(var d=0;d<p.length;d++)if(p[d]&&a.___cxa_can_catch(p[d],c,e))return e=E[e>>2],b.adjusted=e,(sa(p[d]),e)|0;e=E[e>>2];
|
a.startsWith("data:application/octet-stream;base64,"):0===a.indexOf("data:application/octet-stream;base64,")}function w(){return!!w.uncaught_exception}function la(){var e=y.last;if(!e)return(sa(0),0)|0;var b=y.infos[e],c=b.type;if(!c)return(sa(0),e)|0;var p=Array.prototype.slice.call(arguments);a.___cxa_is_pointer_type(c);la.buffer||(la.buffer=Ka(4));E[la.buffer>>2]=e;e=la.buffer;for(var d=0;d<p.length;d++)if(p[d]&&a.___cxa_can_catch(p[d],c,e))return e=E[e>>2],b.adjusted=e,(sa(p[d]),e)|0;e=E[e>>2];
|
||||||
return(sa(c),e)|0}function Z(e,b){u.varargs=b;try{var c=u.get(),p=u.get(),d=u.get();e=0;Z.buffers||(Z.buffers=[null,[],[]],Z.printChar=function(b,c){var e=Z.buffers[b];f(e);0===c||10===c?((1===b?a.print:a.printErr)(h(e,0)),e.length=0):e.push(c)});for(b=0;b<d;b++){for(var g=E[p+8*b>>2],k=E[p+(8*b+4)>>2],l=0;l<k;l++)Z.printChar(c,W[g+l]);e+=k}return e}catch(ya){return"undefined"!==typeof FS&&ya instanceof FS.ErrnoError||O(ya),-ya.errno}}function ma(e,b){ma.seen||(ma.seen={});e in ma.seen||(a.dynCall_v(b),
|
return(sa(c),e)|0}function Y(e,b){u.varargs=b;try{var c=u.get(),p=u.get(),d=u.get();e=0;Y.buffers||(Y.buffers=[null,[],[]],Y.printChar=function(b,c){var e=Y.buffers[b];f(e);0===c||10===c?((1===b?a.print:a.printErr)(h(e,0)),e.length=0):e.push(c)});for(b=0;b<d;b++){for(var g=E[p+8*b>>2],k=E[p+(8*b+4)>>2],l=0;l<k;l++)Y.printChar(c,V[g+l]);e+=k}return e}catch(ya){return"undefined"!==typeof FS&&ya instanceof FS.ErrnoError||O(ya),-ya.errno}}function ma(e,b){ma.seen||(ma.seen={});e in ma.seen||(a.dynCall_v(b),
|
||||||
ma.seen[e]=1)}function na(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}function wa(e){function b(){if(!a.calledRun&&(a.calledRun=!0,!oa)){La||(La=!0,B(Ma));B(Na);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Oa.unshift(a.postRun.shift());B(Oa)}}if(!(0<ea)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)Pa.unshift(a.preRun.shift());
|
ma.seen[e]=1)}function na(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}function wa(e){function b(){if(!a.calledRun&&(a.calledRun=!0,!oa)){La||(La=!0,B(Ma));B(Na);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Oa.unshift(a.postRun.shift());B(Oa)}}if(!(0<da)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)Pa.unshift(a.preRun.shift());
|
||||||
B(Pa);0<ea||a.calledRun||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);b()},1)):b())}}function O(e){if(a.onAbort)a.onAbort(e);void 0!==e?(a.print(e),a.printErr(e),e=JSON.stringify(e)):e="";oa=!0;throw"abort("+e+"). Build with -s ASSERTIONS=1 for more info.";}function m(){}function t(a){return(a||m).__cache__}function T(a,b){var c=t(b),e=c[a];if(e)return e;e=Object.create((b||m).prototype);e.ptr=a;return c[a]=e}function U(a){if("string"===typeof a){for(var b=
|
B(Pa);0<da||a.calledRun||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);b()},1)):b())}}function O(e){if(a.onAbort)a.onAbort(e);void 0!==e?(a.print(e),a.printErr(e),e=JSON.stringify(e)):e="";oa=!0;throw"abort("+e+"). Build with -s ASSERTIONS=1 for more info.";}function m(){}function t(a){return(a||m).__cache__}function T(a,b){var c=t(b),e=c[a];if(e)return e;e=Object.create((b||m).prototype);e.ptr=a;return c[a]=e}function ea(a){if("string"===
|
||||||
0,c=0;c<a.length;++c){var e=a.charCodeAt(c);55296<=e&&57343>=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++c)&1023);127>=e?++b:b=2047>=e?b+2:65535>=e?b+3:2097151>=e?b+4:67108863>=e?b+5:b+6}b=Array(b+1);c=0;e=b.length;if(0<e){e=c+e-1;for(var d=0;d<a.length;++d){var f=a.charCodeAt(d);55296<=f&&57343>=f&&(f=65536+((f&1023)<<10)|a.charCodeAt(++d)&1023);if(127>=f){if(c>=e)break;b[c++]=f}else{if(2047>=f){if(c+1>=e)break;b[c++]=192|f>>6}else{if(65535>=f){if(c+2>=e)break;b[c++]=224|f>>12}else{if(2097151>=f){if(c+
|
typeof a){for(var b=0,c=0;c<a.length;++c){var e=a.charCodeAt(c);55296<=e&&57343>=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++c)&1023);127>=e?++b:b=2047>=e?b+2:65535>=e?b+3:2097151>=e?b+4:67108863>=e?b+5:b+6}b=Array(b+1);c=0;e=b.length;if(0<e){e=c+e-1;for(var d=0;d<a.length;++d){var f=a.charCodeAt(d);55296<=f&&57343>=f&&(f=65536+((f&1023)<<10)|a.charCodeAt(++d)&1023);if(127>=f){if(c>=e)break;b[c++]=f}else{if(2047>=f){if(c+1>=e)break;b[c++]=192|f>>6}else{if(65535>=f){if(c+2>=e)break;b[c++]=224|f>>12}else{if(2097151>=
|
||||||
3>=e)break;b[c++]=240|f>>18}else{if(67108863>=f){if(c+4>=e)break;b[c++]=248|f>>24}else{if(c+5>=e)break;b[c++]=252|f>>30;b[c++]=128|f>>24&63}b[c++]=128|f>>18&63}b[c++]=128|f>>12&63}b[c++]=128|f>>6&63}b[c++]=128|f&63}}b[c]=0}a=l.alloc(b,ia);l.copy(b,ia,a)}return a}function z(){throw"cannot construct a Status, no constructor in IDL";}function F(){this.ptr=Wa();t(F)[this.ptr]=this}function G(){this.ptr=Xa();t(G)[this.ptr]=this}function H(){this.ptr=Ya();t(H)[this.ptr]=this}function I(){this.ptr=Za();
|
f){if(c+3>=e)break;b[c++]=240|f>>18}else{if(67108863>=f){if(c+4>=e)break;b[c++]=248|f>>24}else{if(c+5>=e)break;b[c++]=252|f>>30;b[c++]=128|f>>24&63}b[c++]=128|f>>18&63}b[c++]=128|f>>12&63}b[c++]=128|f>>6&63}b[c++]=128|f&63}}b[c]=0}a=l.alloc(b,ia);l.copy(b,ia,a)}return a}function z(){throw"cannot construct a Status, no constructor in IDL";}function F(){this.ptr=Wa();t(F)[this.ptr]=this}function G(){this.ptr=Xa();t(G)[this.ptr]=this}function H(){this.ptr=Ya();t(H)[this.ptr]=this}function I(){this.ptr=
|
||||||
t(I)[this.ptr]=this}function J(){this.ptr=$a();t(J)[this.ptr]=this}function n(){this.ptr=ab();t(n)[this.ptr]=this}function P(){this.ptr=bb();t(P)[this.ptr]=this}function x(){this.ptr=cb();t(x)[this.ptr]=this}function K(){this.ptr=db();t(K)[this.ptr]=this}function q(){this.ptr=eb();t(q)[this.ptr]=this}function L(){this.ptr=fb();t(L)[this.ptr]=this}function M(){this.ptr=gb();t(M)[this.ptr]=this}function V(){this.ptr=hb();t(V)[this.ptr]=this}function Q(){this.ptr=ib();t(Q)[this.ptr]=this}function g(){this.ptr=
|
Za();t(I)[this.ptr]=this}function J(){this.ptr=$a();t(J)[this.ptr]=this}function n(){this.ptr=ab();t(n)[this.ptr]=this}function P(){this.ptr=bb();t(P)[this.ptr]=this}function x(){this.ptr=cb();t(x)[this.ptr]=this}function K(){this.ptr=db();t(K)[this.ptr]=this}function r(){this.ptr=eb();t(r)[this.ptr]=this}function L(){this.ptr=fb();t(L)[this.ptr]=this}function M(){this.ptr=gb();t(M)[this.ptr]=this}function U(){this.ptr=hb();t(U)[this.ptr]=this}function Q(){this.ptr=ib();t(Q)[this.ptr]=this}function g(){this.ptr=
|
||||||
jb();t(g)[this.ptr]=this}function C(){this.ptr=kb();t(C)[this.ptr]=this}function X(){throw"cannot construct a VoidPtr, no constructor in IDL";}function N(){this.ptr=lb();t(N)[this.ptr]=this}function R(){this.ptr=mb();t(R)[this.ptr]=this}d=d||{};var a="undefined"!==typeof d?d:{},Qa=!1,Ra=!1;a.onRuntimeInitialized=function(){Qa=!0;if(Ra&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Ra=!0;if(Qa&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=
|
jb();t(g)[this.ptr]=this}function C(){this.ptr=kb();t(C)[this.ptr]=this}function W(){throw"cannot construct a VoidPtr, no constructor in IDL";}function N(){this.ptr=lb();t(N)[this.ptr]=this}function R(){this.ptr=mb();t(R)[this.ptr]=this}d=d||{};var a="undefined"!==typeof d?d:{},Qa=!1,Ra=!1;a.onRuntimeInitialized=function(){Qa=!0;if(Ra&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Ra=!0;if(Qa&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=
|
||||||
function(a){if("string"!==typeof a)return!1;a=a.split(".");return 2>a.length||3<a.length?!1:1==a[0]&&0<=a[1]&&3>=a[1]?!0:0!=a[0]||10<a[1]?!1:!0};var pa={},aa;for(aa in a)a.hasOwnProperty(aa)&&(pa[aa]=a[aa]);a.arguments=[];a.thisProgram="./this.program";a.quit=function(a,b){throw b;};a.preRun=[];a.postRun=[];var ja=!1,fa=!1,qa=!1,za=!1;if(a.ENVIRONMENT)if("WEB"===a.ENVIRONMENT)ja=!0;else if("WORKER"===a.ENVIRONMENT)fa=!0;else if("NODE"===a.ENVIRONMENT)qa=!0;else if("SHELL"===a.ENVIRONMENT)za=!0;else throw Error("Module['ENVIRONMENT'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.");
|
function(a){if("string"!==typeof a)return!1;a=a.split(".");return 2>a.length||3<a.length?!1:1==a[0]&&0<=a[1]&&3>=a[1]?!0:0!=a[0]||10<a[1]?!1:!0};var pa={},Z;for(Z in a)a.hasOwnProperty(Z)&&(pa[Z]=a[Z]);a.arguments=[];a.thisProgram="./this.program";a.quit=function(a,b){throw b;};a.preRun=[];a.postRun=[];var ja=!1,fa=!1,qa=!1,za=!1;if(a.ENVIRONMENT)if("WEB"===a.ENVIRONMENT)ja=!0;else if("WORKER"===a.ENVIRONMENT)fa=!0;else if("NODE"===a.ENVIRONMENT)qa=!0;else if("SHELL"===a.ENVIRONMENT)za=!0;else throw Error("Module['ENVIRONMENT'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.");
|
||||||
else ja="object"===typeof window,fa="function"===typeof importScripts,qa="object"===typeof process&&"function"===typeof require&&!ja&&!fa,za=!ja&&!qa&&!fa;if(qa){var Aa,Ba;a.read=function(a,b){Aa||(Aa=require("fs"));Ba||(Ba=require("path"));a=Ba.normalize(a);a=Aa.readFileSync(a);return b?a:a.toString()};a.readBinary=function(e){e=a.read(e,!0);e.buffer||(e=new Uint8Array(e));f(e.buffer);return e};1<process.argv.length&&(a.thisProgram=process.argv[1].replace(/\\/g,"/"));a.arguments=process.argv.slice(2);
|
else ja="object"===typeof window,fa="function"===typeof importScripts,qa="object"===typeof process&&"function"===typeof require&&!ja&&!fa,za=!ja&&!qa&&!fa;if(qa){var Aa,Ba;a.read=function(a,b){Aa||(Aa=require("fs"));Ba||(Ba=require("path"));a=Ba.normalize(a);a=Aa.readFileSync(a);return b?a:a.toString()};a.readBinary=function(e){e=a.read(e,!0);e.buffer||(e=new Uint8Array(e));f(e.buffer);return e};1<process.argv.length&&(a.thisProgram=process.argv[1].replace(/\\/g,"/"));a.arguments=process.argv.slice(2);
|
||||||
process.on("uncaughtException",function(a){if(!(a instanceof na))throw a;});process.on("unhandledRejection",function(a,b){process.exit(1)});a.inspect=function(){return"[Emscripten Module object]"}}else if(za)"undefined"!=typeof read&&(a.read=function(a){return read(a)}),a.readBinary=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");f("object"===typeof a);return a},"undefined"!=typeof scriptArgs?a.arguments=scriptArgs:"undefined"!=typeof arguments&&
|
process.on("uncaughtException",function(a){if(!(a instanceof na))throw a;});process.on("unhandledRejection",function(a,b){process.exit(1)});a.inspect=function(){return"[Emscripten Module object]"}}else if(za)"undefined"!=typeof read&&(a.read=function(a){return read(a)}),a.readBinary=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");f("object"===typeof a);return a},"undefined"!=typeof scriptArgs?a.arguments=scriptArgs:"undefined"!=typeof arguments&&
|
||||||
(a.arguments=arguments),"function"===typeof quit&&(a.quit=function(a,b){quit(a)});else if(ja||fa)a.read=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},fa&&(a.readBinary=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),a.readAsync=function(a,b,c){var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=function(){200==e.status||0==e.status&&e.response?
|
(a.arguments=arguments),"function"===typeof quit&&(a.quit=function(a,b){quit(a)});else if(ja||fa)a.read=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},fa&&(a.readBinary=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),a.readAsync=function(a,b,c){var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=function(){200==e.status||0==e.status&&e.response?
|
||||||
b(e.response):c()};e.onerror=c;e.send(null)},a.setWindowTitle=function(a){document.title=a};a.print="undefined"!==typeof console?console.log.bind(console):"undefined"!==typeof print?print:null;a.printErr="undefined"!==typeof printErr?printErr:"undefined"!==typeof console&&console.warn.bind(console)||a.print;a.print=a.print;a.printErr=a.printErr;for(aa in pa)pa.hasOwnProperty(aa)&&(a[aa]=pa[aa]);pa=void 0;var oa=0,Ia="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!==typeof TextDecoder&&
|
b(e.response):c()};e.onerror=c;e.send(null)},a.setWindowTitle=function(a){document.title=a};a.print="undefined"!==typeof console?console.log.bind(console):"undefined"!==typeof print?print:null;a.printErr="undefined"!==typeof printErr?printErr:"undefined"!==typeof console&&console.warn.bind(console)||a.print;a.print=a.print;a.printErr=a.printErr;for(Z in pa)pa.hasOwnProperty(Z)&&(a[Z]=pa[Z]);pa=void 0;var oa=0,Ia="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!==typeof TextDecoder&&
|
||||||
new TextDecoder("utf-16le");var ia,W,Ja,E,ba,Ca,ta,ua,Da,ka;var Ea=ba=Ca=ta=ua=Da=ka=0;var Sa=!1;a.reallocBuffer||(a.reallocBuffer=function(a){try{if(ArrayBuffer.transfer)var b=ArrayBuffer.transfer(D,a);else{var c=ia;b=new ArrayBuffer(a);(new Int8Array(b)).set(c)}}catch(p){return!1}return nb(b)?b:!1});try{var Ta=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);Ta(new ArrayBuffer(4))}catch(e){Ta=function(a){return a.byteLength}}var Fa=a.TOTAL_STACK||
|
new TextDecoder("utf-16le");var ia,V,Ja,E,aa,Ca,ta,ua,Da,ka;var Ea=aa=Ca=ta=ua=Da=ka=0;var Sa=!1;a.reallocBuffer||(a.reallocBuffer=function(a){try{if(ArrayBuffer.transfer)var b=ArrayBuffer.transfer(D,a);else{var c=ia;b=new ArrayBuffer(a);(new Int8Array(b)).set(c)}}catch(p){return!1}return nb(b)?b:!1});try{var Ta=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);Ta(new ArrayBuffer(4))}catch(e){Ta=function(a){return a.byteLength}}var Fa=a.TOTAL_STACK||
|
||||||
5242880,A=a.TOTAL_MEMORY||16777216;A<Fa&&a.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+A+"! (TOTAL_STACK="+Fa+")");if(a.buffer)var D=a.buffer;else"object"===typeof WebAssembly&&"function"===typeof WebAssembly.Memory?(a.wasmMemory=new WebAssembly.Memory({initial:A/65536}),D=a.wasmMemory.buffer):D=new ArrayBuffer(A),a.buffer=D;r();E[0]=1668509029;Ja[1]=25459;if(115!==W[2]||99!==W[3])throw"Runtime error: expected the system to be little-endian!";var Pa=[],Ma=[],Na=[],ob=[],Oa=[],
|
5242880,A=a.TOTAL_MEMORY||16777216;A<Fa&&a.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+A+"! (TOTAL_STACK="+Fa+")");if(a.buffer)var D=a.buffer;else"object"===typeof WebAssembly&&"function"===typeof WebAssembly.Memory?(a.wasmMemory=new WebAssembly.Memory({initial:A/65536}),D=a.wasmMemory.buffer):D=new ArrayBuffer(A),a.buffer=D;q();E[0]=1668509029;Ja[1]=25459;if(115!==V[2]||99!==V[3])throw"Runtime error: expected the system to be little-endian!";var Pa=[],Ma=[],Na=[],ob=[],Oa=[],
|
||||||
La=!1,pb=Math.floor,ea=0,Ga=null,ra=null;a.preloadedImages={};a.preloadedAudios={};(function(){function e(){try{if(a.wasmBinary)return new Uint8Array(a.wasmBinary);if(a.readBinary)return a.readBinary(f);throw"on the web, we need the wasm binary to be preloaded and set on Module['wasmBinary']. emcc.py will do that for you when generating HTML (but not JS)";}catch(Va){O(Va)}}function b(){return a.wasmBinary||!ja&&!fa||"function"!==typeof fetch?new Promise(function(a,b){a(e())}):fetch(f,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+
|
La=!1,pb=Math.floor,da=0,Ga=null,ra=null;a.preloadedImages={};a.preloadedAudios={};(function(){function e(){try{if(a.wasmBinary)return new Uint8Array(a.wasmBinary);if(a.readBinary)return a.readBinary(f);throw"on the web, we need the wasm binary to be preloaded and set on Module['wasmBinary']. emcc.py will do that for you when generating HTML (but not JS)";}catch(Va){O(Va)}}function b(){return a.wasmBinary||!ja&&!fa||"function"!==typeof fetch?new Promise(function(a,b){a(e())}):fetch(f,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+
|
||||||
f+"'";return a.arrayBuffer()}).catch(function(){return e()})}function c(c,e,d){function p(b,c){k=b.exports;k.memory&&(b=k.memory,c=a.buffer,b.byteLength<c.byteLength&&a.printErr("the new buffer in mergeMemory is smaller than the previous one. in native wasm, we should grow memory here"),c=new Int8Array(c),(new Int8Array(b)).set(c),a.buffer=D=b,r());a.asm=k;a.usingWasm=!0;ea--;a.monitorRunDependencies&&a.monitorRunDependencies(ea);0==ea&&(null!==Ga&&(clearInterval(Ga),Ga=null),ra&&(b=ra,ra=null,b()))}
|
f+"'";return a.arrayBuffer()}).catch(function(){return e()})}function c(c,e,d){function p(b,c){k=b.exports;k.memory&&(b=k.memory,c=a.buffer,b.byteLength<c.byteLength&&a.printErr("the new buffer in mergeMemory is smaller than the previous one. in native wasm, we should grow memory here"),c=new Int8Array(c),(new Int8Array(b)).set(c),a.buffer=D=b,q());a.asm=k;a.usingWasm=!0;da--;a.monitorRunDependencies&&a.monitorRunDependencies(da);0==da&&(null!==Ga&&(clearInterval(Ga),Ga=null),ra&&(b=ra,ra=null,b()))}
|
||||||
function g(a){p(a.instance,a.module)}function S(c){b().then(function(a){return WebAssembly.instantiate(a,h)}).then(c).catch(function(b){a.printErr("failed to asynchronously prepare wasm: "+b);O(b)})}if("object"!==typeof WebAssembly)return a.printErr("no native wasm support detected"),!1;if(!(a.wasmMemory instanceof WebAssembly.Memory))return a.printErr("no native wasm Memory in use"),!1;e.memory=a.wasmMemory;h.global={NaN:NaN,Infinity:Infinity};h["global.Math"]=Math;h.env=e;ea++;a.monitorRunDependencies&&
|
function g(a){p(a.instance,a.module)}function S(c){b().then(function(a){return WebAssembly.instantiate(a,h)}).then(c).catch(function(b){a.printErr("failed to asynchronously prepare wasm: "+b);O(b)})}if("object"!==typeof WebAssembly)return a.printErr("no native wasm support detected"),!1;if(!(a.wasmMemory instanceof WebAssembly.Memory))return a.printErr("no native wasm Memory in use"),!1;e.memory=a.wasmMemory;h.global={NaN:NaN,Infinity:Infinity};h["global.Math"]=Math;h.env=e;da++;a.monitorRunDependencies&&
|
||||||
a.monitorRunDependencies(ea);if(a.instantiateWasm)try{return a.instantiateWasm(h,p)}catch(qb){return a.printErr("Module.instantiateWasm callback failed with error: "+qb),!1}a.wasmBinary||"function"!==typeof WebAssembly.instantiateStreaming||Y(f)||"function"!==typeof fetch?S(g):WebAssembly.instantiateStreaming(fetch(f,{credentials:"same-origin"}),h).then(g).catch(function(b){a.printErr("wasm streaming compile failed: "+b);a.printErr("falling back to ArrayBuffer instantiation");S(g)});return{}}var d=
|
a.monitorRunDependencies(da);if(a.instantiateWasm)try{return a.instantiateWasm(h,p)}catch(qb){return a.printErr("Module.instantiateWasm callback failed with error: "+qb),!1}a.wasmBinary||"function"!==typeof WebAssembly.instantiateStreaming||X(f)||"function"!==typeof fetch?S(g):WebAssembly.instantiateStreaming(fetch(f,{credentials:"same-origin"}),h).then(g).catch(function(b){a.printErr("wasm streaming compile failed: "+b);a.printErr("falling back to ArrayBuffer instantiation");S(g)});return{}}var d=
|
||||||
"draco_decoder.wast",f="draco_decoder.wasm",g="draco_decoder.temp.asm.js";"function"===typeof a.locateFile&&(Y(d)||(d=a.locateFile(d)),Y(f)||(f=a.locateFile(f)),Y(g)||(g=a.locateFile(g)));var h={global:null,env:null,asm2wasm:{"f64-rem":function(a,b){return a%b},"debugger":function(){debugger}},parent:a},k=null;a.asmPreload=a.asm;var l=a.reallocBuffer;a.reallocBuffer=function(b){if("asmjs"===m)var c=l(b);else a:{b=ha(b,a.usingWasm?65536:16777216);var e=a.buffer.byteLength;if(a.usingWasm)try{c=-1!==
|
"draco_decoder.wast",f="draco_decoder.wasm",g="draco_decoder.temp.asm.js";"function"===typeof a.locateFile&&(X(d)||(d=a.locateFile(d)),X(f)||(f=a.locateFile(f)),X(g)||(g=a.locateFile(g)));var h={global:null,env:null,asm2wasm:{"f64-rem":function(a,b){return a%b},"debugger":function(){debugger}},parent:a},k=null;a.asmPreload=a.asm;var l=a.reallocBuffer;a.reallocBuffer=function(b){if("asmjs"===m)var c=l(b);else a:{b=ha(b,a.usingWasm?65536:16777216);var e=a.buffer.byteLength;if(a.usingWasm)try{c=-1!==
|
||||||
a.wasmMemory.grow((b-e)/65536)?a.buffer=a.wasmMemory.buffer:null;break a}catch(vd){c=null;break a}c=void 0}return c};var m="";a.asm=function(b,e,d){if(!e.table){var p=a.wasmTableSize;void 0===p&&(p=1024);var f=a.wasmMaxTableSize;e.table="object"===typeof WebAssembly&&"function"===typeof WebAssembly.Table?void 0!==f?new WebAssembly.Table({initial:p,maximum:f,element:"anyfunc"}):new WebAssembly.Table({initial:p,element:"anyfunc"}):Array(p);a.wasmTable=e.table}e.memoryBase||(e.memoryBase=a.STATIC_BASE);
|
a.wasmMemory.grow((b-e)/65536)?a.buffer=a.wasmMemory.buffer:null;break a}catch(sd){c=null;break a}c=void 0}return c};var m="";a.asm=function(b,e,d){if(!e.table){var p=a.wasmTableSize;void 0===p&&(p=1024);var f=a.wasmMaxTableSize;e.table="object"===typeof WebAssembly&&"function"===typeof WebAssembly.Table?void 0!==f?new WebAssembly.Table({initial:p,maximum:f,element:"anyfunc"}):new WebAssembly.Table({initial:p,element:"anyfunc"}):Array(p);a.wasmTable=e.table}e.memoryBase||(e.memoryBase=a.STATIC_BASE);
|
||||||
e.tableBase||(e.tableBase=0);(b=c(b,e,d))||O("no binaryen method succeeded. consider enabling more options, like interpreting, if you want that: https://github.com/kripken/emscripten/wiki/WebAssembly#binaryen-methods");return b}})();Ea=1024;ba=Ea+19408;Ma.push();a.STATIC_BASE=Ea;a.STATIC_BUMP=19408;var rb=ba;ba+=16;var y={last:0,caught:[],infos:{},deAdjust:function(a){if(!a||y.infos[a])return a;for(var b in y.infos)if(y.infos[b].adjusted===a)return b;return a},addRef:function(a){a&&y.infos[a].refcount++},
|
e.tableBase||(e.tableBase=0);(b=c(b,e,d))||O("no binaryen method succeeded. consider enabling more options, like interpreting, if you want that: https://github.com/kripken/emscripten/wiki/WebAssembly#binaryen-methods");return b}})();Ea=1024;aa=Ea+19408;Ma.push();a.STATIC_BASE=Ea;a.STATIC_BUMP=19408;var rb=aa;aa+=16;var y={last:0,caught:[],infos:{},deAdjust:function(a){if(!a||y.infos[a])return a;for(var b in y.infos)if(y.infos[b].adjusted===a)return b;return a},addRef:function(a){a&&y.infos[a].refcount++},
|
||||||
decRef:function(e){if(e){var b=y.infos[e];f(0<b.refcount);b.refcount--;0!==b.refcount||b.rethrown||(b.destructor&&a.dynCall_vi(b.destructor,e),delete y.infos[e],___cxa_free_exception(e))}},clearRef:function(a){a&&(y.infos[a].refcount=0)}},u={varargs:0,get:function(a){u.varargs+=4;return E[u.varargs-4>>2]},getStr:function(){return v(u.get())},get64:function(){var a=u.get(),b=u.get();0<=a?f(0===b):f(-1===b);return a},getZero:function(){f(0===u.get())}},va={},Ha=1;ka=function(a){f(!Sa);var b=ba;ba=ba+
|
decRef:function(e){if(e){var b=y.infos[e];f(0<b.refcount);b.refcount--;0!==b.refcount||b.rethrown||(b.destructor&&a.dynCall_vi(b.destructor,e),delete y.infos[e],___cxa_free_exception(e))}},clearRef:function(a){a&&(y.infos[a].refcount=0)}},u={varargs:0,get:function(a){u.varargs+=4;return E[u.varargs-4>>2]},getStr:function(){return v(u.get())},get64:function(){var a=u.get(),b=u.get();0<=a?f(0===b):f(-1===b);return a},getZero:function(){f(0===u.get())}},va={},Ha=1;ka=function(a){f(!Sa);var b=aa;aa=aa+
|
||||||
a+15&-16;return b}(4);Ca=ta=k(ba);ua=Ca+Fa;Da=k(ua);E[ka>>2]=Da;Sa=!0;a.wasmTableSize=492;a.wasmMaxTableSize=492;a.asmGlobalArg={};a.asmLibraryArg={abort:O,assert:f,enlargeMemory:function(){var e=a.usingWasm?65536:16777216,b=2147483648-e;if(E[ka>>2]>b)return!1;var c=A;for(A=Math.max(A,16777216);A<E[ka>>2];)A=536870912>=A?ha(2*A,e):Math.min(ha((3*A+2147483648)/4,e),b);e=a.reallocBuffer(A);if(!e||e.byteLength!=A)return A=c,!1;a.buffer=D=e;r();return!0},getTotalMemory:function(){return A},abortOnCannotGrowMemory:function(){O("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+
|
a+15&-16;return b}(4);Ca=ta=k(aa);ua=Ca+Fa;Da=k(ua);E[ka>>2]=Da;Sa=!0;a.wasmTableSize=492;a.wasmMaxTableSize=492;a.asmGlobalArg={};a.asmLibraryArg={abort:O,assert:f,enlargeMemory:function(){var e=a.usingWasm?65536:16777216,b=2147483648-e;if(E[ka>>2]>b)return!1;var c=A;for(A=Math.max(A,16777216);A<E[ka>>2];)A=536870912>=A?ha(2*A,e):Math.min(ha((3*A+2147483648)/4,e),b);e=a.reallocBuffer(A);if(!e||e.byteLength!=A)return A=c,!1;a.buffer=D=e;q();return!0},getTotalMemory:function(){return A},abortOnCannotGrowMemory:function(){O("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+
|
||||||
A+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},invoke_ii:function(e,b){try{return a.dynCall_ii(e,b)}catch(c){if("number"!==typeof c&&"longjmp"!==c)throw c;a.setThrew(1,0)}},invoke_iii:function(e,b,c){try{return a.dynCall_iii(e,b,c)}catch(p){if("number"!==typeof p&&"longjmp"!==p)throw p;a.setThrew(1,0)}},invoke_iiii:function(e,b,c,d){try{return a.dynCall_iiii(e,
|
A+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},invoke_ii:function(e,b){try{return a.dynCall_ii(e,b)}catch(c){if("number"!==typeof c&&"longjmp"!==c)throw c;a.setThrew(1,0)}},invoke_iii:function(e,b,c){try{return a.dynCall_iii(e,b,c)}catch(p){if("number"!==typeof p&&"longjmp"!==p)throw p;a.setThrew(1,0)}},invoke_iiii:function(e,b,c,d){try{return a.dynCall_iiii(e,
|
||||||
b,c,d)}catch(S){if("number"!==typeof S&&"longjmp"!==S)throw S;a.setThrew(1,0)}},invoke_iiiiiii:function(e,b,c,d,f,g,h){try{return a.dynCall_iiiiiii(e,b,c,d,f,g,h)}catch(da){if("number"!==typeof da&&"longjmp"!==da)throw da;a.setThrew(1,0)}},invoke_v:function(e){try{a.dynCall_v(e)}catch(b){if("number"!==typeof b&&"longjmp"!==b)throw b;a.setThrew(1,0)}},invoke_vi:function(e,b){try{a.dynCall_vi(e,b)}catch(c){if("number"!==typeof c&&"longjmp"!==c)throw c;a.setThrew(1,0)}},invoke_vii:function(e,b,c){try{a.dynCall_vii(e,
|
b,c,d)}catch(S){if("number"!==typeof S&&"longjmp"!==S)throw S;a.setThrew(1,0)}},invoke_iiiiiii:function(e,b,c,d,f,g,h){try{return a.dynCall_iiiiiii(e,b,c,d,f,g,h)}catch(ca){if("number"!==typeof ca&&"longjmp"!==ca)throw ca;a.setThrew(1,0)}},invoke_v:function(e){try{a.dynCall_v(e)}catch(b){if("number"!==typeof b&&"longjmp"!==b)throw b;a.setThrew(1,0)}},invoke_vi:function(e,b){try{a.dynCall_vi(e,b)}catch(c){if("number"!==typeof c&&"longjmp"!==c)throw c;a.setThrew(1,0)}},invoke_vii:function(e,b,c){try{a.dynCall_vii(e,
|
||||||
b,c)}catch(p){if("number"!==typeof p&&"longjmp"!==p)throw p;a.setThrew(1,0)}},invoke_viii:function(e,b,c,d){try{a.dynCall_viii(e,b,c,d)}catch(S){if("number"!==typeof S&&"longjmp"!==S)throw S;a.setThrew(1,0)}},invoke_viiii:function(e,b,c,d,f){try{a.dynCall_viiii(e,b,c,d,f)}catch(xa){if("number"!==typeof xa&&"longjmp"!==xa)throw xa;a.setThrew(1,0)}},invoke_viiiii:function(e,b,c,d,f,g){try{a.dynCall_viiiii(e,b,c,d,f,g)}catch(ca){if("number"!==typeof ca&&"longjmp"!==ca)throw ca;a.setThrew(1,0)}},invoke_viiiiii:function(e,
|
b,c)}catch(p){if("number"!==typeof p&&"longjmp"!==p)throw p;a.setThrew(1,0)}},invoke_viii:function(e,b,c,d){try{a.dynCall_viii(e,b,c,d)}catch(S){if("number"!==typeof S&&"longjmp"!==S)throw S;a.setThrew(1,0)}},invoke_viiii:function(e,b,c,d,f){try{a.dynCall_viiii(e,b,c,d,f)}catch(xa){if("number"!==typeof xa&&"longjmp"!==xa)throw xa;a.setThrew(1,0)}},invoke_viiiii:function(e,b,c,d,f,g){try{a.dynCall_viiiii(e,b,c,d,f,g)}catch(ba){if("number"!==typeof ba&&"longjmp"!==ba)throw ba;a.setThrew(1,0)}},invoke_viiiiii:function(e,
|
||||||
b,c,d,f,g,h){try{a.dynCall_viiiiii(e,b,c,d,f,g,h)}catch(da){if("number"!==typeof da&&"longjmp"!==da)throw da;a.setThrew(1,0)}},__ZSt18uncaught_exceptionv:w,___cxa_allocate_exception:function(a){return Ka(a)},___cxa_begin_catch:function(a){var b=y.infos[a];b&&!b.caught&&(b.caught=!0,w.uncaught_exception--);b&&(b.rethrown=!1);y.caught.push(a);y.addRef(y.deAdjust(a));return a},___cxa_find_matching_catch:la,___cxa_pure_virtual:function(){oa=!0;throw"Pure virtual function called!";},___cxa_throw:function(a,
|
b,c,d,f,g,h){try{a.dynCall_viiiiii(e,b,c,d,f,g,h)}catch(ca){if("number"!==typeof ca&&"longjmp"!==ca)throw ca;a.setThrew(1,0)}},__ZSt18uncaught_exceptionv:w,___cxa_allocate_exception:function(a){return Ka(a)},___cxa_begin_catch:function(a){var b=y.infos[a];b&&!b.caught&&(b.caught=!0,w.uncaught_exception--);b&&(b.rethrown=!1);y.caught.push(a);y.addRef(y.deAdjust(a));return a},___cxa_find_matching_catch:la,___cxa_pure_virtual:function(){oa=!0;throw"Pure virtual function called!";},___cxa_throw:function(a,
|
||||||
b,c){y.infos[a]={ptr:a,adjusted:a,type:b,destructor:c,refcount:0,caught:!1,rethrown:!1};y.last=a;"uncaught_exception"in w?w.uncaught_exception++:w.uncaught_exception=1;throw a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";},___gxx_personality_v0:function(){},___resumeException:function(a){y.last||(y.last=a);throw a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";
|
b,c){y.infos[a]={ptr:a,adjusted:a,type:b,destructor:c,refcount:0,caught:!1,rethrown:!1};y.last=a;"uncaught_exception"in w?w.uncaught_exception++:w.uncaught_exception=1;throw a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";},___gxx_personality_v0:function(){},___resumeException:function(a){y.last||(y.last=a);throw a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";
|
||||||
},___setErrNo:function(d){a.___errno_location&&(E[a.___errno_location()>>2]=d);return d},___syscall140:function(a,b){u.varargs=b;try{var c=u.getStreamFromFD();u.get();var d=u.get(),e=u.get(),f=u.get();FS.llseek(c,d,f);E[e>>2]=c.position;c.getdents&&0===d&&0===f&&(c.getdents=null);return 0}catch(ca){return"undefined"!==typeof FS&&ca instanceof FS.ErrnoError||O(ca),-ca.errno}},___syscall146:Z,___syscall54:function(a,b){u.varargs=b;return 0},___syscall6:function(a,b){u.varargs=b;try{var c=u.getStreamFromFD();
|
},___setErrNo:function(d){a.___errno_location&&(E[a.___errno_location()>>2]=d);return d},___syscall140:function(a,b){u.varargs=b;try{var c=u.getStreamFromFD();u.get();var d=u.get(),e=u.get(),f=u.get();FS.llseek(c,d,f);E[e>>2]=c.position;c.getdents&&0===d&&0===f&&(c.getdents=null);return 0}catch(ba){return"undefined"!==typeof FS&&ba instanceof FS.ErrnoError||O(ba),-ba.errno}},___syscall146:Y,___syscall54:function(a,b){u.varargs=b;return 0},___syscall6:function(a,b){u.varargs=b;try{var c=u.getStreamFromFD();
|
||||||
FS.close(c);return 0}catch(p){return"undefined"!==typeof FS&&p instanceof FS.ErrnoError||O(p),-p.errno}},_abort:function(){a.abort()},_emscripten_memcpy_big:function(a,b,c){W.set(W.subarray(b,b+c),a);return a},_llvm_floor_f64:pb,_llvm_trap:function(){O("trap!")},_pthread_getspecific:function(a){return va[a]||0},_pthread_key_create:function(a,b){if(0==a)return 22;E[a>>2]=Ha;va[Ha]=0;Ha++;return 0},_pthread_once:ma,_pthread_setspecific:function(a,b){if(!(a in va))return 22;va[a]=b;return 0},flush_NO_FILESYSTEM:function(){var d=
|
FS.close(c);return 0}catch(p){return"undefined"!==typeof FS&&p instanceof FS.ErrnoError||O(p),-p.errno}},_abort:function(){a.abort()},_emscripten_memcpy_big:function(a,b,c){V.set(V.subarray(b,b+c),a);return a},_llvm_floor_f64:pb,_llvm_trap:function(){O("trap!")},_pthread_getspecific:function(a){return va[a]||0},_pthread_key_create:function(a,b){if(0==a)return 22;E[a>>2]=Ha;va[Ha]=0;Ha++;return 0},_pthread_once:ma,_pthread_setspecific:function(a,b){if(!(a in va))return 22;va[a]=b;return 0},flush_NO_FILESYSTEM:function(){var d=
|
||||||
a._fflush;d&&d(0);if(d=Z.printChar){var b=Z.buffers;b[1].length&&d(1,10);b[2].length&&d(2,10)}},DYNAMICTOP_PTR:ka,tempDoublePtr:rb,ABORT:oa,STACKTOP:ta,STACK_MAX:ua};var Ua=a.asm(a.asmGlobalArg,a.asmLibraryArg,D);a.asm=Ua;a.___cxa_can_catch=function(){return a.asm.___cxa_can_catch.apply(null,arguments)};a.___cxa_is_pointer_type=function(){return a.asm.___cxa_is_pointer_type.apply(null,arguments)};var $a=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,
|
a._fflush;d&&d(0);if(d=Y.printChar){var b=Y.buffers;b[1].length&&d(1,10);b[2].length&&d(2,10)}},DYNAMICTOP_PTR:ka,tempDoublePtr:rb,ABORT:oa,STACKTOP:ta,STACK_MAX:ua};var Ua=a.asm(a.asmGlobalArg,a.asmLibraryArg,D);a.asm=Ua;a.___cxa_can_catch=function(){return a.asm.___cxa_can_catch.apply(null,arguments)};a.___cxa_is_pointer_type=function(){return a.asm.___cxa_is_pointer_type.apply(null,arguments)};var $a=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,
|
||||||
arguments)},sb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,arguments)},tb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},ub=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,
|
arguments)},sb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,arguments)},tb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},ub=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,
|
||||||
arguments)},cb=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,arguments)},vb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},wb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,
|
arguments)},cb=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,arguments)},vb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},wb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,
|
||||||
arguments)},xb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,arguments)},yb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,arguments)},zb=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,
|
arguments)},xb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,arguments)},yb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,arguments)},zb=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,
|
||||||
@ -67,53 +67,51 @@ arguments)},pc=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return
|
|||||||
arguments)},sc=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoUInt8Array_GetValue_1.apply(null,arguments)},tc=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return a.asm._emscripten_bind_DracoUInt8Array___destroy___0.apply(null,arguments)},uc=a._emscripten_bind_DracoUInt8Array_size_0=function(){return a.asm._emscripten_bind_DracoUInt8Array_size_0.apply(null,arguments)},hb=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return a.asm._emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null,
|
arguments)},sc=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoUInt8Array_GetValue_1.apply(null,arguments)},tc=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return a.asm._emscripten_bind_DracoUInt8Array___destroy___0.apply(null,arguments)},uc=a._emscripten_bind_DracoUInt8Array_size_0=function(){return a.asm._emscripten_bind_DracoUInt8Array_size_0.apply(null,arguments)},hb=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return a.asm._emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null,
|
||||||
arguments)},vc=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return a.asm._emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},kb=a._emscripten_bind_Mesh_Mesh_0=function(){return a.asm._emscripten_bind_Mesh_Mesh_0.apply(null,arguments)},wc=a._emscripten_bind_Mesh___destroy___0=function(){return a.asm._emscripten_bind_Mesh___destroy___0.apply(null,arguments)},xc=a._emscripten_bind_Mesh_num_attributes_0=function(){return a.asm._emscripten_bind_Mesh_num_attributes_0.apply(null,
|
arguments)},vc=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return a.asm._emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},kb=a._emscripten_bind_Mesh_Mesh_0=function(){return a.asm._emscripten_bind_Mesh_Mesh_0.apply(null,arguments)},wc=a._emscripten_bind_Mesh___destroy___0=function(){return a.asm._emscripten_bind_Mesh___destroy___0.apply(null,arguments)},xc=a._emscripten_bind_Mesh_num_attributes_0=function(){return a.asm._emscripten_bind_Mesh_num_attributes_0.apply(null,
|
||||||
arguments)},yc=a._emscripten_bind_Mesh_num_faces_0=function(){return a.asm._emscripten_bind_Mesh_num_faces_0.apply(null,arguments)},zc=a._emscripten_bind_Mesh_num_points_0=function(){return a.asm._emscripten_bind_Mesh_num_points_0.apply(null,arguments)},Ac=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},Bc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetEntryName_2.apply(null,
|
arguments)},yc=a._emscripten_bind_Mesh_num_faces_0=function(){return a.asm._emscripten_bind_Mesh_num_faces_0.apply(null,arguments)},zc=a._emscripten_bind_Mesh_num_points_0=function(){return a.asm._emscripten_bind_Mesh_num_points_0.apply(null,arguments)},Ac=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},Bc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetEntryName_2.apply(null,
|
||||||
arguments)},Cc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,arguments)},Dc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},Ec=a._emscripten_bind_MetadataQuerier_HasDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasDoubleEntry_2.apply(null,arguments)},Fc=a._emscripten_bind_MetadataQuerier_HasEntry_2=
|
arguments)},Cc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,arguments)},Dc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},Ec=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasEntry_2.apply(null,arguments)},eb=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=
|
||||||
function(){return a.asm._emscripten_bind_MetadataQuerier_HasEntry_2.apply(null,arguments)},Gc=a._emscripten_bind_MetadataQuerier_HasIntEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasIntEntry_2.apply(null,arguments)},Hc=a._emscripten_bind_MetadataQuerier_HasStringEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasStringEntry_2.apply(null,arguments)},eb=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return a.asm._emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,
|
function(){return a.asm._emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,arguments)},Fc=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return a.asm._emscripten_bind_MetadataQuerier_NumEntries_1.apply(null,arguments)},Gc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return a.asm._emscripten_bind_MetadataQuerier___destroy___0.apply(null,arguments)},mb=a._emscripten_bind_Metadata_Metadata_0=function(){return a.asm._emscripten_bind_Metadata_Metadata_0.apply(null,
|
||||||
arguments)},Ic=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return a.asm._emscripten_bind_MetadataQuerier_NumEntries_1.apply(null,arguments)},Jc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return a.asm._emscripten_bind_MetadataQuerier___destroy___0.apply(null,arguments)},mb=a._emscripten_bind_Metadata_Metadata_0=function(){return a.asm._emscripten_bind_Metadata_Metadata_0.apply(null,arguments)},Kc=a._emscripten_bind_Metadata___destroy___0=function(){return a.asm._emscripten_bind_Metadata___destroy___0.apply(null,
|
arguments)},Hc=a._emscripten_bind_Metadata___destroy___0=function(){return a.asm._emscripten_bind_Metadata___destroy___0.apply(null,arguments)},Ic=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return a.asm._emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},ab=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return a.asm._emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},Jc=a._emscripten_bind_PointAttribute___destroy___0=
|
||||||
arguments)},Lc=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return a.asm._emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},ab=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return a.asm._emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},Mc=a._emscripten_bind_PointAttribute___destroy___0=function(){return a.asm._emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},Nc=a._emscripten_bind_PointAttribute_attribute_type_0=
|
function(){return a.asm._emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},Kc=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return a.asm._emscripten_bind_PointAttribute_attribute_type_0.apply(null,arguments)},Lc=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_offset_0.apply(null,arguments)},Mc=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_stride_0.apply(null,
|
||||||
function(){return a.asm._emscripten_bind_PointAttribute_attribute_type_0.apply(null,arguments)},Oc=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_offset_0.apply(null,arguments)},Pc=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_stride_0.apply(null,arguments)},Qc=a._emscripten_bind_PointAttribute_data_type_0=function(){return a.asm._emscripten_bind_PointAttribute_data_type_0.apply(null,
|
arguments)},Nc=a._emscripten_bind_PointAttribute_data_type_0=function(){return a.asm._emscripten_bind_PointAttribute_data_type_0.apply(null,arguments)},Oc=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm._emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},Pc=a._emscripten_bind_PointAttribute_num_components_0=function(){return a.asm._emscripten_bind_PointAttribute_num_components_0.apply(null,arguments)},Qc=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm._emscripten_bind_PointAttribute_size_0.apply(null,
|
||||||
arguments)},Rc=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm._emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},Sc=a._emscripten_bind_PointAttribute_num_components_0=function(){return a.asm._emscripten_bind_PointAttribute_num_components_0.apply(null,arguments)},Tc=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm._emscripten_bind_PointAttribute_size_0.apply(null,arguments)},Uc=a._emscripten_bind_PointAttribute_unique_id_0=function(){return a.asm._emscripten_bind_PointAttribute_unique_id_0.apply(null,
|
arguments)},Rc=a._emscripten_bind_PointAttribute_unique_id_0=function(){return a.asm._emscripten_bind_PointAttribute_unique_id_0.apply(null,arguments)},Xa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return a.asm._emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},Sc=a._emscripten_bind_PointCloud___destroy___0=function(){return a.asm._emscripten_bind_PointCloud___destroy___0.apply(null,arguments)},Tc=a._emscripten_bind_PointCloud_num_attributes_0=function(){return a.asm._emscripten_bind_PointCloud_num_attributes_0.apply(null,
|
||||||
arguments)},Xa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return a.asm._emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},Vc=a._emscripten_bind_PointCloud___destroy___0=function(){return a.asm._emscripten_bind_PointCloud___destroy___0.apply(null,arguments)},Wc=a._emscripten_bind_PointCloud_num_attributes_0=function(){return a.asm._emscripten_bind_PointCloud_num_attributes_0.apply(null,arguments)},Xc=a._emscripten_bind_PointCloud_num_points_0=function(){return a.asm._emscripten_bind_PointCloud_num_points_0.apply(null,
|
arguments)},Uc=a._emscripten_bind_PointCloud_num_points_0=function(){return a.asm._emscripten_bind_PointCloud_num_points_0.apply(null,arguments)},Vc=a._emscripten_bind_Status___destroy___0=function(){return a.asm._emscripten_bind_Status___destroy___0.apply(null,arguments)},Wc=a._emscripten_bind_Status_code_0=function(){return a.asm._emscripten_bind_Status_code_0.apply(null,arguments)},Xc=a._emscripten_bind_Status_error_msg_0=function(){return a.asm._emscripten_bind_Status_error_msg_0.apply(null,arguments)},
|
||||||
arguments)},Yc=a._emscripten_bind_Status___destroy___0=function(){return a.asm._emscripten_bind_Status___destroy___0.apply(null,arguments)},Zc=a._emscripten_bind_Status_code_0=function(){return a.asm._emscripten_bind_Status_code_0.apply(null,arguments)},$c=a._emscripten_bind_Status_error_msg_0=function(){return a.asm._emscripten_bind_Status_error_msg_0.apply(null,arguments)},ad=a._emscripten_bind_Status_ok_0=function(){return a.asm._emscripten_bind_Status_ok_0.apply(null,arguments)},bd=a._emscripten_bind_VoidPtr___destroy___0=
|
Yc=a._emscripten_bind_Status_ok_0=function(){return a.asm._emscripten_bind_Status_ok_0.apply(null,arguments)},Zc=a._emscripten_bind_VoidPtr___destroy___0=function(){return a.asm._emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},$c=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null,arguments)},ad=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=
|
||||||
function(){return a.asm._emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},cd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null,arguments)},dd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)},ed=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=
|
function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)},bd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null,arguments)},cd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,
|
||||||
function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null,arguments)},fd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,arguments)},gd=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null,
|
arguments)},dd=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null,arguments)},ed=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},fd=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,
|
||||||
arguments)},hd=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},id=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,arguments)},jd=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},kd=
|
arguments)},gd=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},hd=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)},id=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},jd=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=
|
||||||
a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)},ld=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},md=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,arguments)},nd=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=
|
function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,arguments)},kd=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},ld=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD.apply(null,arguments)},md=a._emscripten_enum_draco_StatusCode_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_ERROR.apply(null,
|
||||||
function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},od=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD.apply(null,arguments)},pd=a._emscripten_enum_draco_StatusCode_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_ERROR.apply(null,arguments)},qd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return a.asm._emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,
|
arguments)},nd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return a.asm._emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,arguments)},od=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_IO_ERROR.apply(null,arguments)},pd=a._emscripten_enum_draco_StatusCode_OK=function(){return a.asm._emscripten_enum_draco_StatusCode_OK.apply(null,arguments)},qd=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,
|
||||||
arguments)},rd=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_IO_ERROR.apply(null,arguments)},sd=a._emscripten_enum_draco_StatusCode_OK=function(){return a.asm._emscripten_enum_draco_StatusCode_OK.apply(null,arguments)},td=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,arguments)},ud=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,
|
arguments)},rd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,arguments)},nb=a._emscripten_replace_memory=function(){return a.asm._emscripten_replace_memory.apply(null,arguments)};a._free=function(){return a.asm._free.apply(null,arguments)};a._llvm_bswap_i32=function(){return a.asm._llvm_bswap_i32.apply(null,arguments)};var Ka=a._malloc=function(){return a.asm._malloc.apply(null,arguments)};a._memcpy=
|
||||||
arguments)},nb=a._emscripten_replace_memory=function(){return a.asm._emscripten_replace_memory.apply(null,arguments)};a._free=function(){return a.asm._free.apply(null,arguments)};a._llvm_bswap_i32=function(){return a.asm._llvm_bswap_i32.apply(null,arguments)};var Ka=a._malloc=function(){return a.asm._malloc.apply(null,arguments)};a._memcpy=function(){return a.asm._memcpy.apply(null,arguments)};a._memmove=function(){return a.asm._memmove.apply(null,arguments)};a._memset=function(){return a.asm._memset.apply(null,
|
function(){return a.asm._memcpy.apply(null,arguments)};a._memmove=function(){return a.asm._memmove.apply(null,arguments)};a._memset=function(){return a.asm._memset.apply(null,arguments)};a._sbrk=function(){return a.asm._sbrk.apply(null,arguments)};a.establishStackSpace=function(){return a.asm.establishStackSpace.apply(null,arguments)};a.getTempRet0=function(){return a.asm.getTempRet0.apply(null,arguments)};a.runPostSets=function(){return a.asm.runPostSets.apply(null,arguments)};var sa=a.setTempRet0=
|
||||||
arguments)};a._sbrk=function(){return a.asm._sbrk.apply(null,arguments)};a.establishStackSpace=function(){return a.asm.establishStackSpace.apply(null,arguments)};a.getTempRet0=function(){return a.asm.getTempRet0.apply(null,arguments)};a.runPostSets=function(){return a.asm.runPostSets.apply(null,arguments)};var sa=a.setTempRet0=function(){return a.asm.setTempRet0.apply(null,arguments)};a.setThrew=function(){return a.asm.setThrew.apply(null,arguments)};a.stackAlloc=function(){return a.asm.stackAlloc.apply(null,
|
function(){return a.asm.setTempRet0.apply(null,arguments)};a.setThrew=function(){return a.asm.setThrew.apply(null,arguments)};a.stackAlloc=function(){return a.asm.stackAlloc.apply(null,arguments)};a.stackRestore=function(){return a.asm.stackRestore.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};a.dynCall_ii=function(){return a.asm.dynCall_ii.apply(null,arguments)};a.dynCall_iii=function(){return a.asm.dynCall_iii.apply(null,arguments)};a.dynCall_iiii=function(){return a.asm.dynCall_iiii.apply(null,
|
||||||
arguments)};a.stackRestore=function(){return a.asm.stackRestore.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};a.dynCall_ii=function(){return a.asm.dynCall_ii.apply(null,arguments)};a.dynCall_iii=function(){return a.asm.dynCall_iii.apply(null,arguments)};a.dynCall_iiii=function(){return a.asm.dynCall_iiii.apply(null,arguments)};a.dynCall_iiiiiii=function(){return a.asm.dynCall_iiiiiii.apply(null,arguments)};a.dynCall_v=function(){return a.asm.dynCall_v.apply(null,
|
arguments)};a.dynCall_iiiiiii=function(){return a.asm.dynCall_iiiiiii.apply(null,arguments)};a.dynCall_v=function(){return a.asm.dynCall_v.apply(null,arguments)};a.dynCall_vi=function(){return a.asm.dynCall_vi.apply(null,arguments)};a.dynCall_vii=function(){return a.asm.dynCall_vii.apply(null,arguments)};a.dynCall_viii=function(){return a.asm.dynCall_viii.apply(null,arguments)};a.dynCall_viiii=function(){return a.asm.dynCall_viiii.apply(null,arguments)};a.dynCall_viiiii=function(){return a.asm.dynCall_viiiii.apply(null,
|
||||||
arguments)};a.dynCall_vi=function(){return a.asm.dynCall_vi.apply(null,arguments)};a.dynCall_vii=function(){return a.asm.dynCall_vii.apply(null,arguments)};a.dynCall_viii=function(){return a.asm.dynCall_viii.apply(null,arguments)};a.dynCall_viiii=function(){return a.asm.dynCall_viiii.apply(null,arguments)};a.dynCall_viiiii=function(){return a.asm.dynCall_viiiii.apply(null,arguments)};a.dynCall_viiiiii=function(){return a.asm.dynCall_viiiiii.apply(null,arguments)};a.asm=Ua;a.then=function(d){if(a.calledRun)d(a);
|
arguments)};a.dynCall_viiiiii=function(){return a.asm.dynCall_viiiiii.apply(null,arguments)};a.asm=Ua;a.then=function(d){if(a.calledRun)d(a);else{var b=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){b&&b();d(a)}}return a};na.prototype=Error();na.prototype.constructor=na;ra=function b(){a.calledRun||wa();a.calledRun||(ra=b)};a.run=wa;a.exit=function(b,c){if(!c||!a.noExitRuntime||0!==b){if(!a.noExitRuntime&&(oa=!0,ta=void 0,B(ob),a.onExit))a.onExit(b);qa&&process.exit(b);a.quit(b,new na(b))}};
|
||||||
else{var b=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){b&&b();d(a)}}return a};na.prototype=Error();na.prototype.constructor=na;ra=function b(){a.calledRun||wa();a.calledRun||(ra=b)};a.run=wa;a.exit=function(b,c){if(!c||!a.noExitRuntime||0!==b){if(!a.noExitRuntime&&(oa=!0,ta=void 0,B(ob),a.onExit))a.onExit(b);qa&&process.exit(b);a.quit(b,new na(b))}};a.abort=O;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();a.noExitRuntime=!0;
|
a.abort=O;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();a.noExitRuntime=!0;wa();m.prototype=Object.create(m.prototype);m.prototype.constructor=m;m.prototype.__class__=m;m.__cache__={};a.WrapperObject=m;a.getCache=t;a.wrapPointer=T;a.castObject=function(a,c){return T(a.ptr,c)};a.NULL=T(0);a.destroy=function(a){if(!a.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";a.__destroy__();delete t(a.__class__)[a.ptr]};
|
||||||
wa();m.prototype=Object.create(m.prototype);m.prototype.constructor=m;m.prototype.__class__=m;m.__cache__={};a.WrapperObject=m;a.getCache=t;a.wrapPointer=T;a.castObject=function(a,c){return T(a.ptr,c)};a.NULL=T(0);a.destroy=function(a){if(!a.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";a.__destroy__();delete t(a.__class__)[a.ptr]};a.compare=function(a,c){return a.ptr===c.ptr};a.getPointer=function(a){return a.ptr};a.getClass=function(a){return a.__class__};var l=
|
a.compare=function(a,c){return a.ptr===c.ptr};a.getPointer=function(a){return a.ptr};a.getClass=function(a){return a.__class__};var l={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(l.needed){for(var b=0;b<l.temps.length;b++)a._free(l.temps[b]);l.temps.length=0;a._free(l.buffer);l.buffer=0;l.size+=l.needed;l.needed=0}l.buffer||(l.size+=128,l.buffer=a._malloc(l.size),f(l.buffer));l.pos=0},alloc:function(b,c){f(l.buffer);b=b.length*c.BYTES_PER_ELEMENT;b=b+7&-8;l.pos+b>=l.size?(f(0<b),
|
||||||
{buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(l.needed){for(var b=0;b<l.temps.length;b++)a._free(l.temps[b]);l.temps.length=0;a._free(l.buffer);l.buffer=0;l.size+=l.needed;l.needed=0}l.buffer||(l.size+=128,l.buffer=a._malloc(l.size),f(l.buffer));l.pos=0},alloc:function(b,c){f(l.buffer);b=b.length*c.BYTES_PER_ELEMENT;b=b+7&-8;l.pos+b>=l.size?(f(0<b),l.needed+=b,c=a._malloc(b),l.temps.push(c)):(c=l.buffer+l.pos,l.pos+=b);return c},copy:function(a,c,d){switch(c.BYTES_PER_ELEMENT){case 2:d>>=
|
l.needed+=b,c=a._malloc(b),l.temps.push(c)):(c=l.buffer+l.pos,l.pos+=b);return c},copy:function(a,c,d){switch(c.BYTES_PER_ELEMENT){case 2:d>>=1;break;case 4:d>>=2;break;case 8:d>>=3}for(var b=0;b<a.length;b++)c[d+b]=a[b]}};z.prototype=Object.create(m.prototype);z.prototype.constructor=z;z.prototype.__class__=z;z.__cache__={};a.Status=z;z.prototype.code=z.prototype.code=function(){return Wc(this.ptr)};z.prototype.ok=z.prototype.ok=function(){return!!Yc(this.ptr)};z.prototype.error_msg=z.prototype.error_msg=
|
||||||
1;break;case 4:d>>=2;break;case 8:d>>=3}for(var b=0;b<a.length;b++)c[d+b]=a[b]}};z.prototype=Object.create(m.prototype);z.prototype.constructor=z;z.prototype.__class__=z;z.__cache__={};a.Status=z;z.prototype.code=z.prototype.code=function(){return Zc(this.ptr)};z.prototype.ok=z.prototype.ok=function(){return!!ad(this.ptr)};z.prototype.error_msg=z.prototype.error_msg=function(){return v($c(this.ptr))};z.prototype.__destroy__=z.prototype.__destroy__=function(){Yc(this.ptr)};F.prototype=Object.create(m.prototype);
|
function(){return v(Xc(this.ptr))};z.prototype.__destroy__=z.prototype.__destroy__=function(){Vc(this.ptr)};F.prototype=Object.create(m.prototype);F.prototype.constructor=F;F.prototype.__class__=F;F.__cache__={};a.DracoUInt16Array=F;F.prototype.GetValue=F.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return mc(b,a)};F.prototype.size=F.prototype.size=function(){return oc(this.ptr)};F.prototype.__destroy__=F.prototype.__destroy__=function(){nc(this.ptr)};G.prototype=
|
||||||
F.prototype.constructor=F;F.prototype.__class__=F;F.__cache__={};a.DracoUInt16Array=F;F.prototype.GetValue=F.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return mc(b,a)};F.prototype.size=F.prototype.size=function(){return oc(this.ptr)};F.prototype.__destroy__=F.prototype.__destroy__=function(){nc(this.ptr)};G.prototype=Object.create(m.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.PointCloud=G;G.prototype.num_attributes=G.prototype.num_attributes=
|
Object.create(m.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.PointCloud=G;G.prototype.num_attributes=G.prototype.num_attributes=function(){return Tc(this.ptr)};G.prototype.num_points=G.prototype.num_points=function(){return Uc(this.ptr)};G.prototype.__destroy__=G.prototype.__destroy__=function(){Sc(this.ptr)};H.prototype=Object.create(m.prototype);H.prototype.constructor=H;H.prototype.__class__=H;H.__cache__={};a.DracoUInt8Array=H;H.prototype.GetValue=H.prototype.GetValue=
|
||||||
function(){return Wc(this.ptr)};G.prototype.num_points=G.prototype.num_points=function(){return Xc(this.ptr)};G.prototype.__destroy__=G.prototype.__destroy__=function(){Vc(this.ptr)};H.prototype=Object.create(m.prototype);H.prototype.constructor=H;H.prototype.__class__=H;H.__cache__={};a.DracoUInt8Array=H;H.prototype.GetValue=H.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return sc(b,a)};H.prototype.size=H.prototype.size=function(){return uc(this.ptr)};H.prototype.__destroy__=
|
function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return sc(b,a)};H.prototype.size=H.prototype.size=function(){return uc(this.ptr)};H.prototype.__destroy__=H.prototype.__destroy__=function(){tc(this.ptr)};I.prototype=Object.create(m.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.DracoUInt32Array=I;I.prototype.GetValue=I.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return pc(b,a)};I.prototype.size=I.prototype.size=function(){return rc(this.ptr)};
|
||||||
H.prototype.__destroy__=function(){tc(this.ptr)};I.prototype=Object.create(m.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.DracoUInt32Array=I;I.prototype.GetValue=I.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return pc(b,a)};I.prototype.size=I.prototype.size=function(){return rc(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){qc(this.ptr)};J.prototype=Object.create(m.prototype);J.prototype.constructor=J;J.prototype.__class__=
|
I.prototype.__destroy__=I.prototype.__destroy__=function(){qc(this.ptr)};J.prototype=Object.create(m.prototype);J.prototype.constructor=J;J.prototype.__class__=J;J.__cache__={};a.AttributeOctahedronTransform=J;J.prototype.InitFromAttribute=J.prototype.InitFromAttribute=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!sb(b,a)};J.prototype.quantization_bits=J.prototype.quantization_bits=function(){return ub(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){tb(this.ptr)};
|
||||||
J;J.__cache__={};a.AttributeOctahedronTransform=J;J.prototype.InitFromAttribute=J.prototype.InitFromAttribute=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!sb(b,a)};J.prototype.quantization_bits=J.prototype.quantization_bits=function(){return ub(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){tb(this.ptr)};n.prototype=Object.create(m.prototype);n.prototype.constructor=n;n.prototype.__class__=n;n.__cache__={};a.PointAttribute=n;n.prototype.size=n.prototype.size=
|
n.prototype=Object.create(m.prototype);n.prototype.constructor=n;n.prototype.__class__=n;n.__cache__={};a.PointAttribute=n;n.prototype.size=n.prototype.size=function(){return Qc(this.ptr)};n.prototype.GetAttributeTransformData=n.prototype.GetAttributeTransformData=function(){return T(Ic(this.ptr),P)};n.prototype.attribute_type=n.prototype.attribute_type=function(){return Kc(this.ptr)};n.prototype.data_type=n.prototype.data_type=function(){return Nc(this.ptr)};n.prototype.num_components=n.prototype.num_components=
|
||||||
function(){return Tc(this.ptr)};n.prototype.GetAttributeTransformData=n.prototype.GetAttributeTransformData=function(){return T(Lc(this.ptr),P)};n.prototype.attribute_type=n.prototype.attribute_type=function(){return Nc(this.ptr)};n.prototype.data_type=n.prototype.data_type=function(){return Qc(this.ptr)};n.prototype.num_components=n.prototype.num_components=function(){return Sc(this.ptr)};n.prototype.normalized=n.prototype.normalized=function(){return!!Rc(this.ptr)};n.prototype.byte_stride=n.prototype.byte_stride=
|
function(){return Pc(this.ptr)};n.prototype.normalized=n.prototype.normalized=function(){return!!Oc(this.ptr)};n.prototype.byte_stride=n.prototype.byte_stride=function(){return Mc(this.ptr)};n.prototype.byte_offset=n.prototype.byte_offset=function(){return Lc(this.ptr)};n.prototype.unique_id=n.prototype.unique_id=function(){return Rc(this.ptr)};n.prototype.__destroy__=n.prototype.__destroy__=function(){Jc(this.ptr)};P.prototype=Object.create(m.prototype);P.prototype.constructor=P;P.prototype.__class__=
|
||||||
function(){return Pc(this.ptr)};n.prototype.byte_offset=n.prototype.byte_offset=function(){return Oc(this.ptr)};n.prototype.unique_id=n.prototype.unique_id=function(){return Uc(this.ptr)};n.prototype.__destroy__=n.prototype.__destroy__=function(){Mc(this.ptr)};P.prototype=Object.create(m.prototype);P.prototype.constructor=P;P.prototype.__class__=P;P.__cache__={};a.AttributeTransformData=P;P.prototype.transform_type=P.prototype.transform_type=function(){return Bb(this.ptr)};P.prototype.__destroy__=
|
P;P.__cache__={};a.AttributeTransformData=P;P.prototype.transform_type=P.prototype.transform_type=function(){return Bb(this.ptr)};P.prototype.__destroy__=P.prototype.__destroy__=function(){Ab(this.ptr)};x.prototype=Object.create(m.prototype);x.prototype.constructor=x;x.prototype.__class__=x;x.__cache__={};a.AttributeQuantizationTransform=x;x.prototype.InitFromAttribute=x.prototype.InitFromAttribute=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!vb(b,a)};x.prototype.quantization_bits=
|
||||||
P.prototype.__destroy__=function(){Ab(this.ptr)};x.prototype=Object.create(m.prototype);x.prototype.constructor=x;x.prototype.__class__=x;x.__cache__={};a.AttributeQuantizationTransform=x;x.prototype.InitFromAttribute=x.prototype.InitFromAttribute=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!vb(b,a)};x.prototype.quantization_bits=x.prototype.quantization_bits=function(){return yb(this.ptr)};x.prototype.min_value=x.prototype.min_value=function(a){var b=this.ptr;a&&"object"===
|
x.prototype.quantization_bits=function(){return yb(this.ptr)};x.prototype.min_value=x.prototype.min_value=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return xb(b,a)};x.prototype.range=x.prototype.range=function(){return zb(this.ptr)};x.prototype.__destroy__=x.prototype.__destroy__=function(){wb(this.ptr)};K.prototype=Object.create(m.prototype);K.prototype.constructor=K;K.prototype.__class__=K;K.__cache__={};a.DracoInt8Array=K;K.prototype.GetValue=K.prototype.GetValue=function(a){var b=
|
||||||
typeof a&&(a=a.ptr);return xb(b,a)};x.prototype.range=x.prototype.range=function(){return zb(this.ptr)};x.prototype.__destroy__=x.prototype.__destroy__=function(){wb(this.ptr)};K.prototype=Object.create(m.prototype);K.prototype.constructor=K;K.prototype.__class__=K;K.__cache__={};a.DracoInt8Array=K;K.prototype.GetValue=K.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return jc(b,a)};K.prototype.size=K.prototype.size=function(){return lc(this.ptr)};K.prototype.__destroy__=
|
this.ptr;a&&"object"===typeof a&&(a=a.ptr);return jc(b,a)};K.prototype.size=K.prototype.size=function(){return lc(this.ptr)};K.prototype.__destroy__=K.prototype.__destroy__=function(){kc(this.ptr)};r.prototype=Object.create(m.prototype);r.prototype.constructor=r;r.prototype.__class__=r;r.__cache__={};a.MetadataQuerier=r;r.prototype.HasEntry=r.prototype.HasEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:ea(c);return!!Ec(b,a,c)};r.prototype.GetIntEntry=
|
||||||
K.prototype.__destroy__=function(){kc(this.ptr)};q.prototype=Object.create(m.prototype);q.prototype.constructor=q;q.prototype.__class__=q;q.__cache__={};a.MetadataQuerier=q;q.prototype.HasEntry=q.prototype.HasEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);return!!Fc(b,a,c)};q.prototype.HasIntEntry=q.prototype.HasIntEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);
|
r.prototype.GetIntEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:ea(c);return Cc(b,a,c)};r.prototype.GetDoubleEntry=r.prototype.GetDoubleEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:ea(c);return Ac(b,a,c)};r.prototype.GetStringEntry=r.prototype.GetStringEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:ea(c);
|
||||||
return!!Gc(b,a,c)};q.prototype.GetIntEntry=q.prototype.GetIntEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);return Cc(b,a,c)};q.prototype.HasDoubleEntry=q.prototype.HasDoubleEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);return!!Ec(b,a,c)};q.prototype.GetDoubleEntry=q.prototype.GetDoubleEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=
|
return v(Dc(b,a,c))};r.prototype.NumEntries=r.prototype.NumEntries=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Fc(b,a)};r.prototype.GetEntryName=r.prototype.GetEntryName=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return v(Bc(b,a,c))};r.prototype.__destroy__=r.prototype.__destroy__=function(){Gc(this.ptr)};L.prototype=Object.create(m.prototype);L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.DracoInt16Array=
|
||||||
a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);return Ac(b,a,c)};q.prototype.HasStringEntry=q.prototype.HasStringEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);return!!Hc(b,a,c)};q.prototype.GetStringEntry=q.prototype.GetStringEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);return v(Dc(b,a,c))};q.prototype.NumEntries=q.prototype.NumEntries=function(a){var b=this.ptr;
|
L;L.prototype.GetValue=L.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return dc(b,a)};L.prototype.size=L.prototype.size=function(){return fc(this.ptr)};L.prototype.__destroy__=L.prototype.__destroy__=function(){ec(this.ptr)};M.prototype=Object.create(m.prototype);M.prototype.constructor=M;M.prototype.__class__=M;M.__cache__={};a.DracoFloat32Array=M;M.prototype.GetValue=M.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return ac(b,
|
||||||
a&&"object"===typeof a&&(a=a.ptr);return Ic(b,a)};q.prototype.GetEntryName=q.prototype.GetEntryName=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return v(Bc(b,a,c))};q.prototype.__destroy__=q.prototype.__destroy__=function(){Jc(this.ptr)};L.prototype=Object.create(m.prototype);L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.DracoInt16Array=L;L.prototype.GetValue=L.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&
|
a)};M.prototype.size=M.prototype.size=function(){return cc(this.ptr)};M.prototype.__destroy__=M.prototype.__destroy__=function(){bc(this.ptr)};U.prototype=Object.create(m.prototype);U.prototype.constructor=U;U.prototype.__class__=U;U.__cache__={};a.GeometryAttribute=U;U.prototype.__destroy__=U.prototype.__destroy__=function(){vc(this.ptr)};Q.prototype=Object.create(m.prototype);Q.prototype.constructor=Q;Q.prototype.__class__=Q;Q.__cache__={};a.DecoderBuffer=Q;Q.prototype.Init=Q.prototype.Init=function(a,
|
||||||
(a=a.ptr);return dc(b,a)};L.prototype.size=L.prototype.size=function(){return fc(this.ptr)};L.prototype.__destroy__=L.prototype.__destroy__=function(){ec(this.ptr)};M.prototype=Object.create(m.prototype);M.prototype.constructor=M;M.prototype.__class__=M;M.__cache__={};a.DracoFloat32Array=M;M.prototype.GetValue=M.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return ac(b,a)};M.prototype.size=M.prototype.size=function(){return cc(this.ptr)};M.prototype.__destroy__=M.prototype.__destroy__=
|
c){var b=this.ptr;l.prepare();if("object"==typeof a&&"object"===typeof a){var d=l.alloc(a,ia);l.copy(a,ia,d);a=d}c&&"object"===typeof c&&(c=c.ptr);Cb(b,a,c)};Q.prototype.__destroy__=Q.prototype.__destroy__=function(){Db(this.ptr)};g.prototype=Object.create(m.prototype);g.prototype.constructor=g;g.prototype.__class__=g;g.__cache__={};a.Decoder=g;g.prototype.GetEncodedGeometryType=g.prototype.GetEncodedGeometryType=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Vb(b,a)};g.prototype.DecodeBufferToPointCloud=
|
||||||
function(){bc(this.ptr)};V.prototype=Object.create(m.prototype);V.prototype.constructor=V;V.prototype.__class__=V;V.__cache__={};a.GeometryAttribute=V;V.prototype.__destroy__=V.prototype.__destroy__=function(){vc(this.ptr)};Q.prototype=Object.create(m.prototype);Q.prototype.constructor=Q;Q.prototype.__class__=Q;Q.__cache__={};a.DecoderBuffer=Q;Q.prototype.Init=Q.prototype.Init=function(a,c){var b=this.ptr;l.prepare();if("object"==typeof a&&"object"===typeof a){var d=l.alloc(a,ia);l.copy(a,ia,d);a=
|
g.prototype.DecodeBufferToPointCloud=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Fb(b,a,c),z)};g.prototype.DecodeBufferToMesh=g.prototype.DecodeBufferToMesh=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Eb(b,a,c),z)};g.prototype.GetAttributeId=g.prototype.GetAttributeId=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return Lb(b,
|
||||||
d}c&&"object"===typeof c&&(c=c.ptr);Cb(b,a,c)};Q.prototype.__destroy__=Q.prototype.__destroy__=function(){Db(this.ptr)};g.prototype=Object.create(m.prototype);g.prototype.constructor=g;g.prototype.__class__=g;g.__cache__={};a.Decoder=g;g.prototype.GetEncodedGeometryType=g.prototype.GetEncodedGeometryType=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Vb(b,a)};g.prototype.DecodeBufferToPointCloud=g.prototype.DecodeBufferToPointCloud=function(a,c){var b=this.ptr;a&&"object"===typeof a&&
|
a,c)};g.prototype.GetAttributeIdByName=g.prototype.GetAttributeIdByName=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:ea(c);return Kb(b,a,c)};g.prototype.GetAttributeIdByMetadataEntry=g.prototype.GetAttributeIdByMetadataEntry=function(a,c,d){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:ea(c);d=d&&"object"===typeof d?d.ptr:ea(d);return Jb(b,a,c,d)};g.prototype.GetAttribute=g.prototype.GetAttribute=
|
||||||
(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Fb(b,a,c),z)};g.prototype.DecodeBufferToMesh=g.prototype.DecodeBufferToMesh=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Eb(b,a,c),z)};g.prototype.GetAttributeId=g.prototype.GetAttributeId=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return Lb(b,a,c)};g.prototype.GetAttributeIdByName=g.prototype.GetAttributeIdByName=function(a,c){var b=
|
function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Ub(b,a,c),n)};g.prototype.GetAttributeByUniqueId=g.prototype.GetAttributeByUniqueId=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Gb(b,a,c),n)};g.prototype.GetMetadata=g.prototype.GetMetadata=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return T(Xb(b,a),R)};g.prototype.GetAttributeMetadata=g.prototype.GetAttributeMetadata=
|
||||||
this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);return Kb(b,a,c)};g.prototype.GetAttributeIdByMetadataEntry=g.prototype.GetAttributeIdByMetadataEntry=function(a,c,d){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:U(c);d=d&&"object"===typeof d?d.ptr:U(d);return Jb(b,a,c,d)};g.prototype.GetAttribute=g.prototype.GetAttribute=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=
|
function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Qb(b,a,c),R)};g.prototype.GetFaceFromMesh=g.prototype.GetFaceFromMesh=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Wb(b,a,c,d)};g.prototype.GetTriangleStripsFromMesh=g.prototype.GetTriangleStripsFromMesh=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);
|
||||||
c.ptr);return T(Ub(b,a,c),n)};g.prototype.GetAttributeByUniqueId=g.prototype.GetAttributeByUniqueId=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Gb(b,a,c),n)};g.prototype.GetMetadata=g.prototype.GetMetadata=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return T(Xb(b,a),R)};g.prototype.GetAttributeMetadata=g.prototype.GetAttributeMetadata=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&
|
return Yb(b,a,c)};g.prototype.GetAttributeFloat=g.prototype.GetAttributeFloat=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ib(b,a,c,d)};g.prototype.GetAttributeFloatForAllPoints=g.prototype.GetAttributeFloatForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Hb(b,a,c,d)};g.prototype.GetAttributeIntForAllPoints=
|
||||||
(c=c.ptr);return T(Qb(b,a,c),R)};g.prototype.GetFaceFromMesh=g.prototype.GetFaceFromMesh=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Wb(b,a,c,d)};g.prototype.GetTriangleStripsFromMesh=g.prototype.GetTriangleStripsFromMesh=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return Yb(b,a,c)};g.prototype.GetAttributeFloat=g.prototype.GetAttributeFloat=function(a,
|
g.prototype.GetAttributeIntForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Pb(b,a,c,d)};g.prototype.GetAttributeInt8ForAllPoints=g.prototype.GetAttributeInt8ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ob(b,a,c,d)};g.prototype.GetAttributeUInt8ForAllPoints=g.prototype.GetAttributeUInt8ForAllPoints=
|
||||||
c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ib(b,a,c,d)};g.prototype.GetAttributeFloatForAllPoints=g.prototype.GetAttributeFloatForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Hb(b,a,c,d)};g.prototype.GetAttributeIntForAllPoints=g.prototype.GetAttributeIntForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===
|
function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Tb(b,a,c,d)};g.prototype.GetAttributeInt16ForAllPoints=g.prototype.GetAttributeInt16ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Mb(b,a,c,d)};g.prototype.GetAttributeUInt16ForAllPoints=g.prototype.GetAttributeUInt16ForAllPoints=function(a,c,d){var b=this.ptr;
|
||||||
typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Pb(b,a,c,d)};g.prototype.GetAttributeInt8ForAllPoints=g.prototype.GetAttributeInt8ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ob(b,a,c,d)};g.prototype.GetAttributeUInt8ForAllPoints=g.prototype.GetAttributeUInt8ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===
|
a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Rb(b,a,c,d)};g.prototype.GetAttributeInt32ForAllPoints=g.prototype.GetAttributeInt32ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Nb(b,a,c,d)};g.prototype.GetAttributeUInt32ForAllPoints=g.prototype.GetAttributeUInt32ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&
|
||||||
typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Tb(b,a,c,d)};g.prototype.GetAttributeInt16ForAllPoints=g.prototype.GetAttributeInt16ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Mb(b,a,c,d)};g.prototype.GetAttributeUInt16ForAllPoints=g.prototype.GetAttributeUInt16ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&
|
(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Sb(b,a,c,d)};g.prototype.SkipAttributeTransform=g.prototype.SkipAttributeTransform=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);Zb(b,a)};g.prototype.__destroy__=g.prototype.__destroy__=function(){$b(this.ptr)};C.prototype=Object.create(m.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.Mesh=C;C.prototype.num_faces=C.prototype.num_faces=function(){return yc(this.ptr)};
|
||||||
"object"===typeof d&&(d=d.ptr);return!!Rb(b,a,c,d)};g.prototype.GetAttributeInt32ForAllPoints=g.prototype.GetAttributeInt32ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Nb(b,a,c,d)};g.prototype.GetAttributeUInt32ForAllPoints=g.prototype.GetAttributeUInt32ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=
|
C.prototype.num_attributes=C.prototype.num_attributes=function(){return xc(this.ptr)};C.prototype.num_points=C.prototype.num_points=function(){return zc(this.ptr)};C.prototype.__destroy__=C.prototype.__destroy__=function(){wc(this.ptr)};W.prototype=Object.create(m.prototype);W.prototype.constructor=W;W.prototype.__class__=W;W.__cache__={};a.VoidPtr=W;W.prototype.__destroy__=W.prototype.__destroy__=function(){Zc(this.ptr)};N.prototype=Object.create(m.prototype);N.prototype.constructor=N;N.prototype.__class__=
|
||||||
d.ptr);return!!Sb(b,a,c,d)};g.prototype.SkipAttributeTransform=g.prototype.SkipAttributeTransform=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);Zb(b,a)};g.prototype.__destroy__=g.prototype.__destroy__=function(){$b(this.ptr)};C.prototype=Object.create(m.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.Mesh=C;C.prototype.num_faces=C.prototype.num_faces=function(){return yc(this.ptr)};C.prototype.num_attributes=C.prototype.num_attributes=function(){return xc(this.ptr)};
|
N;N.__cache__={};a.DracoInt32Array=N;N.prototype.GetValue=N.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return gc(b,a)};N.prototype.size=N.prototype.size=function(){return ic(this.ptr)};N.prototype.__destroy__=N.prototype.__destroy__=function(){hc(this.ptr)};R.prototype=Object.create(m.prototype);R.prototype.constructor=R;R.prototype.__class__=R;R.__cache__={};a.Metadata=R;R.prototype.__destroy__=R.prototype.__destroy__=function(){Hc(this.ptr)};(function(){function b(){a.OK=
|
||||||
C.prototype.num_points=C.prototype.num_points=function(){return zc(this.ptr)};C.prototype.__destroy__=C.prototype.__destroy__=function(){wc(this.ptr)};X.prototype=Object.create(m.prototype);X.prototype.constructor=X;X.prototype.__class__=X;X.__cache__={};a.VoidPtr=X;X.prototype.__destroy__=X.prototype.__destroy__=function(){bd(this.ptr)};N.prototype=Object.create(m.prototype);N.prototype.constructor=N;N.prototype.__class__=N;N.__cache__={};a.DracoInt32Array=N;N.prototype.GetValue=N.prototype.GetValue=
|
pd();a.ERROR=md();a.IO_ERROR=od();a.INVALID_PARAMETER=nd();a.UNSUPPORTED_VERSION=rd();a.UNKNOWN_VERSION=qd();a.INVALID_GEOMETRY_TYPE=dd();a.POINT_CLOUD=ed();a.TRIANGULAR_MESH=fd();a.ATTRIBUTE_INVALID_TRANSFORM=$c();a.ATTRIBUTE_NO_TRANSFORM=ad();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=cd();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=bd();a.INVALID=id();a.POSITION=kd();a.NORMAL=jd();a.COLOR=gd();a.TEX_COORD=ld();a.GENERIC=hd()}a.calledRun?b():Na.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();
|
||||||
function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return gc(b,a)};N.prototype.size=N.prototype.size=function(){return ic(this.ptr)};N.prototype.__destroy__=N.prototype.__destroy__=function(){hc(this.ptr)};R.prototype=Object.create(m.prototype);R.prototype.constructor=R;R.prototype.__class__=R;R.__cache__={};a.Metadata=R;R.prototype.__destroy__=R.prototype.__destroy__=function(){Kc(this.ptr)};(function(){function b(){a.OK=sd();a.ERROR=pd();a.IO_ERROR=rd();a.INVALID_PARAMETER=qd();a.UNSUPPORTED_VERSION=
|
return d};"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule);
|
||||||
ud();a.UNKNOWN_VERSION=td();a.INVALID_GEOMETRY_TYPE=gd();a.POINT_CLOUD=hd();a.TRIANGULAR_MESH=id();a.ATTRIBUTE_INVALID_TRANSFORM=cd();a.ATTRIBUTE_NO_TRANSFORM=dd();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=fd();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=ed();a.INVALID=ld();a.POSITION=nd();a.NORMAL=md();a.COLOR=jd();a.TEX_COORD=od();a.GENERIC=kd()}a.calledRun?b():Na.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();return d};
|
|
||||||
"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule);
|
|
||||||
|
@ -4,48 +4,48 @@ $jscomp.polyfill("Math.clz32",function(d){return d?d:function(d){d=Number(d)>>>0
|
|||||||
$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var d=0;return function(k){return $jscomp.SYMBOL_PREFIX+(k||"")+d++}}();
|
$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var d=0;return function(k){return $jscomp.SYMBOL_PREFIX+(k||"")+d++}}();
|
||||||
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var d=$jscomp.global.Symbol.iterator;d||(d=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[d]&&$jscomp.defineProperty(Array.prototype,d,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(d){var k=0;return $jscomp.iteratorPrototype(function(){return k<d.length?{done:!1,value:d[k++]}:{done:!0}})};
|
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var d=$jscomp.global.Symbol.iterator;d||(d=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[d]&&$jscomp.defineProperty(Array.prototype,d,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(d){var k=0;return $jscomp.iteratorPrototype(function(){return k<d.length?{done:!1,value:d[k++]}:{done:!0}})};
|
||||||
$jscomp.iteratorPrototype=function(d){$jscomp.initSymbolIterator();d={next:d};d[$jscomp.global.Symbol.iterator]=function(){return this};return d};$jscomp.makeIterator=function(d){$jscomp.initSymbolIterator();var k=d[Symbol.iterator];return k?k.call(d):$jscomp.arrayIterator(d)};$jscomp.FORCE_POLYFILL_PROMISE=!1;
|
$jscomp.iteratorPrototype=function(d){$jscomp.initSymbolIterator();d={next:d};d[$jscomp.global.Symbol.iterator]=function(){return this};return d};$jscomp.makeIterator=function(d){$jscomp.initSymbolIterator();var k=d[Symbol.iterator];return k?k.call(d):$jscomp.arrayIterator(d)};$jscomp.FORCE_POLYFILL_PROMISE=!1;
|
||||||
$jscomp.polyfill("Promise",function(d){function k(){this.batch_=null}function f(d){return d instanceof h?d:new h(function(r,f){r(d)})}if(d&&!$jscomp.FORCE_POLYFILL_PROMISE)return d;k.prototype.asyncExecute=function(d){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(d);return this};k.prototype.asyncExecuteBatch_=function(){var d=this;this.asyncExecuteFunction(function(){d.executeBatch_()})};var u=$jscomp.global.setTimeout;k.prototype.asyncExecuteFunction=function(d){u(d,
|
$jscomp.polyfill("Promise",function(d){function k(){this.batch_=null}function f(d){return d instanceof h?d:new h(function(q,f){q(d)})}if(d&&!$jscomp.FORCE_POLYFILL_PROMISE)return d;k.prototype.asyncExecute=function(d){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(d);return this};k.prototype.asyncExecuteBatch_=function(){var d=this;this.asyncExecuteFunction(function(){d.executeBatch_()})};var u=$jscomp.global.setTimeout;k.prototype.asyncExecuteFunction=function(d){u(d,
|
||||||
0)};k.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var d=this.batch_;this.batch_=[];for(var B=0;B<d.length;++B){var f=d[B];delete d[B];try{f()}catch(v){this.asyncThrow_(v)}}}this.batch_=null};k.prototype.asyncThrow_=function(d){this.asyncExecuteFunction(function(){throw d;})};var h=function(d){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var r=this.createResolveAndReject_();try{d(r.resolve,r.reject)}catch(Y){r.reject(Y)}};h.prototype.createResolveAndReject_=
|
0)};k.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var d=this.batch_;this.batch_=[];for(var B=0;B<d.length;++B){var f=d[B];delete d[B];try{f()}catch(v){this.asyncThrow_(v)}}}this.batch_=null};k.prototype.asyncThrow_=function(d){this.asyncExecuteFunction(function(){throw d;})};var h=function(d){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var q=this.createResolveAndReject_();try{d(q.resolve,q.reject)}catch(X){q.reject(X)}};h.prototype.createResolveAndReject_=
|
||||||
function(){function d(d){return function(r){h||(h=!0,d.call(f,r))}}var f=this,h=!1;return{resolve:d(this.resolveTo_),reject:d(this.reject_)}};h.prototype.resolveTo_=function(d){if(d===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(d instanceof h)this.settleSameAsPromise_(d);else{a:switch(typeof d){case "object":var f=null!=d;break a;case "function":f=!0;break a;default:f=!1}f?this.resolveToNonPromiseObj_(d):this.fulfill_(d)}};h.prototype.resolveToNonPromiseObj_=function(d){var f=
|
function(){function d(d){return function(q){h||(h=!0,d.call(f,q))}}var f=this,h=!1;return{resolve:d(this.resolveTo_),reject:d(this.reject_)}};h.prototype.resolveTo_=function(d){if(d===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(d instanceof h)this.settleSameAsPromise_(d);else{a:switch(typeof d){case "object":var f=null!=d;break a;case "function":f=!0;break a;default:f=!1}f?this.resolveToNonPromiseObj_(d):this.fulfill_(d)}};h.prototype.resolveToNonPromiseObj_=function(d){var f=
|
||||||
void 0;try{f=d.then}catch(Y){this.reject_(Y);return}"function"==typeof f?this.settleSameAsThenable_(f,d):this.fulfill_(d)};h.prototype.reject_=function(d){this.settle_(2,d)};h.prototype.fulfill_=function(d){this.settle_(1,d)};h.prototype.settle_=function(d,f){if(0!=this.state_)throw Error("Cannot settle("+d+", "+f|"): Promise already settled in state"+this.state_);this.state_=d;this.result_=f;this.executeOnSettledCallbacks_()};h.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var d=
|
void 0;try{f=d.then}catch(X){this.reject_(X);return}"function"==typeof f?this.settleSameAsThenable_(f,d):this.fulfill_(d)};h.prototype.reject_=function(d){this.settle_(2,d)};h.prototype.fulfill_=function(d){this.settle_(1,d)};h.prototype.settle_=function(d,f){if(0!=this.state_)throw Error("Cannot settle("+d+", "+f|"): Promise already settled in state"+this.state_);this.state_=d;this.result_=f;this.executeOnSettledCallbacks_()};h.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var d=
|
||||||
this.onSettledCallbacks_,f=0;f<d.length;++f)d[f].call(),d[f]=null;this.onSettledCallbacks_=null}};var ha=new k;h.prototype.settleSameAsPromise_=function(d){var f=this.createResolveAndReject_();d.callWhenSettled_(f.resolve,f.reject)};h.prototype.settleSameAsThenable_=function(d,f){var h=this.createResolveAndReject_();try{d.call(f,h.resolve,h.reject)}catch(v){h.reject(v)}};h.prototype.then=function(d,f){function k(d,f){return"function"==typeof d?function(f){try{v(d(f))}catch(O){r(O)}}:f}var v,r,B=new h(function(d,
|
this.onSettledCallbacks_,f=0;f<d.length;++f)d[f].call(),d[f]=null;this.onSettledCallbacks_=null}};var ha=new k;h.prototype.settleSameAsPromise_=function(d){var f=this.createResolveAndReject_();d.callWhenSettled_(f.resolve,f.reject)};h.prototype.settleSameAsThenable_=function(d,f){var h=this.createResolveAndReject_();try{d.call(f,h.resolve,h.reject)}catch(v){h.reject(v)}};h.prototype.then=function(d,f){function k(d,f){return"function"==typeof d?function(f){try{v(d(f))}catch(O){q(O)}}:f}var v,q,B=new h(function(d,
|
||||||
f){v=d;r=f});this.callWhenSettled_(k(d,v),k(f,r));return B};h.prototype.catch=function(d){return this.then(void 0,d)};h.prototype.callWhenSettled_=function(d,f){function h(){switch(k.state_){case 1:d(k.result_);break;case 2:f(k.result_);break;default:throw Error("Unexpected state: "+k.state_);}}var k=this;null==this.onSettledCallbacks_?ha.asyncExecute(h):this.onSettledCallbacks_.push(function(){ha.asyncExecute(h)})};h.resolve=f;h.reject=function(d){return new h(function(f,h){h(d)})};h.race=function(d){return new h(function(h,
|
f){v=d;q=f});this.callWhenSettled_(k(d,v),k(f,q));return B};h.prototype.catch=function(d){return this.then(void 0,d)};h.prototype.callWhenSettled_=function(d,f){function h(){switch(k.state_){case 1:d(k.result_);break;case 2:f(k.result_);break;default:throw Error("Unexpected state: "+k.state_);}}var k=this;null==this.onSettledCallbacks_?ha.asyncExecute(h):this.onSettledCallbacks_.push(function(){ha.asyncExecute(h)})};h.resolve=f;h.reject=function(d){return new h(function(f,h){h(d)})};h.race=function(d){return new h(function(h,
|
||||||
k){for(var v=$jscomp.makeIterator(d),r=v.next();!r.done;r=v.next())f(r.value).callWhenSettled_(h,k)})};h.all=function(d){var k=$jscomp.makeIterator(d),r=k.next();return r.done?f([]):new h(function(d,h){function v(f){return function(h){u[f]=h;B--;0==B&&d(u)}}var u=[],B=0;do u.push(void 0),B++,f(r.value).callWhenSettled_(v(u.length-1),h),r=k.next();while(!r.done)})};return h},"es6","es3");
|
k){for(var v=$jscomp.makeIterator(d),q=v.next();!q.done;q=v.next())f(q.value).callWhenSettled_(h,k)})};h.all=function(d){var k=$jscomp.makeIterator(d),q=k.next();return q.done?f([]):new h(function(d,h){function v(f){return function(h){u[f]=h;B--;0==B&&d(u)}}var u=[],B=0;do u.push(void 0),B++,f(q.value).callWhenSettled_(v(u.length-1),h),q=k.next();while(!q.done)})};return h},"es6","es3");
|
||||||
var DracoDecoderModule=function(d){function k(a,c){c||(c=16);return Math.ceil(a/c)*c}function f(a,c){a||O("Assertion failed: "+c)}function u(a,c){if(0===c||!a)return"";for(var b=0,e,d=0;;){e=W[a+d>>0];b|=e;if(0==e&&!c)break;d++;if(c&&d==c)break}c||(c=d);e="";if(128>b){for(;0<c;)b=String.fromCharCode.apply(String,W.subarray(a,a+Math.min(c,1024))),e=e?e+b:b,a+=1024,c-=1024;return e}return h(W,a)}function h(a,c){for(var b=c;a[b];)++b;if(16<b-c&&a.subarray&&Ia)return Ia.decode(a.subarray(c,b));for(b=
|
var DracoDecoderModule=function(d){function k(a,b){b||(b=16);return Math.ceil(a/b)*b}function f(a,b){a||O("Assertion failed: "+b)}function u(a,b){if(0===b||!a)return"";for(var c=0,e,d=0;;){e=V[a+d>>0];c|=e;if(0==e&&!b)break;d++;if(b&&d==b)break}b||(b=d);e="";if(128>c){for(;0<b;)c=String.fromCharCode.apply(String,V.subarray(a,a+Math.min(b,1024))),e=e?e+c:c,a+=1024,b-=1024;return e}return h(V,a)}function h(a,b){for(var c=b;a[c];)++c;if(16<c-b&&a.subarray&&Ia)return Ia.decode(a.subarray(b,c));for(c=
|
||||||
"";;){var e=a[c++];if(!e)return b;if(e&128){var d=a[c++]&63;if(192==(e&224))b+=String.fromCharCode((e&31)<<6|d);else{var f=a[c++]&63;if(224==(e&240))e=(e&15)<<12|d<<6|f;else{var g=a[c++]&63;if(240==(e&248))e=(e&7)<<18|d<<12|f<<6|g;else{var h=a[c++]&63;if(248==(e&252))e=(e&3)<<24|d<<18|f<<12|g<<6|h;else{var k=a[c++]&63;e=(e&1)<<30|d<<24|f<<18|g<<12|h<<6|k}}}65536>e?b+=String.fromCharCode(e):(e-=65536,b+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else b+=String.fromCharCode(e)}}function ha(a,c){0<
|
"";;){var e=a[b++];if(!e)return c;if(e&128){var d=a[b++]&63;if(192==(e&224))c+=String.fromCharCode((e&31)<<6|d);else{var f=a[b++]&63;if(224==(e&240))e=(e&15)<<12|d<<6|f;else{var g=a[b++]&63;if(240==(e&248))e=(e&7)<<18|d<<12|f<<6|g;else{var h=a[b++]&63;if(248==(e&252))e=(e&3)<<24|d<<18|f<<12|g<<6|h;else{var k=a[b++]&63;e=(e&1)<<30|d<<24|f<<18|g<<12|h<<6|k}}}65536>e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else c+=String.fromCharCode(e)}}function ha(a,b){0<
|
||||||
a%c&&(a+=c-a%c);return a}function r(){a.HEAP8=ia=new Int8Array(D);a.HEAP16=Ja=new Int16Array(D);a.HEAP32=E=new Int32Array(D);a.HEAPU8=W=new Uint8Array(D);a.HEAPU16=new Uint16Array(D);a.HEAPU32=new Uint32Array(D);a.HEAPF32=new Float32Array(D);a.HEAPF64=new Float64Array(D)}function B(e){for(;0<e.length;){var c=e.shift();if("function"==typeof c)c();else{var b=c.func;"number"===typeof b?void 0===c.arg?a.dynCall_v(b):a.dynCall_vi(b,c.arg):b(void 0===c.arg?null:c.arg)}}}function Y(a){return String.prototype.startsWith?
|
a%b&&(a+=b-a%b);return a}function q(){a.HEAP8=ia=new Int8Array(D);a.HEAP16=Ja=new Int16Array(D);a.HEAP32=E=new Int32Array(D);a.HEAPU8=V=new Uint8Array(D);a.HEAPU16=new Uint16Array(D);a.HEAPU32=new Uint32Array(D);a.HEAPF32=new Float32Array(D);a.HEAPF64=new Float64Array(D)}function B(e){for(;0<e.length;){var b=e.shift();if("function"==typeof b)b();else{var c=b.func;"number"===typeof c?void 0===b.arg?a.dynCall_v(c):a.dynCall_vi(c,b.arg):c(void 0===b.arg?null:b.arg)}}}function X(a){return String.prototype.startsWith?
|
||||||
a.startsWith("data:application/octet-stream;base64,"):0===a.indexOf("data:application/octet-stream;base64,")}function v(){return!!v.uncaught_exception}function la(){var e=y.last;if(!e)return(sa(0),0)|0;var c=y.infos[e],b=c.type;if(!b)return(sa(0),e)|0;var p=Array.prototype.slice.call(arguments);a.___cxa_is_pointer_type(b);la.buffer||(la.buffer=Ka(4));E[la.buffer>>2]=e;e=la.buffer;for(var d=0;d<p.length;d++)if(p[d]&&a.___cxa_can_catch(p[d],b,e))return e=E[e>>2],c.adjusted=e,(sa(p[d]),e)|0;e=E[e>>2];
|
a.startsWith("data:application/octet-stream;base64,"):0===a.indexOf("data:application/octet-stream;base64,")}function v(){return!!v.uncaught_exception}function la(){var e=y.last;if(!e)return(sa(0),0)|0;var b=y.infos[e],c=b.type;if(!c)return(sa(0),e)|0;var p=Array.prototype.slice.call(arguments);a.___cxa_is_pointer_type(c);la.buffer||(la.buffer=Ka(4));E[la.buffer>>2]=e;e=la.buffer;for(var d=0;d<p.length;d++)if(p[d]&&a.___cxa_can_catch(p[d],c,e))return e=E[e>>2],b.adjusted=e,(sa(p[d]),e)|0;e=E[e>>2];
|
||||||
return(sa(b),e)|0}function Z(e,c){w.varargs=c;try{var b=w.get(),p=w.get(),d=w.get();e=0;Z.buffers||(Z.buffers=[null,[],[]],Z.printChar=function(c,b){var e=Z.buffers[c];f(e);0===b||10===b?((1===c?a.print:a.printErr)(h(e,0)),e.length=0):e.push(b)});for(c=0;c<d;c++){for(var g=E[p+8*c>>2],k=E[p+(8*c+4)>>2],l=0;l<k;l++)Z.printChar(b,W[g+l]);e+=k}return e}catch(ya){return"undefined"!==typeof FS&&ya instanceof FS.ErrnoError||O(ya),-ya.errno}}function ma(e,c){ma.seen||(ma.seen={});e in ma.seen||(a.dynCall_v(c),
|
return(sa(c),e)|0}function Y(e,b){w.varargs=b;try{var c=w.get(),p=w.get(),d=w.get();e=0;Y.buffers||(Y.buffers=[null,[],[]],Y.printChar=function(b,c){var e=Y.buffers[b];f(e);0===c||10===c?((1===b?a.print:a.printErr)(h(e,0)),e.length=0):e.push(c)});for(b=0;b<d;b++){for(var g=E[p+8*b>>2],k=E[p+(8*b+4)>>2],l=0;l<k;l++)Y.printChar(c,V[g+l]);e+=k}return e}catch(ya){return"undefined"!==typeof FS&&ya instanceof FS.ErrnoError||O(ya),-ya.errno}}function ma(e,b){ma.seen||(ma.seen={});e in ma.seen||(a.dynCall_v(b),
|
||||||
ma.seen[e]=1)}function na(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}function wa(e){function c(){if(!a.calledRun&&(a.calledRun=!0,!oa)){La||(La=!0,B(Ma));B(Na);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Oa.unshift(a.postRun.shift());B(Oa)}}if(!(0<ea)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)Pa.unshift(a.preRun.shift());
|
ma.seen[e]=1)}function na(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}function wa(e){function b(){if(!a.calledRun&&(a.calledRun=!0,!oa)){La||(La=!0,B(Ma));B(Na);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Oa.unshift(a.postRun.shift());B(Oa)}}if(!(0<da)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)Pa.unshift(a.preRun.shift());
|
||||||
B(Pa);0<ea||a.calledRun||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);c()},1)):c())}}function O(e){if(a.onAbort)a.onAbort(e);void 0!==e?(a.print(e),a.printErr(e),e=JSON.stringify(e)):e="";oa=!0;throw"abort("+e+"). Build with -s ASSERTIONS=1 for more info.";}function m(){}function t(a){return(a||m).__cache__}function T(a,c){var b=t(c),e=b[a];if(e)return e;e=Object.create((c||m).prototype);e.ptr=a;return b[a]=e}function U(a){if("string"===typeof a){for(var c=
|
B(Pa);0<da||a.calledRun||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);b()},1)):b())}}function O(e){if(a.onAbort)a.onAbort(e);void 0!==e?(a.print(e),a.printErr(e),e=JSON.stringify(e)):e="";oa=!0;throw"abort("+e+"). Build with -s ASSERTIONS=1 for more info.";}function m(){}function t(a){return(a||m).__cache__}function T(a,b){var c=t(b),e=c[a];if(e)return e;e=Object.create((b||m).prototype);e.ptr=a;return c[a]=e}function ea(a){if("string"===
|
||||||
0,b=0;b<a.length;++b){var e=a.charCodeAt(b);55296<=e&&57343>=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++b)&1023);127>=e?++c:c=2047>=e?c+2:65535>=e?c+3:2097151>=e?c+4:67108863>=e?c+5:c+6}c=Array(c+1);b=0;e=c.length;if(0<e){e=b+e-1;for(var d=0;d<a.length;++d){var f=a.charCodeAt(d);55296<=f&&57343>=f&&(f=65536+((f&1023)<<10)|a.charCodeAt(++d)&1023);if(127>=f){if(b>=e)break;c[b++]=f}else{if(2047>=f){if(b+1>=e)break;c[b++]=192|f>>6}else{if(65535>=f){if(b+2>=e)break;c[b++]=224|f>>12}else{if(2097151>=f){if(b+
|
typeof a){for(var b=0,c=0;c<a.length;++c){var e=a.charCodeAt(c);55296<=e&&57343>=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++c)&1023);127>=e?++b:b=2047>=e?b+2:65535>=e?b+3:2097151>=e?b+4:67108863>=e?b+5:b+6}b=Array(b+1);c=0;e=b.length;if(0<e){e=c+e-1;for(var d=0;d<a.length;++d){var f=a.charCodeAt(d);55296<=f&&57343>=f&&(f=65536+((f&1023)<<10)|a.charCodeAt(++d)&1023);if(127>=f){if(c>=e)break;b[c++]=f}else{if(2047>=f){if(c+1>=e)break;b[c++]=192|f>>6}else{if(65535>=f){if(c+2>=e)break;b[c++]=224|f>>12}else{if(2097151>=
|
||||||
3>=e)break;c[b++]=240|f>>18}else{if(67108863>=f){if(b+4>=e)break;c[b++]=248|f>>24}else{if(b+5>=e)break;c[b++]=252|f>>30;c[b++]=128|f>>24&63}c[b++]=128|f>>18&63}c[b++]=128|f>>12&63}c[b++]=128|f>>6&63}c[b++]=128|f&63}}c[b]=0}a=l.alloc(c,ia);l.copy(c,ia,a)}return a}function z(){throw"cannot construct a Status, no constructor in IDL";}function F(){this.ptr=Wa();t(F)[this.ptr]=this}function G(){this.ptr=Xa();t(G)[this.ptr]=this}function H(){this.ptr=Ya();t(H)[this.ptr]=this}function I(){this.ptr=Za();
|
f){if(c+3>=e)break;b[c++]=240|f>>18}else{if(67108863>=f){if(c+4>=e)break;b[c++]=248|f>>24}else{if(c+5>=e)break;b[c++]=252|f>>30;b[c++]=128|f>>24&63}b[c++]=128|f>>18&63}b[c++]=128|f>>12&63}b[c++]=128|f>>6&63}b[c++]=128|f&63}}b[c]=0}a=l.alloc(b,ia);l.copy(b,ia,a)}return a}function z(){throw"cannot construct a Status, no constructor in IDL";}function F(){this.ptr=Wa();t(F)[this.ptr]=this}function G(){this.ptr=Xa();t(G)[this.ptr]=this}function H(){this.ptr=Ya();t(H)[this.ptr]=this}function I(){this.ptr=
|
||||||
t(I)[this.ptr]=this}function J(){this.ptr=$a();t(J)[this.ptr]=this}function n(){this.ptr=ab();t(n)[this.ptr]=this}function P(){this.ptr=bb();t(P)[this.ptr]=this}function x(){this.ptr=cb();t(x)[this.ptr]=this}function K(){this.ptr=db();t(K)[this.ptr]=this}function q(){this.ptr=eb();t(q)[this.ptr]=this}function L(){this.ptr=fb();t(L)[this.ptr]=this}function M(){this.ptr=gb();t(M)[this.ptr]=this}function V(){this.ptr=hb();t(V)[this.ptr]=this}function Q(){this.ptr=ib();t(Q)[this.ptr]=this}function g(){this.ptr=
|
Za();t(I)[this.ptr]=this}function J(){this.ptr=$a();t(J)[this.ptr]=this}function n(){this.ptr=ab();t(n)[this.ptr]=this}function P(){this.ptr=bb();t(P)[this.ptr]=this}function x(){this.ptr=cb();t(x)[this.ptr]=this}function K(){this.ptr=db();t(K)[this.ptr]=this}function r(){this.ptr=eb();t(r)[this.ptr]=this}function L(){this.ptr=fb();t(L)[this.ptr]=this}function M(){this.ptr=gb();t(M)[this.ptr]=this}function U(){this.ptr=hb();t(U)[this.ptr]=this}function Q(){this.ptr=ib();t(Q)[this.ptr]=this}function g(){this.ptr=
|
||||||
jb();t(g)[this.ptr]=this}function C(){this.ptr=kb();t(C)[this.ptr]=this}function X(){throw"cannot construct a VoidPtr, no constructor in IDL";}function N(){this.ptr=lb();t(N)[this.ptr]=this}function R(){this.ptr=mb();t(R)[this.ptr]=this}d=d||{};var a="undefined"!==typeof d?d:{},Qa=!1,Ra=!1;a.onRuntimeInitialized=function(){Qa=!0;if(Ra&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Ra=!0;if(Qa&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=
|
jb();t(g)[this.ptr]=this}function C(){this.ptr=kb();t(C)[this.ptr]=this}function W(){throw"cannot construct a VoidPtr, no constructor in IDL";}function N(){this.ptr=lb();t(N)[this.ptr]=this}function R(){this.ptr=mb();t(R)[this.ptr]=this}d=d||{};var a="undefined"!==typeof d?d:{},Qa=!1,Ra=!1;a.onRuntimeInitialized=function(){Qa=!0;if(Ra&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Ra=!0;if(Qa&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=
|
||||||
function(a){if("string"!==typeof a)return!1;a=a.split(".");return 2>a.length||3<a.length?!1:1==a[0]&&0<=a[1]&&3>=a[1]?!0:0!=a[0]||10<a[1]?!1:!0};var pa={},aa;for(aa in a)a.hasOwnProperty(aa)&&(pa[aa]=a[aa]);a.arguments=[];a.thisProgram="./this.program";a.quit=function(a,c){throw c;};a.preRun=[];a.postRun=[];var ja=!1,fa=!1,qa=!1,za=!1;if(a.ENVIRONMENT)if("WEB"===a.ENVIRONMENT)ja=!0;else if("WORKER"===a.ENVIRONMENT)fa=!0;else if("NODE"===a.ENVIRONMENT)qa=!0;else if("SHELL"===a.ENVIRONMENT)za=!0;else throw Error("Module['ENVIRONMENT'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.");
|
function(a){if("string"!==typeof a)return!1;a=a.split(".");return 2>a.length||3<a.length?!1:1==a[0]&&0<=a[1]&&3>=a[1]?!0:0!=a[0]||10<a[1]?!1:!0};var pa={},Z;for(Z in a)a.hasOwnProperty(Z)&&(pa[Z]=a[Z]);a.arguments=[];a.thisProgram="./this.program";a.quit=function(a,b){throw b;};a.preRun=[];a.postRun=[];var ja=!1,fa=!1,qa=!1,za=!1;if(a.ENVIRONMENT)if("WEB"===a.ENVIRONMENT)ja=!0;else if("WORKER"===a.ENVIRONMENT)fa=!0;else if("NODE"===a.ENVIRONMENT)qa=!0;else if("SHELL"===a.ENVIRONMENT)za=!0;else throw Error("Module['ENVIRONMENT'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.");
|
||||||
else ja="object"===typeof window,fa="function"===typeof importScripts,qa="object"===typeof process&&"function"===typeof require&&!ja&&!fa,za=!ja&&!qa&&!fa;if(qa){var Aa,Ba;a.read=function(a,c){Aa||(Aa=require("fs"));Ba||(Ba=require("path"));a=Ba.normalize(a);a=Aa.readFileSync(a);return c?a:a.toString()};a.readBinary=function(e){e=a.read(e,!0);e.buffer||(e=new Uint8Array(e));f(e.buffer);return e};1<process.argv.length&&(a.thisProgram=process.argv[1].replace(/\\/g,"/"));a.arguments=process.argv.slice(2);
|
else ja="object"===typeof window,fa="function"===typeof importScripts,qa="object"===typeof process&&"function"===typeof require&&!ja&&!fa,za=!ja&&!qa&&!fa;if(qa){var Aa,Ba;a.read=function(a,b){Aa||(Aa=require("fs"));Ba||(Ba=require("path"));a=Ba.normalize(a);a=Aa.readFileSync(a);return b?a:a.toString()};a.readBinary=function(e){e=a.read(e,!0);e.buffer||(e=new Uint8Array(e));f(e.buffer);return e};1<process.argv.length&&(a.thisProgram=process.argv[1].replace(/\\/g,"/"));a.arguments=process.argv.slice(2);
|
||||||
process.on("uncaughtException",function(a){if(!(a instanceof na))throw a;});process.on("unhandledRejection",function(a,c){process.exit(1)});a.inspect=function(){return"[Emscripten Module object]"}}else if(za)"undefined"!=typeof read&&(a.read=function(a){return read(a)}),a.readBinary=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");f("object"===typeof a);return a},"undefined"!=typeof scriptArgs?a.arguments=scriptArgs:"undefined"!=typeof arguments&&
|
process.on("uncaughtException",function(a){if(!(a instanceof na))throw a;});process.on("unhandledRejection",function(a,b){process.exit(1)});a.inspect=function(){return"[Emscripten Module object]"}}else if(za)"undefined"!=typeof read&&(a.read=function(a){return read(a)}),a.readBinary=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");f("object"===typeof a);return a},"undefined"!=typeof scriptArgs?a.arguments=scriptArgs:"undefined"!=typeof arguments&&
|
||||||
(a.arguments=arguments),"function"===typeof quit&&(a.quit=function(a,c){quit(a)});else if(ja||fa)a.read=function(a){var c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);return c.responseText},fa&&(a.readBinary=function(a){var c=new XMLHttpRequest;c.open("GET",a,!1);c.responseType="arraybuffer";c.send(null);return new Uint8Array(c.response)}),a.readAsync=function(a,c,b){var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=function(){200==e.status||0==e.status&&e.response?
|
(a.arguments=arguments),"function"===typeof quit&&(a.quit=function(a,b){quit(a)});else if(ja||fa)a.read=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},fa&&(a.readBinary=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),a.readAsync=function(a,b,c){var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=function(){200==e.status||0==e.status&&e.response?
|
||||||
c(e.response):b()};e.onerror=b;e.send(null)},a.setWindowTitle=function(a){document.title=a};a.print="undefined"!==typeof console?console.log.bind(console):"undefined"!==typeof print?print:null;a.printErr="undefined"!==typeof printErr?printErr:"undefined"!==typeof console&&console.warn.bind(console)||a.print;a.print=a.print;a.printErr=a.printErr;for(aa in pa)pa.hasOwnProperty(aa)&&(a[aa]=pa[aa]);pa=void 0;var oa=0,Ia="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!==typeof TextDecoder&&
|
b(e.response):c()};e.onerror=c;e.send(null)},a.setWindowTitle=function(a){document.title=a};a.print="undefined"!==typeof console?console.log.bind(console):"undefined"!==typeof print?print:null;a.printErr="undefined"!==typeof printErr?printErr:"undefined"!==typeof console&&console.warn.bind(console)||a.print;a.print=a.print;a.printErr=a.printErr;for(Z in pa)pa.hasOwnProperty(Z)&&(a[Z]=pa[Z]);pa=void 0;var oa=0,Ia="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!==typeof TextDecoder&&
|
||||||
new TextDecoder("utf-16le");var ia,W,Ja,E,ba,Ca,ta,ua,Da,ka;var Ea=ba=Ca=ta=ua=Da=ka=0;var Sa=!1;a.reallocBuffer||(a.reallocBuffer=function(a){try{if(ArrayBuffer.transfer)var c=ArrayBuffer.transfer(D,a);else{var b=ia;c=new ArrayBuffer(a);(new Int8Array(c)).set(b)}}catch(p){return!1}return nb(c)?c:!1});try{var Ta=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);Ta(new ArrayBuffer(4))}catch(e){Ta=function(a){return a.byteLength}}var Fa=a.TOTAL_STACK||
|
new TextDecoder("utf-16le");var ia,V,Ja,E,aa,Ca,ta,ua,Da,ka;var Ea=aa=Ca=ta=ua=Da=ka=0;var Sa=!1;a.reallocBuffer||(a.reallocBuffer=function(a){try{if(ArrayBuffer.transfer)var b=ArrayBuffer.transfer(D,a);else{var c=ia;b=new ArrayBuffer(a);(new Int8Array(b)).set(c)}}catch(p){return!1}return nb(b)?b:!1});try{var Ta=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);Ta(new ArrayBuffer(4))}catch(e){Ta=function(a){return a.byteLength}}var Fa=a.TOTAL_STACK||
|
||||||
5242880,A=a.TOTAL_MEMORY||16777216;A<Fa&&a.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+A+"! (TOTAL_STACK="+Fa+")");if(a.buffer)var D=a.buffer;else"object"===typeof WebAssembly&&"function"===typeof WebAssembly.Memory?(a.wasmMemory=new WebAssembly.Memory({initial:A/65536}),D=a.wasmMemory.buffer):D=new ArrayBuffer(A),a.buffer=D;r();E[0]=1668509029;Ja[1]=25459;if(115!==W[2]||99!==W[3])throw"Runtime error: expected the system to be little-endian!";var Pa=[],Ma=[],Na=[],ob=[],Oa=[],
|
5242880,A=a.TOTAL_MEMORY||16777216;A<Fa&&a.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+A+"! (TOTAL_STACK="+Fa+")");if(a.buffer)var D=a.buffer;else"object"===typeof WebAssembly&&"function"===typeof WebAssembly.Memory?(a.wasmMemory=new WebAssembly.Memory({initial:A/65536}),D=a.wasmMemory.buffer):D=new ArrayBuffer(A),a.buffer=D;q();E[0]=1668509029;Ja[1]=25459;if(115!==V[2]||99!==V[3])throw"Runtime error: expected the system to be little-endian!";var Pa=[],Ma=[],Na=[],ob=[],Oa=[],
|
||||||
La=!1,ea=0,Ga=null,ra=null;a.preloadedImages={};a.preloadedAudios={};(function(){function e(){try{if(a.wasmBinary)return new Uint8Array(a.wasmBinary);if(a.readBinary)return a.readBinary(f);throw"on the web, we need the wasm binary to be preloaded and set on Module['wasmBinary']. emcc.py will do that for you when generating HTML (but not JS)";}catch(Va){O(Va)}}function c(){return a.wasmBinary||!ja&&!fa||"function"!==typeof fetch?new Promise(function(a,c){a(e())}):fetch(f,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+
|
La=!1,da=0,Ga=null,ra=null;a.preloadedImages={};a.preloadedAudios={};(function(){function e(){try{if(a.wasmBinary)return new Uint8Array(a.wasmBinary);if(a.readBinary)return a.readBinary(f);throw"on the web, we need the wasm binary to be preloaded and set on Module['wasmBinary']. emcc.py will do that for you when generating HTML (but not JS)";}catch(Va){O(Va)}}function b(){return a.wasmBinary||!ja&&!fa||"function"!==typeof fetch?new Promise(function(a,b){a(e())}):fetch(f,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+
|
||||||
f+"'";return a.arrayBuffer()}).catch(function(){return e()})}function b(b,e,d){function p(c,b){k=c.exports;k.memory&&(c=k.memory,b=a.buffer,c.byteLength<b.byteLength&&a.printErr("the new buffer in mergeMemory is smaller than the previous one. in native wasm, we should grow memory here"),b=new Int8Array(b),(new Int8Array(c)).set(b),a.buffer=D=c,r());a.asm=k;a.usingWasm=!0;ea--;a.monitorRunDependencies&&a.monitorRunDependencies(ea);0==ea&&(null!==Ga&&(clearInterval(Ga),Ga=null),ra&&(c=ra,ra=null,c()))}
|
f+"'";return a.arrayBuffer()}).catch(function(){return e()})}function c(c,e,d){function p(b,c){k=b.exports;k.memory&&(b=k.memory,c=a.buffer,b.byteLength<c.byteLength&&a.printErr("the new buffer in mergeMemory is smaller than the previous one. in native wasm, we should grow memory here"),c=new Int8Array(c),(new Int8Array(b)).set(c),a.buffer=D=b,q());a.asm=k;a.usingWasm=!0;da--;a.monitorRunDependencies&&a.monitorRunDependencies(da);0==da&&(null!==Ga&&(clearInterval(Ga),Ga=null),ra&&(b=ra,ra=null,b()))}
|
||||||
function g(a){p(a.instance,a.module)}function S(b){c().then(function(a){return WebAssembly.instantiate(a,h)}).then(b).catch(function(c){a.printErr("failed to asynchronously prepare wasm: "+c);O(c)})}if("object"!==typeof WebAssembly)return a.printErr("no native wasm support detected"),!1;if(!(a.wasmMemory instanceof WebAssembly.Memory))return a.printErr("no native wasm Memory in use"),!1;e.memory=a.wasmMemory;h.global={NaN:NaN,Infinity:Infinity};h["global.Math"]=Math;h.env=e;ea++;a.monitorRunDependencies&&
|
function g(a){p(a.instance,a.module)}function S(c){b().then(function(a){return WebAssembly.instantiate(a,h)}).then(c).catch(function(b){a.printErr("failed to asynchronously prepare wasm: "+b);O(b)})}if("object"!==typeof WebAssembly)return a.printErr("no native wasm support detected"),!1;if(!(a.wasmMemory instanceof WebAssembly.Memory))return a.printErr("no native wasm Memory in use"),!1;e.memory=a.wasmMemory;h.global={NaN:NaN,Infinity:Infinity};h["global.Math"]=Math;h.env=e;da++;a.monitorRunDependencies&&
|
||||||
a.monitorRunDependencies(ea);if(a.instantiateWasm)try{return a.instantiateWasm(h,p)}catch(pb){return a.printErr("Module.instantiateWasm callback failed with error: "+pb),!1}a.wasmBinary||"function"!==typeof WebAssembly.instantiateStreaming||Y(f)||"function"!==typeof fetch?S(g):WebAssembly.instantiateStreaming(fetch(f,{credentials:"same-origin"}),h).then(g).catch(function(c){a.printErr("wasm streaming compile failed: "+c);a.printErr("falling back to ArrayBuffer instantiation");S(g)});return{}}var d=
|
a.monitorRunDependencies(da);if(a.instantiateWasm)try{return a.instantiateWasm(h,p)}catch(pb){return a.printErr("Module.instantiateWasm callback failed with error: "+pb),!1}a.wasmBinary||"function"!==typeof WebAssembly.instantiateStreaming||X(f)||"function"!==typeof fetch?S(g):WebAssembly.instantiateStreaming(fetch(f,{credentials:"same-origin"}),h).then(g).catch(function(b){a.printErr("wasm streaming compile failed: "+b);a.printErr("falling back to ArrayBuffer instantiation");S(g)});return{}}var d=
|
||||||
"draco_decoder.wast",f="draco_decoder.wasm",g="draco_decoder.temp.asm.js";"function"===typeof a.locateFile&&(Y(d)||(d=a.locateFile(d)),Y(f)||(f=a.locateFile(f)),Y(g)||(g=a.locateFile(g)));var h={global:null,env:null,asm2wasm:{"f64-rem":function(a,c){return a%c},"debugger":function(){debugger}},parent:a},k=null;a.asmPreload=a.asm;var l=a.reallocBuffer;a.reallocBuffer=function(c){if("asmjs"===m)var b=l(c);else a:{c=ha(c,a.usingWasm?65536:16777216);var e=a.buffer.byteLength;if(a.usingWasm)try{b=-1!==
|
"draco_decoder.wast",f="draco_decoder.wasm",g="draco_decoder.temp.asm.js";"function"===typeof a.locateFile&&(X(d)||(d=a.locateFile(d)),X(f)||(f=a.locateFile(f)),X(g)||(g=a.locateFile(g)));var h={global:null,env:null,asm2wasm:{"f64-rem":function(a,b){return a%b},"debugger":function(){debugger}},parent:a},k=null;a.asmPreload=a.asm;var l=a.reallocBuffer;a.reallocBuffer=function(b){if("asmjs"===m)var c=l(b);else a:{b=ha(b,a.usingWasm?65536:16777216);var e=a.buffer.byteLength;if(a.usingWasm)try{c=-1!==
|
||||||
a.wasmMemory.grow((c-e)/65536)?a.buffer=a.wasmMemory.buffer:null;break a}catch(ud){b=null;break a}b=void 0}return b};var m="";a.asm=function(c,e,d){if(!e.table){var p=a.wasmTableSize;void 0===p&&(p=1024);var f=a.wasmMaxTableSize;e.table="object"===typeof WebAssembly&&"function"===typeof WebAssembly.Table?void 0!==f?new WebAssembly.Table({initial:p,maximum:f,element:"anyfunc"}):new WebAssembly.Table({initial:p,element:"anyfunc"}):Array(p);a.wasmTable=e.table}e.memoryBase||(e.memoryBase=a.STATIC_BASE);
|
a.wasmMemory.grow((b-e)/65536)?a.buffer=a.wasmMemory.buffer:null;break a}catch(rd){c=null;break a}c=void 0}return c};var m="";a.asm=function(b,e,d){if(!e.table){var p=a.wasmTableSize;void 0===p&&(p=1024);var f=a.wasmMaxTableSize;e.table="object"===typeof WebAssembly&&"function"===typeof WebAssembly.Table?void 0!==f?new WebAssembly.Table({initial:p,maximum:f,element:"anyfunc"}):new WebAssembly.Table({initial:p,element:"anyfunc"}):Array(p);a.wasmTable=e.table}e.memoryBase||(e.memoryBase=a.STATIC_BASE);
|
||||||
e.tableBase||(e.tableBase=0);(c=b(c,e,d))||O("no binaryen method succeeded. consider enabling more options, like interpreting, if you want that: https://github.com/kripken/emscripten/wiki/WebAssembly#binaryen-methods");return c}})();Ea=1024;ba=Ea+14800;Ma.push();a.STATIC_BASE=Ea;a.STATIC_BUMP=14800;var qb=ba;ba+=16;var y={last:0,caught:[],infos:{},deAdjust:function(a){if(!a||y.infos[a])return a;for(var c in y.infos)if(y.infos[c].adjusted===a)return c;return a},addRef:function(a){a&&y.infos[a].refcount++},
|
e.tableBase||(e.tableBase=0);(b=c(b,e,d))||O("no binaryen method succeeded. consider enabling more options, like interpreting, if you want that: https://github.com/kripken/emscripten/wiki/WebAssembly#binaryen-methods");return b}})();Ea=1024;aa=Ea+14800;Ma.push();a.STATIC_BASE=Ea;a.STATIC_BUMP=14800;var qb=aa;aa+=16;var y={last:0,caught:[],infos:{},deAdjust:function(a){if(!a||y.infos[a])return a;for(var b in y.infos)if(y.infos[b].adjusted===a)return b;return a},addRef:function(a){a&&y.infos[a].refcount++},
|
||||||
decRef:function(e){if(e){var c=y.infos[e];f(0<c.refcount);c.refcount--;0!==c.refcount||c.rethrown||(c.destructor&&a.dynCall_vi(c.destructor,e),delete y.infos[e],___cxa_free_exception(e))}},clearRef:function(a){a&&(y.infos[a].refcount=0)}},w={varargs:0,get:function(a){w.varargs+=4;return E[w.varargs-4>>2]},getStr:function(){return u(w.get())},get64:function(){var a=w.get(),c=w.get();0<=a?f(0===c):f(-1===c);return a},getZero:function(){f(0===w.get())}},va={},Ha=1;ka=function(a){f(!Sa);var c=ba;ba=ba+
|
decRef:function(e){if(e){var b=y.infos[e];f(0<b.refcount);b.refcount--;0!==b.refcount||b.rethrown||(b.destructor&&a.dynCall_vi(b.destructor,e),delete y.infos[e],___cxa_free_exception(e))}},clearRef:function(a){a&&(y.infos[a].refcount=0)}},w={varargs:0,get:function(a){w.varargs+=4;return E[w.varargs-4>>2]},getStr:function(){return u(w.get())},get64:function(){var a=w.get(),b=w.get();0<=a?f(0===b):f(-1===b);return a},getZero:function(){f(0===w.get())}},va={},Ha=1;ka=function(a){f(!Sa);var b=aa;aa=aa+
|
||||||
a+15&-16;return c}(4);Ca=ta=k(ba);ua=Ca+Fa;Da=k(ua);E[ka>>2]=Da;Sa=!0;a.wasmTableSize=476;a.wasmMaxTableSize=476;a.asmGlobalArg={};a.asmLibraryArg={abort:O,assert:f,enlargeMemory:function(){var e=a.usingWasm?65536:16777216,c=2147483648-e;if(E[ka>>2]>c)return!1;var b=A;for(A=Math.max(A,16777216);A<E[ka>>2];)A=536870912>=A?ha(2*A,e):Math.min(ha((3*A+2147483648)/4,e),c);e=a.reallocBuffer(A);if(!e||e.byteLength!=A)return A=b,!1;a.buffer=D=e;r();return!0},getTotalMemory:function(){return A},abortOnCannotGrowMemory:function(){O("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+
|
a+15&-16;return b}(4);Ca=ta=k(aa);ua=Ca+Fa;Da=k(ua);E[ka>>2]=Da;Sa=!0;a.wasmTableSize=476;a.wasmMaxTableSize=476;a.asmGlobalArg={};a.asmLibraryArg={abort:O,assert:f,enlargeMemory:function(){var e=a.usingWasm?65536:16777216,b=2147483648-e;if(E[ka>>2]>b)return!1;var c=A;for(A=Math.max(A,16777216);A<E[ka>>2];)A=536870912>=A?ha(2*A,e):Math.min(ha((3*A+2147483648)/4,e),b);e=a.reallocBuffer(A);if(!e||e.byteLength!=A)return A=c,!1;a.buffer=D=e;q();return!0},getTotalMemory:function(){return A},abortOnCannotGrowMemory:function(){O("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+
|
||||||
A+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},invoke_ii:function(e,c){try{return a.dynCall_ii(e,c)}catch(b){if("number"!==typeof b&&"longjmp"!==b)throw b;a.setThrew(1,0)}},invoke_iii:function(e,c,b){try{return a.dynCall_iii(e,c,b)}catch(p){if("number"!==typeof p&&"longjmp"!==p)throw p;a.setThrew(1,0)}},invoke_iiii:function(e,c,b,d){try{return a.dynCall_iiii(e,
|
A+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")},invoke_ii:function(e,b){try{return a.dynCall_ii(e,b)}catch(c){if("number"!==typeof c&&"longjmp"!==c)throw c;a.setThrew(1,0)}},invoke_iii:function(e,b,c){try{return a.dynCall_iii(e,b,c)}catch(p){if("number"!==typeof p&&"longjmp"!==p)throw p;a.setThrew(1,0)}},invoke_iiii:function(e,b,c,d){try{return a.dynCall_iiii(e,
|
||||||
c,b,d)}catch(S){if("number"!==typeof S&&"longjmp"!==S)throw S;a.setThrew(1,0)}},invoke_iiiiiii:function(e,c,b,d,f,g,h){try{return a.dynCall_iiiiiii(e,c,b,d,f,g,h)}catch(da){if("number"!==typeof da&&"longjmp"!==da)throw da;a.setThrew(1,0)}},invoke_v:function(e){try{a.dynCall_v(e)}catch(c){if("number"!==typeof c&&"longjmp"!==c)throw c;a.setThrew(1,0)}},invoke_vi:function(e,c){try{a.dynCall_vi(e,c)}catch(b){if("number"!==typeof b&&"longjmp"!==b)throw b;a.setThrew(1,0)}},invoke_vii:function(e,c,b){try{a.dynCall_vii(e,
|
b,c,d)}catch(S){if("number"!==typeof S&&"longjmp"!==S)throw S;a.setThrew(1,0)}},invoke_iiiiiii:function(e,b,c,d,f,g,h){try{return a.dynCall_iiiiiii(e,b,c,d,f,g,h)}catch(ca){if("number"!==typeof ca&&"longjmp"!==ca)throw ca;a.setThrew(1,0)}},invoke_v:function(e){try{a.dynCall_v(e)}catch(b){if("number"!==typeof b&&"longjmp"!==b)throw b;a.setThrew(1,0)}},invoke_vi:function(e,b){try{a.dynCall_vi(e,b)}catch(c){if("number"!==typeof c&&"longjmp"!==c)throw c;a.setThrew(1,0)}},invoke_vii:function(e,b,c){try{a.dynCall_vii(e,
|
||||||
c,b)}catch(p){if("number"!==typeof p&&"longjmp"!==p)throw p;a.setThrew(1,0)}},invoke_viii:function(e,c,b,d){try{a.dynCall_viii(e,c,b,d)}catch(S){if("number"!==typeof S&&"longjmp"!==S)throw S;a.setThrew(1,0)}},invoke_viiii:function(e,c,b,d,f){try{a.dynCall_viiii(e,c,b,d,f)}catch(xa){if("number"!==typeof xa&&"longjmp"!==xa)throw xa;a.setThrew(1,0)}},invoke_viiiii:function(e,c,b,d,f,g){try{a.dynCall_viiiii(e,c,b,d,f,g)}catch(ca){if("number"!==typeof ca&&"longjmp"!==ca)throw ca;a.setThrew(1,0)}},invoke_viiiiii:function(e,
|
b,c)}catch(p){if("number"!==typeof p&&"longjmp"!==p)throw p;a.setThrew(1,0)}},invoke_viii:function(e,b,c,d){try{a.dynCall_viii(e,b,c,d)}catch(S){if("number"!==typeof S&&"longjmp"!==S)throw S;a.setThrew(1,0)}},invoke_viiii:function(e,b,c,d,f){try{a.dynCall_viiii(e,b,c,d,f)}catch(xa){if("number"!==typeof xa&&"longjmp"!==xa)throw xa;a.setThrew(1,0)}},invoke_viiiii:function(e,b,c,d,f,g){try{a.dynCall_viiiii(e,b,c,d,f,g)}catch(ba){if("number"!==typeof ba&&"longjmp"!==ba)throw ba;a.setThrew(1,0)}},invoke_viiiiii:function(e,
|
||||||
c,b,d,f,g,h){try{a.dynCall_viiiiii(e,c,b,d,f,g,h)}catch(da){if("number"!==typeof da&&"longjmp"!==da)throw da;a.setThrew(1,0)}},__ZSt18uncaught_exceptionv:v,___cxa_allocate_exception:function(a){return Ka(a)},___cxa_begin_catch:function(a){var c=y.infos[a];c&&!c.caught&&(c.caught=!0,v.uncaught_exception--);c&&(c.rethrown=!1);y.caught.push(a);y.addRef(y.deAdjust(a));return a},___cxa_find_matching_catch:la,___cxa_pure_virtual:function(){oa=!0;throw"Pure virtual function called!";},___cxa_throw:function(a,
|
b,c,d,f,g,h){try{a.dynCall_viiiiii(e,b,c,d,f,g,h)}catch(ca){if("number"!==typeof ca&&"longjmp"!==ca)throw ca;a.setThrew(1,0)}},__ZSt18uncaught_exceptionv:v,___cxa_allocate_exception:function(a){return Ka(a)},___cxa_begin_catch:function(a){var b=y.infos[a];b&&!b.caught&&(b.caught=!0,v.uncaught_exception--);b&&(b.rethrown=!1);y.caught.push(a);y.addRef(y.deAdjust(a));return a},___cxa_find_matching_catch:la,___cxa_pure_virtual:function(){oa=!0;throw"Pure virtual function called!";},___cxa_throw:function(a,
|
||||||
c,b){y.infos[a]={ptr:a,adjusted:a,type:c,destructor:b,refcount:0,caught:!1,rethrown:!1};y.last=a;"uncaught_exception"in v?v.uncaught_exception++:v.uncaught_exception=1;throw a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";},___gxx_personality_v0:function(){},___resumeException:function(a){y.last||(y.last=a);throw a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";
|
b,c){y.infos[a]={ptr:a,adjusted:a,type:b,destructor:c,refcount:0,caught:!1,rethrown:!1};y.last=a;"uncaught_exception"in v?v.uncaught_exception++:v.uncaught_exception=1;throw a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";},___gxx_personality_v0:function(){},___resumeException:function(a){y.last||(y.last=a);throw a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";
|
||||||
},___setErrNo:function(d){a.___errno_location&&(E[a.___errno_location()>>2]=d);return d},___syscall140:function(a,c){w.varargs=c;try{var b=w.getStreamFromFD();w.get();var d=w.get(),e=w.get(),f=w.get();FS.llseek(b,d,f);E[e>>2]=b.position;b.getdents&&0===d&&0===f&&(b.getdents=null);return 0}catch(ca){return"undefined"!==typeof FS&&ca instanceof FS.ErrnoError||O(ca),-ca.errno}},___syscall146:Z,___syscall6:function(a,c){w.varargs=c;try{var b=w.getStreamFromFD();FS.close(b);return 0}catch(p){return"undefined"!==
|
},___setErrNo:function(d){a.___errno_location&&(E[a.___errno_location()>>2]=d);return d},___syscall140:function(a,b){w.varargs=b;try{var c=w.getStreamFromFD();w.get();var d=w.get(),e=w.get(),f=w.get();FS.llseek(c,d,f);E[e>>2]=c.position;c.getdents&&0===d&&0===f&&(c.getdents=null);return 0}catch(ba){return"undefined"!==typeof FS&&ba instanceof FS.ErrnoError||O(ba),-ba.errno}},___syscall146:Y,___syscall6:function(a,b){w.varargs=b;try{var c=w.getStreamFromFD();FS.close(c);return 0}catch(p){return"undefined"!==
|
||||||
typeof FS&&p instanceof FS.ErrnoError||O(p),-p.errno}},_abort:function(){a.abort()},_emscripten_memcpy_big:function(a,c,b){W.set(W.subarray(c,c+b),a);return a},_llvm_trap:function(){O("trap!")},_pthread_getspecific:function(a){return va[a]||0},_pthread_key_create:function(a,c){if(0==a)return 22;E[a>>2]=Ha;va[Ha]=0;Ha++;return 0},_pthread_once:ma,_pthread_setspecific:function(a,c){if(!(a in va))return 22;va[a]=c;return 0},flush_NO_FILESYSTEM:function(){var d=a._fflush;d&&d(0);if(d=Z.printChar){var c=
|
typeof FS&&p instanceof FS.ErrnoError||O(p),-p.errno}},_abort:function(){a.abort()},_emscripten_memcpy_big:function(a,b,c){V.set(V.subarray(b,b+c),a);return a},_llvm_trap:function(){O("trap!")},_pthread_getspecific:function(a){return va[a]||0},_pthread_key_create:function(a,b){if(0==a)return 22;E[a>>2]=Ha;va[Ha]=0;Ha++;return 0},_pthread_once:ma,_pthread_setspecific:function(a,b){if(!(a in va))return 22;va[a]=b;return 0},flush_NO_FILESYSTEM:function(){var d=a._fflush;d&&d(0);if(d=Y.printChar){var b=
|
||||||
Z.buffers;c[1].length&&d(1,10);c[2].length&&d(2,10)}},DYNAMICTOP_PTR:ka,tempDoublePtr:qb,ABORT:oa,STACKTOP:ta,STACK_MAX:ua};var Ua=a.asm(a.asmGlobalArg,a.asmLibraryArg,D);a.asm=Ua;a.___cxa_can_catch=function(){return a.asm.___cxa_can_catch.apply(null,arguments)};a.___cxa_is_pointer_type=function(){return a.asm.___cxa_is_pointer_type.apply(null,arguments)};var $a=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,
|
Y.buffers;b[1].length&&d(1,10);b[2].length&&d(2,10)}},DYNAMICTOP_PTR:ka,tempDoublePtr:qb,ABORT:oa,STACKTOP:ta,STACK_MAX:ua};var Ua=a.asm(a.asmGlobalArg,a.asmLibraryArg,D);a.asm=Ua;a.___cxa_can_catch=function(){return a.asm.___cxa_can_catch.apply(null,arguments)};a.___cxa_is_pointer_type=function(){return a.asm.___cxa_is_pointer_type.apply(null,arguments)};var $a=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,
|
||||||
arguments)},rb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,arguments)},sb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},tb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,
|
arguments)},rb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,arguments)},sb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},tb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,
|
||||||
arguments)},cb=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,arguments)},ub=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},vb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,
|
arguments)},cb=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,arguments)},ub=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},vb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,
|
||||||
arguments)},wb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,arguments)},xb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,arguments)},yb=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,
|
arguments)},wb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,arguments)},xb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,arguments)},yb=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return a.asm._emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,
|
||||||
@ -67,53 +67,51 @@ arguments)},oc=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return
|
|||||||
arguments)},rc=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoUInt8Array_GetValue_1.apply(null,arguments)},sc=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return a.asm._emscripten_bind_DracoUInt8Array___destroy___0.apply(null,arguments)},tc=a._emscripten_bind_DracoUInt8Array_size_0=function(){return a.asm._emscripten_bind_DracoUInt8Array_size_0.apply(null,arguments)},hb=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return a.asm._emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null,
|
arguments)},rc=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return a.asm._emscripten_bind_DracoUInt8Array_GetValue_1.apply(null,arguments)},sc=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return a.asm._emscripten_bind_DracoUInt8Array___destroy___0.apply(null,arguments)},tc=a._emscripten_bind_DracoUInt8Array_size_0=function(){return a.asm._emscripten_bind_DracoUInt8Array_size_0.apply(null,arguments)},hb=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return a.asm._emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null,
|
||||||
arguments)},uc=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return a.asm._emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},kb=a._emscripten_bind_Mesh_Mesh_0=function(){return a.asm._emscripten_bind_Mesh_Mesh_0.apply(null,arguments)},vc=a._emscripten_bind_Mesh___destroy___0=function(){return a.asm._emscripten_bind_Mesh___destroy___0.apply(null,arguments)},wc=a._emscripten_bind_Mesh_num_attributes_0=function(){return a.asm._emscripten_bind_Mesh_num_attributes_0.apply(null,
|
arguments)},uc=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return a.asm._emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},kb=a._emscripten_bind_Mesh_Mesh_0=function(){return a.asm._emscripten_bind_Mesh_Mesh_0.apply(null,arguments)},vc=a._emscripten_bind_Mesh___destroy___0=function(){return a.asm._emscripten_bind_Mesh___destroy___0.apply(null,arguments)},wc=a._emscripten_bind_Mesh_num_attributes_0=function(){return a.asm._emscripten_bind_Mesh_num_attributes_0.apply(null,
|
||||||
arguments)},xc=a._emscripten_bind_Mesh_num_faces_0=function(){return a.asm._emscripten_bind_Mesh_num_faces_0.apply(null,arguments)},yc=a._emscripten_bind_Mesh_num_points_0=function(){return a.asm._emscripten_bind_Mesh_num_points_0.apply(null,arguments)},zc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},Ac=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetEntryName_2.apply(null,
|
arguments)},xc=a._emscripten_bind_Mesh_num_faces_0=function(){return a.asm._emscripten_bind_Mesh_num_faces_0.apply(null,arguments)},yc=a._emscripten_bind_Mesh_num_points_0=function(){return a.asm._emscripten_bind_Mesh_num_points_0.apply(null,arguments)},zc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},Ac=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetEntryName_2.apply(null,
|
||||||
arguments)},Bc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,arguments)},Cc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},Dc=a._emscripten_bind_MetadataQuerier_HasDoubleEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasDoubleEntry_2.apply(null,arguments)},Ec=a._emscripten_bind_MetadataQuerier_HasEntry_2=
|
arguments)},Bc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,arguments)},Cc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},Dc=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasEntry_2.apply(null,arguments)},eb=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=
|
||||||
function(){return a.asm._emscripten_bind_MetadataQuerier_HasEntry_2.apply(null,arguments)},Fc=a._emscripten_bind_MetadataQuerier_HasIntEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasIntEntry_2.apply(null,arguments)},Gc=a._emscripten_bind_MetadataQuerier_HasStringEntry_2=function(){return a.asm._emscripten_bind_MetadataQuerier_HasStringEntry_2.apply(null,arguments)},eb=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return a.asm._emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,
|
function(){return a.asm._emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,arguments)},Ec=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return a.asm._emscripten_bind_MetadataQuerier_NumEntries_1.apply(null,arguments)},Fc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return a.asm._emscripten_bind_MetadataQuerier___destroy___0.apply(null,arguments)},mb=a._emscripten_bind_Metadata_Metadata_0=function(){return a.asm._emscripten_bind_Metadata_Metadata_0.apply(null,
|
||||||
arguments)},Hc=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return a.asm._emscripten_bind_MetadataQuerier_NumEntries_1.apply(null,arguments)},Ic=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return a.asm._emscripten_bind_MetadataQuerier___destroy___0.apply(null,arguments)},mb=a._emscripten_bind_Metadata_Metadata_0=function(){return a.asm._emscripten_bind_Metadata_Metadata_0.apply(null,arguments)},Jc=a._emscripten_bind_Metadata___destroy___0=function(){return a.asm._emscripten_bind_Metadata___destroy___0.apply(null,
|
arguments)},Gc=a._emscripten_bind_Metadata___destroy___0=function(){return a.asm._emscripten_bind_Metadata___destroy___0.apply(null,arguments)},Hc=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return a.asm._emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},ab=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return a.asm._emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},Ic=a._emscripten_bind_PointAttribute___destroy___0=
|
||||||
arguments)},Kc=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return a.asm._emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},ab=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return a.asm._emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},Lc=a._emscripten_bind_PointAttribute___destroy___0=function(){return a.asm._emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},Mc=a._emscripten_bind_PointAttribute_attribute_type_0=
|
function(){return a.asm._emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},Jc=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return a.asm._emscripten_bind_PointAttribute_attribute_type_0.apply(null,arguments)},Kc=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_offset_0.apply(null,arguments)},Lc=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_stride_0.apply(null,
|
||||||
function(){return a.asm._emscripten_bind_PointAttribute_attribute_type_0.apply(null,arguments)},Nc=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_offset_0.apply(null,arguments)},Oc=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return a.asm._emscripten_bind_PointAttribute_byte_stride_0.apply(null,arguments)},Pc=a._emscripten_bind_PointAttribute_data_type_0=function(){return a.asm._emscripten_bind_PointAttribute_data_type_0.apply(null,
|
arguments)},Mc=a._emscripten_bind_PointAttribute_data_type_0=function(){return a.asm._emscripten_bind_PointAttribute_data_type_0.apply(null,arguments)},Nc=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm._emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},Oc=a._emscripten_bind_PointAttribute_num_components_0=function(){return a.asm._emscripten_bind_PointAttribute_num_components_0.apply(null,arguments)},Pc=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm._emscripten_bind_PointAttribute_size_0.apply(null,
|
||||||
arguments)},Qc=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm._emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},Rc=a._emscripten_bind_PointAttribute_num_components_0=function(){return a.asm._emscripten_bind_PointAttribute_num_components_0.apply(null,arguments)},Sc=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm._emscripten_bind_PointAttribute_size_0.apply(null,arguments)},Tc=a._emscripten_bind_PointAttribute_unique_id_0=function(){return a.asm._emscripten_bind_PointAttribute_unique_id_0.apply(null,
|
arguments)},Qc=a._emscripten_bind_PointAttribute_unique_id_0=function(){return a.asm._emscripten_bind_PointAttribute_unique_id_0.apply(null,arguments)},Xa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return a.asm._emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},Rc=a._emscripten_bind_PointCloud___destroy___0=function(){return a.asm._emscripten_bind_PointCloud___destroy___0.apply(null,arguments)},Sc=a._emscripten_bind_PointCloud_num_attributes_0=function(){return a.asm._emscripten_bind_PointCloud_num_attributes_0.apply(null,
|
||||||
arguments)},Xa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return a.asm._emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},Uc=a._emscripten_bind_PointCloud___destroy___0=function(){return a.asm._emscripten_bind_PointCloud___destroy___0.apply(null,arguments)},Vc=a._emscripten_bind_PointCloud_num_attributes_0=function(){return a.asm._emscripten_bind_PointCloud_num_attributes_0.apply(null,arguments)},Wc=a._emscripten_bind_PointCloud_num_points_0=function(){return a.asm._emscripten_bind_PointCloud_num_points_0.apply(null,
|
arguments)},Tc=a._emscripten_bind_PointCloud_num_points_0=function(){return a.asm._emscripten_bind_PointCloud_num_points_0.apply(null,arguments)},Uc=a._emscripten_bind_Status___destroy___0=function(){return a.asm._emscripten_bind_Status___destroy___0.apply(null,arguments)},Vc=a._emscripten_bind_Status_code_0=function(){return a.asm._emscripten_bind_Status_code_0.apply(null,arguments)},Wc=a._emscripten_bind_Status_error_msg_0=function(){return a.asm._emscripten_bind_Status_error_msg_0.apply(null,arguments)},
|
||||||
arguments)},Xc=a._emscripten_bind_Status___destroy___0=function(){return a.asm._emscripten_bind_Status___destroy___0.apply(null,arguments)},Yc=a._emscripten_bind_Status_code_0=function(){return a.asm._emscripten_bind_Status_code_0.apply(null,arguments)},Zc=a._emscripten_bind_Status_error_msg_0=function(){return a.asm._emscripten_bind_Status_error_msg_0.apply(null,arguments)},$c=a._emscripten_bind_Status_ok_0=function(){return a.asm._emscripten_bind_Status_ok_0.apply(null,arguments)},ad=a._emscripten_bind_VoidPtr___destroy___0=
|
Xc=a._emscripten_bind_Status_ok_0=function(){return a.asm._emscripten_bind_Status_ok_0.apply(null,arguments)},Yc=a._emscripten_bind_VoidPtr___destroy___0=function(){return a.asm._emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},Zc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null,arguments)},$c=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=
|
||||||
function(){return a.asm._emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},bd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null,arguments)},cd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)},dd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=
|
function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)},ad=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null,arguments)},bd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,
|
||||||
function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null,arguments)},ed=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return a.asm._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,arguments)},fd=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null,
|
arguments)},cd=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null,arguments)},dd=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},ed=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,
|
||||||
arguments)},gd=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},hd=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,arguments)},id=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},jd=
|
arguments)},fd=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},gd=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)},hd=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},id=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=
|
||||||
a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)},kd=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},ld=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,arguments)},md=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=
|
function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,arguments)},jd=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},kd=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD.apply(null,arguments)},ld=a._emscripten_enum_draco_StatusCode_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_ERROR.apply(null,
|
||||||
function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},nd=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return a.asm._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD.apply(null,arguments)},od=a._emscripten_enum_draco_StatusCode_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_ERROR.apply(null,arguments)},pd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return a.asm._emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,
|
arguments)},md=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return a.asm._emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,arguments)},nd=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_IO_ERROR.apply(null,arguments)},od=a._emscripten_enum_draco_StatusCode_OK=function(){return a.asm._emscripten_enum_draco_StatusCode_OK.apply(null,arguments)},pd=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,
|
||||||
arguments)},qd=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return a.asm._emscripten_enum_draco_StatusCode_IO_ERROR.apply(null,arguments)},rd=a._emscripten_enum_draco_StatusCode_OK=function(){return a.asm._emscripten_enum_draco_StatusCode_OK.apply(null,arguments)},sd=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,arguments)},td=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,
|
arguments)},qd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return a.asm._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,arguments)},nb=a._emscripten_replace_memory=function(){return a.asm._emscripten_replace_memory.apply(null,arguments)};a._free=function(){return a.asm._free.apply(null,arguments)};a._llvm_bswap_i32=function(){return a.asm._llvm_bswap_i32.apply(null,arguments)};var Ka=a._malloc=function(){return a.asm._malloc.apply(null,arguments)};a._memcpy=
|
||||||
arguments)},nb=a._emscripten_replace_memory=function(){return a.asm._emscripten_replace_memory.apply(null,arguments)};a._free=function(){return a.asm._free.apply(null,arguments)};a._llvm_bswap_i32=function(){return a.asm._llvm_bswap_i32.apply(null,arguments)};var Ka=a._malloc=function(){return a.asm._malloc.apply(null,arguments)};a._memcpy=function(){return a.asm._memcpy.apply(null,arguments)};a._memmove=function(){return a.asm._memmove.apply(null,arguments)};a._memset=function(){return a.asm._memset.apply(null,
|
function(){return a.asm._memcpy.apply(null,arguments)};a._memmove=function(){return a.asm._memmove.apply(null,arguments)};a._memset=function(){return a.asm._memset.apply(null,arguments)};a._sbrk=function(){return a.asm._sbrk.apply(null,arguments)};a.establishStackSpace=function(){return a.asm.establishStackSpace.apply(null,arguments)};a.getTempRet0=function(){return a.asm.getTempRet0.apply(null,arguments)};a.runPostSets=function(){return a.asm.runPostSets.apply(null,arguments)};var sa=a.setTempRet0=
|
||||||
arguments)};a._sbrk=function(){return a.asm._sbrk.apply(null,arguments)};a.establishStackSpace=function(){return a.asm.establishStackSpace.apply(null,arguments)};a.getTempRet0=function(){return a.asm.getTempRet0.apply(null,arguments)};a.runPostSets=function(){return a.asm.runPostSets.apply(null,arguments)};var sa=a.setTempRet0=function(){return a.asm.setTempRet0.apply(null,arguments)};a.setThrew=function(){return a.asm.setThrew.apply(null,arguments)};a.stackAlloc=function(){return a.asm.stackAlloc.apply(null,
|
function(){return a.asm.setTempRet0.apply(null,arguments)};a.setThrew=function(){return a.asm.setThrew.apply(null,arguments)};a.stackAlloc=function(){return a.asm.stackAlloc.apply(null,arguments)};a.stackRestore=function(){return a.asm.stackRestore.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};a.dynCall_ii=function(){return a.asm.dynCall_ii.apply(null,arguments)};a.dynCall_iii=function(){return a.asm.dynCall_iii.apply(null,arguments)};a.dynCall_iiii=function(){return a.asm.dynCall_iiii.apply(null,
|
||||||
arguments)};a.stackRestore=function(){return a.asm.stackRestore.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};a.dynCall_ii=function(){return a.asm.dynCall_ii.apply(null,arguments)};a.dynCall_iii=function(){return a.asm.dynCall_iii.apply(null,arguments)};a.dynCall_iiii=function(){return a.asm.dynCall_iiii.apply(null,arguments)};a.dynCall_iiiiiii=function(){return a.asm.dynCall_iiiiiii.apply(null,arguments)};a.dynCall_v=function(){return a.asm.dynCall_v.apply(null,
|
arguments)};a.dynCall_iiiiiii=function(){return a.asm.dynCall_iiiiiii.apply(null,arguments)};a.dynCall_v=function(){return a.asm.dynCall_v.apply(null,arguments)};a.dynCall_vi=function(){return a.asm.dynCall_vi.apply(null,arguments)};a.dynCall_vii=function(){return a.asm.dynCall_vii.apply(null,arguments)};a.dynCall_viii=function(){return a.asm.dynCall_viii.apply(null,arguments)};a.dynCall_viiii=function(){return a.asm.dynCall_viiii.apply(null,arguments)};a.dynCall_viiiii=function(){return a.asm.dynCall_viiiii.apply(null,
|
||||||
arguments)};a.dynCall_vi=function(){return a.asm.dynCall_vi.apply(null,arguments)};a.dynCall_vii=function(){return a.asm.dynCall_vii.apply(null,arguments)};a.dynCall_viii=function(){return a.asm.dynCall_viii.apply(null,arguments)};a.dynCall_viiii=function(){return a.asm.dynCall_viiii.apply(null,arguments)};a.dynCall_viiiii=function(){return a.asm.dynCall_viiiii.apply(null,arguments)};a.dynCall_viiiiii=function(){return a.asm.dynCall_viiiiii.apply(null,arguments)};a.asm=Ua;a.then=function(d){if(a.calledRun)d(a);
|
arguments)};a.dynCall_viiiiii=function(){return a.asm.dynCall_viiiiii.apply(null,arguments)};a.asm=Ua;a.then=function(d){if(a.calledRun)d(a);else{var b=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){b&&b();d(a)}}return a};na.prototype=Error();na.prototype.constructor=na;ra=function b(){a.calledRun||wa();a.calledRun||(ra=b)};a.run=wa;a.exit=function(b,c){if(!c||!a.noExitRuntime||0!==b){if(!a.noExitRuntime&&(oa=!0,ta=void 0,B(ob),a.onExit))a.onExit(b);qa&&process.exit(b);a.quit(b,new na(b))}};
|
||||||
else{var c=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){c&&c();d(a)}}return a};na.prototype=Error();na.prototype.constructor=na;ra=function c(){a.calledRun||wa();a.calledRun||(ra=c)};a.run=wa;a.exit=function(c,b){if(!b||!a.noExitRuntime||0!==c){if(!a.noExitRuntime&&(oa=!0,ta=void 0,B(ob),a.onExit))a.onExit(c);qa&&process.exit(c);a.quit(c,new na(c))}};a.abort=O;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();a.noExitRuntime=!0;
|
a.abort=O;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();a.noExitRuntime=!0;wa();m.prototype=Object.create(m.prototype);m.prototype.constructor=m;m.prototype.__class__=m;m.__cache__={};a.WrapperObject=m;a.getCache=t;a.wrapPointer=T;a.castObject=function(a,c){return T(a.ptr,c)};a.NULL=T(0);a.destroy=function(a){if(!a.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";a.__destroy__();delete t(a.__class__)[a.ptr]};
|
||||||
wa();m.prototype=Object.create(m.prototype);m.prototype.constructor=m;m.prototype.__class__=m;m.__cache__={};a.WrapperObject=m;a.getCache=t;a.wrapPointer=T;a.castObject=function(a,b){return T(a.ptr,b)};a.NULL=T(0);a.destroy=function(a){if(!a.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";a.__destroy__();delete t(a.__class__)[a.ptr]};a.compare=function(a,b){return a.ptr===b.ptr};a.getPointer=function(a){return a.ptr};a.getClass=function(a){return a.__class__};var l=
|
a.compare=function(a,c){return a.ptr===c.ptr};a.getPointer=function(a){return a.ptr};a.getClass=function(a){return a.__class__};var l={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(l.needed){for(var b=0;b<l.temps.length;b++)a._free(l.temps[b]);l.temps.length=0;a._free(l.buffer);l.buffer=0;l.size+=l.needed;l.needed=0}l.buffer||(l.size+=128,l.buffer=a._malloc(l.size),f(l.buffer));l.pos=0},alloc:function(b,c){f(l.buffer);b=b.length*c.BYTES_PER_ELEMENT;b=b+7&-8;l.pos+b>=l.size?(f(0<b),
|
||||||
{buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(l.needed){for(var c=0;c<l.temps.length;c++)a._free(l.temps[c]);l.temps.length=0;a._free(l.buffer);l.buffer=0;l.size+=l.needed;l.needed=0}l.buffer||(l.size+=128,l.buffer=a._malloc(l.size),f(l.buffer));l.pos=0},alloc:function(c,b){f(l.buffer);c=c.length*b.BYTES_PER_ELEMENT;c=c+7&-8;l.pos+c>=l.size?(f(0<c),l.needed+=c,b=a._malloc(c),l.temps.push(b)):(b=l.buffer+l.pos,l.pos+=c);return b},copy:function(a,b,d){switch(b.BYTES_PER_ELEMENT){case 2:d>>=
|
l.needed+=b,c=a._malloc(b),l.temps.push(c)):(c=l.buffer+l.pos,l.pos+=b);return c},copy:function(a,c,d){switch(c.BYTES_PER_ELEMENT){case 2:d>>=1;break;case 4:d>>=2;break;case 8:d>>=3}for(var b=0;b<a.length;b++)c[d+b]=a[b]}};z.prototype=Object.create(m.prototype);z.prototype.constructor=z;z.prototype.__class__=z;z.__cache__={};a.Status=z;z.prototype.code=z.prototype.code=function(){return Vc(this.ptr)};z.prototype.ok=z.prototype.ok=function(){return!!Xc(this.ptr)};z.prototype.error_msg=z.prototype.error_msg=
|
||||||
1;break;case 4:d>>=2;break;case 8:d>>=3}for(var c=0;c<a.length;c++)b[d+c]=a[c]}};z.prototype=Object.create(m.prototype);z.prototype.constructor=z;z.prototype.__class__=z;z.__cache__={};a.Status=z;z.prototype.code=z.prototype.code=function(){return Yc(this.ptr)};z.prototype.ok=z.prototype.ok=function(){return!!$c(this.ptr)};z.prototype.error_msg=z.prototype.error_msg=function(){return u(Zc(this.ptr))};z.prototype.__destroy__=z.prototype.__destroy__=function(){Xc(this.ptr)};F.prototype=Object.create(m.prototype);
|
function(){return u(Wc(this.ptr))};z.prototype.__destroy__=z.prototype.__destroy__=function(){Uc(this.ptr)};F.prototype=Object.create(m.prototype);F.prototype.constructor=F;F.prototype.__class__=F;F.__cache__={};a.DracoUInt16Array=F;F.prototype.GetValue=F.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return lc(b,a)};F.prototype.size=F.prototype.size=function(){return nc(this.ptr)};F.prototype.__destroy__=F.prototype.__destroy__=function(){mc(this.ptr)};G.prototype=
|
||||||
F.prototype.constructor=F;F.prototype.__class__=F;F.__cache__={};a.DracoUInt16Array=F;F.prototype.GetValue=F.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return lc(c,a)};F.prototype.size=F.prototype.size=function(){return nc(this.ptr)};F.prototype.__destroy__=F.prototype.__destroy__=function(){mc(this.ptr)};G.prototype=Object.create(m.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.PointCloud=G;G.prototype.num_attributes=G.prototype.num_attributes=
|
Object.create(m.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.PointCloud=G;G.prototype.num_attributes=G.prototype.num_attributes=function(){return Sc(this.ptr)};G.prototype.num_points=G.prototype.num_points=function(){return Tc(this.ptr)};G.prototype.__destroy__=G.prototype.__destroy__=function(){Rc(this.ptr)};H.prototype=Object.create(m.prototype);H.prototype.constructor=H;H.prototype.__class__=H;H.__cache__={};a.DracoUInt8Array=H;H.prototype.GetValue=H.prototype.GetValue=
|
||||||
function(){return Vc(this.ptr)};G.prototype.num_points=G.prototype.num_points=function(){return Wc(this.ptr)};G.prototype.__destroy__=G.prototype.__destroy__=function(){Uc(this.ptr)};H.prototype=Object.create(m.prototype);H.prototype.constructor=H;H.prototype.__class__=H;H.__cache__={};a.DracoUInt8Array=H;H.prototype.GetValue=H.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return rc(c,a)};H.prototype.size=H.prototype.size=function(){return tc(this.ptr)};H.prototype.__destroy__=
|
function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return rc(b,a)};H.prototype.size=H.prototype.size=function(){return tc(this.ptr)};H.prototype.__destroy__=H.prototype.__destroy__=function(){sc(this.ptr)};I.prototype=Object.create(m.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.DracoUInt32Array=I;I.prototype.GetValue=I.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return oc(b,a)};I.prototype.size=I.prototype.size=function(){return qc(this.ptr)};
|
||||||
H.prototype.__destroy__=function(){sc(this.ptr)};I.prototype=Object.create(m.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.DracoUInt32Array=I;I.prototype.GetValue=I.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return oc(c,a)};I.prototype.size=I.prototype.size=function(){return qc(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){pc(this.ptr)};J.prototype=Object.create(m.prototype);J.prototype.constructor=J;J.prototype.__class__=
|
I.prototype.__destroy__=I.prototype.__destroy__=function(){pc(this.ptr)};J.prototype=Object.create(m.prototype);J.prototype.constructor=J;J.prototype.__class__=J;J.__cache__={};a.AttributeOctahedronTransform=J;J.prototype.InitFromAttribute=J.prototype.InitFromAttribute=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!rb(b,a)};J.prototype.quantization_bits=J.prototype.quantization_bits=function(){return tb(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){sb(this.ptr)};
|
||||||
J;J.__cache__={};a.AttributeOctahedronTransform=J;J.prototype.InitFromAttribute=J.prototype.InitFromAttribute=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!rb(c,a)};J.prototype.quantization_bits=J.prototype.quantization_bits=function(){return tb(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){sb(this.ptr)};n.prototype=Object.create(m.prototype);n.prototype.constructor=n;n.prototype.__class__=n;n.__cache__={};a.PointAttribute=n;n.prototype.size=n.prototype.size=
|
n.prototype=Object.create(m.prototype);n.prototype.constructor=n;n.prototype.__class__=n;n.__cache__={};a.PointAttribute=n;n.prototype.size=n.prototype.size=function(){return Pc(this.ptr)};n.prototype.GetAttributeTransformData=n.prototype.GetAttributeTransformData=function(){return T(Hc(this.ptr),P)};n.prototype.attribute_type=n.prototype.attribute_type=function(){return Jc(this.ptr)};n.prototype.data_type=n.prototype.data_type=function(){return Mc(this.ptr)};n.prototype.num_components=n.prototype.num_components=
|
||||||
function(){return Sc(this.ptr)};n.prototype.GetAttributeTransformData=n.prototype.GetAttributeTransformData=function(){return T(Kc(this.ptr),P)};n.prototype.attribute_type=n.prototype.attribute_type=function(){return Mc(this.ptr)};n.prototype.data_type=n.prototype.data_type=function(){return Pc(this.ptr)};n.prototype.num_components=n.prototype.num_components=function(){return Rc(this.ptr)};n.prototype.normalized=n.prototype.normalized=function(){return!!Qc(this.ptr)};n.prototype.byte_stride=n.prototype.byte_stride=
|
function(){return Oc(this.ptr)};n.prototype.normalized=n.prototype.normalized=function(){return!!Nc(this.ptr)};n.prototype.byte_stride=n.prototype.byte_stride=function(){return Lc(this.ptr)};n.prototype.byte_offset=n.prototype.byte_offset=function(){return Kc(this.ptr)};n.prototype.unique_id=n.prototype.unique_id=function(){return Qc(this.ptr)};n.prototype.__destroy__=n.prototype.__destroy__=function(){Ic(this.ptr)};P.prototype=Object.create(m.prototype);P.prototype.constructor=P;P.prototype.__class__=
|
||||||
function(){return Oc(this.ptr)};n.prototype.byte_offset=n.prototype.byte_offset=function(){return Nc(this.ptr)};n.prototype.unique_id=n.prototype.unique_id=function(){return Tc(this.ptr)};n.prototype.__destroy__=n.prototype.__destroy__=function(){Lc(this.ptr)};P.prototype=Object.create(m.prototype);P.prototype.constructor=P;P.prototype.__class__=P;P.__cache__={};a.AttributeTransformData=P;P.prototype.transform_type=P.prototype.transform_type=function(){return Ab(this.ptr)};P.prototype.__destroy__=
|
P;P.__cache__={};a.AttributeTransformData=P;P.prototype.transform_type=P.prototype.transform_type=function(){return Ab(this.ptr)};P.prototype.__destroy__=P.prototype.__destroy__=function(){zb(this.ptr)};x.prototype=Object.create(m.prototype);x.prototype.constructor=x;x.prototype.__class__=x;x.__cache__={};a.AttributeQuantizationTransform=x;x.prototype.InitFromAttribute=x.prototype.InitFromAttribute=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!ub(b,a)};x.prototype.quantization_bits=
|
||||||
P.prototype.__destroy__=function(){zb(this.ptr)};x.prototype=Object.create(m.prototype);x.prototype.constructor=x;x.prototype.__class__=x;x.__cache__={};a.AttributeQuantizationTransform=x;x.prototype.InitFromAttribute=x.prototype.InitFromAttribute=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return!!ub(c,a)};x.prototype.quantization_bits=x.prototype.quantization_bits=function(){return xb(this.ptr)};x.prototype.min_value=x.prototype.min_value=function(a){var c=this.ptr;a&&"object"===
|
x.prototype.quantization_bits=function(){return xb(this.ptr)};x.prototype.min_value=x.prototype.min_value=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return wb(b,a)};x.prototype.range=x.prototype.range=function(){return yb(this.ptr)};x.prototype.__destroy__=x.prototype.__destroy__=function(){vb(this.ptr)};K.prototype=Object.create(m.prototype);K.prototype.constructor=K;K.prototype.__class__=K;K.__cache__={};a.DracoInt8Array=K;K.prototype.GetValue=K.prototype.GetValue=function(a){var b=
|
||||||
typeof a&&(a=a.ptr);return wb(c,a)};x.prototype.range=x.prototype.range=function(){return yb(this.ptr)};x.prototype.__destroy__=x.prototype.__destroy__=function(){vb(this.ptr)};K.prototype=Object.create(m.prototype);K.prototype.constructor=K;K.prototype.__class__=K;K.__cache__={};a.DracoInt8Array=K;K.prototype.GetValue=K.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return ic(c,a)};K.prototype.size=K.prototype.size=function(){return kc(this.ptr)};K.prototype.__destroy__=
|
this.ptr;a&&"object"===typeof a&&(a=a.ptr);return ic(b,a)};K.prototype.size=K.prototype.size=function(){return kc(this.ptr)};K.prototype.__destroy__=K.prototype.__destroy__=function(){jc(this.ptr)};r.prototype=Object.create(m.prototype);r.prototype.constructor=r;r.prototype.__class__=r;r.__cache__={};a.MetadataQuerier=r;r.prototype.HasEntry=r.prototype.HasEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:ea(c);return!!Dc(b,a,c)};r.prototype.GetIntEntry=
|
||||||
K.prototype.__destroy__=function(){jc(this.ptr)};q.prototype=Object.create(m.prototype);q.prototype.constructor=q;q.prototype.__class__=q;q.__cache__={};a.MetadataQuerier=q;q.prototype.HasEntry=q.prototype.HasEntry=function(a,b){var c=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);return!!Ec(c,a,b)};q.prototype.HasIntEntry=q.prototype.HasIntEntry=function(a,b){var c=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);
|
r.prototype.GetIntEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:ea(c);return Bc(b,a,c)};r.prototype.GetDoubleEntry=r.prototype.GetDoubleEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:ea(c);return zc(b,a,c)};r.prototype.GetStringEntry=r.prototype.GetStringEntry=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:ea(c);
|
||||||
return!!Fc(c,a,b)};q.prototype.GetIntEntry=q.prototype.GetIntEntry=function(a,b){var c=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);return Bc(c,a,b)};q.prototype.HasDoubleEntry=q.prototype.HasDoubleEntry=function(a,b){var c=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);return!!Dc(c,a,b)};q.prototype.GetDoubleEntry=q.prototype.GetDoubleEntry=function(a,b){var c=this.ptr;l.prepare();a&&"object"===typeof a&&(a=
|
return u(Cc(b,a,c))};r.prototype.NumEntries=r.prototype.NumEntries=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Ec(b,a)};r.prototype.GetEntryName=r.prototype.GetEntryName=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return u(Ac(b,a,c))};r.prototype.__destroy__=r.prototype.__destroy__=function(){Fc(this.ptr)};L.prototype=Object.create(m.prototype);L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.DracoInt16Array=
|
||||||
a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);return zc(c,a,b)};q.prototype.HasStringEntry=q.prototype.HasStringEntry=function(a,b){var c=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);return!!Gc(c,a,b)};q.prototype.GetStringEntry=q.prototype.GetStringEntry=function(a,b){var c=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);return u(Cc(c,a,b))};q.prototype.NumEntries=q.prototype.NumEntries=function(a){var c=this.ptr;
|
L;L.prototype.GetValue=L.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return cc(b,a)};L.prototype.size=L.prototype.size=function(){return ec(this.ptr)};L.prototype.__destroy__=L.prototype.__destroy__=function(){dc(this.ptr)};M.prototype=Object.create(m.prototype);M.prototype.constructor=M;M.prototype.__class__=M;M.__cache__={};a.DracoFloat32Array=M;M.prototype.GetValue=M.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return $b(b,
|
||||||
a&&"object"===typeof a&&(a=a.ptr);return Hc(c,a)};q.prototype.GetEntryName=q.prototype.GetEntryName=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return u(Ac(c,a,b))};q.prototype.__destroy__=q.prototype.__destroy__=function(){Ic(this.ptr)};L.prototype=Object.create(m.prototype);L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.DracoInt16Array=L;L.prototype.GetValue=L.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&
|
a)};M.prototype.size=M.prototype.size=function(){return bc(this.ptr)};M.prototype.__destroy__=M.prototype.__destroy__=function(){ac(this.ptr)};U.prototype=Object.create(m.prototype);U.prototype.constructor=U;U.prototype.__class__=U;U.__cache__={};a.GeometryAttribute=U;U.prototype.__destroy__=U.prototype.__destroy__=function(){uc(this.ptr)};Q.prototype=Object.create(m.prototype);Q.prototype.constructor=Q;Q.prototype.__class__=Q;Q.__cache__={};a.DecoderBuffer=Q;Q.prototype.Init=Q.prototype.Init=function(a,
|
||||||
(a=a.ptr);return cc(c,a)};L.prototype.size=L.prototype.size=function(){return ec(this.ptr)};L.prototype.__destroy__=L.prototype.__destroy__=function(){dc(this.ptr)};M.prototype=Object.create(m.prototype);M.prototype.constructor=M;M.prototype.__class__=M;M.__cache__={};a.DracoFloat32Array=M;M.prototype.GetValue=M.prototype.GetValue=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return $b(c,a)};M.prototype.size=M.prototype.size=function(){return bc(this.ptr)};M.prototype.__destroy__=M.prototype.__destroy__=
|
c){var b=this.ptr;l.prepare();if("object"==typeof a&&"object"===typeof a){var d=l.alloc(a,ia);l.copy(a,ia,d);a=d}c&&"object"===typeof c&&(c=c.ptr);Bb(b,a,c)};Q.prototype.__destroy__=Q.prototype.__destroy__=function(){Cb(this.ptr)};g.prototype=Object.create(m.prototype);g.prototype.constructor=g;g.prototype.__class__=g;g.__cache__={};a.Decoder=g;g.prototype.GetEncodedGeometryType=g.prototype.GetEncodedGeometryType=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Ub(b,a)};g.prototype.DecodeBufferToPointCloud=
|
||||||
function(){ac(this.ptr)};V.prototype=Object.create(m.prototype);V.prototype.constructor=V;V.prototype.__class__=V;V.__cache__={};a.GeometryAttribute=V;V.prototype.__destroy__=V.prototype.__destroy__=function(){uc(this.ptr)};Q.prototype=Object.create(m.prototype);Q.prototype.constructor=Q;Q.prototype.__class__=Q;Q.__cache__={};a.DecoderBuffer=Q;Q.prototype.Init=Q.prototype.Init=function(a,b){var c=this.ptr;l.prepare();if("object"==typeof a&&"object"===typeof a){var d=l.alloc(a,ia);l.copy(a,ia,d);a=
|
g.prototype.DecodeBufferToPointCloud=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Eb(b,a,c),z)};g.prototype.DecodeBufferToMesh=g.prototype.DecodeBufferToMesh=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Db(b,a,c),z)};g.prototype.GetAttributeId=g.prototype.GetAttributeId=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return Kb(b,
|
||||||
d}b&&"object"===typeof b&&(b=b.ptr);Bb(c,a,b)};Q.prototype.__destroy__=Q.prototype.__destroy__=function(){Cb(this.ptr)};g.prototype=Object.create(m.prototype);g.prototype.constructor=g;g.prototype.__class__=g;g.__cache__={};a.Decoder=g;g.prototype.GetEncodedGeometryType=g.prototype.GetEncodedGeometryType=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return Ub(c,a)};g.prototype.DecodeBufferToPointCloud=g.prototype.DecodeBufferToPointCloud=function(a,b){var c=this.ptr;a&&"object"===typeof a&&
|
a,c)};g.prototype.GetAttributeIdByName=g.prototype.GetAttributeIdByName=function(a,c){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:ea(c);return Jb(b,a,c)};g.prototype.GetAttributeIdByMetadataEntry=g.prototype.GetAttributeIdByMetadataEntry=function(a,c,d){var b=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);c=c&&"object"===typeof c?c.ptr:ea(c);d=d&&"object"===typeof d?d.ptr:ea(d);return Ib(b,a,c,d)};g.prototype.GetAttribute=g.prototype.GetAttribute=
|
||||||
(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return T(Eb(c,a,b),z)};g.prototype.DecodeBufferToMesh=g.prototype.DecodeBufferToMesh=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return T(Db(c,a,b),z)};g.prototype.GetAttributeId=g.prototype.GetAttributeId=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return Kb(c,a,b)};g.prototype.GetAttributeIdByName=g.prototype.GetAttributeIdByName=function(a,b){var c=
|
function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Tb(b,a,c),n)};g.prototype.GetAttributeByUniqueId=g.prototype.GetAttributeByUniqueId=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Fb(b,a,c),n)};g.prototype.GetMetadata=g.prototype.GetMetadata=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return T(Wb(b,a),R)};g.prototype.GetAttributeMetadata=g.prototype.GetAttributeMetadata=
|
||||||
this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);return Jb(c,a,b)};g.prototype.GetAttributeIdByMetadataEntry=g.prototype.GetAttributeIdByMetadataEntry=function(a,b,d){var c=this.ptr;l.prepare();a&&"object"===typeof a&&(a=a.ptr);b=b&&"object"===typeof b?b.ptr:U(b);d=d&&"object"===typeof d?d.ptr:U(d);return Ib(c,a,b,d)};g.prototype.GetAttribute=g.prototype.GetAttribute=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=
|
function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);return T(Pb(b,a,c),R)};g.prototype.GetFaceFromMesh=g.prototype.GetFaceFromMesh=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Vb(b,a,c,d)};g.prototype.GetTriangleStripsFromMesh=g.prototype.GetTriangleStripsFromMesh=function(a,c){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);
|
||||||
b.ptr);return T(Tb(c,a,b),n)};g.prototype.GetAttributeByUniqueId=g.prototype.GetAttributeByUniqueId=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return T(Fb(c,a,b),n)};g.prototype.GetMetadata=g.prototype.GetMetadata=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return T(Wb(c,a),R)};g.prototype.GetAttributeMetadata=g.prototype.GetAttributeMetadata=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&
|
return Xb(b,a,c)};g.prototype.GetAttributeFloat=g.prototype.GetAttributeFloat=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Hb(b,a,c,d)};g.prototype.GetAttributeFloatForAllPoints=g.prototype.GetAttributeFloatForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Gb(b,a,c,d)};g.prototype.GetAttributeIntForAllPoints=
|
||||||
(b=b.ptr);return T(Pb(c,a,b),R)};g.prototype.GetFaceFromMesh=g.prototype.GetFaceFromMesh=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Vb(c,a,b,d)};g.prototype.GetTriangleStripsFromMesh=g.prototype.GetTriangleStripsFromMesh=function(a,b){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);return Xb(c,a,b)};g.prototype.GetAttributeFloat=g.prototype.GetAttributeFloat=function(a,
|
g.prototype.GetAttributeIntForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ob(b,a,c,d)};g.prototype.GetAttributeInt8ForAllPoints=g.prototype.GetAttributeInt8ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Nb(b,a,c,d)};g.prototype.GetAttributeUInt8ForAllPoints=g.prototype.GetAttributeUInt8ForAllPoints=
|
||||||
b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Hb(c,a,b,d)};g.prototype.GetAttributeFloatForAllPoints=g.prototype.GetAttributeFloatForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Gb(c,a,b,d)};g.prototype.GetAttributeIntForAllPoints=g.prototype.GetAttributeIntForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===
|
function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Sb(b,a,c,d)};g.prototype.GetAttributeInt16ForAllPoints=g.prototype.GetAttributeInt16ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Lb(b,a,c,d)};g.prototype.GetAttributeUInt16ForAllPoints=g.prototype.GetAttributeUInt16ForAllPoints=function(a,c,d){var b=this.ptr;
|
||||||
typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ob(c,a,b,d)};g.prototype.GetAttributeInt8ForAllPoints=g.prototype.GetAttributeInt8ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Nb(c,a,b,d)};g.prototype.GetAttributeUInt8ForAllPoints=g.prototype.GetAttributeUInt8ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===
|
a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Qb(b,a,c,d)};g.prototype.GetAttributeInt32ForAllPoints=g.prototype.GetAttributeInt32ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Mb(b,a,c,d)};g.prototype.GetAttributeUInt32ForAllPoints=g.prototype.GetAttributeUInt32ForAllPoints=function(a,c,d){var b=this.ptr;a&&"object"===typeof a&&
|
||||||
typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Sb(c,a,b,d)};g.prototype.GetAttributeInt16ForAllPoints=g.prototype.GetAttributeInt16ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Lb(c,a,b,d)};g.prototype.GetAttributeUInt16ForAllPoints=g.prototype.GetAttributeUInt16ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&
|
(a=a.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Rb(b,a,c,d)};g.prototype.SkipAttributeTransform=g.prototype.SkipAttributeTransform=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);Yb(b,a)};g.prototype.__destroy__=g.prototype.__destroy__=function(){Zb(this.ptr)};C.prototype=Object.create(m.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.Mesh=C;C.prototype.num_faces=C.prototype.num_faces=function(){return xc(this.ptr)};
|
||||||
"object"===typeof d&&(d=d.ptr);return!!Qb(c,a,b,d)};g.prototype.GetAttributeInt32ForAllPoints=g.prototype.GetAttributeInt32ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Mb(c,a,b,d)};g.prototype.GetAttributeUInt32ForAllPoints=g.prototype.GetAttributeUInt32ForAllPoints=function(a,b,d){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);b&&"object"===typeof b&&(b=b.ptr);d&&"object"===typeof d&&(d=
|
C.prototype.num_attributes=C.prototype.num_attributes=function(){return wc(this.ptr)};C.prototype.num_points=C.prototype.num_points=function(){return yc(this.ptr)};C.prototype.__destroy__=C.prototype.__destroy__=function(){vc(this.ptr)};W.prototype=Object.create(m.prototype);W.prototype.constructor=W;W.prototype.__class__=W;W.__cache__={};a.VoidPtr=W;W.prototype.__destroy__=W.prototype.__destroy__=function(){Yc(this.ptr)};N.prototype=Object.create(m.prototype);N.prototype.constructor=N;N.prototype.__class__=
|
||||||
d.ptr);return!!Rb(c,a,b,d)};g.prototype.SkipAttributeTransform=g.prototype.SkipAttributeTransform=function(a){var c=this.ptr;a&&"object"===typeof a&&(a=a.ptr);Yb(c,a)};g.prototype.__destroy__=g.prototype.__destroy__=function(){Zb(this.ptr)};C.prototype=Object.create(m.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.Mesh=C;C.prototype.num_faces=C.prototype.num_faces=function(){return xc(this.ptr)};C.prototype.num_attributes=C.prototype.num_attributes=function(){return wc(this.ptr)};
|
N;N.__cache__={};a.DracoInt32Array=N;N.prototype.GetValue=N.prototype.GetValue=function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return fc(b,a)};N.prototype.size=N.prototype.size=function(){return hc(this.ptr)};N.prototype.__destroy__=N.prototype.__destroy__=function(){gc(this.ptr)};R.prototype=Object.create(m.prototype);R.prototype.constructor=R;R.prototype.__class__=R;R.__cache__={};a.Metadata=R;R.prototype.__destroy__=R.prototype.__destroy__=function(){Gc(this.ptr)};(function(){function b(){a.OK=
|
||||||
C.prototype.num_points=C.prototype.num_points=function(){return yc(this.ptr)};C.prototype.__destroy__=C.prototype.__destroy__=function(){vc(this.ptr)};X.prototype=Object.create(m.prototype);X.prototype.constructor=X;X.prototype.__class__=X;X.__cache__={};a.VoidPtr=X;X.prototype.__destroy__=X.prototype.__destroy__=function(){ad(this.ptr)};N.prototype=Object.create(m.prototype);N.prototype.constructor=N;N.prototype.__class__=N;N.__cache__={};a.DracoInt32Array=N;N.prototype.GetValue=N.prototype.GetValue=
|
od();a.ERROR=ld();a.IO_ERROR=nd();a.INVALID_PARAMETER=md();a.UNSUPPORTED_VERSION=qd();a.UNKNOWN_VERSION=pd();a.INVALID_GEOMETRY_TYPE=cd();a.POINT_CLOUD=dd();a.TRIANGULAR_MESH=ed();a.ATTRIBUTE_INVALID_TRANSFORM=Zc();a.ATTRIBUTE_NO_TRANSFORM=$c();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=bd();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=ad();a.INVALID=hd();a.POSITION=jd();a.NORMAL=id();a.COLOR=fd();a.TEX_COORD=kd();a.GENERIC=gd()}a.calledRun?b():Na.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();
|
||||||
function(a){var b=this.ptr;a&&"object"===typeof a&&(a=a.ptr);return fc(b,a)};N.prototype.size=N.prototype.size=function(){return hc(this.ptr)};N.prototype.__destroy__=N.prototype.__destroy__=function(){gc(this.ptr)};R.prototype=Object.create(m.prototype);R.prototype.constructor=R;R.prototype.__class__=R;R.__cache__={};a.Metadata=R;R.prototype.__destroy__=R.prototype.__destroy__=function(){Jc(this.ptr)};(function(){function c(){a.OK=rd();a.ERROR=od();a.IO_ERROR=qd();a.INVALID_PARAMETER=pd();a.UNSUPPORTED_VERSION=
|
return d};"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule);
|
||||||
td();a.UNKNOWN_VERSION=sd();a.INVALID_GEOMETRY_TYPE=fd();a.POINT_CLOUD=gd();a.TRIANGULAR_MESH=hd();a.ATTRIBUTE_INVALID_TRANSFORM=bd();a.ATTRIBUTE_NO_TRANSFORM=cd();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=ed();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=dd();a.INVALID=kd();a.POSITION=md();a.NORMAL=ld();a.COLOR=id();a.TEX_COORD=nd();a.GENERIC=jd()}a.calledRun?c():Na.unshift(c)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();return d};
|
|
||||||
"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule);
|
|
||||||
|
@ -5,6 +5,11 @@
|
|||||||
|
|
||||||
News
|
News
|
||||||
=======
|
=======
|
||||||
|
### Version 1.3.5 release
|
||||||
|
* Added option to build Draco for Universal Scene Description
|
||||||
|
* Code cleanup
|
||||||
|
* Bug fixes
|
||||||
|
|
||||||
### Version 1.3.4 release
|
### Version 1.3.4 release
|
||||||
* Fixes for Unity
|
* Fixes for Unity
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "draco3d",
|
"name": "draco3d",
|
||||||
"version": "1.3.4",
|
"version": "1.3.5",
|
||||||
"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.",
|
"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.",
|
||||||
"main": "draco3d.js",
|
"main": "draco3d.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -12,10 +12,15 @@ The [GL Transmission Format (glTF)](https://github.com/KhronosGroup/glTF) is an
|
|||||||
|
|
||||||
This package is a build for encoding/decoding [Draco mesh compression extension](https://github.com/KhronosGroup/glTF/pull/874) in glTF specification. It could be used to compress the meshes in glTF assets or to decode the buffer data that belongs to a Draco mesh compression extension. For more detail, please read the extension spec.
|
This package is a build for encoding/decoding [Draco mesh compression extension](https://github.com/KhronosGroup/glTF/pull/874) in glTF specification. It could be used to compress the meshes in glTF assets or to decode the buffer data that belongs to a Draco mesh compression extension. For more detail, please read the extension spec.
|
||||||
|
|
||||||
TODO: Add glTF branch url.
|
Draco github glTF branch URL: https://github.com/google/draco/tree/gltf_2.0_draco_extension
|
||||||
|
|
||||||
News
|
News
|
||||||
=======
|
=======
|
||||||
|
### Version 1.3.5 release
|
||||||
|
* Added option to build Draco for Universal Scene Description
|
||||||
|
* Code cleanup
|
||||||
|
* Bug fixes
|
||||||
|
|
||||||
### Version 1.3.4 release
|
### Version 1.3.4 release
|
||||||
* Fixes for Unity
|
* Fixes for Unity
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "draco3dgltf",
|
"name": "draco3dgltf",
|
||||||
"version": "1.3.4",
|
"version": "1.3.5",
|
||||||
"description": "This package contains a specific version of Draco 3D geometric compression library that is used for glTF Draco mesh compression extension.",
|
"description": "This package contains a specific version of Draco 3D geometric compression library that is used for glTF Draco mesh compression extension.",
|
||||||
"main": "draco3dgltf.js",
|
"main": "draco3dgltf.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -92,6 +92,11 @@ bool AttributeQuantizationTransform::ComputeParameters(
|
|||||||
range_ = dif;
|
range_ = dif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In case all values are the same, initialize the range to unit length. This
|
||||||
|
// will ensure that all values are quantized properly to the same value.
|
||||||
|
if (range_ == 0.f)
|
||||||
|
range_ = 1.f;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ bool PointAttribute::Reset(size_t num_attribute_values) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
|
#ifdef DRACO_ATTRIBUTE_VALUES_DEDUPLICATION_SUPPORTED
|
||||||
AttributeValueIndex::ValueType PointAttribute::DeduplicateValues(
|
AttributeValueIndex::ValueType PointAttribute::DeduplicateValues(
|
||||||
const GeometryAttribute &in_att) {
|
const GeometryAttribute &in_att) {
|
||||||
return DeduplicateValues(in_att, AttributeValueIndex(0));
|
return DeduplicateValues(in_att, AttributeValueIndex(0));
|
||||||
|
@ -105,7 +105,7 @@ class PointAttribute : public GeometryAttribute {
|
|||||||
return GetValue(mapped_index(point_index), out_data);
|
return GetValue(mapped_index(point_index), out_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
|
#ifdef DRACO_ATTRIBUTE_VALUES_DEDUPLICATION_SUPPORTED
|
||||||
// Deduplicate |in_att| values into |this| attribute. |in_att| can be equal
|
// Deduplicate |in_att| values into |this| attribute. |in_att| can be equal
|
||||||
// to |this|.
|
// to |this|.
|
||||||
// Returns -1 if the deduplication failed.
|
// Returns -1 if the deduplication failed.
|
||||||
@ -130,7 +130,7 @@ class PointAttribute : public GeometryAttribute {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#ifdef DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
|
#ifdef DRACO_ATTRIBUTE_VALUES_DEDUPLICATION_SUPPORTED
|
||||||
template <typename T>
|
template <typename T>
|
||||||
AttributeValueIndex::ValueType DeduplicateTypedValues(
|
AttributeValueIndex::ValueType DeduplicateTypedValues(
|
||||||
const GeometryAttribute &in_att, AttributeValueIndex in_att_offset);
|
const GeometryAttribute &in_att, AttributeValueIndex in_att_offset);
|
||||||
|
@ -21,7 +21,9 @@
|
|||||||
#include "draco/draco_features.h"
|
#include "draco/draco_features.h"
|
||||||
|
|
||||||
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_constrained_multi_parallelogram_decoder.h"
|
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_constrained_multi_parallelogram_decoder.h"
|
||||||
|
#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
|
||||||
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_decoder.h"
|
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_decoder.h"
|
||||||
|
#endif
|
||||||
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_multi_parallelogram_decoder.h"
|
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_multi_parallelogram_decoder.h"
|
||||||
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_parallelogram_decoder.h"
|
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_parallelogram_decoder.h"
|
||||||
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_tex_coords_decoder.h"
|
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_tex_coords_decoder.h"
|
||||||
@ -82,16 +84,20 @@ struct MeshPredictionSchemeDecoderFactory {
|
|||||||
new MeshPredictionSchemeTexCoordsPortableDecoder<
|
new MeshPredictionSchemeTexCoordsPortableDecoder<
|
||||||
DataTypeT, TransformT, MeshDataT>(attribute, transform,
|
DataTypeT, TransformT, MeshDataT>(attribute, transform,
|
||||||
mesh_data));
|
mesh_data));
|
||||||
} else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
|
}
|
||||||
|
#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
|
||||||
|
else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
|
||||||
return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
|
return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
|
||||||
new MeshPredictionSchemeGeometricNormalDecoder<
|
new MeshPredictionSchemeGeometricNormalDecoder<
|
||||||
DataTypeT, TransformT, MeshDataT>(attribute, transform,
|
DataTypeT, TransformT, MeshDataT>(attribute, transform,
|
||||||
mesh_data));
|
mesh_data));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
|
||||||
// Operator () specialized for normal octahedron transforms. These transforms
|
// Operator () specialized for normal octahedron transforms. These transforms
|
||||||
// are currently used only by the geometric normal prediction scheme (the
|
// are currently used only by the geometric normal prediction scheme (the
|
||||||
// transform is also used by delta coding, but delta predictor is not
|
// transform is also used by delta coding, but delta predictor is not
|
||||||
@ -128,6 +134,7 @@ struct MeshPredictionSchemeDecoderFactory {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
template <class TransformT, class MeshDataT>
|
template <class TransformT, class MeshDataT>
|
||||||
std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>> operator()(
|
std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>> operator()(
|
||||||
|
@ -32,10 +32,12 @@ PredictionSchemeMethod SelectPredictionMethod(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (att->attribute_type() == GeometryAttribute::NORMAL) {
|
if (att->attribute_type() == GeometryAttribute::NORMAL) {
|
||||||
|
#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
|
||||||
if (encoder->options()->GetSpeed() < 4) {
|
if (encoder->options()->GetSpeed() < 4) {
|
||||||
// Use geometric normal prediction for speeds 0, 1, 2, 3.
|
// Use geometric normal prediction for speeds 0, 1, 2, 3.
|
||||||
return MESH_PREDICTION_GEOMETRIC_NORMAL;
|
return MESH_PREDICTION_GEOMETRIC_NORMAL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return PREDICTION_DIFFERENCE; // default
|
return PREDICTION_DIFFERENCE; // default
|
||||||
}
|
}
|
||||||
// Handle other attribute types.
|
// Handle other attribute types.
|
||||||
|
@ -19,7 +19,9 @@
|
|||||||
#define DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_PREDICTION_SCHEME_ENCODER_FACTORY_H_
|
#define DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_PREDICTION_SCHEME_ENCODER_FACTORY_H_
|
||||||
|
|
||||||
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_constrained_multi_parallelogram_encoder.h"
|
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_constrained_multi_parallelogram_encoder.h"
|
||||||
|
#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
|
||||||
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_encoder.h"
|
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_geometric_normal_encoder.h"
|
||||||
|
#endif
|
||||||
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_multi_parallelogram_encoder.h"
|
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_multi_parallelogram_encoder.h"
|
||||||
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_parallelogram_encoder.h"
|
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_parallelogram_encoder.h"
|
||||||
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_tex_coords_encoder.h"
|
#include "draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_tex_coords_encoder.h"
|
||||||
@ -49,32 +51,25 @@ struct MeshPredictionSchemeEncoderFactory {
|
|||||||
new MeshPredictionSchemeParallelogramEncoder<DataTypeT, TransformT,
|
new MeshPredictionSchemeParallelogramEncoder<DataTypeT, TransformT,
|
||||||
MeshDataT>(
|
MeshDataT>(
|
||||||
attribute, transform, mesh_data));
|
attribute, transform, mesh_data));
|
||||||
} else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
|
|
||||||
return std::unique_ptr<PredictionSchemeEncoder<DataTypeT, TransformT>>(
|
|
||||||
new MeshPredictionSchemeMultiParallelogramEncoder<
|
|
||||||
DataTypeT, TransformT, MeshDataT>(attribute, transform,
|
|
||||||
mesh_data));
|
|
||||||
} else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
|
} else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
|
||||||
return std::unique_ptr<PredictionSchemeEncoder<DataTypeT, TransformT>>(
|
return std::unique_ptr<PredictionSchemeEncoder<DataTypeT, TransformT>>(
|
||||||
new MeshPredictionSchemeConstrainedMultiParallelogramEncoder<
|
new MeshPredictionSchemeConstrainedMultiParallelogramEncoder<
|
||||||
DataTypeT, TransformT, MeshDataT>(attribute, transform,
|
DataTypeT, TransformT, MeshDataT>(attribute, transform,
|
||||||
mesh_data));
|
mesh_data));
|
||||||
} else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
|
|
||||||
return std::unique_ptr<PredictionSchemeEncoder<DataTypeT, TransformT>>(
|
|
||||||
new MeshPredictionSchemeTexCoordsEncoder<DataTypeT, TransformT,
|
|
||||||
MeshDataT>(
|
|
||||||
attribute, transform, mesh_data));
|
|
||||||
} else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
|
} else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
|
||||||
return std::unique_ptr<PredictionSchemeEncoder<DataTypeT, TransformT>>(
|
return std::unique_ptr<PredictionSchemeEncoder<DataTypeT, TransformT>>(
|
||||||
new MeshPredictionSchemeTexCoordsPortableEncoder<
|
new MeshPredictionSchemeTexCoordsPortableEncoder<
|
||||||
DataTypeT, TransformT, MeshDataT>(attribute, transform,
|
DataTypeT, TransformT, MeshDataT>(attribute, transform,
|
||||||
mesh_data));
|
mesh_data));
|
||||||
} else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
|
}
|
||||||
|
#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
|
||||||
|
else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
|
||||||
return std::unique_ptr<PredictionSchemeEncoder<DataTypeT, TransformT>>(
|
return std::unique_ptr<PredictionSchemeEncoder<DataTypeT, TransformT>>(
|
||||||
new MeshPredictionSchemeGeometricNormalEncoder<DataTypeT, TransformT,
|
new MeshPredictionSchemeGeometricNormalEncoder<DataTypeT, TransformT,
|
||||||
MeshDataT>(
|
MeshDataT>(
|
||||||
attribute, transform, mesh_data));
|
attribute, transform, mesh_data));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -13,7 +13,9 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
#include "draco/compression/attributes/sequential_attribute_decoders_controller.h"
|
#include "draco/compression/attributes/sequential_attribute_decoders_controller.h"
|
||||||
|
#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
|
||||||
#include "draco/compression/attributes/sequential_normal_attribute_decoder.h"
|
#include "draco/compression/attributes/sequential_normal_attribute_decoder.h"
|
||||||
|
#endif
|
||||||
#include "draco/compression/attributes/sequential_quantization_attribute_decoder.h"
|
#include "draco/compression/attributes/sequential_quantization_attribute_decoder.h"
|
||||||
#include "draco/compression/config/compression_shared.h"
|
#include "draco/compression/config/compression_shared.h"
|
||||||
|
|
||||||
@ -123,9 +125,11 @@ SequentialAttributeDecodersController::CreateSequentialDecoder(
|
|||||||
case SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION:
|
case SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION:
|
||||||
return std::unique_ptr<SequentialAttributeDecoder>(
|
return std::unique_ptr<SequentialAttributeDecoder>(
|
||||||
new SequentialQuantizationAttributeDecoder());
|
new SequentialQuantizationAttributeDecoder());
|
||||||
|
#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
|
||||||
case SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS:
|
case SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS:
|
||||||
return std::unique_ptr<SequentialNormalAttributeDecoder>(
|
return std::unique_ptr<SequentialNormalAttributeDecoder>(
|
||||||
new SequentialNormalAttributeDecoder());
|
new SequentialNormalAttributeDecoder());
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,9 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
#include "draco/compression/attributes/sequential_attribute_encoders_controller.h"
|
#include "draco/compression/attributes/sequential_attribute_encoders_controller.h"
|
||||||
|
#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
|
||||||
#include "draco/compression/attributes/sequential_normal_attribute_encoder.h"
|
#include "draco/compression/attributes/sequential_normal_attribute_encoder.h"
|
||||||
|
#endif
|
||||||
#include "draco/compression/attributes/sequential_quantization_attribute_encoder.h"
|
#include "draco/compression/attributes/sequential_quantization_attribute_encoder.h"
|
||||||
#include "draco/compression/point_cloud/point_cloud_encoder.h"
|
#include "draco/compression/point_cloud/point_cloud_encoder.h"
|
||||||
|
|
||||||
@ -121,15 +123,19 @@ SequentialAttributeEncodersController::CreateSequentialEncoder(int i) {
|
|||||||
case DT_FLOAT32:
|
case DT_FLOAT32:
|
||||||
if (encoder()->options()->GetAttributeInt(att_id, "quantization_bits",
|
if (encoder()->options()->GetAttributeInt(att_id, "quantization_bits",
|
||||||
-1) > 0) {
|
-1) > 0) {
|
||||||
|
#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
|
||||||
if (att->attribute_type() == GeometryAttribute::NORMAL) {
|
if (att->attribute_type() == GeometryAttribute::NORMAL) {
|
||||||
// We currently only support normals with float coordinates
|
// We currently only support normals with float coordinates
|
||||||
// and must be quantized.
|
// and must be quantized.
|
||||||
return std::unique_ptr<SequentialAttributeEncoder>(
|
return std::unique_ptr<SequentialAttributeEncoder>(
|
||||||
new SequentialNormalAttributeEncoder());
|
new SequentialNormalAttributeEncoder());
|
||||||
} else {
|
} else {
|
||||||
|
#endif
|
||||||
return std::unique_ptr<SequentialAttributeEncoder>(
|
return std::unique_ptr<SequentialAttributeEncoder>(
|
||||||
new SequentialQuantizationAttributeEncoder());
|
new SequentialQuantizationAttributeEncoder());
|
||||||
|
#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "draco/compression/config/compression_shared.h"
|
#include "draco/compression/config/compression_shared.h"
|
||||||
#include "draco/compression/config/decoder_options.h"
|
#include "draco/compression/config/decoder_options.h"
|
||||||
#include "draco/core/decoder_buffer.h"
|
#include "draco/core/decoder_buffer.h"
|
||||||
#include "draco/core/statusor.h"
|
#include "draco/core/status_or.h"
|
||||||
#include "draco/mesh/mesh.h"
|
#include "draco/mesh/mesh.h"
|
||||||
|
|
||||||
namespace draco {
|
namespace draco {
|
||||||
|
@ -68,7 +68,7 @@ class EncoderBase {
|
|||||||
Status CheckPredictionScheme(GeometryAttribute::Type att_type,
|
Status CheckPredictionScheme(GeometryAttribute::Type att_type,
|
||||||
int prediction_scheme) const {
|
int prediction_scheme) const {
|
||||||
// Out of bound checks:
|
// Out of bound checks:
|
||||||
if (prediction_scheme < 0)
|
if (prediction_scheme < PREDICTION_NONE)
|
||||||
return Status(Status::ERROR, "Invalid prediction scheme requested.");
|
return Status(Status::ERROR, "Invalid prediction scheme requested.");
|
||||||
if (prediction_scheme >= NUM_PREDICTION_SCHEMES)
|
if (prediction_scheme >= NUM_PREDICTION_SCHEMES)
|
||||||
return Status(Status::ERROR, "Invalid prediction scheme requested.");
|
return Status(Status::ERROR, "Invalid prediction scheme requested.");
|
||||||
@ -76,6 +76,9 @@ class EncoderBase {
|
|||||||
if (prediction_scheme == MESH_PREDICTION_TEX_COORDS_DEPRECATED)
|
if (prediction_scheme == MESH_PREDICTION_TEX_COORDS_DEPRECATED)
|
||||||
return Status(Status::ERROR,
|
return Status(Status::ERROR,
|
||||||
"MESH_PREDICTION_TEX_COORDS_DEPRECATED is deprecated.");
|
"MESH_PREDICTION_TEX_COORDS_DEPRECATED is deprecated.");
|
||||||
|
if (prediction_scheme == MESH_PREDICTION_MULTI_PARALLELOGRAM)
|
||||||
|
return Status(Status::ERROR,
|
||||||
|
"MESH_PREDICTION_MULTI_PARALLELOGRAM is deprecated.");
|
||||||
// Attribute specific checks:
|
// Attribute specific checks:
|
||||||
if (prediction_scheme == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
|
if (prediction_scheme == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
|
||||||
if (att_type != GeometryAttribute::TEX_COORD)
|
if (att_type != GeometryAttribute::TEX_COORD)
|
||||||
|
@ -20,29 +20,29 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#define ANS_DIVIDE_BY_MULTIPLY 1
|
#define DRACO_ANS_DIVIDE_BY_MULTIPLY 1
|
||||||
#if ANS_DIVIDE_BY_MULTIPLY
|
#if DRACO_ANS_DIVIDE_BY_MULTIPLY
|
||||||
#include "draco/core/divide.h"
|
#include "draco/core/divide.h"
|
||||||
#endif
|
#endif
|
||||||
#include "draco/core/macros.h"
|
#include "draco/core/macros.h"
|
||||||
|
|
||||||
namespace draco {
|
namespace draco {
|
||||||
|
|
||||||
#if ANS_DIVIDE_BY_MULTIPLY
|
#if DRACO_ANS_DIVIDE_BY_MULTIPLY
|
||||||
|
|
||||||
#define ANS_DIVREM(quotient, remainder, dividend, divisor) \
|
#define DRACO_ANS_DIVREM(quotient, remainder, dividend, divisor) \
|
||||||
do { \
|
do { \
|
||||||
quotient = fastdiv(dividend, divisor); \
|
quotient = fastdiv(dividend, divisor); \
|
||||||
remainder = dividend - quotient * divisor; \
|
remainder = dividend - quotient * divisor; \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define ANS_DIV(dividend, divisor) fastdiv(dividend, divisor)
|
#define DRACO_ANS_DIV(dividend, divisor) fastdiv(dividend, divisor)
|
||||||
#else
|
#else
|
||||||
#define ANS_DIVREM(quotient, remainder, dividend, divisor) \
|
#define DRACO_ANS_DIVREM(quotient, remainder, dividend, divisor) \
|
||||||
do { \
|
do { \
|
||||||
quotient = dividend / divisor; \
|
quotient = dividend / divisor; \
|
||||||
remainder = dividend % divisor; \
|
remainder = dividend % divisor; \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define ANS_DIV(dividend, divisor) ((dividend) / (divisor))
|
#define DRACO_ANS_DIV(dividend, divisor) ((dividend) / (divisor))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct AnsCoder {
|
struct AnsCoder {
|
||||||
@ -60,13 +60,9 @@ struct AnsDecoder {
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef uint8_t AnsP8;
|
typedef uint8_t AnsP8;
|
||||||
#define ans_p8_precision 256u
|
#define DRACO_ANS_P8_PRECISION 256u
|
||||||
#define ans_p8_shift 8
|
#define DRACO_ANS_L_BASE (4096u)
|
||||||
#define ans_p10_precision 1024u
|
#define DRACO_ANS_IO_BASE 256
|
||||||
|
|
||||||
#define l_base (ans_p10_precision * 4) // l_base % precision must be 0
|
|
||||||
#define io_base 256
|
|
||||||
// Range I = { l_base, l_base + 1, ..., l_base * io_base - 1 }
|
|
||||||
|
|
||||||
static uint32_t mem_get_le16(const void *vmem) {
|
static uint32_t mem_get_le16(const void *vmem) {
|
||||||
uint32_t val;
|
uint32_t val;
|
||||||
@ -126,14 +122,14 @@ static inline void ans_write_init(struct AnsCoder *const ans,
|
|||||||
uint8_t *const buf) {
|
uint8_t *const buf) {
|
||||||
ans->buf = buf;
|
ans->buf = buf;
|
||||||
ans->buf_offset = 0;
|
ans->buf_offset = 0;
|
||||||
ans->state = l_base;
|
ans->state = DRACO_ANS_L_BASE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int ans_write_end(struct AnsCoder *const ans) {
|
static inline int ans_write_end(struct AnsCoder *const ans) {
|
||||||
uint32_t state;
|
uint32_t state;
|
||||||
DRACO_DCHECK_GE(ans->state, l_base);
|
DRACO_DCHECK_GE(ans->state, DRACO_ANS_L_BASE);
|
||||||
DRACO_DCHECK_LT(ans->state, l_base * io_base);
|
DRACO_DCHECK_LT(ans->state, DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE);
|
||||||
state = ans->state - l_base;
|
state = ans->state - DRACO_ANS_L_BASE;
|
||||||
if (state < (1 << 6)) {
|
if (state < (1 << 6)) {
|
||||||
ans->buf[ans->buf_offset] = (0x00 << 6) + state;
|
ans->buf[ans->buf_offset] = (0x00 << 6) + state;
|
||||||
return ans->buf_offset + 1;
|
return ans->buf_offset + 1;
|
||||||
@ -149,43 +145,44 @@ static inline int ans_write_end(struct AnsCoder *const ans) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// rABS with descending spread
|
// rABS with descending spread.
|
||||||
// p or p0 takes the place of l_s from the paper
|
// p or p0 takes the place of l_s from the paper.
|
||||||
// ans_p8_precision is m
|
// DRACO_ANS_P8_PRECISION is m.
|
||||||
static inline void rabs_desc_write(struct AnsCoder *ans, int val, AnsP8 p0) {
|
static inline void rabs_desc_write(struct AnsCoder *ans, int val, AnsP8 p0) {
|
||||||
const AnsP8 p = ans_p8_precision - p0;
|
const AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
|
||||||
const unsigned l_s = val ? p : p0;
|
const unsigned l_s = val ? p : p0;
|
||||||
unsigned quot, rem;
|
unsigned quot, rem;
|
||||||
if (ans->state >= l_base / ans_p8_precision * io_base * l_s) {
|
if (ans->state >=
|
||||||
ans->buf[ans->buf_offset++] = ans->state % io_base;
|
DRACO_ANS_L_BASE / DRACO_ANS_P8_PRECISION * DRACO_ANS_IO_BASE * l_s) {
|
||||||
ans->state /= io_base;
|
ans->buf[ans->buf_offset++] = ans->state % DRACO_ANS_IO_BASE;
|
||||||
|
ans->state /= DRACO_ANS_IO_BASE;
|
||||||
}
|
}
|
||||||
ANS_DIVREM(quot, rem, ans->state, l_s);
|
DRACO_ANS_DIVREM(quot, rem, ans->state, l_s);
|
||||||
ans->state = quot * ans_p8_precision + rem + (val ? 0 : p);
|
ans->state = quot * DRACO_ANS_P8_PRECISION + rem + (val ? 0 : p);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ANS_IMPL1 0
|
#define DRACO_ANS_IMPL1 0
|
||||||
#define UNPREDICTABLE(x) x
|
#define UNPREDICTABLE(x) x
|
||||||
static inline int rabs_desc_read(struct AnsDecoder *ans, AnsP8 p0) {
|
static inline int rabs_desc_read(struct AnsDecoder *ans, AnsP8 p0) {
|
||||||
int val;
|
int val;
|
||||||
#if ANS_IMPL1
|
#if DRACO_ANS_IMPL1
|
||||||
unsigned l_s;
|
unsigned l_s;
|
||||||
#else
|
#else
|
||||||
unsigned quot, rem, x, xn;
|
unsigned quot, rem, x, xn;
|
||||||
#endif
|
#endif
|
||||||
const AnsP8 p = ans_p8_precision - p0;
|
const AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
|
||||||
if (ans->state < l_base && ans->buf_offset > 0) {
|
if (ans->state < DRACO_ANS_L_BASE && ans->buf_offset > 0) {
|
||||||
ans->state = ans->state * io_base + ans->buf[--ans->buf_offset];
|
ans->state = ans->state * DRACO_ANS_IO_BASE + ans->buf[--ans->buf_offset];
|
||||||
}
|
}
|
||||||
#if ANS_IMPL1
|
#if DRACO_ANS_IMPL1
|
||||||
val = ans->state % ans_p8_precision < p;
|
val = ans->state % DRACO_ANS_P8_PRECISION < p;
|
||||||
l_s = val ? p : p0;
|
l_s = val ? p : p0;
|
||||||
ans->state = (ans->state / ans_p8_precision) * l_s +
|
ans->state = (ans->state / DRACO_ANS_P8_PRECISION) * l_s +
|
||||||
ans->state % ans_p8_precision - (!val * p);
|
ans->state % DRACO_ANS_P8_PRECISION - (!val * p);
|
||||||
#else
|
#else
|
||||||
x = ans->state;
|
x = ans->state;
|
||||||
quot = x / ans_p8_precision;
|
quot = x / DRACO_ANS_P8_PRECISION;
|
||||||
rem = x % ans_p8_precision;
|
rem = x % DRACO_ANS_P8_PRECISION;
|
||||||
xn = quot * p;
|
xn = quot * p;
|
||||||
val = rem < p;
|
val = rem < p;
|
||||||
if (UNPREDICTABLE(val)) {
|
if (UNPREDICTABLE(val)) {
|
||||||
@ -198,41 +195,42 @@ static inline int rabs_desc_read(struct AnsDecoder *ans, AnsP8 p0) {
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
// rABS with ascending spread
|
// rABS with ascending spread.
|
||||||
// p or p0 takes the place of l_s from the paper
|
// p or p0 takes the place of l_s from the paper.
|
||||||
// ans_p8_precision is m
|
// DRACO_ANS_P8_PRECISION is m.
|
||||||
static inline void rabs_asc_write(struct AnsCoder *ans, int val, AnsP8 p0) {
|
static inline void rabs_asc_write(struct AnsCoder *ans, int val, AnsP8 p0) {
|
||||||
const AnsP8 p = ans_p8_precision - p0;
|
const AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
|
||||||
const unsigned l_s = val ? p : p0;
|
const unsigned l_s = val ? p : p0;
|
||||||
unsigned quot, rem;
|
unsigned quot, rem;
|
||||||
if (ans->state >= l_base / ans_p8_precision * io_base * l_s) {
|
if (ans->state >=
|
||||||
ans->buf[ans->buf_offset++] = ans->state % io_base;
|
DRACO_ANS_L_BASE / DRACO_ANS_P8_PRECISION * DRACO_ANS_IO_BASE * l_s) {
|
||||||
ans->state /= io_base;
|
ans->buf[ans->buf_offset++] = ans->state % DRACO_ANS_IO_BASE;
|
||||||
|
ans->state /= DRACO_ANS_IO_BASE;
|
||||||
}
|
}
|
||||||
ANS_DIVREM(quot, rem, ans->state, l_s);
|
DRACO_ANS_DIVREM(quot, rem, ans->state, l_s);
|
||||||
ans->state = quot * ans_p8_precision + rem + (val ? p0 : 0);
|
ans->state = quot * DRACO_ANS_P8_PRECISION + rem + (val ? p0 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int rabs_asc_read(struct AnsDecoder *ans, AnsP8 p0) {
|
static inline int rabs_asc_read(struct AnsDecoder *ans, AnsP8 p0) {
|
||||||
int val;
|
int val;
|
||||||
#if ANS_IMPL1
|
#if DRACO_ANS_IMPL1
|
||||||
unsigned l_s;
|
unsigned l_s;
|
||||||
#else
|
#else
|
||||||
unsigned quot, rem, x, xn;
|
unsigned quot, rem, x, xn;
|
||||||
#endif
|
#endif
|
||||||
const AnsP8 p = ans_p8_precision - p0;
|
const AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
|
||||||
if (ans->state < l_base) {
|
if (ans->state < DRACO_ANS_L_BASE) {
|
||||||
ans->state = ans->state * io_base + ans->buf[--ans->buf_offset];
|
ans->state = ans->state * DRACO_ANS_IO_BASE + ans->buf[--ans->buf_offset];
|
||||||
}
|
}
|
||||||
#if ANS_IMPL1
|
#if DRACO_ANS_IMPL1
|
||||||
val = ans->state % ans_p8_precision < p;
|
val = ans->state % DRACO_ANS_P8_PRECISION < p;
|
||||||
l_s = val ? p : p0;
|
l_s = val ? p : p0;
|
||||||
ans->state = (ans->state / ans_p8_precision) * l_s +
|
ans->state = (ans->state / DRACO_ANS_P8_PRECISION) * l_s +
|
||||||
ans->state % ans_p8_precision - (!val * p);
|
ans->state % DRACO_ANS_P8_PRECISION - (!val * p);
|
||||||
#else
|
#else
|
||||||
x = ans->state;
|
x = ans->state;
|
||||||
quot = x / ans_p8_precision;
|
quot = x / DRACO_ANS_P8_PRECISION;
|
||||||
rem = x % ans_p8_precision;
|
rem = x % DRACO_ANS_P8_PRECISION;
|
||||||
xn = quot * p;
|
xn = quot * p;
|
||||||
val = rem >= p0;
|
val = rem >= p0;
|
||||||
if (UNPREDICTABLE(val)) {
|
if (UNPREDICTABLE(val)) {
|
||||||
@ -248,32 +246,34 @@ static inline int rabs_asc_read(struct AnsDecoder *ans, AnsP8 p0) {
|
|||||||
#define rabs_read rabs_desc_read
|
#define rabs_read rabs_desc_read
|
||||||
#define rabs_write rabs_desc_write
|
#define rabs_write rabs_desc_write
|
||||||
|
|
||||||
// uABS with normalization
|
// uABS with normalization.
|
||||||
static inline void uabs_write(struct AnsCoder *ans, int val, AnsP8 p0) {
|
static inline void uabs_write(struct AnsCoder *ans, int val, AnsP8 p0) {
|
||||||
AnsP8 p = ans_p8_precision - p0;
|
AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
|
||||||
const unsigned l_s = val ? p : p0;
|
const unsigned l_s = val ? p : p0;
|
||||||
while (ans->state >= l_base / ans_p8_precision * io_base * l_s) {
|
while (ans->state >=
|
||||||
ans->buf[ans->buf_offset++] = ans->state % io_base;
|
DRACO_ANS_L_BASE / DRACO_ANS_P8_PRECISION * DRACO_ANS_IO_BASE * l_s) {
|
||||||
ans->state /= io_base;
|
ans->buf[ans->buf_offset++] = ans->state % DRACO_ANS_IO_BASE;
|
||||||
|
ans->state /= DRACO_ANS_IO_BASE;
|
||||||
}
|
}
|
||||||
if (!val)
|
if (!val)
|
||||||
ans->state = ANS_DIV(ans->state * ans_p8_precision, p0);
|
ans->state = DRACO_ANS_DIV(ans->state * DRACO_ANS_P8_PRECISION, p0);
|
||||||
else
|
else
|
||||||
ans->state = ANS_DIV((ans->state + 1) * ans_p8_precision + p - 1, p) - 1;
|
ans->state =
|
||||||
|
DRACO_ANS_DIV((ans->state + 1) * DRACO_ANS_P8_PRECISION + p - 1, p) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int uabs_read(struct AnsDecoder *ans, AnsP8 p0) {
|
static inline int uabs_read(struct AnsDecoder *ans, AnsP8 p0) {
|
||||||
AnsP8 p = ans_p8_precision - p0;
|
AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
|
||||||
int s;
|
int s;
|
||||||
// unsigned int xp1;
|
// unsigned int xp1;
|
||||||
unsigned xp, sp;
|
unsigned xp, sp;
|
||||||
unsigned state = ans->state;
|
unsigned state = ans->state;
|
||||||
while (state < l_base && ans->buf_offset > 0) {
|
while (state < DRACO_ANS_L_BASE && ans->buf_offset > 0) {
|
||||||
state = state * io_base + ans->buf[--ans->buf_offset];
|
state = state * DRACO_ANS_IO_BASE + ans->buf[--ans->buf_offset];
|
||||||
}
|
}
|
||||||
sp = state * p;
|
sp = state * p;
|
||||||
// xp1 = (sp + p) / ans_p8_precision;
|
// xp1 = (sp + p) / DRACO_ANS_P8_PRECISION;
|
||||||
xp = sp / ans_p8_precision;
|
xp = sp / DRACO_ANS_P8_PRECISION;
|
||||||
// s = xp1 - xp;
|
// s = xp1 - xp;
|
||||||
s = (sp & 0xFF) >= p0;
|
s = (sp & 0xFF) >= p0;
|
||||||
if (UNPREDICTABLE(s))
|
if (UNPREDICTABLE(s))
|
||||||
@ -286,8 +286,8 @@ static inline int uabs_read(struct AnsDecoder *ans, AnsP8 p0) {
|
|||||||
static inline int uabs_read_bit(struct AnsDecoder *ans) {
|
static inline int uabs_read_bit(struct AnsDecoder *ans) {
|
||||||
int s;
|
int s;
|
||||||
unsigned state = ans->state;
|
unsigned state = ans->state;
|
||||||
while (state < l_base && ans->buf_offset > 0) {
|
while (state < DRACO_ANS_L_BASE && ans->buf_offset > 0) {
|
||||||
state = state * io_base + ans->buf[--ans->buf_offset];
|
state = state * DRACO_ANS_IO_BASE + ans->buf[--ans->buf_offset];
|
||||||
}
|
}
|
||||||
s = static_cast<int>(state & 1);
|
s = static_cast<int>(state & 1);
|
||||||
ans->state = state >> 1;
|
ans->state = state >> 1;
|
||||||
@ -317,23 +317,23 @@ static inline int ans_read_init(struct AnsDecoder *const ans,
|
|||||||
} else {
|
} else {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
ans->state += l_base;
|
ans->state += DRACO_ANS_L_BASE;
|
||||||
if (ans->state >= l_base * io_base)
|
if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int ans_read_end(struct AnsDecoder *const ans) {
|
static inline int ans_read_end(struct AnsDecoder *const ans) {
|
||||||
return ans->state == l_base;
|
return ans->state == DRACO_ANS_L_BASE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int ans_reader_has_error(const struct AnsDecoder *const ans) {
|
static inline int ans_reader_has_error(const struct AnsDecoder *const ans) {
|
||||||
return ans->state < l_base && ans->buf_offset == 0;
|
return ans->state < DRACO_ANS_L_BASE && ans->buf_offset == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct rans_sym {
|
struct rans_sym {
|
||||||
uint32_t prob;
|
uint32_t prob;
|
||||||
uint32_t cum_prob; // not-inclusive
|
uint32_t cum_prob; // not-inclusive.
|
||||||
};
|
};
|
||||||
|
|
||||||
// Class for performing rANS encoding using a desired number of precision bits.
|
// Class for performing rANS encoding using a desired number of precision bits.
|
||||||
@ -356,7 +356,7 @@ class RAnsEncoder {
|
|||||||
inline int write_end() {
|
inline int write_end() {
|
||||||
uint32_t state;
|
uint32_t state;
|
||||||
DRACO_DCHECK_GE(ans_.state, l_rans_base);
|
DRACO_DCHECK_GE(ans_.state, l_rans_base);
|
||||||
DRACO_DCHECK_LT(ans_.state, l_rans_base * io_base);
|
DRACO_DCHECK_LT(ans_.state, l_rans_base * DRACO_ANS_IO_BASE);
|
||||||
state = ans_.state - l_rans_base;
|
state = ans_.state - l_rans_base;
|
||||||
if (state < (1 << 6)) {
|
if (state < (1 << 6)) {
|
||||||
ans_.buf[ans_.buf_offset] = (0x00 << 6) + state;
|
ans_.buf[ans_.buf_offset] = (0x00 << 6) + state;
|
||||||
@ -376,14 +376,14 @@ class RAnsEncoder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// rANS with normalization
|
// rANS with normalization.
|
||||||
// sym->prob takes the place of l_s from the paper
|
// sym->prob takes the place of l_s from the paper.
|
||||||
// rans_precision is m
|
// rans_precision is m.
|
||||||
inline void rans_write(const struct rans_sym *const sym) {
|
inline void rans_write(const struct rans_sym *const sym) {
|
||||||
const uint32_t p = sym->prob;
|
const uint32_t p = sym->prob;
|
||||||
while (ans_.state >= l_rans_base / rans_precision * io_base * p) {
|
while (ans_.state >= l_rans_base / rans_precision * DRACO_ANS_IO_BASE * p) {
|
||||||
ans_.buf[ans_.buf_offset++] = ans_.state % io_base;
|
ans_.buf[ans_.buf_offset++] = ans_.state % DRACO_ANS_IO_BASE;
|
||||||
ans_.state /= io_base;
|
ans_.state /= DRACO_ANS_IO_BASE;
|
||||||
}
|
}
|
||||||
// TODO(ostava): The division and multiplication should be optimized.
|
// TODO(ostava): The division and multiplication should be optimized.
|
||||||
ans_.state =
|
ans_.state =
|
||||||
@ -399,7 +399,7 @@ class RAnsEncoder {
|
|||||||
struct rans_dec_sym {
|
struct rans_dec_sym {
|
||||||
uint32_t val;
|
uint32_t val;
|
||||||
uint32_t prob;
|
uint32_t prob;
|
||||||
uint32_t cum_prob; // not-inclusive
|
uint32_t cum_prob; // not-inclusive.
|
||||||
};
|
};
|
||||||
|
|
||||||
// Class for performing rANS decoding using a desired number of precision bits.
|
// Class for performing rANS decoding using a desired number of precision bits.
|
||||||
@ -439,7 +439,7 @@ class RAnsDecoder {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
ans_.state += l_rans_base;
|
ans_.state += l_rans_base;
|
||||||
if (ans_.state >= l_rans_base * io_base)
|
if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -455,7 +455,7 @@ class RAnsDecoder {
|
|||||||
unsigned quo;
|
unsigned quo;
|
||||||
struct rans_dec_sym sym;
|
struct rans_dec_sym sym;
|
||||||
while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
|
while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
|
||||||
ans_.state = ans_.state * io_base + ans_.buf[--ans_.buf_offset];
|
ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
|
||||||
}
|
}
|
||||||
// |rans_precision| is a power of two compile time constant, and the below
|
// |rans_precision| is a power of two compile time constant, and the below
|
||||||
// division and modulo are going to be optimized by the compiler.
|
// division and modulo are going to be optimized by the compiler.
|
||||||
@ -507,7 +507,10 @@ class RAnsDecoder {
|
|||||||
AnsDecoder ans_;
|
AnsDecoder ans_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef ANS_DIVREM
|
#undef DRACO_ANS_DIVREM
|
||||||
|
#undef DRACO_ANS_P8_PRECISION
|
||||||
|
#undef DRACO_ANS_L_BASE
|
||||||
|
#undef DRACO_ANS_IO_BASE
|
||||||
|
|
||||||
} // namespace draco
|
} // namespace draco
|
||||||
|
|
||||||
|
@ -40,8 +40,8 @@ constexpr int ComputeRAnsPrecisionFromUniqueSymbolsBitLength(
|
|||||||
|
|
||||||
// Compute approximate frequency table size needed for storing the provided
|
// Compute approximate frequency table size needed for storing the provided
|
||||||
// symbols.
|
// symbols.
|
||||||
static int64_t ApproximateRAnsFrequencyTableBits(int32_t max_value,
|
static inline int64_t ApproximateRAnsFrequencyTableBits(
|
||||||
int num_unique_symbols) {
|
int32_t max_value, int num_unique_symbols) {
|
||||||
// Approximate number of bits for storing zero frequency entries using the
|
// Approximate number of bits for storing zero frequency entries using the
|
||||||
// run length encoding (with max length of 64).
|
// run length encoding (with max length of 64).
|
||||||
const int64_t table_zero_frequency_bits =
|
const int64_t table_zero_frequency_bits =
|
||||||
|
@ -16,8 +16,10 @@
|
|||||||
|
|
||||||
#include "draco/compression/mesh/mesh_edgebreaker_encoder.h"
|
#include "draco/compression/mesh/mesh_edgebreaker_encoder.h"
|
||||||
#include "draco/compression/mesh/mesh_sequential_encoder.h"
|
#include "draco/compression/mesh/mesh_sequential_encoder.h"
|
||||||
|
#ifdef DRACO_POINT_CLOUD_COMPRESSION_SUPPORTED
|
||||||
#include "draco/compression/point_cloud/point_cloud_kd_tree_encoder.h"
|
#include "draco/compression/point_cloud/point_cloud_kd_tree_encoder.h"
|
||||||
#include "draco/compression/point_cloud/point_cloud_sequential_encoder.h"
|
#include "draco/compression/point_cloud/point_cloud_sequential_encoder.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace draco {
|
namespace draco {
|
||||||
|
|
||||||
@ -38,6 +40,7 @@ Status ExpertEncoder::EncodeToBuffer(EncoderBuffer *out_buffer) {
|
|||||||
|
|
||||||
Status ExpertEncoder::EncodePointCloudToBuffer(const PointCloud &pc,
|
Status ExpertEncoder::EncodePointCloudToBuffer(const PointCloud &pc,
|
||||||
EncoderBuffer *out_buffer) {
|
EncoderBuffer *out_buffer) {
|
||||||
|
#ifdef DRACO_POINT_CLOUD_COMPRESSION_SUPPORTED
|
||||||
std::unique_ptr<PointCloudEncoder> encoder;
|
std::unique_ptr<PointCloudEncoder> encoder;
|
||||||
const int encoding_method = options().GetGlobalInt("encoding_method", -1);
|
const int encoding_method = options().GetGlobalInt("encoding_method", -1);
|
||||||
|
|
||||||
@ -87,6 +90,9 @@ Status ExpertEncoder::EncodePointCloudToBuffer(const PointCloud &pc,
|
|||||||
set_num_encoded_points(encoder->num_encoded_points());
|
set_num_encoded_points(encoder->num_encoded_points());
|
||||||
set_num_encoded_faces(0);
|
set_num_encoded_faces(0);
|
||||||
return OkStatus();
|
return OkStatus();
|
||||||
|
#else
|
||||||
|
return Status(Status::ERROR, "Point cloud encoding is not enabled.");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Status ExpertEncoder::EncodeMeshToBuffer(const Mesh &m,
|
Status ExpertEncoder::EncodeMeshToBuffer(const Mesh &m,
|
||||||
|
@ -31,9 +31,7 @@ bool MeshEdgebreakerEncoder::InitializeEncoder() {
|
|||||||
impl_ = nullptr;
|
impl_ = nullptr;
|
||||||
// For tiny meshes it's usually better to use the basic edgebreaker as the
|
// For tiny meshes it's usually better to use the basic edgebreaker as the
|
||||||
// overhead of the predictive one may turn out to be too big.
|
// overhead of the predictive one may turn out to be too big.
|
||||||
// TODO(ostava): For now we have a set limit for forcing the basic edgebreaker
|
// TODO(b/111065939): Check if this can be improved.
|
||||||
// based on the number of faces, but a more complex heuristic may be used if
|
|
||||||
// needed.
|
|
||||||
const bool is_tiny_mesh = mesh()->num_faces() < 1000;
|
const bool is_tiny_mesh = mesh()->num_faces() < 1000;
|
||||||
|
|
||||||
int selected_edgebreaker_method =
|
int selected_edgebreaker_method =
|
||||||
@ -81,7 +79,7 @@ bool MeshEdgebreakerEncoder::EncodeAttributesEncoderIdentifier(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MeshEdgebreakerEncoder::EncodeConnectivity() {
|
Status MeshEdgebreakerEncoder::EncodeConnectivity() {
|
||||||
return impl_->EncodeConnectivity();
|
return impl_->EncodeConnectivity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ class MeshEdgebreakerEncoder : public MeshEncoder {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool InitializeEncoder() override;
|
bool InitializeEncoder() override;
|
||||||
bool EncodeConnectivity() override;
|
Status EncodeConnectivity() override;
|
||||||
bool GenerateAttributesEncoder(int32_t att_id) override;
|
bool GenerateAttributesEncoder(int32_t att_id) override;
|
||||||
bool EncodeAttributesEncoderIdentifier(int32_t att_encoder_id) override;
|
bool EncodeAttributesEncoderIdentifier(int32_t att_encoder_id) override;
|
||||||
void ComputeNumberOfEncodedPoints() override;
|
void ComputeNumberOfEncodedPoints() override;
|
||||||
|
@ -263,7 +263,7 @@ bool MeshEdgebreakerEncoderImpl<TraversalEncoder>::
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class TraversalEncoder>
|
template <class TraversalEncoder>
|
||||||
bool MeshEdgebreakerEncoderImpl<TraversalEncoder>::EncodeConnectivity() {
|
Status MeshEdgebreakerEncoderImpl<TraversalEncoder>::EncodeConnectivity() {
|
||||||
// To encode the mesh, we need face connectivity data stored in a corner
|
// To encode the mesh, we need face connectivity data stored in a corner
|
||||||
// table. To compute the connectivity we must use indices associated with
|
// table. To compute the connectivity we must use indices associated with
|
||||||
// POSITION attribute, because they define which edges can be connected
|
// POSITION attribute, because they define which edges can be connected
|
||||||
@ -279,7 +279,7 @@ bool MeshEdgebreakerEncoderImpl<TraversalEncoder>::EncodeConnectivity() {
|
|||||||
corner_table_->num_faces() == corner_table_->NumDegeneratedFaces()) {
|
corner_table_->num_faces() == corner_table_->NumDegeneratedFaces()) {
|
||||||
// Failed to construct the corner table.
|
// Failed to construct the corner table.
|
||||||
// TODO(ostava): Add better error reporting.
|
// TODO(ostava): Add better error reporting.
|
||||||
return false;
|
return Status(Status::ERROR, "All triangles are degenerate.");
|
||||||
}
|
}
|
||||||
|
|
||||||
traversal_encoder_.Init(this);
|
traversal_encoder_.Init(this);
|
||||||
@ -317,10 +317,10 @@ bool MeshEdgebreakerEncoderImpl<TraversalEncoder>::EncodeConnectivity() {
|
|||||||
pos_encoding_data_.num_values = 0;
|
pos_encoding_data_.num_values = 0;
|
||||||
|
|
||||||
if (!FindHoles())
|
if (!FindHoles())
|
||||||
return false;
|
return Status(Status::ERROR, "Failed to process mesh holes.");
|
||||||
|
|
||||||
if (!InitAttributeData())
|
if (!InitAttributeData())
|
||||||
return false;
|
return Status(Status::ERROR, "Failed to initialize attribute data.");
|
||||||
|
|
||||||
const uint8_t num_attribute_data =
|
const uint8_t num_attribute_data =
|
||||||
static_cast<uint8_t>(attribute_data_.size());
|
static_cast<uint8_t>(attribute_data_.size());
|
||||||
@ -376,7 +376,7 @@ bool MeshEdgebreakerEncoderImpl<TraversalEncoder>::EncodeConnectivity() {
|
|||||||
if (opp_face_id != kInvalidFaceIndex &&
|
if (opp_face_id != kInvalidFaceIndex &&
|
||||||
!visited_faces_[opp_face_id.value()]) {
|
!visited_faces_[opp_face_id.value()]) {
|
||||||
if (!EncodeConnectivityFromCorner(opp_id))
|
if (!EncodeConnectivityFromCorner(opp_id))
|
||||||
return false;
|
return Status(Status::ERROR, "Failed to encode mesh component.");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Boundary configuration. We start on a boundary rather than on a face.
|
// Boundary configuration. We start on a boundary rather than on a face.
|
||||||
@ -385,7 +385,7 @@ bool MeshEdgebreakerEncoderImpl<TraversalEncoder>::EncodeConnectivity() {
|
|||||||
// Start processing the face opposite to the boundary edge (the face
|
// Start processing the face opposite to the boundary edge (the face
|
||||||
// containing the start_corner).
|
// containing the start_corner).
|
||||||
if (!EncodeConnectivityFromCorner(start_corner))
|
if (!EncodeConnectivityFromCorner(start_corner))
|
||||||
return false;
|
return Status(Status::ERROR, "Failed to encode mesh component.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Reverse the order of connectivity corners to match the order in which
|
// Reverse the order of connectivity corners to match the order in which
|
||||||
@ -417,11 +417,11 @@ bool MeshEdgebreakerEncoderImpl<TraversalEncoder>::EncodeConnectivity() {
|
|||||||
|
|
||||||
// Append the traversal buffer.
|
// Append the traversal buffer.
|
||||||
if (!EncodeSplitData())
|
if (!EncodeSplitData())
|
||||||
return false;
|
return Status(Status::ERROR, "Failed to encode split data.");
|
||||||
encoder_->buffer()->Encode(traversal_encoder_.buffer().data(),
|
encoder_->buffer()->Encode(traversal_encoder_.buffer().data(),
|
||||||
traversal_encoder_.buffer().size());
|
traversal_encoder_.buffer().size());
|
||||||
|
|
||||||
return true;
|
return OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class TraversalEncoder>
|
template <class TraversalEncoder>
|
||||||
|
@ -45,7 +45,7 @@ class MeshEdgebreakerEncoderImpl : public MeshEdgebreakerEncoderImplInterface {
|
|||||||
|
|
||||||
bool GenerateAttributesEncoder(int32_t att_id) override;
|
bool GenerateAttributesEncoder(int32_t att_id) override;
|
||||||
bool EncodeAttributesEncoderIdentifier(int32_t att_encoder_id) override;
|
bool EncodeAttributesEncoderIdentifier(int32_t att_encoder_id) override;
|
||||||
bool EncodeConnectivity() override;
|
Status EncodeConnectivity() override;
|
||||||
|
|
||||||
const CornerTable *GetCornerTable() const override {
|
const CornerTable *GetCornerTable() const override {
|
||||||
return corner_table_.get();
|
return corner_table_.get();
|
||||||
|
@ -41,7 +41,7 @@ class MeshEdgebreakerEncoderImplInterface {
|
|||||||
int att_id) const = 0;
|
int att_id) const = 0;
|
||||||
virtual bool GenerateAttributesEncoder(int32_t att_id) = 0;
|
virtual bool GenerateAttributesEncoder(int32_t att_id) = 0;
|
||||||
virtual bool EncodeAttributesEncoderIdentifier(int32_t att_encoder_id) = 0;
|
virtual bool EncodeAttributesEncoderIdentifier(int32_t att_encoder_id) = 0;
|
||||||
virtual bool EncodeConnectivity() = 0;
|
virtual Status EncodeConnectivity() = 0;
|
||||||
|
|
||||||
// Returns corner table of the encoded mesh.
|
// Returns corner table of the encoded mesh.
|
||||||
virtual const CornerTable *GetCornerTable() const = 0;
|
virtual const CornerTable *GetCornerTable() const = 0;
|
||||||
|
@ -23,12 +23,11 @@ void MeshEncoder::SetMesh(const Mesh &m) {
|
|||||||
SetPointCloud(m);
|
SetPointCloud(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MeshEncoder::EncodeGeometryData() {
|
Status MeshEncoder::EncodeGeometryData() {
|
||||||
if (!EncodeConnectivity())
|
DRACO_RETURN_IF_ERROR(EncodeConnectivity());
|
||||||
return false;
|
|
||||||
if (options()->GetGlobalBool("store_number_of_encoded_faces", false))
|
if (options()->GetGlobalBool("store_number_of_encoded_faces", false))
|
||||||
ComputeNumberOfEncodedFaces();
|
ComputeNumberOfEncodedFaces();
|
||||||
return true;
|
return OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace draco
|
} // namespace draco
|
||||||
|
@ -61,10 +61,10 @@ class MeshEncoder : public PointCloudEncoder {
|
|||||||
const Mesh *mesh() const { return mesh_; }
|
const Mesh *mesh() const { return mesh_; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool EncodeGeometryData() override;
|
Status EncodeGeometryData() override;
|
||||||
|
|
||||||
// Needs to be implemented by the derived classes.
|
// Needs to be implemented by the derived classes.
|
||||||
virtual bool EncodeConnectivity() = 0;
|
virtual Status EncodeConnectivity() = 0;
|
||||||
|
|
||||||
// Computes and sets the num_encoded_faces_ for the encoder.
|
// Computes and sets the num_encoded_faces_ for the encoder.
|
||||||
virtual void ComputeNumberOfEncodedFaces() = 0;
|
virtual void ComputeNumberOfEncodedFaces() = 0;
|
||||||
|
@ -87,7 +87,7 @@ TEST_P(MeshEncoderTest, EncodeGoldenMesh) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(MeshEncoderTests, MeshEncoderTest,
|
INSTANTIATE_TEST_SUITE_P(MeshEncoderTests, MeshEncoderTest,
|
||||||
::testing::Values("sequential", "edgebreaker"));
|
::testing::Values("sequential", "edgebreaker"));
|
||||||
|
|
||||||
} // namespace draco
|
} // namespace draco
|
||||||
|
@ -25,7 +25,7 @@ namespace draco {
|
|||||||
|
|
||||||
MeshSequentialEncoder::MeshSequentialEncoder() {}
|
MeshSequentialEncoder::MeshSequentialEncoder() {}
|
||||||
|
|
||||||
bool MeshSequentialEncoder::EncodeConnectivity() {
|
Status MeshSequentialEncoder::EncodeConnectivity() {
|
||||||
// Serialize indices.
|
// Serialize indices.
|
||||||
const uint32_t num_faces = mesh()->num_faces();
|
const uint32_t num_faces = mesh()->num_faces();
|
||||||
EncodeVarint(num_faces, buffer());
|
EncodeVarint(num_faces, buffer());
|
||||||
@ -38,7 +38,7 @@ bool MeshSequentialEncoder::EncodeConnectivity() {
|
|||||||
// 0 = Encode compressed indices.
|
// 0 = Encode compressed indices.
|
||||||
buffer()->Encode(static_cast<uint8_t>(0));
|
buffer()->Encode(static_cast<uint8_t>(0));
|
||||||
if (!CompressAndEncodeIndices())
|
if (!CompressAndEncodeIndices())
|
||||||
return false;
|
return Status(Status::ERROR, "Failed to compress connectivity.");
|
||||||
} else {
|
} else {
|
||||||
// 1 = Encode indices directly.
|
// 1 = Encode indices directly.
|
||||||
buffer()->Encode(static_cast<uint8_t>(1));
|
buffer()->Encode(static_cast<uint8_t>(1));
|
||||||
@ -77,7 +77,7 @@ bool MeshSequentialEncoder::EncodeConnectivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MeshSequentialEncoder::GenerateAttributesEncoder(int32_t att_id) {
|
bool MeshSequentialEncoder::GenerateAttributesEncoder(int32_t att_id) {
|
||||||
|
@ -42,7 +42,7 @@ class MeshSequentialEncoder : public MeshEncoder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool EncodeConnectivity() override;
|
Status EncodeConnectivity() override;
|
||||||
bool GenerateAttributesEncoder(int32_t att_id) override;
|
bool GenerateAttributesEncoder(int32_t att_id) override;
|
||||||
void ComputeNumberOfEncodedPoints() override;
|
void ComputeNumberOfEncodedPoints() override;
|
||||||
void ComputeNumberOfEncodedFaces() override;
|
void ComputeNumberOfEncodedFaces() override;
|
||||||
|
@ -43,8 +43,7 @@ Status PointCloudEncoder::Encode(const EncoderOptions &options,
|
|||||||
return Status(Status::ERROR, "Failed to initialize encoder.");
|
return Status(Status::ERROR, "Failed to initialize encoder.");
|
||||||
if (!EncodeEncoderData())
|
if (!EncodeEncoderData())
|
||||||
return Status(Status::ERROR, "Failed to encode internal data.");
|
return Status(Status::ERROR, "Failed to encode internal data.");
|
||||||
if (!EncodeGeometryData())
|
DRACO_RETURN_IF_ERROR(EncodeGeometryData());
|
||||||
return Status(Status::ERROR, "Failed to encode geometry data.");
|
|
||||||
if (!EncodePointAttributes())
|
if (!EncodePointAttributes())
|
||||||
return Status(Status::ERROR, "Failed to encode point attributes.");
|
return Status(Status::ERROR, "Failed to encode point attributes.");
|
||||||
if (options.GetGlobalBool("store_number_of_encoded_points", false))
|
if (options.GetGlobalBool("store_number_of_encoded_points", false))
|
||||||
|
@ -85,7 +85,7 @@ class PointCloudEncoder {
|
|||||||
virtual bool EncodeEncoderData() { return true; }
|
virtual bool EncodeEncoderData() { return true; }
|
||||||
|
|
||||||
// Encodes any global geometry data (such as the number of points).
|
// Encodes any global geometry data (such as the number of points).
|
||||||
virtual bool EncodeGeometryData() { return true; }
|
virtual Status EncodeGeometryData() { return OkStatus(); }
|
||||||
|
|
||||||
// encode all attribute values. The attribute encoders are sorted to resolve
|
// encode all attribute values. The attribute encoders are sorted to resolve
|
||||||
// any attribute dependencies and all the encoded data is stored into the
|
// any attribute dependencies and all the encoded data is stored into the
|
||||||
|
@ -17,10 +17,10 @@
|
|||||||
|
|
||||||
namespace draco {
|
namespace draco {
|
||||||
|
|
||||||
bool PointCloudKdTreeEncoder::EncodeGeometryData() {
|
Status PointCloudKdTreeEncoder::EncodeGeometryData() {
|
||||||
const int32_t num_points = point_cloud()->num_points();
|
const int32_t num_points = point_cloud()->num_points();
|
||||||
buffer()->Encode(num_points);
|
buffer()->Encode(num_points);
|
||||||
return true;
|
return OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PointCloudKdTreeEncoder::GenerateAttributesEncoder(int32_t att_id) {
|
bool PointCloudKdTreeEncoder::GenerateAttributesEncoder(int32_t att_id) {
|
||||||
|
@ -35,7 +35,7 @@ class PointCloudKdTreeEncoder : public PointCloudEncoder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool EncodeGeometryData() override;
|
Status EncodeGeometryData() override;
|
||||||
bool GenerateAttributesEncoder(int32_t att_id) override;
|
bool GenerateAttributesEncoder(int32_t att_id) override;
|
||||||
void ComputeNumberOfEncodedPoints() override;
|
void ComputeNumberOfEncodedPoints() override;
|
||||||
};
|
};
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
|
|
||||||
namespace draco {
|
namespace draco {
|
||||||
|
|
||||||
bool PointCloudSequentialEncoder::EncodeGeometryData() {
|
Status PointCloudSequentialEncoder::EncodeGeometryData() {
|
||||||
const int32_t num_points = point_cloud()->num_points();
|
const int32_t num_points = point_cloud()->num_points();
|
||||||
buffer()->Encode(num_points);
|
buffer()->Encode(num_points);
|
||||||
return true;
|
return OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PointCloudSequentialEncoder::GenerateAttributesEncoder(int32_t att_id) {
|
bool PointCloudSequentialEncoder::GenerateAttributesEncoder(int32_t att_id) {
|
||||||
|
@ -33,7 +33,7 @@ class PointCloudSequentialEncoder : public PointCloudEncoder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool EncodeGeometryData() override;
|
Status EncodeGeometryData() override;
|
||||||
bool GenerateAttributesEncoder(int32_t att_id) override;
|
bool GenerateAttributesEncoder(int32_t att_id) override;
|
||||||
void ComputeNumberOfEncodedPoints() override;
|
void ComputeNumberOfEncodedPoints() override;
|
||||||
};
|
};
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
#include "draco/core/data_buffer.h"
|
#include "draco/core/data_buffer.h"
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
namespace draco {
|
namespace draco {
|
||||||
|
|
||||||
|
@ -53,6 +53,11 @@ inline std::unique_ptr<Mesh> ReadMeshFromTestFile(const std::string &file_name,
|
|||||||
const std::string path = GetTestFileFullPath(file_name);
|
const std::string path = GetTestFileFullPath(file_name);
|
||||||
return ReadMeshFromFile(path, use_metadata).value();
|
return ReadMeshFromFile(path, use_metadata).value();
|
||||||
}
|
}
|
||||||
|
inline std::unique_ptr<Mesh> ReadMeshFromTestFile(const std::string &file_name,
|
||||||
|
const Options &options) {
|
||||||
|
const std::string path = GetTestFileFullPath(file_name);
|
||||||
|
return ReadMeshFromFile(path, options).value();
|
||||||
|
}
|
||||||
|
|
||||||
inline std::unique_ptr<PointCloud> ReadPointCloudFromTestFile(
|
inline std::unique_ptr<PointCloud> ReadPointCloudFromTestFile(
|
||||||
const std::string &file_name) {
|
const std::string &file_name) {
|
||||||
|
@ -41,4 +41,21 @@ int32_t DataTypeLength(DataType dt) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsDataTypeIntegral(DataType dt) {
|
||||||
|
switch (dt) {
|
||||||
|
case DT_INT8:
|
||||||
|
case DT_UINT8:
|
||||||
|
case DT_INT16:
|
||||||
|
case DT_UINT16:
|
||||||
|
case DT_INT32:
|
||||||
|
case DT_UINT32:
|
||||||
|
case DT_INT64:
|
||||||
|
case DT_UINT64:
|
||||||
|
case DT_BOOL:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace draco
|
} // namespace draco
|
||||||
|
@ -41,6 +41,11 @@ enum DataType {
|
|||||||
|
|
||||||
int32_t DataTypeLength(DataType dt);
|
int32_t DataTypeLength(DataType dt);
|
||||||
|
|
||||||
|
// Equivalent to std::is_integral for draco::DataType. Returns true for all
|
||||||
|
// signed and unsigned integer types (including DT_BOOL). Returns false
|
||||||
|
// otherwise.
|
||||||
|
bool IsDataTypeIntegral(DataType dt);
|
||||||
|
|
||||||
} // namespace draco
|
} // namespace draco
|
||||||
|
|
||||||
#endif // DRACO_CORE_DRACO_TYPES_H_
|
#endif // DRACO_CORE_DRACO_TYPES_H_
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
namespace draco {
|
namespace draco {
|
||||||
|
|
||||||
// Draco version is comprised of <major>.<minor>.<revision>.
|
// Draco version is comprised of <major>.<minor>.<revision>.
|
||||||
static const char kDracoVersion[] = "1.3.4";
|
static const char kDracoVersion[] = "1.3.5";
|
||||||
|
|
||||||
const char *Version() { return kDracoVersion; }
|
const char *Version() { return kDracoVersion; }
|
||||||
|
|
||||||
|
@ -32,12 +32,27 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
namespace draco {
|
namespace draco {
|
||||||
|
|
||||||
|
#ifndef DISALLOW_COPY_AND_ASSIGN
|
||||||
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
|
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
|
||||||
TypeName(const TypeName &) = delete; \
|
TypeName(const TypeName &) = delete; \
|
||||||
void operator=(const TypeName &) = delete;
|
void operator=(const TypeName &) = delete;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef FALLTHROUGH_INTENDED
|
#ifndef FALLTHROUGH_INTENDED
|
||||||
#define FALLTHROUGH_INTENDED void(0);
|
#if defined(__clang__) && defined(__has_warning)
|
||||||
|
#if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")
|
||||||
|
#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
|
||||||
|
#endif
|
||||||
|
#elif defined(__GNUC__) && __GNUC__ >= 7
|
||||||
|
#define FALLTHROUGH_INTENDED [[gnu::fallthrough]]
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// If FALLTHROUGH_INTENDED is still not defined, define it.
|
||||||
|
#ifndef FALLTHROUGH_INTENDED
|
||||||
|
#define FALLTHROUGH_INTENDED \
|
||||||
|
do { \
|
||||||
|
} while (0)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef LOG
|
#ifndef LOG
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
#include "draco/core/vector_d.h"
|
||||||
|
|
||||||
#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
|
#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
|
||||||
|
|
||||||
// Returns floor(sqrt(x)) where x is an integer number. The main intend of this
|
// Returns floor(sqrt(x)) where x is an integer number. The main intend of this
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
#include "draco/core/math_utils.h"
|
#include "draco/core/math_utils.h"
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
#include <random>
|
#include <random>
|
||||||
|
|
||||||
#include "draco/core/draco_test_base.h"
|
#include "draco/core/draco_test_base.h"
|
||||||
|
|
||||||
|
using draco::Vector3f;
|
||||||
|
|
||||||
TEST(MathUtils, Mod) { EXPECT_EQ(DRACO_INCREMENT_MOD(1, 1 << 1), 0); }
|
TEST(MathUtils, Mod) { EXPECT_EQ(DRACO_INCREMENT_MOD(1, 1 << 1), 0); }
|
||||||
|
|
||||||
TEST(MathUtils, IntSqrt) {
|
TEST(MathUtils, IntSqrt) {
|
||||||
|
@ -16,11 +16,17 @@
|
|||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace draco {
|
namespace draco {
|
||||||
|
|
||||||
Options::Options() {}
|
Options::Options() {}
|
||||||
|
|
||||||
|
void Options::MergeAndReplace(const Options &other_options) {
|
||||||
|
for (const auto &item : other_options.options_)
|
||||||
|
options_[item.first] = item.second;
|
||||||
|
}
|
||||||
|
|
||||||
void Options::SetInt(const std::string &name, int val) {
|
void Options::SetInt(const std::string &name, int val) {
|
||||||
options_[name] = std::to_string(val);
|
options_[name] = std::to_string(val);
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,11 @@ namespace draco {
|
|||||||
class Options {
|
class Options {
|
||||||
public:
|
public:
|
||||||
Options();
|
Options();
|
||||||
|
|
||||||
|
// Merges |other_options| on top of the existing options of this instance
|
||||||
|
// replacing all entries that are present in both options instances.
|
||||||
|
void MergeAndReplace(const Options &other_options);
|
||||||
|
|
||||||
void SetInt(const std::string &name, int val);
|
void SetInt(const std::string &name, int val);
|
||||||
void SetFloat(const std::string &name, float val);
|
void SetFloat(const std::string &name, float val);
|
||||||
void SetBool(const std::string &name, bool val);
|
void SetBool(const std::string &name, bool val);
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
#ifndef DRACO_CORE_STATUSOR_H_
|
#ifndef DRACO_CORE_STATUS_OR_H_
|
||||||
#define DRACO_CORE_STATUSOR_H_
|
#define DRACO_CORE_STATUS_OR_H_
|
||||||
|
|
||||||
#include "draco/core/macros.h"
|
#include "draco/core/macros.h"
|
||||||
#include "draco/core/status.h"
|
#include "draco/core/status.h"
|
||||||
@ -78,4 +78,4 @@ class StatusOr {
|
|||||||
|
|
||||||
} // namespace draco
|
} // namespace draco
|
||||||
|
|
||||||
#endif // DRACO_CORE_STATUSOR_H_
|
#endif // DRACO_CORE_STATUS_OR_H_
|
@ -24,16 +24,20 @@
|
|||||||
|
|
||||||
namespace draco {
|
namespace draco {
|
||||||
// D-dimensional vector class with basic operations.
|
// D-dimensional vector class with basic operations.
|
||||||
template <class CoeffT, int dimension_t>
|
template <class ScalarT, int dimension_t>
|
||||||
class VectorD {
|
class VectorD {
|
||||||
public:
|
public:
|
||||||
typedef VectorD<CoeffT, dimension_t> Self;
|
|
||||||
typedef CoeffT CoefficientType;
|
|
||||||
static constexpr int dimension = dimension_t;
|
static constexpr int dimension = dimension_t;
|
||||||
|
|
||||||
|
typedef ScalarT Scalar;
|
||||||
|
typedef VectorD<Scalar, dimension_t> Self;
|
||||||
|
|
||||||
|
// TODO(hemmer): Deprecate.
|
||||||
|
typedef ScalarT CoefficientType;
|
||||||
|
|
||||||
VectorD() {
|
VectorD() {
|
||||||
for (int i = 0; i < dimension_t; ++i)
|
for (int i = 0; i < dimension; ++i)
|
||||||
(*this)[i] = CoeffT(0);
|
(*this)[i] = Scalar(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The following constructor does not compile in opt mode, which for now led
|
// The following constructor does not compile in opt mode, which for now led
|
||||||
@ -42,58 +46,75 @@ class VectorD {
|
|||||||
// template <typename... Args>
|
// template <typename... Args>
|
||||||
// explicit VectorD(Args... args) : v_({args...}) {}
|
// explicit VectorD(Args... args) : v_({args...}) {}
|
||||||
|
|
||||||
VectorD(const CoeffT &c0, const CoeffT &c1) : v_({{c0, c1}}) {
|
VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
|
||||||
DRACO_DCHECK_EQ(dimension_t, 2);
|
DRACO_DCHECK_EQ(dimension, 2);
|
||||||
v_[0] = c0;
|
v_[0] = c0;
|
||||||
v_[1] = c1;
|
v_[1] = c1;
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorD(const CoeffT &c0, const CoeffT &c1, const CoeffT &c2)
|
VectorD(const Scalar &c0, const Scalar &c1, const Scalar &c2)
|
||||||
: v_({{c0, c1, c2}}) {
|
: v_({{c0, c1, c2}}) {
|
||||||
DRACO_DCHECK_EQ(dimension_t, 3);
|
DRACO_DCHECK_EQ(dimension, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorD(const CoeffT &c0, const CoeffT &c1, const CoeffT &c2,
|
VectorD(const Scalar &c0, const Scalar &c1, const Scalar &c2,
|
||||||
const CoeffT &c3)
|
const Scalar &c3)
|
||||||
: v_({{c0, c1, c2, c3}}) {
|
: v_({{c0, c1, c2, c3}}) {
|
||||||
DRACO_DCHECK_EQ(dimension_t, 4);
|
DRACO_DCHECK_EQ(dimension, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorD(const CoeffT &c0, const CoeffT &c1, const CoeffT &c2,
|
VectorD(const Scalar &c0, const Scalar &c1, const Scalar &c2,
|
||||||
const CoeffT &c3, const CoeffT &c4)
|
const Scalar &c3, const Scalar &c4)
|
||||||
: v_({{c0, c1, c2, c3, c4}}) {
|
: v_({{c0, c1, c2, c3, c4}}) {
|
||||||
DRACO_DCHECK_EQ(dimension_t, 5);
|
DRACO_DCHECK_EQ(dimension, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorD(const CoeffT &c0, const CoeffT &c1, const CoeffT &c2,
|
VectorD(const Scalar &c0, const Scalar &c1, const Scalar &c2,
|
||||||
const CoeffT &c3, const CoeffT &c4, const CoeffT &c5)
|
const Scalar &c3, const Scalar &c4, const Scalar &c5)
|
||||||
: v_({{c0, c1, c2, c3, c4, c5}}) {
|
: v_({{c0, c1, c2, c3, c4, c5}}) {
|
||||||
DRACO_DCHECK_EQ(dimension_t, 6);
|
DRACO_DCHECK_EQ(dimension, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorD(const CoeffT &c0, const CoeffT &c1, const CoeffT &c2,
|
VectorD(const Scalar &c0, const Scalar &c1, const Scalar &c2,
|
||||||
const CoeffT &c3, const CoeffT &c4, const CoeffT &c5,
|
const Scalar &c3, const Scalar &c4, const Scalar &c5,
|
||||||
const CoeffT &c6)
|
const Scalar &c6)
|
||||||
: v_({{c0, c1, c2, c3, c4, c5, c6}}) {
|
: v_({{c0, c1, c2, c3, c4, c5, c6}}) {
|
||||||
DRACO_DCHECK_EQ(dimension_t, 7);
|
DRACO_DCHECK_EQ(dimension, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorD(const Self &o) {
|
VectorD(const Self &o) {
|
||||||
for (int i = 0; i < dimension_t; ++i)
|
for (int i = 0; i < dimension; ++i)
|
||||||
(*this)[i] = o[i];
|
(*this)[i] = o[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
CoeffT &operator[](int i) { return v_[i]; }
|
// Constructs the vector from another vector with a different data type or a
|
||||||
const CoeffT &operator[](int i) const { return v_[i]; }
|
// different number of components. If the |src_vector| has more components
|
||||||
|
// than |this| vector, the excess components are truncated. If the
|
||||||
|
// |src_vector| has fewer components than |this| vector, the remaining
|
||||||
|
// components are padded with 0.
|
||||||
|
// Note that the constructor is intentionally explicit to avoid accidental
|
||||||
|
// conversions between different vector types.
|
||||||
|
template <class OtherScalarT, int other_dimension_t>
|
||||||
|
explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
|
||||||
|
for (int i = 0; i < dimension; ++i) {
|
||||||
|
if (i < other_dimension_t)
|
||||||
|
v_[i] = Scalar(src_vector[i]);
|
||||||
|
else
|
||||||
|
v_[i] = Scalar(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Scalar &operator[](int i) { return v_[i]; }
|
||||||
|
const Scalar &operator[](int i) const { return v_[i]; }
|
||||||
// TODO(hemmer): remove.
|
// TODO(hemmer): remove.
|
||||||
// Similar to interface of Eigen library.
|
// Similar to interface of Eigen library.
|
||||||
CoeffT &operator()(int i) { return v_[i]; }
|
Scalar &operator()(int i) { return v_[i]; }
|
||||||
const CoeffT &operator()(int i) const { return v_[i]; }
|
const Scalar &operator()(int i) const { return v_[i]; }
|
||||||
|
|
||||||
// Unary operators.
|
// Unary operators.
|
||||||
Self operator-() const {
|
Self operator-() const {
|
||||||
Self ret;
|
Self ret;
|
||||||
for (int i = 0; i < dimension_t; ++i) {
|
for (int i = 0; i < dimension; ++i) {
|
||||||
ret[i] = -(*this)[i];
|
ret[i] = -(*this)[i];
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@ -102,7 +123,7 @@ class VectorD {
|
|||||||
// Binary operators.
|
// Binary operators.
|
||||||
Self operator+(const Self &o) const {
|
Self operator+(const Self &o) const {
|
||||||
Self ret;
|
Self ret;
|
||||||
for (int i = 0; i < dimension_t; ++i) {
|
for (int i = 0; i < dimension; ++i) {
|
||||||
ret[i] = (*this)[i] + o[i];
|
ret[i] = (*this)[i] + o[i];
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@ -110,30 +131,46 @@ class VectorD {
|
|||||||
|
|
||||||
Self operator-(const Self &o) const {
|
Self operator-(const Self &o) const {
|
||||||
Self ret;
|
Self ret;
|
||||||
for (int i = 0; i < dimension_t; ++i) {
|
for (int i = 0; i < dimension; ++i) {
|
||||||
ret[i] = (*this)[i] - o[i];
|
ret[i] = (*this)[i] - o[i];
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
Self operator*(const CoeffT &o) const {
|
Self operator*(const Scalar &o) const {
|
||||||
Self ret;
|
Self ret;
|
||||||
for (int i = 0; i < dimension_t; ++i) {
|
for (int i = 0; i < dimension; ++i) {
|
||||||
ret[i] = (*this)[i] * o;
|
ret[i] = (*this)[i] * o;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
Self operator/(const CoeffT &o) const {
|
Self operator/(const Scalar &o) const {
|
||||||
Self ret;
|
Self ret;
|
||||||
for (int i = 0; i < dimension_t; ++i) {
|
for (int i = 0; i < dimension; ++i) {
|
||||||
ret[i] = (*this)[i] / o;
|
ret[i] = (*this)[i] / o;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Self operator+(const Scalar &o) const {
|
||||||
|
Self ret;
|
||||||
|
for (int i = 0; i < dimension; ++i) {
|
||||||
|
ret[i] = (*this)[i] + o;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
Self operator-(const Scalar &o) const {
|
||||||
|
Self ret;
|
||||||
|
for (int i = 0; i < dimension; ++i) {
|
||||||
|
ret[i] = (*this)[i] - o;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
bool operator==(const Self &o) const {
|
bool operator==(const Self &o) const {
|
||||||
for (int i = 0; i < dimension_t; ++i) {
|
for (int i = 0; i < dimension; ++i) {
|
||||||
if ((*this)[i] != o[i])
|
if ((*this)[i] != o[i])
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -143,67 +180,75 @@ class VectorD {
|
|||||||
bool operator!=(const Self &x) const { return !((*this) == x); }
|
bool operator!=(const Self &x) const { return !((*this) == x); }
|
||||||
|
|
||||||
bool operator<(const Self &x) const {
|
bool operator<(const Self &x) const {
|
||||||
for (int i = 0; i < dimension_t - 1; ++i) {
|
for (int i = 0; i < dimension - 1; ++i) {
|
||||||
if (v_[i] < x.v_[i])
|
if (v_[i] < x.v_[i])
|
||||||
return true;
|
return true;
|
||||||
if (v_[i] > x.v_[i])
|
if (v_[i] > x.v_[i])
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Only one check needed for the last dimension.
|
// Only one check needed for the last dimension.
|
||||||
if (v_[dimension_t - 1] < x.v_[dimension_t - 1])
|
if (v_[dimension - 1] < x.v_[dimension - 1])
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Functions.
|
// Functions.
|
||||||
CoeffT SquaredNorm() const { return this->Dot(*this); }
|
Scalar SquaredNorm() const { return this->Dot(*this); }
|
||||||
|
|
||||||
// Computes L1, the sum of absolute values of all entries.
|
// Computes L1, the sum of absolute values of all entries.
|
||||||
CoeffT AbsSum() const {
|
Scalar AbsSum() const {
|
||||||
CoeffT result(0);
|
Scalar result(0);
|
||||||
for (int i = 0; i < dimension_t; ++i) {
|
for (int i = 0; i < dimension; ++i) {
|
||||||
result += std::abs(v_[i]);
|
result += std::abs(v_[i]);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoeffT Dot(const Self &o) const {
|
Scalar Dot(const Self &o) const {
|
||||||
CoeffT ret(0);
|
Scalar ret(0);
|
||||||
for (int i = 0; i < dimension_t; ++i) {
|
for (int i = 0; i < dimension; ++i) {
|
||||||
ret += (*this)[i] * o[i];
|
ret += (*this)[i] * o[i];
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Normalize() {
|
void Normalize() {
|
||||||
const CoeffT magnitude = std::sqrt(this->SquaredNorm());
|
const Scalar magnitude = std::sqrt(this->SquaredNorm());
|
||||||
if (magnitude == 0) {
|
if (magnitude == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < dimension_t; ++i) {
|
for (int i = 0; i < dimension; ++i) {
|
||||||
(*this)[i] /= magnitude;
|
(*this)[i] /= magnitude;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CoeffT *data() { return &(v_[0]); }
|
const Scalar &MaxCoeff() const {
|
||||||
|
return *std::max_element(v_.begin(), v_.end());
|
||||||
|
}
|
||||||
|
|
||||||
|
const Scalar &MinCoeff() const {
|
||||||
|
return *std::min_element(v_.begin(), v_.end());
|
||||||
|
}
|
||||||
|
|
||||||
|
Scalar *data() { return &(v_[0]); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::array<CoeffT, dimension_t> v_;
|
std::array<Scalar, dimension> v_;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Scalar multiplication from the other side too.
|
// Scalar multiplication from the other side too.
|
||||||
template <class CoeffT, int dimension_t>
|
template <class ScalarT, int dimension_t>
|
||||||
VectorD<CoeffT, dimension_t> operator*(const CoeffT &o,
|
VectorD<ScalarT, dimension_t> operator*(
|
||||||
const VectorD<CoeffT, dimension_t> &v) {
|
const ScalarT &o, const VectorD<ScalarT, dimension_t> &v) {
|
||||||
return v * o;
|
return v * o;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculates the squared distance between two points.
|
// Calculates the squared distance between two points.
|
||||||
template <class CoeffT, int dimension_t>
|
template <class ScalarT, int dimension_t>
|
||||||
CoeffT SquaredDistance(const VectorD<CoeffT, dimension_t> &v1,
|
ScalarT SquaredDistance(const VectorD<ScalarT, dimension_t> &v1,
|
||||||
const VectorD<CoeffT, dimension_t> &v2) {
|
const VectorD<ScalarT, dimension_t> &v2) {
|
||||||
CoeffT difference;
|
ScalarT difference;
|
||||||
CoeffT squared_distance = 0;
|
ScalarT squared_distance = 0;
|
||||||
// Check each index separately so difference is never negative and underflow
|
// Check each index separately so difference is never negative and underflow
|
||||||
// is avoided for unsigned types.
|
// is avoided for unsigned types.
|
||||||
for (int i = 0; i < dimension_t; ++i) {
|
for (int i = 0; i < dimension_t; ++i) {
|
||||||
@ -218,22 +263,22 @@ CoeffT SquaredDistance(const VectorD<CoeffT, dimension_t> &v1,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Global function computing the cross product of two 3D vectors.
|
// Global function computing the cross product of two 3D vectors.
|
||||||
template <class CoeffT>
|
template <class ScalarT>
|
||||||
VectorD<CoeffT, 3> CrossProduct(const VectorD<CoeffT, 3> &u,
|
VectorD<ScalarT, 3> CrossProduct(const VectorD<ScalarT, 3> &u,
|
||||||
const VectorD<CoeffT, 3> &v) {
|
const VectorD<ScalarT, 3> &v) {
|
||||||
// Preventing accidental use with uint32_t and the like.
|
// Preventing accidental use with uint32_t and the like.
|
||||||
static_assert(std::is_signed<CoeffT>::value,
|
static_assert(std::is_signed<ScalarT>::value,
|
||||||
"CoeffT must be a signed type. ");
|
"ScalarT must be a signed type. ");
|
||||||
VectorD<CoeffT, 3> r;
|
VectorD<ScalarT, 3> r;
|
||||||
r[0] = (u[1] * v[2]) - (u[2] * v[1]);
|
r[0] = (u[1] * v[2]) - (u[2] * v[1]);
|
||||||
r[1] = (u[2] * v[0]) - (u[0] * v[2]);
|
r[1] = (u[2] * v[0]) - (u[0] * v[2]);
|
||||||
r[2] = (u[0] * v[1]) - (u[1] * v[0]);
|
r[2] = (u[0] * v[1]) - (u[1] * v[0]);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class CoeffT, int dimension_t>
|
template <class ScalarT, int dimension_t>
|
||||||
inline std::ostream &operator<<(
|
inline std::ostream &operator<<(
|
||||||
std::ostream &out, const draco::VectorD<CoeffT, dimension_t> &vec) {
|
std::ostream &out, const draco::VectorD<ScalarT, dimension_t> &vec) {
|
||||||
for (int i = 0; i < dimension_t - 1; ++i) {
|
for (int i = 0; i < dimension_t - 1; ++i) {
|
||||||
out << vec[i] << " ";
|
out << vec[i] << " ";
|
||||||
}
|
}
|
||||||
|
@ -32,8 +32,6 @@ typedef draco::Vector5ui Vector5ui;
|
|||||||
typedef draco::VectorD<int32_t, 3> Vector3i;
|
typedef draco::VectorD<int32_t, 3> Vector3i;
|
||||||
typedef draco::VectorD<int32_t, 4> Vector4i;
|
typedef draco::VectorD<int32_t, 4> Vector4i;
|
||||||
|
|
||||||
class VectorDTest : public ::testing::Test {
|
|
||||||
protected:
|
|
||||||
template <class CoeffT, int dimension_t>
|
template <class CoeffT, int dimension_t>
|
||||||
void TestSquaredDistance(const draco::VectorD<CoeffT, dimension_t> v1,
|
void TestSquaredDistance(const draco::VectorD<CoeffT, dimension_t> v1,
|
||||||
const draco::VectorD<CoeffT, dimension_t> v2,
|
const draco::VectorD<CoeffT, dimension_t> v2,
|
||||||
@ -43,9 +41,8 @@ class VectorDTest : public ::testing::Test {
|
|||||||
squared_distance = SquaredDistance(v2, v1);
|
squared_distance = SquaredDistance(v2, v1);
|
||||||
ASSERT_EQ(squared_distance, result);
|
ASSERT_EQ(squared_distance, result);
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
TEST_F(VectorDTest, TestOperators) {
|
TEST(VectorDTest, TestOperators) {
|
||||||
{
|
{
|
||||||
const Vector3f v;
|
const Vector3f v;
|
||||||
ASSERT_EQ(v[0], 0);
|
ASSERT_EQ(v[0], 0);
|
||||||
@ -58,10 +55,8 @@ TEST_F(VectorDTest, TestOperators) {
|
|||||||
ASSERT_EQ(v[2], 3);
|
ASSERT_EQ(v[2], 3);
|
||||||
|
|
||||||
Vector3f w = v;
|
Vector3f w = v;
|
||||||
bool comp = (v == w);
|
ASSERT_TRUE(v == w);
|
||||||
ASSERT_TRUE(comp);
|
ASSERT_FALSE(v != w);
|
||||||
comp = (v != w);
|
|
||||||
ASSERT_TRUE(!comp);
|
|
||||||
ASSERT_EQ(w[0], 1);
|
ASSERT_EQ(w[0], 1);
|
||||||
ASSERT_EQ(w[1], 2);
|
ASSERT_EQ(w[1], 2);
|
||||||
ASSERT_EQ(w[2], 3);
|
ASSERT_EQ(w[2], 3);
|
||||||
@ -81,10 +76,15 @@ TEST_F(VectorDTest, TestOperators) {
|
|||||||
ASSERT_EQ(w[1], 2);
|
ASSERT_EQ(w[1], 2);
|
||||||
ASSERT_EQ(w[2], 3);
|
ASSERT_EQ(w[2], 3);
|
||||||
|
|
||||||
|
// Scalar multiplication from left and right.
|
||||||
w = v * 2.f;
|
w = v * 2.f;
|
||||||
ASSERT_EQ(w[0], 2);
|
ASSERT_EQ(w[0], 2);
|
||||||
ASSERT_EQ(w[1], 4);
|
ASSERT_EQ(w[1], 4);
|
||||||
ASSERT_EQ(w[2], 6);
|
ASSERT_EQ(w[2], 6);
|
||||||
|
w = 2.f * v;
|
||||||
|
ASSERT_EQ(w[0], 2);
|
||||||
|
ASSERT_EQ(w[1], 4);
|
||||||
|
ASSERT_EQ(w[2], 6);
|
||||||
|
|
||||||
ASSERT_EQ(v.SquaredNorm(), 14);
|
ASSERT_EQ(v.SquaredNorm(), 14);
|
||||||
ASSERT_EQ(v.Dot(v), 14);
|
ASSERT_EQ(v.Dot(v), 14);
|
||||||
@ -109,7 +109,7 @@ TEST_F(VectorDTest, TestOperators) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VectorDTest, TestSquaredDistance) {
|
TEST(VectorDTest, TestSquaredDistance) {
|
||||||
// Test Vector2f: float, 2D.
|
// Test Vector2f: float, 2D.
|
||||||
Vector2f v1_2f(5.5, 10.5);
|
Vector2f v1_2f(5.5, 10.5);
|
||||||
Vector2f v2_2f(3.5, 15.5);
|
Vector2f v2_2f(3.5, 15.5);
|
||||||
@ -158,7 +158,8 @@ TEST_F(VectorDTest, TestSquaredDistance) {
|
|||||||
result_ui = 158;
|
result_ui = 158;
|
||||||
TestSquaredDistance(v1_5ui, v2_5ui, result_ui);
|
TestSquaredDistance(v1_5ui, v2_5ui, result_ui);
|
||||||
}
|
}
|
||||||
TEST_F(VectorDTest, TestCrossProduct3D) {
|
|
||||||
|
TEST(VectorDTest, TestCrossProduct3D) {
|
||||||
const Vector3i e1(1, 0, 0);
|
const Vector3i e1(1, 0, 0);
|
||||||
const Vector3i e2(0, 1, 0);
|
const Vector3i e2(0, 1, 0);
|
||||||
const Vector3i e3(0, 0, 1);
|
const Vector3i e3(0, 0, 1);
|
||||||
@ -181,7 +182,7 @@ TEST_F(VectorDTest, TestCrossProduct3D) {
|
|||||||
ASSERT_EQ(0, v2.Dot(orth));
|
ASSERT_EQ(0, v2.Dot(orth));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VectorDTest, TestAbsSum) {
|
TEST(VectorDTest, TestAbsSum) {
|
||||||
// Testing const of function and zero.
|
// Testing const of function and zero.
|
||||||
const Vector3i v(0, 0, 0);
|
const Vector3i v(0, 0, 0);
|
||||||
ASSERT_EQ(v.AbsSum(), 0);
|
ASSERT_EQ(v.AbsSum(), 0);
|
||||||
@ -194,7 +195,18 @@ TEST_F(VectorDTest, TestAbsSum) {
|
|||||||
ASSERT_EQ(Vector4i(-2, 4, -8, 3).AbsSum(), 17);
|
ASSERT_EQ(Vector4i(-2, 4, -8, 3).AbsSum(), 17);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VectorDTest, TestOstream) {
|
TEST(VectorDTest, TestMinMaxCoeff) {
|
||||||
|
// Test verifies that MinCoeff() and MaxCoeff() functions work as intended.
|
||||||
|
const Vector4i vi(-10, 5, 2, 3);
|
||||||
|
ASSERT_EQ(vi.MinCoeff(), -10);
|
||||||
|
ASSERT_EQ(vi.MaxCoeff(), 5);
|
||||||
|
|
||||||
|
const Vector3f vf(6.f, 1000.f, -101.f);
|
||||||
|
ASSERT_EQ(vf.MinCoeff(), -101.f);
|
||||||
|
ASSERT_EQ(vf.MaxCoeff(), 1000.f);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(VectorDTest, TestOstream) {
|
||||||
// Tests that the vector can be stored in a provided std::ostream.
|
// Tests that the vector can be stored in a provided std::ostream.
|
||||||
const draco::VectorD<int64_t, 3> vector(1, 2, 3);
|
const draco::VectorD<int64_t, 3> vector(1, 2, 3);
|
||||||
std::stringstream str;
|
std::stringstream str;
|
||||||
@ -202,4 +214,22 @@ TEST_F(VectorDTest, TestOstream) {
|
|||||||
ASSERT_EQ(str.str(), "1 2 3 ");
|
ASSERT_EQ(str.str(), "1 2 3 ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(VectorDTest, TestConvertConstructor) {
|
||||||
|
// Tests that a vector can be constructed from another vector with a different
|
||||||
|
// type.
|
||||||
|
const draco::VectorD<int64_t, 3> vector(1, 2, 3);
|
||||||
|
|
||||||
|
const draco::VectorD<float, 3> vector3f(vector);
|
||||||
|
ASSERT_EQ(vector3f, draco::Vector3f(1.f, 2.f, 3.f));
|
||||||
|
|
||||||
|
const draco::VectorD<float, 2> vector2f(vector);
|
||||||
|
ASSERT_EQ(vector2f, draco::Vector2f(1.f, 2.f));
|
||||||
|
|
||||||
|
const draco::VectorD<float, 4> vector4f(vector3f);
|
||||||
|
ASSERT_EQ(vector4f, draco::Vector4f(1.f, 2.f, 3.f, 0.f));
|
||||||
|
|
||||||
|
const draco::VectorD<double, 1> vector1d(vector3f);
|
||||||
|
ASSERT_EQ(vector1d[0], 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
65
src/draco/io/file_utils.cc
Normal file
65
src/draco/io/file_utils.cc
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
// Copyright 2018 The Draco Authors.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
#include "draco/io/file_utils.h"
|
||||||
|
|
||||||
|
#include "draco/io/parser_utils.h"
|
||||||
|
|
||||||
|
namespace draco {
|
||||||
|
|
||||||
|
bool SplitPath(const std::string &full_path, std::string *out_folder_path,
|
||||||
|
std::string *out_file_name) {
|
||||||
|
const auto pos = full_path.find_last_of("/\\");
|
||||||
|
if (pos != std::string::npos) {
|
||||||
|
if (out_folder_path)
|
||||||
|
*out_folder_path = full_path.substr(0, pos);
|
||||||
|
if (out_file_name)
|
||||||
|
*out_file_name = full_path.substr(pos + 1, full_path.length());
|
||||||
|
} else {
|
||||||
|
if (out_folder_path)
|
||||||
|
*out_folder_path = ".";
|
||||||
|
if (out_file_name)
|
||||||
|
*out_file_name = full_path;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ReplaceFileExtension(const std::string &in_file_name,
|
||||||
|
const std::string &new_extension) {
|
||||||
|
const auto pos = in_file_name.find_last_of(".");
|
||||||
|
if (pos == std::string::npos) {
|
||||||
|
// No extension found.
|
||||||
|
return in_file_name + "." + new_extension;
|
||||||
|
}
|
||||||
|
return in_file_name.substr(0, pos + 1) + new_extension;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string LowercaseFileExtension(const std::string &filename) {
|
||||||
|
const size_t pos = filename.find_last_of('.');
|
||||||
|
if (pos == 0 || pos == std::string::npos || pos == filename.length() - 1)
|
||||||
|
return "";
|
||||||
|
return parser::ToLower(filename.substr(pos + 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GetFullPath(const std::string &input_file_relative_path,
|
||||||
|
const std::string &sibling_file_full_path) {
|
||||||
|
const auto pos = sibling_file_full_path.find_last_of("/\\");
|
||||||
|
std::string input_file_full_path;
|
||||||
|
if (pos != std::string::npos)
|
||||||
|
input_file_full_path = sibling_file_full_path.substr(0, pos + 1);
|
||||||
|
input_file_full_path += input_file_relative_path;
|
||||||
|
return input_file_full_path;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace draco
|
51
src/draco/io/file_utils.h
Normal file
51
src/draco/io/file_utils.h
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
// Copyright 2018 The Draco Authors.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
#ifndef DRACO_IO_FILE_UTILS_H_
|
||||||
|
#define DRACO_IO_FILE_UTILS_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace draco {
|
||||||
|
|
||||||
|
// Splits full path to a file into a folder path + file name.
|
||||||
|
// |out_folder_path| will contain the path to the folder containing the file
|
||||||
|
// excluding the final slash. If no folder is specified in the |full_path|, then
|
||||||
|
// |out_folder_path| is set to "."
|
||||||
|
// Returns false on error.
|
||||||
|
bool SplitPath(const std::string &full_path, std::string *out_folder_path,
|
||||||
|
std::string *out_file_name);
|
||||||
|
|
||||||
|
// Replaces file extension in |in_file_name| with |new_extension|.
|
||||||
|
// If |in_file_name| does not have any extension, the extension is appended.
|
||||||
|
std::string ReplaceFileExtension(const std::string &in_file_name,
|
||||||
|
const std::string &new_extension);
|
||||||
|
|
||||||
|
// Returns the file extension in lowercase if present, else "". Extension is
|
||||||
|
// defined as the string after the last '.' character. If the file starts with
|
||||||
|
// '.' (e.g. Linux hidden files), the first delimiter is ignored.
|
||||||
|
std::string LowercaseFileExtension(const std::string &filename);
|
||||||
|
|
||||||
|
// Given a path of the input file |input_file_relative_path| relative to the
|
||||||
|
// parent directory of |sibling_file_full_path|, this function returns full path
|
||||||
|
// to the input file. If |sibling_file_full_path| has no directory, the relative
|
||||||
|
// path itself |input_file_relative_path| is returned. A common use case is for
|
||||||
|
// the |input_file_relative_path| to be just a file name. See usage examples in
|
||||||
|
// the unit test.
|
||||||
|
std::string GetFullPath(const std::string &input_file_relative_path,
|
||||||
|
const std::string &sibling_file_full_path);
|
||||||
|
|
||||||
|
} // namespace draco
|
||||||
|
|
||||||
|
#endif // DRACO_IO_FILE_UTILS_H_
|
55
src/draco/io/file_utils_test.cc
Normal file
55
src/draco/io/file_utils_test.cc
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
// Copyright 2018 The Draco Authors.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
#include "draco/io/file_utils.h"
|
||||||
|
#include "draco/core/draco_test_base.h"
|
||||||
|
#include "draco/core/draco_test_utils.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
TEST(FileUtilsTest, SplitsPath) {
|
||||||
|
// Tests that the function SplitPath correctly splits a set of test paths.
|
||||||
|
std::string folder_path, file_name;
|
||||||
|
draco::SplitPath("file.x", &folder_path, &file_name);
|
||||||
|
ASSERT_EQ(folder_path, ".");
|
||||||
|
ASSERT_EQ(file_name, "file.x");
|
||||||
|
|
||||||
|
draco::SplitPath("a/b/file.y", &folder_path, &file_name);
|
||||||
|
ASSERT_EQ(folder_path, "a/b");
|
||||||
|
ASSERT_EQ(file_name, "file.y");
|
||||||
|
|
||||||
|
draco::SplitPath("//a/b/c/d/file.z", &folder_path, &file_name);
|
||||||
|
ASSERT_EQ(folder_path, "//a/b/c/d");
|
||||||
|
ASSERT_EQ(file_name, "file.z");
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(FileUtilsTest, ReplaceExtension) {
|
||||||
|
// Tests that the function ReplaceFileExtension correctly replaces extensions
|
||||||
|
// of specified files.
|
||||||
|
ASSERT_EQ(draco::ReplaceFileExtension("a.abc", "x"), "a.x");
|
||||||
|
ASSERT_EQ(draco::ReplaceFileExtension("abc", "x"), "abc.x"); // No extension
|
||||||
|
ASSERT_EQ(draco::ReplaceFileExtension("a/b/c.d", "xyz"), "a/b/c.xyz");
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(FileUtilsTest, GetFullPath) {
|
||||||
|
// Tests that full path is returned when a sibling file has full path.
|
||||||
|
ASSERT_EQ(draco::GetFullPath("xo.png", "/d/i/r/xo.gltf"), "/d/i/r/xo.png");
|
||||||
|
ASSERT_EQ(draco::GetFullPath("buf/01.bin", "dir/xo.gltf"), "dir/buf/01.bin");
|
||||||
|
ASSERT_EQ(draco::GetFullPath("xo.mtl", "/xo.obj"), "/xo.mtl");
|
||||||
|
|
||||||
|
// Tests that only file name is returned when a sibling file has no full path.
|
||||||
|
ASSERT_EQ(draco::GetFullPath("xo.mtl", "xo.obj"), "xo.mtl");
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace
|
@ -16,37 +16,33 @@
|
|||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
#include "draco/io/file_utils.h"
|
||||||
#include "draco/io/obj_decoder.h"
|
#include "draco/io/obj_decoder.h"
|
||||||
#include "draco/io/parser_utils.h"
|
|
||||||
#include "draco/io/ply_decoder.h"
|
#include "draco/io/ply_decoder.h"
|
||||||
|
|
||||||
namespace draco {
|
namespace draco {
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
// Returns the file extension in lowercase if present, else ""
|
|
||||||
inline std::string LowercaseFileExtension(const std::string &filename) {
|
|
||||||
size_t pos = filename.find_last_of('.');
|
|
||||||
if (pos == std::string::npos || pos >= filename.length() - 1)
|
|
||||||
return "";
|
|
||||||
return parser::ToLower(filename.substr(pos + 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
StatusOr<std::unique_ptr<Mesh>> ReadMeshFromFile(const std::string &file_name) {
|
StatusOr<std::unique_ptr<Mesh>> ReadMeshFromFile(const std::string &file_name) {
|
||||||
return ReadMeshFromFile(file_name, false);
|
const Options options;
|
||||||
|
return ReadMeshFromFile(file_name, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusOr<std::unique_ptr<Mesh>> ReadMeshFromFile(const std::string &file_name,
|
StatusOr<std::unique_ptr<Mesh>> ReadMeshFromFile(const std::string &file_name,
|
||||||
bool use_metadata) {
|
bool use_metadata) {
|
||||||
|
Options options;
|
||||||
|
options.SetBool("use_metadata", use_metadata);
|
||||||
|
return ReadMeshFromFile(file_name, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
StatusOr<std::unique_ptr<Mesh>> ReadMeshFromFile(const std::string &file_name,
|
||||||
|
const Options &options) {
|
||||||
std::unique_ptr<Mesh> mesh(new Mesh());
|
std::unique_ptr<Mesh> mesh(new Mesh());
|
||||||
// Analyze file extension.
|
// Analyze file extension.
|
||||||
const std::string extension = LowercaseFileExtension(file_name);
|
const std::string extension = LowercaseFileExtension(file_name);
|
||||||
if (extension == "obj") {
|
if (extension == "obj") {
|
||||||
// Wavefront OBJ file format.
|
// Wavefront OBJ file format.
|
||||||
ObjDecoder obj_decoder;
|
ObjDecoder obj_decoder;
|
||||||
obj_decoder.set_use_metadata(use_metadata);
|
obj_decoder.set_use_metadata(options.GetBool("use_metadata", false));
|
||||||
const Status obj_status = obj_decoder.DecodeFromFile(file_name, mesh.get());
|
const Status obj_status = obj_decoder.DecodeFromFile(file_name, mesh.get());
|
||||||
if (!obj_status.ok())
|
if (!obj_status.ok())
|
||||||
return obj_status;
|
return obj_status;
|
||||||
@ -55,8 +51,7 @@ StatusOr<std::unique_ptr<Mesh>> ReadMeshFromFile(const std::string &file_name,
|
|||||||
if (extension == "ply") {
|
if (extension == "ply") {
|
||||||
// Wavefront PLY file format.
|
// Wavefront PLY file format.
|
||||||
PlyDecoder ply_decoder;
|
PlyDecoder ply_decoder;
|
||||||
if (!ply_decoder.DecodeFromFile(file_name, mesh.get()))
|
DRACO_RETURN_IF_ERROR(ply_decoder.DecodeFromFile(file_name, mesh.get()));
|
||||||
return Status(Status::ERROR, "Unknown error.");
|
|
||||||
return std::move(mesh);
|
return std::move(mesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include "draco/compression/config/compression_shared.h"
|
#include "draco/compression/config/compression_shared.h"
|
||||||
#include "draco/compression/decode.h"
|
#include "draco/compression/decode.h"
|
||||||
#include "draco/compression/expert_encode.h"
|
#include "draco/compression/expert_encode.h"
|
||||||
|
#include "draco/core/options.h"
|
||||||
|
|
||||||
namespace draco {
|
namespace draco {
|
||||||
|
|
||||||
@ -89,6 +90,13 @@ StatusOr<std::unique_ptr<Mesh>> ReadMeshFromFile(const std::string &file_name);
|
|||||||
StatusOr<std::unique_ptr<Mesh>> ReadMeshFromFile(const std::string &file_name,
|
StatusOr<std::unique_ptr<Mesh>> ReadMeshFromFile(const std::string &file_name,
|
||||||
bool use_metadata);
|
bool use_metadata);
|
||||||
|
|
||||||
|
// Reads a mesh from a file. Reading is configured with |options|:
|
||||||
|
// use_metadata : Read obj file info like material names and object names into
|
||||||
|
// metadata. Default is false.
|
||||||
|
// Returns nullptr with an error status if the decoding failed.
|
||||||
|
StatusOr<std::unique_ptr<Mesh>> ReadMeshFromFile(const std::string &file_name,
|
||||||
|
const Options &options);
|
||||||
|
|
||||||
} // namespace draco
|
} // namespace draco
|
||||||
|
|
||||||
#endif // DRACO_MESH_MESH_IO_H_
|
#endif // DRACO_MESH_MESH_IO_H_
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
#include "draco/io/file_utils.h"
|
||||||
#include "draco/io/parser_utils.h"
|
#include "draco/io/parser_utils.h"
|
||||||
#include "draco/metadata/geometry_metadata.h"
|
#include "draco/metadata/geometry_metadata.h"
|
||||||
|
|
||||||
@ -151,12 +152,13 @@ Status ObjDecoder::DecodeInternal() {
|
|||||||
}
|
}
|
||||||
if (num_materials_ > 0 && num_obj_faces_ > 0) {
|
if (num_materials_ > 0 && num_obj_faces_ > 0) {
|
||||||
GeometryAttribute va;
|
GeometryAttribute va;
|
||||||
|
const auto geometry_attribute_type = GeometryAttribute::GENERIC;
|
||||||
if (num_materials_ < 256) {
|
if (num_materials_ < 256) {
|
||||||
va.Init(GeometryAttribute::GENERIC, nullptr, 1, DT_UINT8, false, 1, 0);
|
va.Init(geometry_attribute_type, nullptr, 1, DT_UINT8, false, 1, 0);
|
||||||
} else if (num_materials_ < (1 << 16)) {
|
} else if (num_materials_ < (1 << 16)) {
|
||||||
va.Init(GeometryAttribute::GENERIC, nullptr, 1, DT_UINT16, false, 2, 0);
|
va.Init(geometry_attribute_type, nullptr, 1, DT_UINT16, false, 2, 0);
|
||||||
} else {
|
} else {
|
||||||
va.Init(GeometryAttribute::GENERIC, nullptr, 1, DT_UINT32, false, 4, 0);
|
va.Init(geometry_attribute_type, nullptr, 1, DT_UINT32, false, 4, 0);
|
||||||
}
|
}
|
||||||
material_att_id_ =
|
material_att_id_ =
|
||||||
out_point_cloud_->AddAttribute(va, false, num_materials_);
|
out_point_cloud_->AddAttribute(va, false, num_materials_);
|
||||||
@ -234,10 +236,13 @@ Status ObjDecoder::DecodeInternal() {
|
|||||||
out_mesh_->SetFace(i, face);
|
out_mesh_->SetFace(i, face);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
|
|
||||||
|
#ifdef DRACO_ATTRIBUTE_VALUES_DEDUPLICATION_SUPPORTED
|
||||||
if (deduplicate_input_values_) {
|
if (deduplicate_input_values_) {
|
||||||
out_point_cloud_->DeduplicateAttributeValues();
|
out_point_cloud_->DeduplicateAttributeValues();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef DRACO_ATTRIBUTE_INDICES_DEDUPLICATION_SUPPORTED
|
||||||
out_point_cloud_->DeduplicatePointIds();
|
out_point_cloud_->DeduplicatePointIds();
|
||||||
#endif
|
#endif
|
||||||
return status;
|
return status;
|
||||||
@ -492,6 +497,7 @@ bool ObjDecoder::ParseMaterial(Status * /* status */) {
|
|||||||
// will be added to the list.
|
// will be added to the list.
|
||||||
last_material_id_ = num_materials_;
|
last_material_id_ = num_materials_;
|
||||||
material_name_to_id_[mat_name] = num_materials_++;
|
material_name_to_id_[mat_name] = num_materials_++;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
last_material_id_ = it->second;
|
last_material_id_ = it->second;
|
||||||
@ -626,15 +632,7 @@ void ObjDecoder::MapPointToVertexIndices(
|
|||||||
|
|
||||||
bool ObjDecoder::ParseMaterialFile(const std::string &file_name,
|
bool ObjDecoder::ParseMaterialFile(const std::string &file_name,
|
||||||
Status *status) {
|
Status *status) {
|
||||||
// Get the correct path to the |file_name| using the folder from
|
const std::string full_path = GetFullPath(file_name, input_file_name_);
|
||||||
// |input_file_name_| as the root folder.
|
|
||||||
const auto pos = input_file_name_.find_last_of("/\\");
|
|
||||||
std::string full_path;
|
|
||||||
if (pos != std::string::npos) {
|
|
||||||
full_path = input_file_name_.substr(0, pos + 1);
|
|
||||||
}
|
|
||||||
full_path += file_name;
|
|
||||||
|
|
||||||
std::ifstream file(full_path, std::ios::binary);
|
std::ifstream file(full_path, std::ios::binary);
|
||||||
if (!file)
|
if (!file)
|
||||||
return false;
|
return false;
|
||||||
@ -676,15 +674,14 @@ bool ObjDecoder::ParseMaterialFileDefinition(Status * /* status */) {
|
|||||||
std::string str;
|
std::string str;
|
||||||
if (!parser::ParseString(buffer(), &str))
|
if (!parser::ParseString(buffer(), &str))
|
||||||
return false;
|
return false;
|
||||||
if (str.compare("newmtl") == 0) {
|
if (str == "newmtl") {
|
||||||
parser::SkipWhitespace(buffer());
|
parser::SkipWhitespace(buffer());
|
||||||
parser::ParseLine(buffer(), &str);
|
parser::ParseLine(buffer(), &str);
|
||||||
if (str.length() == 0)
|
if (str.empty())
|
||||||
return false;
|
return false;
|
||||||
// Add new material to our map.
|
// Add new material to our map.
|
||||||
material_name_to_id_[str] = num_materials_++;
|
material_name_to_id_[str] = num_materials_++;
|
||||||
}
|
}
|
||||||
parser::SkipLine(buffer());
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ bool ParseFloat(DecoderBuffer *buffer, float *value) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Apply exponent scaling to value.
|
// Apply exponent scaling to value.
|
||||||
v *= pow(10.0, exponent);
|
v *= pow(static_cast<double>(10.0), exponent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,28 +17,30 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
#include "draco/core/macros.h"
|
#include "draco/core/macros.h"
|
||||||
|
#include "draco/core/status.h"
|
||||||
#include "draco/io/ply_property_reader.h"
|
#include "draco/io/ply_property_reader.h"
|
||||||
|
|
||||||
namespace draco {
|
namespace draco {
|
||||||
|
|
||||||
PlyDecoder::PlyDecoder() : out_mesh_(nullptr), out_point_cloud_(nullptr) {}
|
PlyDecoder::PlyDecoder() : out_mesh_(nullptr), out_point_cloud_(nullptr) {}
|
||||||
|
|
||||||
bool PlyDecoder::DecodeFromFile(const std::string &file_name, Mesh *out_mesh) {
|
Status PlyDecoder::DecodeFromFile(const std::string &file_name,
|
||||||
|
Mesh *out_mesh) {
|
||||||
out_mesh_ = out_mesh;
|
out_mesh_ = out_mesh;
|
||||||
return DecodeFromFile(file_name, static_cast<PointCloud *>(out_mesh));
|
return DecodeFromFile(file_name, static_cast<PointCloud *>(out_mesh));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PlyDecoder::DecodeFromFile(const std::string &file_name,
|
Status PlyDecoder::DecodeFromFile(const std::string &file_name,
|
||||||
PointCloud *out_point_cloud) {
|
PointCloud *out_point_cloud) {
|
||||||
std::ifstream file(file_name, std::ios::binary);
|
std::ifstream file(file_name, std::ios::binary);
|
||||||
if (!file)
|
if (!file)
|
||||||
return false;
|
return Status(Status::IO_ERROR, "Couldn't open file");
|
||||||
// Read the whole file into a buffer.
|
// Read the whole file into a buffer.
|
||||||
auto pos0 = file.tellg();
|
auto pos0 = file.tellg();
|
||||||
file.seekg(0, std::ios::end);
|
file.seekg(0, std::ios::end);
|
||||||
auto file_size = file.tellg() - pos0;
|
auto file_size = file.tellg() - pos0;
|
||||||
if (file_size == 0)
|
if (file_size == 0)
|
||||||
return false;
|
return Status(Status::IO_ERROR, "Zero file size");
|
||||||
file.seekg(0, std::ios::beg);
|
file.seekg(0, std::ios::beg);
|
||||||
std::vector<char> data(file_size);
|
std::vector<char> data(file_size);
|
||||||
file.read(&data[0], file_size);
|
file.read(&data[0], file_size);
|
||||||
@ -47,44 +49,45 @@ bool PlyDecoder::DecodeFromFile(const std::string &file_name,
|
|||||||
return DecodeFromBuffer(&buffer_, out_point_cloud);
|
return DecodeFromBuffer(&buffer_, out_point_cloud);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PlyDecoder::DecodeFromBuffer(DecoderBuffer *buffer, Mesh *out_mesh) {
|
Status PlyDecoder::DecodeFromBuffer(DecoderBuffer *buffer, Mesh *out_mesh) {
|
||||||
out_mesh_ = out_mesh;
|
out_mesh_ = out_mesh;
|
||||||
return DecodeFromBuffer(buffer, static_cast<PointCloud *>(out_mesh));
|
return DecodeFromBuffer(buffer, static_cast<PointCloud *>(out_mesh));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PlyDecoder::DecodeFromBuffer(DecoderBuffer *buffer,
|
Status PlyDecoder::DecodeFromBuffer(DecoderBuffer *buffer,
|
||||||
PointCloud *out_point_cloud) {
|
PointCloud *out_point_cloud) {
|
||||||
out_point_cloud_ = out_point_cloud;
|
out_point_cloud_ = out_point_cloud;
|
||||||
buffer_.Init(buffer->data_head(), buffer->remaining_size());
|
buffer_.Init(buffer->data_head(), buffer->remaining_size());
|
||||||
return DecodeInternal();
|
return DecodeInternal();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PlyDecoder::DecodeInternal() {
|
Status PlyDecoder::DecodeInternal() {
|
||||||
PlyReader ply_reader;
|
PlyReader ply_reader;
|
||||||
if (!ply_reader.Read(buffer()))
|
DRACO_RETURN_IF_ERROR(ply_reader.Read(buffer()));
|
||||||
return false;
|
|
||||||
// First, decode the connectivity data.
|
// First, decode the connectivity data.
|
||||||
if (out_mesh_ && !DecodeFaceData(ply_reader.GetElementByName("face")))
|
if (out_mesh_)
|
||||||
return false;
|
DRACO_RETURN_IF_ERROR(DecodeFaceData(ply_reader.GetElementByName("face")));
|
||||||
// Decode all attributes.
|
// Decode all attributes.
|
||||||
if (!DecodeVertexData(ply_reader.GetElementByName("vertex")))
|
DRACO_RETURN_IF_ERROR(
|
||||||
return false;
|
DecodeVertexData(ply_reader.GetElementByName("vertex")));
|
||||||
#ifdef DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
|
|
||||||
// In case there are no faces this is just a point cloud which does
|
// In case there are no faces this is just a point cloud which does
|
||||||
// not require deduplication.
|
// not require deduplication.
|
||||||
if (out_mesh_ && out_mesh_->num_faces() != 0) {
|
if (out_mesh_ && out_mesh_->num_faces() != 0) {
|
||||||
|
#ifdef DRACO_ATTRIBUTE_VALUES_DEDUPLICATION_SUPPORTED
|
||||||
if (!out_point_cloud_->DeduplicateAttributeValues())
|
if (!out_point_cloud_->DeduplicateAttributeValues())
|
||||||
return false;
|
return Status(Status::ERROR, "Could not deduplicate attribute values");
|
||||||
out_point_cloud_->DeduplicatePointIds();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
return true;
|
#ifdef DRACO_ATTRIBUTE_INDICES_DEDUPLICATION_SUPPORTED
|
||||||
|
out_point_cloud_->DeduplicatePointIds();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PlyDecoder::DecodeFaceData(const PlyElement *face_element) {
|
Status PlyDecoder::DecodeFaceData(const PlyElement *face_element) {
|
||||||
// We accept point clouds now.
|
// We accept point clouds now.
|
||||||
if (face_element == nullptr) {
|
if (face_element == nullptr) {
|
||||||
return true;
|
return Status(Status::INVALID_PARAMETER, "face_element is null");
|
||||||
}
|
}
|
||||||
const int64_t num_faces = face_element->num_entries();
|
const int64_t num_faces = face_element->num_entries();
|
||||||
out_mesh_->SetNumFaces(num_faces);
|
out_mesh_->SetNumFaces(num_faces);
|
||||||
@ -95,7 +98,7 @@ bool PlyDecoder::DecodeFaceData(const PlyElement *face_element) {
|
|||||||
vertex_indices = face_element->GetPropertyByName("vertex_index");
|
vertex_indices = face_element->GetPropertyByName("vertex_index");
|
||||||
}
|
}
|
||||||
if (vertex_indices == nullptr || !vertex_indices->is_list()) {
|
if (vertex_indices == nullptr || !vertex_indices->is_list()) {
|
||||||
return false; // No faces defined.
|
return Status(Status::ERROR, "No faces defined");
|
||||||
}
|
}
|
||||||
|
|
||||||
PlyPropertyReader<PointIndex::ValueType> vertex_index_reader(vertex_indices);
|
PlyPropertyReader<PointIndex::ValueType> vertex_index_reader(vertex_indices);
|
||||||
@ -114,7 +117,7 @@ bool PlyDecoder::DecodeFaceData(const PlyElement *face_element) {
|
|||||||
face_index++;
|
face_index++;
|
||||||
}
|
}
|
||||||
out_mesh_->SetNumFaces(face_index.value());
|
out_mesh_->SetNumFaces(face_index.value());
|
||||||
return true;
|
return OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename DataTypeT>
|
template <typename DataTypeT>
|
||||||
@ -138,9 +141,9 @@ bool PlyDecoder::ReadPropertiesToAttribute(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PlyDecoder::DecodeVertexData(const PlyElement *vertex_element) {
|
Status PlyDecoder::DecodeVertexData(const PlyElement *vertex_element) {
|
||||||
if (vertex_element == nullptr)
|
if (vertex_element == nullptr)
|
||||||
return false;
|
return Status(Status::INVALID_PARAMETER, "vertex_element is null");
|
||||||
// TODO(ostava): For now, try to load x,y,z vertices and red,green,blue,alpha
|
// TODO(ostava): For now, try to load x,y,z vertices and red,green,blue,alpha
|
||||||
// colors. We need to add other properties later.
|
// colors. We need to add other properties later.
|
||||||
const PlyProperty *const x_prop = vertex_element->GetPropertyByName("x");
|
const PlyProperty *const x_prop = vertex_element->GetPropertyByName("x");
|
||||||
@ -149,7 +152,7 @@ bool PlyDecoder::DecodeVertexData(const PlyElement *vertex_element) {
|
|||||||
if (!x_prop || !y_prop || !z_prop) {
|
if (!x_prop || !y_prop || !z_prop) {
|
||||||
// Currently, we require 3 vertex coordinates (this should be generalized
|
// Currently, we require 3 vertex coordinates (this should be generalized
|
||||||
// later on).
|
// later on).
|
||||||
return false;
|
return Status(Status::INVALID_PARAMETER, "x, y, or z property is missing");
|
||||||
}
|
}
|
||||||
const PointIndex::ValueType num_vertices = vertex_element->num_entries();
|
const PointIndex::ValueType num_vertices = vertex_element->num_entries();
|
||||||
out_point_cloud_->set_num_points(num_vertices);
|
out_point_cloud_->set_num_points(num_vertices);
|
||||||
@ -158,12 +161,14 @@ bool PlyDecoder::DecodeVertexData(const PlyElement *vertex_element) {
|
|||||||
// All properties must have the same type.
|
// All properties must have the same type.
|
||||||
if (x_prop->data_type() != y_prop->data_type() ||
|
if (x_prop->data_type() != y_prop->data_type() ||
|
||||||
y_prop->data_type() != z_prop->data_type()) {
|
y_prop->data_type() != z_prop->data_type()) {
|
||||||
return false;
|
return Status(Status::INVALID_PARAMETER,
|
||||||
|
"x, y, and z properties must have the same type");
|
||||||
}
|
}
|
||||||
// TODO(ostava): For now assume the position types are float32 or int32.
|
// TODO(ostava): For now assume the position types are float32 or int32.
|
||||||
const DataType dt = x_prop->data_type();
|
const DataType dt = x_prop->data_type();
|
||||||
if (dt != DT_FLOAT32 && dt != DT_INT32)
|
if (dt != DT_FLOAT32 && dt != DT_INT32)
|
||||||
return false;
|
return Status(Status::INVALID_PARAMETER,
|
||||||
|
"x, y, and z properties must be of type float32 or int32");
|
||||||
|
|
||||||
GeometryAttribute va;
|
GeometryAttribute va;
|
||||||
va.Init(GeometryAttribute::POSITION, nullptr, 3, dt, false,
|
va.Init(GeometryAttribute::POSITION, nullptr, 3, dt, false,
|
||||||
@ -232,7 +237,8 @@ bool PlyDecoder::DecodeVertexData(const PlyElement *vertex_element) {
|
|||||||
// TODO(ostava): For now ensure the data type of all components is uint8.
|
// TODO(ostava): For now ensure the data type of all components is uint8.
|
||||||
DRACO_DCHECK_EQ(true, p->data_type() == DT_UINT8);
|
DRACO_DCHECK_EQ(true, p->data_type() == DT_UINT8);
|
||||||
if (p->data_type() != DT_UINT8)
|
if (p->data_type() != DT_UINT8)
|
||||||
return false;
|
return Status(Status::INVALID_PARAMETER,
|
||||||
|
"Type of 'red' property must be uint8");
|
||||||
color_readers.push_back(std::unique_ptr<PlyPropertyReader<uint8_t>>(
|
color_readers.push_back(std::unique_ptr<PlyPropertyReader<uint8_t>>(
|
||||||
new PlyPropertyReader<uint8_t>(p)));
|
new PlyPropertyReader<uint8_t>(p)));
|
||||||
}
|
}
|
||||||
@ -241,7 +247,8 @@ bool PlyDecoder::DecodeVertexData(const PlyElement *vertex_element) {
|
|||||||
// TODO(ostava): For now ensure the data type of all components is uint8.
|
// TODO(ostava): For now ensure the data type of all components is uint8.
|
||||||
DRACO_DCHECK_EQ(true, p->data_type() == DT_UINT8);
|
DRACO_DCHECK_EQ(true, p->data_type() == DT_UINT8);
|
||||||
if (p->data_type() != DT_UINT8)
|
if (p->data_type() != DT_UINT8)
|
||||||
return false;
|
return Status(Status::INVALID_PARAMETER,
|
||||||
|
"Type of 'green' property must be uint8");
|
||||||
color_readers.push_back(std::unique_ptr<PlyPropertyReader<uint8_t>>(
|
color_readers.push_back(std::unique_ptr<PlyPropertyReader<uint8_t>>(
|
||||||
new PlyPropertyReader<uint8_t>(p)));
|
new PlyPropertyReader<uint8_t>(p)));
|
||||||
}
|
}
|
||||||
@ -250,7 +257,8 @@ bool PlyDecoder::DecodeVertexData(const PlyElement *vertex_element) {
|
|||||||
// TODO(ostava): For now ensure the data type of all components is uint8.
|
// TODO(ostava): For now ensure the data type of all components is uint8.
|
||||||
DRACO_DCHECK_EQ(true, p->data_type() == DT_UINT8);
|
DRACO_DCHECK_EQ(true, p->data_type() == DT_UINT8);
|
||||||
if (p->data_type() != DT_UINT8)
|
if (p->data_type() != DT_UINT8)
|
||||||
return false;
|
return Status(Status::INVALID_PARAMETER,
|
||||||
|
"Type of 'blue' property must be uint8");
|
||||||
color_readers.push_back(std::unique_ptr<PlyPropertyReader<uint8_t>>(
|
color_readers.push_back(std::unique_ptr<PlyPropertyReader<uint8_t>>(
|
||||||
new PlyPropertyReader<uint8_t>(p)));
|
new PlyPropertyReader<uint8_t>(p)));
|
||||||
}
|
}
|
||||||
@ -259,7 +267,8 @@ bool PlyDecoder::DecodeVertexData(const PlyElement *vertex_element) {
|
|||||||
// TODO(ostava): For now ensure the data type of all components is uint8.
|
// TODO(ostava): For now ensure the data type of all components is uint8.
|
||||||
DRACO_DCHECK_EQ(true, p->data_type() == DT_UINT8);
|
DRACO_DCHECK_EQ(true, p->data_type() == DT_UINT8);
|
||||||
if (p->data_type() != DT_UINT8)
|
if (p->data_type() != DT_UINT8)
|
||||||
return false;
|
return Status(Status::INVALID_PARAMETER,
|
||||||
|
"Type of 'alpha' property must be uint8");
|
||||||
color_readers.push_back(std::unique_ptr<PlyPropertyReader<uint8_t>>(
|
color_readers.push_back(std::unique_ptr<PlyPropertyReader<uint8_t>>(
|
||||||
new PlyPropertyReader<uint8_t>(p)));
|
new PlyPropertyReader<uint8_t>(p)));
|
||||||
}
|
}
|
||||||
@ -279,7 +288,7 @@ bool PlyDecoder::DecodeVertexData(const PlyElement *vertex_element) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace draco
|
} // namespace draco
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "draco/draco_features.h"
|
#include "draco/draco_features.h"
|
||||||
|
|
||||||
#include "draco/core/decoder_buffer.h"
|
#include "draco/core/decoder_buffer.h"
|
||||||
|
#include "draco/core/status.h"
|
||||||
#include "draco/io/ply_reader.h"
|
#include "draco/io/ply_reader.h"
|
||||||
#include "draco/mesh/mesh.h"
|
#include "draco/mesh/mesh.h"
|
||||||
|
|
||||||
@ -35,21 +36,20 @@ class PlyDecoder {
|
|||||||
PlyDecoder();
|
PlyDecoder();
|
||||||
|
|
||||||
// Decodes an obj file stored in the input file.
|
// Decodes an obj file stored in the input file.
|
||||||
// Returns nullptr if the decoding failed.
|
Status DecodeFromFile(const std::string &file_name, Mesh *out_mesh);
|
||||||
bool DecodeFromFile(const std::string &file_name, Mesh *out_mesh);
|
Status DecodeFromFile(const std::string &file_name,
|
||||||
bool DecodeFromFile(const std::string &file_name,
|
|
||||||
PointCloud *out_point_cloud);
|
PointCloud *out_point_cloud);
|
||||||
|
|
||||||
bool DecodeFromBuffer(DecoderBuffer *buffer, Mesh *out_mesh);
|
Status DecodeFromBuffer(DecoderBuffer *buffer, Mesh *out_mesh);
|
||||||
bool DecodeFromBuffer(DecoderBuffer *buffer, PointCloud *out_point_cloud);
|
Status DecodeFromBuffer(DecoderBuffer *buffer, PointCloud *out_point_cloud);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool DecodeInternal();
|
Status DecodeInternal();
|
||||||
DecoderBuffer *buffer() { return &buffer_; }
|
DecoderBuffer *buffer() { return &buffer_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool DecodeFaceData(const PlyElement *face_element);
|
Status DecodeFaceData(const PlyElement *face_element);
|
||||||
bool DecodeVertexData(const PlyElement *vertex_element);
|
Status DecodeVertexData(const PlyElement *vertex_element);
|
||||||
|
|
||||||
template <typename DataTypeT>
|
template <typename DataTypeT>
|
||||||
bool ReadPropertiesToAttribute(
|
bool ReadPropertiesToAttribute(
|
||||||
|
@ -26,8 +26,11 @@ class PlyDecoderTest : public ::testing::Test {
|
|||||||
const std::string path = GetTestFileFullPath(file_name);
|
const std::string path = GetTestFileFullPath(file_name);
|
||||||
PlyDecoder decoder;
|
PlyDecoder decoder;
|
||||||
std::unique_ptr<Geometry> geometry(new Geometry());
|
std::unique_ptr<Geometry> geometry(new Geometry());
|
||||||
if (!decoder.DecodeFromFile(path, geometry.get()))
|
Status status = decoder.DecodeFromFile(path, geometry.get());
|
||||||
|
if (!status.ok()) {
|
||||||
|
LOG(ERROR) << "Failed to decode " << file_name << ": " << status;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
}
|
||||||
return geometry;
|
return geometry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
|
|
||||||
|
#include "draco/core/status.h"
|
||||||
#include "draco/io/parser_utils.h"
|
#include "draco/io/parser_utils.h"
|
||||||
#include "draco/io/ply_property_writer.h"
|
#include "draco/io/ply_property_writer.h"
|
||||||
|
|
||||||
@ -34,13 +35,11 @@ PlyElement::PlyElement(const std::string &name, int64_t num_entries)
|
|||||||
|
|
||||||
PlyReader::PlyReader() : format_(kLittleEndian) {}
|
PlyReader::PlyReader() : format_(kLittleEndian) {}
|
||||||
|
|
||||||
bool PlyReader::Read(DecoderBuffer *buffer) {
|
Status PlyReader::Read(DecoderBuffer *buffer) {
|
||||||
error_message_.clear();
|
|
||||||
std::string value;
|
std::string value;
|
||||||
// The first line needs to by "ply".
|
// The first line needs to by "ply".
|
||||||
if (!parser::ParseString(buffer, &value) || value != "ply") {
|
if (!parser::ParseString(buffer, &value) || value != "ply") {
|
||||||
error_message_ = "Not a valid ply file.";
|
return Status(Status::INVALID_PARAMETER, "Not a valid ply file");
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
parser::SkipLine(buffer);
|
parser::SkipLine(buffer);
|
||||||
|
|
||||||
@ -52,52 +51,49 @@ bool PlyReader::Read(DecoderBuffer *buffer) {
|
|||||||
format = words[1];
|
format = words[1];
|
||||||
version = words[2];
|
version = words[2];
|
||||||
} else {
|
} else {
|
||||||
error_message_ = "Missing or wrong format line.";
|
return Status(Status::INVALID_PARAMETER, "Missing or wrong format line");
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
if (version != "1.0") {
|
if (version != "1.0") {
|
||||||
error_message_ = "Unsupported PLY version.";
|
return Status(Status::UNSUPPORTED_VERSION, "Unsupported PLY version");
|
||||||
return false; // Wrong version.
|
|
||||||
}
|
}
|
||||||
if (format == "binary_big_endian") {
|
if (format == "binary_big_endian") {
|
||||||
error_message_ =
|
return Status(Status::UNSUPPORTED_VERSION,
|
||||||
"Unsupported format. Currently we support only ascii and"
|
"Unsupported format. Currently we support only ascii and"
|
||||||
" binary_little_endian format.";
|
" binary_little_endian format.");
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
if (format == "ascii") {
|
if (format == "ascii") {
|
||||||
format_ = kAscii;
|
format_ = kAscii;
|
||||||
} else {
|
} else {
|
||||||
format_ = kLittleEndian;
|
format_ = kLittleEndian;
|
||||||
}
|
}
|
||||||
if (!ParseHeader(buffer))
|
DRACO_RETURN_IF_ERROR(ParseHeader(buffer));
|
||||||
return false;
|
if (!ParsePropertiesData(buffer)) {
|
||||||
if (!ParsePropertiesData(buffer))
|
return Status(Status::INVALID_PARAMETER, "Couldn't parse properties");
|
||||||
return false;
|
}
|
||||||
return true;
|
return OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PlyReader::ParseHeader(DecoderBuffer *buffer) {
|
Status PlyReader::ParseHeader(DecoderBuffer *buffer) {
|
||||||
while (error_message_.length() == 0 && !ParseEndHeader(buffer)) {
|
while (true) {
|
||||||
|
DRACO_ASSIGN_OR_RETURN(bool end, ParseEndHeader(buffer));
|
||||||
|
if (end)
|
||||||
|
break;
|
||||||
if (ParseElement(buffer))
|
if (ParseElement(buffer))
|
||||||
continue;
|
continue;
|
||||||
if (ParseProperty(buffer))
|
DRACO_ASSIGN_OR_RETURN(bool property_parsed, ParseProperty(buffer));
|
||||||
|
if (property_parsed)
|
||||||
continue;
|
continue;
|
||||||
parser::SkipLine(buffer);
|
parser::SkipLine(buffer);
|
||||||
}
|
}
|
||||||
if (error_message_.length() > 0) {
|
return OkStatus();
|
||||||
printf("ERROR %s\n", error_message_.c_str());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PlyReader::ParseEndHeader(DecoderBuffer *buffer) {
|
StatusOr<bool> PlyReader::ParseEndHeader(DecoderBuffer *buffer) {
|
||||||
parser::SkipWhitespace(buffer);
|
parser::SkipWhitespace(buffer);
|
||||||
std::array<char, 10> c;
|
std::array<char, 10> c;
|
||||||
if (!buffer->Peek(&c)) {
|
if (!buffer->Peek(&c)) {
|
||||||
error_message_ = "End of file reached before the end_header.";
|
return Status(Status::INVALID_PARAMETER,
|
||||||
return false;
|
"End of file reached before the end_header");
|
||||||
}
|
}
|
||||||
if (std::memcmp(&c[0], "end_header", 10) != 0)
|
if (std::memcmp(&c[0], "end_header", 10) != 0)
|
||||||
return false;
|
return false;
|
||||||
@ -126,7 +122,7 @@ bool PlyReader::ParseElement(DecoderBuffer *buffer) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PlyReader::ParseProperty(DecoderBuffer *buffer) {
|
StatusOr<bool> PlyReader::ParseProperty(DecoderBuffer *buffer) {
|
||||||
if (elements_.empty())
|
if (elements_.empty())
|
||||||
return false; // Ignore properties if there is no active element.
|
return false; // Ignore properties if there is no active element.
|
||||||
DecoderBuffer line_buffer(*buffer);
|
DecoderBuffer line_buffer(*buffer);
|
||||||
@ -154,15 +150,13 @@ bool PlyReader::ParseProperty(DecoderBuffer *buffer) {
|
|||||||
}
|
}
|
||||||
const DataType data_type = GetDataTypeFromString(data_type_str);
|
const DataType data_type = GetDataTypeFromString(data_type_str);
|
||||||
if (data_type == DT_INVALID) {
|
if (data_type == DT_INVALID) {
|
||||||
error_message_ = "Wrong property data type.";
|
return Status(Status::INVALID_PARAMETER, "Wrong property data type");
|
||||||
return true; // Parsed.
|
|
||||||
}
|
}
|
||||||
DataType list_type = DT_INVALID;
|
DataType list_type = DT_INVALID;
|
||||||
if (property_list_search) {
|
if (property_list_search) {
|
||||||
list_type = GetDataTypeFromString(list_type_str);
|
list_type = GetDataTypeFromString(list_type_str);
|
||||||
if (list_type == DT_INVALID) {
|
if (list_type == DT_INVALID) {
|
||||||
error_message_ = "Wrong property list type.";
|
return Status(Status::INVALID_PARAMETER, "Wrong property list type");
|
||||||
return true; // Parsed.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elements_.back().AddProperty(
|
elements_.back().AddProperty(
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
|
|
||||||
#include "draco/core/decoder_buffer.h"
|
#include "draco/core/decoder_buffer.h"
|
||||||
#include "draco/core/draco_types.h"
|
#include "draco/core/draco_types.h"
|
||||||
|
#include "draco/core/status.h"
|
||||||
|
#include "draco/core/status_or.h"
|
||||||
|
|
||||||
namespace draco {
|
namespace draco {
|
||||||
|
|
||||||
@ -111,7 +113,7 @@ class PlyElement {
|
|||||||
class PlyReader {
|
class PlyReader {
|
||||||
public:
|
public:
|
||||||
PlyReader();
|
PlyReader();
|
||||||
bool Read(DecoderBuffer *buffer);
|
Status Read(DecoderBuffer *buffer);
|
||||||
|
|
||||||
const PlyElement *GetElementByName(const std::string &name) const {
|
const PlyElement *GetElementByName(const std::string &name) const {
|
||||||
const auto it = element_index_.find(name);
|
const auto it = element_index_.find(name);
|
||||||
@ -128,10 +130,10 @@ class PlyReader {
|
|||||||
private:
|
private:
|
||||||
enum Format { kLittleEndian = 0, kAscii };
|
enum Format { kLittleEndian = 0, kAscii };
|
||||||
|
|
||||||
bool ParseHeader(DecoderBuffer *buffer);
|
Status ParseHeader(DecoderBuffer *buffer);
|
||||||
bool ParseEndHeader(DecoderBuffer *buffer);
|
StatusOr<bool> ParseEndHeader(DecoderBuffer *buffer);
|
||||||
bool ParseElement(DecoderBuffer *buffer);
|
bool ParseElement(DecoderBuffer *buffer);
|
||||||
bool ParseProperty(DecoderBuffer *buffer);
|
StatusOr<bool> ParseProperty(DecoderBuffer *buffer);
|
||||||
bool ParsePropertiesData(DecoderBuffer *buffer);
|
bool ParsePropertiesData(DecoderBuffer *buffer);
|
||||||
bool ParseElementData(DecoderBuffer *buffer, int element_index);
|
bool ParseElementData(DecoderBuffer *buffer, int element_index);
|
||||||
bool ParseElementDataAscii(DecoderBuffer *buffer, int element_index);
|
bool ParseElementDataAscii(DecoderBuffer *buffer, int element_index);
|
||||||
@ -141,7 +143,6 @@ class PlyReader {
|
|||||||
DataType GetDataTypeFromString(const std::string &name) const;
|
DataType GetDataTypeFromString(const std::string &name) const;
|
||||||
|
|
||||||
std::vector<PlyElement> elements_;
|
std::vector<PlyElement> elements_;
|
||||||
std::string error_message_;
|
|
||||||
std::map<std::string, int> element_index_;
|
std::map<std::string, int> element_index_;
|
||||||
Format format_;
|
Format format_;
|
||||||
};
|
};
|
||||||
|
@ -45,7 +45,8 @@ TEST_F(PlyReaderTest, TestReader) {
|
|||||||
DecoderBuffer buf;
|
DecoderBuffer buf;
|
||||||
buf.Init(data.data(), data.size());
|
buf.Init(data.data(), data.size());
|
||||||
PlyReader reader;
|
PlyReader reader;
|
||||||
ASSERT_TRUE(reader.Read(&buf));
|
Status status = reader.Read(&buf);
|
||||||
|
ASSERT_TRUE(status.ok()) << status;
|
||||||
ASSERT_EQ(reader.num_elements(), 2);
|
ASSERT_EQ(reader.num_elements(), 2);
|
||||||
ASSERT_EQ(reader.element(0).num_properties(), 7);
|
ASSERT_EQ(reader.element(0).num_properties(), 7);
|
||||||
ASSERT_EQ(reader.element(1).num_properties(), 1);
|
ASSERT_EQ(reader.element(1).num_properties(), 1);
|
||||||
@ -68,13 +69,15 @@ TEST_F(PlyReaderTest, TestReaderAscii) {
|
|||||||
DecoderBuffer buf;
|
DecoderBuffer buf;
|
||||||
buf.Init(data.data(), data.size());
|
buf.Init(data.data(), data.size());
|
||||||
PlyReader reader;
|
PlyReader reader;
|
||||||
ASSERT_TRUE(reader.Read(&buf));
|
Status status = reader.Read(&buf);
|
||||||
|
ASSERT_TRUE(status.ok()) << status;
|
||||||
|
|
||||||
const std::string file_name_ascii = "test_pos_color_ascii.ply";
|
const std::string file_name_ascii = "test_pos_color_ascii.ply";
|
||||||
const std::vector<char> data_ascii = ReadPlyFile(file_name_ascii);
|
const std::vector<char> data_ascii = ReadPlyFile(file_name_ascii);
|
||||||
buf.Init(data_ascii.data(), data_ascii.size());
|
buf.Init(data_ascii.data(), data_ascii.size());
|
||||||
PlyReader reader_ascii;
|
PlyReader reader_ascii;
|
||||||
ASSERT_TRUE(reader_ascii.Read(&buf));
|
status = reader_ascii.Read(&buf);
|
||||||
|
ASSERT_TRUE(status.ok()) << status;
|
||||||
ASSERT_EQ(reader.num_elements(), reader_ascii.num_elements());
|
ASSERT_EQ(reader.num_elements(), reader_ascii.num_elements());
|
||||||
ASSERT_EQ(reader.element(0).num_properties(),
|
ASSERT_EQ(reader.element(0).num_properties(),
|
||||||
reader_ascii.element(0).num_properties());
|
reader_ascii.element(0).num_properties());
|
||||||
@ -97,7 +100,8 @@ TEST_F(PlyReaderTest, TestReaderExtraWhitespace) {
|
|||||||
DecoderBuffer buf;
|
DecoderBuffer buf;
|
||||||
buf.Init(data.data(), data.size());
|
buf.Init(data.data(), data.size());
|
||||||
PlyReader reader;
|
PlyReader reader;
|
||||||
ASSERT_TRUE(reader.Read(&buf));
|
Status status = reader.Read(&buf);
|
||||||
|
ASSERT_TRUE(status.ok()) << status;
|
||||||
|
|
||||||
ASSERT_EQ(reader.num_elements(), 2);
|
ASSERT_EQ(reader.num_elements(), 2);
|
||||||
ASSERT_EQ(reader.element(0).num_properties(), 7);
|
ASSERT_EQ(reader.element(0).num_properties(), 7);
|
||||||
@ -121,7 +125,8 @@ TEST_F(PlyReaderTest, TestReaderMoreDataTypes) {
|
|||||||
DecoderBuffer buf;
|
DecoderBuffer buf;
|
||||||
buf.Init(data.data(), data.size());
|
buf.Init(data.data(), data.size());
|
||||||
PlyReader reader;
|
PlyReader reader;
|
||||||
ASSERT_TRUE(reader.Read(&buf));
|
Status status = reader.Read(&buf);
|
||||||
|
ASSERT_TRUE(status.ok()) << status;
|
||||||
|
|
||||||
ASSERT_EQ(reader.num_elements(), 2);
|
ASSERT_EQ(reader.num_elements(), 2);
|
||||||
ASSERT_EQ(reader.element(0).num_properties(), 7);
|
ASSERT_EQ(reader.element(0).num_properties(), 7);
|
||||||
|
@ -40,8 +40,7 @@ StatusOr<std::unique_ptr<PointCloud>> ReadPointCloudFromFile(
|
|||||||
if (extension == ".ply") {
|
if (extension == ".ply") {
|
||||||
// Wavefront PLY file format.
|
// Wavefront PLY file format.
|
||||||
PlyDecoder ply_decoder;
|
PlyDecoder ply_decoder;
|
||||||
if (!ply_decoder.DecodeFromFile(file_name, pc.get()))
|
DRACO_RETURN_IF_ERROR(ply_decoder.DecodeFromFile(file_name, pc.get()));
|
||||||
return Status(Status::ERROR, "Unknown error.");
|
|
||||||
return std::move(pc);
|
return std::move(pc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,15 +32,6 @@ bool MetadataQuerier::HasEntry(const Metadata &metadata,
|
|||||||
return metadata.entries().count(entry_name) > 0;
|
return metadata.entries().count(entry_name) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MetadataQuerier::HasIntEntry(const Metadata &metadata,
|
|
||||||
const char *entry_name) const {
|
|
||||||
int32_t value = 0;
|
|
||||||
const std::string name(entry_name);
|
|
||||||
if (!metadata.GetEntryInt(name, &value))
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
long MetadataQuerier::GetIntEntry(const Metadata &metadata,
|
long MetadataQuerier::GetIntEntry(const Metadata &metadata,
|
||||||
const char *entry_name) const {
|
const char *entry_name) const {
|
||||||
int32_t value = 0;
|
int32_t value = 0;
|
||||||
@ -49,15 +40,6 @@ long MetadataQuerier::GetIntEntry(const Metadata &metadata,
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MetadataQuerier::HasDoubleEntry(const Metadata &metadata,
|
|
||||||
const char *entry_name) const {
|
|
||||||
double value = 0;
|
|
||||||
const std::string name(entry_name);
|
|
||||||
if (!metadata.GetEntryDouble(name, &value))
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
double MetadataQuerier::GetDoubleEntry(const Metadata &metadata,
|
double MetadataQuerier::GetDoubleEntry(const Metadata &metadata,
|
||||||
const char *entry_name) const {
|
const char *entry_name) const {
|
||||||
double value = 0;
|
double value = 0;
|
||||||
@ -66,21 +48,13 @@ double MetadataQuerier::GetDoubleEntry(const Metadata &metadata,
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MetadataQuerier::HasStringEntry(const Metadata &metadata,
|
|
||||||
const char *entry_name) const {
|
|
||||||
std::string return_value;
|
|
||||||
const std::string name(entry_name);
|
|
||||||
if (!metadata.GetEntryString(name, &return_value))
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *MetadataQuerier::GetStringEntry(const Metadata &metadata,
|
const char *MetadataQuerier::GetStringEntry(const Metadata &metadata,
|
||||||
const char *entry_name) const {
|
const char *entry_name) {
|
||||||
std::string return_value;
|
|
||||||
const std::string name(entry_name);
|
const std::string name(entry_name);
|
||||||
metadata.GetEntryString(name, &return_value);
|
if (!metadata.GetEntryString(name, &last_string_returned_))
|
||||||
const char *value = return_value.c_str();
|
return nullptr;
|
||||||
|
|
||||||
|
const char *value = last_string_returned_.c_str();
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,18 +39,18 @@ class MetadataQuerier {
|
|||||||
MetadataQuerier();
|
MetadataQuerier();
|
||||||
|
|
||||||
bool HasEntry(const draco::Metadata &metadata, const char *entry_name) const;
|
bool HasEntry(const draco::Metadata &metadata, const char *entry_name) const;
|
||||||
bool HasIntEntry(const draco::Metadata &metadata,
|
|
||||||
const char *entry_name) const;
|
// This function does not guarantee that entry's type is long.
|
||||||
long GetIntEntry(const draco::Metadata &metadata,
|
long GetIntEntry(const draco::Metadata &metadata,
|
||||||
const char *entry_name) const;
|
const char *entry_name) const;
|
||||||
bool HasDoubleEntry(const draco::Metadata &metadata,
|
|
||||||
const char *entry_name) const;
|
// This function does not guarantee that entry's type is double.
|
||||||
double GetDoubleEntry(const draco::Metadata &metadata,
|
double GetDoubleEntry(const draco::Metadata &metadata,
|
||||||
const char *entry_name) const;
|
const char *entry_name) const;
|
||||||
bool HasStringEntry(const draco::Metadata &metadata,
|
|
||||||
const char *entry_name) const;
|
// This function does not guarantee that entry's type is char*.
|
||||||
const char *GetStringEntry(const draco::Metadata &metadata,
|
const char *GetStringEntry(const draco::Metadata &metadata,
|
||||||
const char *entry_name) const;
|
const char *entry_name);
|
||||||
|
|
||||||
long NumEntries(const draco::Metadata &metadata) const;
|
long NumEntries(const draco::Metadata &metadata) const;
|
||||||
const char *GetEntryName(const draco::Metadata &metadata, int entry_id);
|
const char *GetEntryName(const draco::Metadata &metadata, int entry_id);
|
||||||
@ -59,6 +59,9 @@ class MetadataQuerier {
|
|||||||
// Cached values for metadata entries.
|
// Cached values for metadata entries.
|
||||||
std::vector<std::string> entry_names_;
|
std::vector<std::string> entry_names_;
|
||||||
const draco::Metadata *entry_names_metadata_;
|
const draco::Metadata *entry_names_metadata_;
|
||||||
|
|
||||||
|
// Cached value for GetStringEntry() to avoid scoping issues.
|
||||||
|
std::string last_string_returned_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DracoFloat32Array {
|
class DracoFloat32Array {
|
||||||
|
@ -116,16 +116,10 @@ interface MetadataQuerier {
|
|||||||
|
|
||||||
boolean HasEntry([Ref, Const] Metadata metadata,
|
boolean HasEntry([Ref, Const] Metadata metadata,
|
||||||
[Const] DOMString entry_name);
|
[Const] DOMString entry_name);
|
||||||
boolean HasIntEntry([Ref, Const] Metadata metadata,
|
|
||||||
[Const] DOMString entry_name);
|
|
||||||
long GetIntEntry([Ref, Const] Metadata metadata,
|
long GetIntEntry([Ref, Const] Metadata metadata,
|
||||||
[Const] DOMString entry_name);
|
[Const] DOMString entry_name);
|
||||||
boolean HasDoubleEntry([Ref, Const] Metadata metadata,
|
|
||||||
[Const] DOMString entry_name);
|
|
||||||
double GetDoubleEntry([Ref, Const] Metadata metadata,
|
double GetDoubleEntry([Ref, Const] Metadata metadata,
|
||||||
[Const] DOMString entry_name);
|
[Const] DOMString entry_name);
|
||||||
boolean HasStringEntry([Ref, Const] Metadata metadata,
|
|
||||||
[Const] DOMString entry_name);
|
|
||||||
[Const] DOMString GetStringEntry([Ref, Const] Metadata metadata,
|
[Const] DOMString GetStringEntry([Ref, Const] Metadata metadata,
|
||||||
[Const] DOMString entry_name);
|
[Const] DOMString entry_name);
|
||||||
|
|
||||||
|
@ -237,8 +237,10 @@ EncodeResult drc2py_encode(Drc2PyMesh *in_mesh, char *file_path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Deduplicate Attributes and Points
|
// Deduplicate Attributes and Points
|
||||||
#ifdef DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
|
#ifdef DRACO_ATTRIBUTE_VALUES_DEDUPLICATION_SUPPORTED
|
||||||
drc_mesh->DeduplicateAttributeValues();
|
drc_mesh->DeduplicateAttributeValues();
|
||||||
|
#endif
|
||||||
|
#ifdef DRACO_ATTRIBUTE_INDICES_DEDUPLICATION_SUPPORTED
|
||||||
drc_mesh->DeduplicatePointIds();
|
drc_mesh->DeduplicatePointIds();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
|
#include "draco/attributes/geometry_indices.h"
|
||||||
#include "draco/mesh/corner_table_iterators.h"
|
#include "draco/mesh/corner_table_iterators.h"
|
||||||
|
|
||||||
namespace draco {
|
namespace draco {
|
||||||
@ -46,6 +47,8 @@ bool CornerTable::Init(const IndexTypeVector<FaceIndex, FaceType> &faces) {
|
|||||||
int num_vertices = -1;
|
int num_vertices = -1;
|
||||||
if (!ComputeOppositeCorners(&num_vertices))
|
if (!ComputeOppositeCorners(&num_vertices))
|
||||||
return false;
|
return false;
|
||||||
|
if (!BreakNonManifoldEdges())
|
||||||
|
return false;
|
||||||
if (!ComputeVertexCorners(num_vertices))
|
if (!ComputeVertexCorners(num_vertices))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
@ -193,6 +196,110 @@ bool CornerTable::ComputeOppositeCorners(int *num_vertices) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CornerTable::BreakNonManifoldEdges() {
|
||||||
|
// This function detects and breaks non-manifold edges that are caused by
|
||||||
|
// folds in 1-ring neighborhood around a vertex. Non-manifold edges can occur
|
||||||
|
// when the 1-ring surface around a vertex self-intersects in a common edge.
|
||||||
|
// For example imagine a surface around a pivot vertex 0, where the 1-ring
|
||||||
|
// is defined by vertices |1, 2, 3, 1, 4|. The surface passes edge <0, 1>
|
||||||
|
// twice which would result in a non-manifold edge that needs to be broken.
|
||||||
|
// For now all faces connected to these non-manifold edges are disconnected
|
||||||
|
// resulting in open boundaries on the mesh. New vertices will be created
|
||||||
|
// automatically for each new disjoint patch in the ComputeVertexCorners()
|
||||||
|
// method.
|
||||||
|
// Note that all other non-manifold edges are implicitly handled by the
|
||||||
|
// function ComputeVertexCorners() that automatically creates new vertices
|
||||||
|
// on disjoint 1-ring surface patches.
|
||||||
|
|
||||||
|
std::vector<bool> visited_corners(num_corners(), false);
|
||||||
|
std::vector<std::pair<VertexIndex, CornerIndex>> sink_vertices;
|
||||||
|
bool mesh_connectivity_updated = false;
|
||||||
|
do {
|
||||||
|
mesh_connectivity_updated = false;
|
||||||
|
for (CornerIndex c(0); c < num_corners(); ++c) {
|
||||||
|
if (visited_corners[c.value()])
|
||||||
|
continue;
|
||||||
|
sink_vertices.clear();
|
||||||
|
|
||||||
|
// First swing all the way to find the left-most corner connected to the
|
||||||
|
// corner's vertex.
|
||||||
|
CornerIndex first_c = c;
|
||||||
|
CornerIndex current_c = c;
|
||||||
|
CornerIndex next_c;
|
||||||
|
while (next_c = SwingLeft(current_c),
|
||||||
|
next_c != first_c && next_c != kInvalidCornerIndex &&
|
||||||
|
!visited_corners[next_c.value()]) {
|
||||||
|
current_c = next_c;
|
||||||
|
}
|
||||||
|
|
||||||
|
first_c = current_c;
|
||||||
|
|
||||||
|
// Swing right from the first corner and check if all visited edges
|
||||||
|
// are unique.
|
||||||
|
do {
|
||||||
|
visited_corners[current_c.value()] = true;
|
||||||
|
// Each new edge is defined by the pivot vertex (that is the same for
|
||||||
|
// all faces) and by the sink vertex (that is the |next| vertex from the
|
||||||
|
// currently processed pivot corner. I.e., each edge is uniquely defined
|
||||||
|
// by the sink vertex index.
|
||||||
|
const CornerIndex sink_c = Next(current_c);
|
||||||
|
const VertexIndex sink_v = corner_to_vertex_map_[sink_c];
|
||||||
|
|
||||||
|
// Corner that defines the edge on the face.
|
||||||
|
const CornerIndex edge_corner = Previous(current_c);
|
||||||
|
bool vertex_connectivity_updated = false;
|
||||||
|
// Go over all processed edges (sink vertices). If the current sink
|
||||||
|
// vertex has been already encountered before it may indicate a
|
||||||
|
// non-manifold edge that needs to be broken.
|
||||||
|
for (auto &&attached_sink_vertex : sink_vertices) {
|
||||||
|
if (attached_sink_vertex.first == sink_v) {
|
||||||
|
// Sink vertex has been already processed.
|
||||||
|
const CornerIndex other_edge_corner = attached_sink_vertex.second;
|
||||||
|
const CornerIndex opp_edge_corner = Opposite(edge_corner);
|
||||||
|
|
||||||
|
if (opp_edge_corner == other_edge_corner) {
|
||||||
|
// We are closing the loop so no need to change the connectivity.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Break the connectivity on the non-manifold edge.
|
||||||
|
// TODO(ostava): It may be possible to reconnect the faces in a way
|
||||||
|
// that the final surface would be manifold.
|
||||||
|
const CornerIndex opp_other_edge_corner =
|
||||||
|
Opposite(other_edge_corner);
|
||||||
|
if (opp_edge_corner != kInvalidCornerIndex)
|
||||||
|
SetOppositeCorner(opp_edge_corner, kInvalidCornerIndex);
|
||||||
|
if (opp_other_edge_corner != kInvalidCornerIndex)
|
||||||
|
SetOppositeCorner(opp_other_edge_corner, kInvalidCornerIndex);
|
||||||
|
|
||||||
|
SetOppositeCorner(edge_corner, kInvalidCornerIndex);
|
||||||
|
SetOppositeCorner(other_edge_corner, kInvalidCornerIndex);
|
||||||
|
|
||||||
|
vertex_connectivity_updated = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (vertex_connectivity_updated) {
|
||||||
|
// Because of the updated connectivity, not all corners connected to
|
||||||
|
// this vertex have been processed and we need to go over them again.
|
||||||
|
// TODO(ostava): This can be optimized as we don't really need to
|
||||||
|
// iterate over all corners.
|
||||||
|
mesh_connectivity_updated = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// Insert new sink vertex information <sink vertex index, edge corner>.
|
||||||
|
std::pair<VertexIndex, CornerIndex> new_sink_vert;
|
||||||
|
new_sink_vert.first = corner_to_vertex_map_[Previous(current_c)];
|
||||||
|
new_sink_vert.second = sink_c;
|
||||||
|
sink_vertices.push_back(new_sink_vert);
|
||||||
|
|
||||||
|
current_c = SwingRight(current_c);
|
||||||
|
} while (current_c != first_c && current_c != kInvalidCornerIndex);
|
||||||
|
}
|
||||||
|
} while (mesh_connectivity_updated);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool CornerTable::ComputeVertexCorners(int num_vertices) {
|
bool CornerTable::ComputeVertexCorners(int num_vertices) {
|
||||||
DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
|
DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
|
||||||
num_original_vertices_ = num_vertices;
|
num_original_vertices_ = num_vertices;
|
||||||
|
@ -51,7 +51,6 @@ namespace draco {
|
|||||||
// non-manifold edges and vertices are automatically split.
|
// non-manifold edges and vertices are automatically split.
|
||||||
class CornerTable {
|
class CornerTable {
|
||||||
public:
|
public:
|
||||||
// TODO(hemmer): rename to Face.
|
|
||||||
// Corner table face type.
|
// Corner table face type.
|
||||||
typedef std::array<VertexIndex, 3> FaceType;
|
typedef std::array<VertexIndex, 3> FaceType;
|
||||||
|
|
||||||
@ -333,10 +332,14 @@ class CornerTable {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// Computes opposite corners mapping from the data stored in
|
// Computes opposite corners mapping from the data stored in
|
||||||
// |corner_to_vertex_map_|. Any non-manifold edge will be split so the result
|
// |corner_to_vertex_map_|.
|
||||||
// is always a 2-manifold surface.
|
|
||||||
bool ComputeOppositeCorners(int *num_vertices);
|
bool ComputeOppositeCorners(int *num_vertices);
|
||||||
|
|
||||||
|
// Finds and breaks non-manifold edges in the 1-ring neighborhood around
|
||||||
|
// vertices (vertices themselves will be split in the ComputeVertexCorners()
|
||||||
|
// function if necessary).
|
||||||
|
bool BreakNonManifoldEdges();
|
||||||
|
|
||||||
// Computes the lookup map for going from a vertex to a corner. This method
|
// Computes the lookup map for going from a vertex to a corner. This method
|
||||||
// can handle non-manifold vertices by splitting them into multiple manifold
|
// can handle non-manifold vertices by splitting them into multiple manifold
|
||||||
// vertices.
|
// vertices.
|
||||||
|
@ -27,7 +27,7 @@ using conditional_t = typename std::conditional<B, T, F>::type;
|
|||||||
|
|
||||||
Mesh::Mesh() {}
|
Mesh::Mesh() {}
|
||||||
|
|
||||||
#ifdef DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
|
#ifdef DRACO_ATTRIBUTE_INDICES_DEDUPLICATION_SUPPORTED
|
||||||
void Mesh::ApplyPointIdDeduplication(
|
void Mesh::ApplyPointIdDeduplication(
|
||||||
const IndexTypeVector<PointIndex, PointIndex> &id_map,
|
const IndexTypeVector<PointIndex, PointIndex> &id_map,
|
||||||
const std::vector<PointIndex> &unique_point_ids) {
|
const std::vector<PointIndex> &unique_point_ids) {
|
||||||
|
@ -17,11 +17,11 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "draco/draco_features.h"
|
|
||||||
|
|
||||||
#include "draco/attributes/geometry_indices.h"
|
#include "draco/attributes/geometry_indices.h"
|
||||||
#include "draco/core/hash_utils.h"
|
#include "draco/core/hash_utils.h"
|
||||||
#include "draco/core/macros.h"
|
#include "draco/core/macros.h"
|
||||||
|
#include "draco/core/status.h"
|
||||||
|
#include "draco/draco_features.h"
|
||||||
#include "draco/point_cloud/point_cloud.h"
|
#include "draco/point_cloud/point_cloud.h"
|
||||||
|
|
||||||
namespace draco {
|
namespace draco {
|
||||||
@ -109,7 +109,7 @@ class Mesh : public PointCloud {
|
|||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#ifdef DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
|
#ifdef DRACO_ATTRIBUTE_INDICES_DEDUPLICATION_SUPPORTED
|
||||||
// Extends the point deduplication to face corners. This method is called from
|
// Extends the point deduplication to face corners. This method is called from
|
||||||
// the PointCloud::DeduplicatePointIds() and it remaps all point ids stored in
|
// the PointCloud::DeduplicatePointIds() and it remaps all point ids stored in
|
||||||
// |faces_| to the new deduplicated point ids using the map |id_map|.
|
// |faces_| to the new deduplicated point ids using the map |id_map|.
|
||||||
|
@ -56,6 +56,25 @@ inline bool IsCornerOppositeToAttributeSeam(CornerIndex ci,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Interpolates an attribute value on a face using given barycentric
|
||||||
|
// coordinates. InterpolatedVectorT should be a VectorD that corresponds to the
|
||||||
|
// values stored in the attribute.
|
||||||
|
// TODO(ostava): Find a better place for this.
|
||||||
|
template <typename InterpolatedVectorT>
|
||||||
|
InterpolatedVectorT ComputeInterpolatedAttributeValueOnMeshFace(
|
||||||
|
const Mesh &mesh, const PointAttribute &attribute, FaceIndex fi,
|
||||||
|
const std::array<float, 3> &barycentric_coord) {
|
||||||
|
const Mesh::Face &face = mesh.face(fi);
|
||||||
|
// Get values for all three corners of the face.
|
||||||
|
InterpolatedVectorT val[3];
|
||||||
|
for (int c = 0; c < 3; ++c) {
|
||||||
|
attribute.GetMappedValue(face[c], &(val[c][0]));
|
||||||
|
}
|
||||||
|
// Return an interpolated value.
|
||||||
|
return barycentric_coord[0] * val[0] + barycentric_coord[1] * val[1] +
|
||||||
|
barycentric_coord[2] * val[2];
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace draco
|
} // namespace draco
|
||||||
|
|
||||||
#endif // DRACO_MESH_MESH_MISC_FUNCTIONS_H_
|
#endif // DRACO_MESH_MESH_MISC_FUNCTIONS_H_
|
||||||
|
@ -65,10 +65,12 @@ void TriangleSoupMeshBuilder::SetPerFaceAttributeValueForFace(
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<Mesh> TriangleSoupMeshBuilder::Finalize() {
|
std::unique_ptr<Mesh> TriangleSoupMeshBuilder::Finalize() {
|
||||||
#ifdef DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
|
#ifdef DRACO_ATTRIBUTE_VALUES_DEDUPLICATION_SUPPORTED
|
||||||
// First deduplicate attribute values.
|
// First deduplicate attribute values.
|
||||||
if (!mesh_->DeduplicateAttributeValues())
|
if (!mesh_->DeduplicateAttributeValues())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
#endif
|
||||||
|
#ifdef DRACO_ATTRIBUTE_INDICES_DEDUPLICATION_SUPPORTED
|
||||||
// Also deduplicate vertex indices.
|
// Also deduplicate vertex indices.
|
||||||
mesh_->DeduplicatePointIds();
|
mesh_->DeduplicatePointIds();
|
||||||
#endif
|
#endif
|
||||||
|
@ -101,27 +101,45 @@ class Metadata {
|
|||||||
// accessing entries of common data types. For now, developers need to know
|
// accessing entries of common data types. For now, developers need to know
|
||||||
// the type of entries they are requesting.
|
// the type of entries they are requesting.
|
||||||
void AddEntryInt(const std::string &name, int32_t value);
|
void AddEntryInt(const std::string &name, int32_t value);
|
||||||
|
|
||||||
|
// Returns false if Metadata does not contain an entry with a key of |name|.
|
||||||
|
// This function does not guarantee that entry's type is int32_t.
|
||||||
bool GetEntryInt(const std::string &name, int32_t *value) const;
|
bool GetEntryInt(const std::string &name, int32_t *value) const;
|
||||||
|
|
||||||
void AddEntryIntArray(const std::string &name,
|
void AddEntryIntArray(const std::string &name,
|
||||||
const std::vector<int32_t> &value);
|
const std::vector<int32_t> &value);
|
||||||
|
|
||||||
|
// Returns false if Metadata does not contain an entry with a key of |name|.
|
||||||
|
// This function does not guarantee that entry's type is a vector of int32_t.
|
||||||
bool GetEntryIntArray(const std::string &name,
|
bool GetEntryIntArray(const std::string &name,
|
||||||
std::vector<int32_t> *value) const;
|
std::vector<int32_t> *value) const;
|
||||||
|
|
||||||
void AddEntryDouble(const std::string &name, double value);
|
void AddEntryDouble(const std::string &name, double value);
|
||||||
|
|
||||||
|
// Returns false if Metadata does not contain an entry with a key of |name|.
|
||||||
|
// This function does not guarantee that entry's type is double.
|
||||||
bool GetEntryDouble(const std::string &name, double *value) const;
|
bool GetEntryDouble(const std::string &name, double *value) const;
|
||||||
|
|
||||||
void AddEntryDoubleArray(const std::string &name,
|
void AddEntryDoubleArray(const std::string &name,
|
||||||
const std::vector<double> &value);
|
const std::vector<double> &value);
|
||||||
|
|
||||||
|
// Returns false if Metadata does not contain an entry with a key of |name|.
|
||||||
|
// This function does not guarantee that entry's type is a vector of double.
|
||||||
bool GetEntryDoubleArray(const std::string &name,
|
bool GetEntryDoubleArray(const std::string &name,
|
||||||
std::vector<double> *value) const;
|
std::vector<double> *value) const;
|
||||||
|
|
||||||
void AddEntryString(const std::string &name, const std::string &value);
|
void AddEntryString(const std::string &name, const std::string &value);
|
||||||
|
|
||||||
|
// Returns false if Metadata does not contain an entry with a key of |name|.
|
||||||
|
// This function does not guarantee that entry's type is std::string.
|
||||||
bool GetEntryString(const std::string &name, std::string *value) const;
|
bool GetEntryString(const std::string &name, std::string *value) const;
|
||||||
|
|
||||||
// Add a blob of data as an entry.
|
// Add a blob of data as an entry.
|
||||||
void AddEntryBinary(const std::string &name,
|
void AddEntryBinary(const std::string &name,
|
||||||
const std::vector<uint8_t> &value);
|
const std::vector<uint8_t> &value);
|
||||||
|
|
||||||
|
// Returns false if Metadata does not contain an entry with a key of |name|.
|
||||||
|
// This function does not guarantee that entry's type is a vector of uint8_t.
|
||||||
bool GetEntryBinary(const std::string &name,
|
bool GetEntryBinary(const std::string &name,
|
||||||
std::vector<uint8_t> *value) const;
|
std::vector<uint8_t> *value) const;
|
||||||
|
|
||||||
|
@ -87,23 +87,32 @@ int PointCloud::AddAttribute(std::unique_ptr<PointAttribute> pa) {
|
|||||||
int PointCloud::AddAttribute(
|
int PointCloud::AddAttribute(
|
||||||
const GeometryAttribute &att, bool identity_mapping,
|
const GeometryAttribute &att, bool identity_mapping,
|
||||||
AttributeValueIndex::ValueType num_attribute_values) {
|
AttributeValueIndex::ValueType num_attribute_values) {
|
||||||
const GeometryAttribute::Type type = att.attribute_type();
|
auto pa = CreateAttribute(att, identity_mapping, num_attribute_values);
|
||||||
if (type == GeometryAttribute::INVALID)
|
if (!pa)
|
||||||
return -1;
|
return -1;
|
||||||
const int32_t att_id =
|
const int32_t att_id = AddAttribute(std::move(pa));
|
||||||
AddAttribute(std::unique_ptr<PointAttribute>(new PointAttribute(att)));
|
return att_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::unique_ptr<PointAttribute> PointCloud::CreateAttribute(
|
||||||
|
const GeometryAttribute &att, bool identity_mapping,
|
||||||
|
AttributeValueIndex::ValueType num_attribute_values) const {
|
||||||
|
if (att.attribute_type() == GeometryAttribute::INVALID)
|
||||||
|
return nullptr;
|
||||||
|
std::unique_ptr<PointAttribute> pa =
|
||||||
|
std::unique_ptr<PointAttribute>(new PointAttribute(att));
|
||||||
// Initialize point cloud specific attribute data.
|
// Initialize point cloud specific attribute data.
|
||||||
if (!identity_mapping) {
|
if (!identity_mapping) {
|
||||||
// First create mapping between indices.
|
// First create mapping between indices.
|
||||||
attribute(att_id)->SetExplicitMapping(num_points_);
|
pa->SetExplicitMapping(num_points_);
|
||||||
} else {
|
} else {
|
||||||
attribute(att_id)->SetIdentityMapping();
|
pa->SetIdentityMapping();
|
||||||
attribute(att_id)->Resize(num_points_);
|
pa->Resize(num_points_);
|
||||||
}
|
}
|
||||||
if (num_attribute_values > 0) {
|
if (num_attribute_values > 0) {
|
||||||
attribute(att_id)->Reset(num_attribute_values);
|
pa->Reset(num_attribute_values);
|
||||||
}
|
}
|
||||||
return att_id;
|
return pa;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PointCloud::SetAttribute(int att_id, std::unique_ptr<PointAttribute> pa) {
|
void PointCloud::SetAttribute(int att_id, std::unique_ptr<PointAttribute> pa) {
|
||||||
@ -148,7 +157,7 @@ void PointCloud::DeleteAttribute(int att_id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
|
#ifdef DRACO_ATTRIBUTE_INDICES_DEDUPLICATION_SUPPORTED
|
||||||
void PointCloud::DeduplicatePointIds() {
|
void PointCloud::DeduplicatePointIds() {
|
||||||
// Hashing function for a single vertex.
|
// Hashing function for a single vertex.
|
||||||
auto point_hash = [this](PointIndex p) {
|
auto point_hash = [this](PointIndex p) {
|
||||||
@ -214,7 +223,9 @@ void PointCloud::ApplyPointIdDeduplication(
|
|||||||
attribute(a)->SetExplicitMapping(num_unique_points);
|
attribute(a)->SetExplicitMapping(num_unique_points);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DRACO_ATTRIBUTE_VALUES_DEDUPLICATION_SUPPORTED
|
||||||
bool PointCloud::DeduplicateAttributeValues() {
|
bool PointCloud::DeduplicateAttributeValues() {
|
||||||
// Go over all attributes and create mapping between duplicate entries.
|
// Go over all attributes and create mapping between duplicate entries.
|
||||||
if (num_points() == 0)
|
if (num_points() == 0)
|
||||||
|
@ -89,10 +89,17 @@ class PointCloud {
|
|||||||
// PointAttribute::SetPointMapEntry() method. |num_attribute_values| can be
|
// PointAttribute::SetPointMapEntry() method. |num_attribute_values| can be
|
||||||
// used to specify the number of attribute values that are going to be
|
// used to specify the number of attribute values that are going to be
|
||||||
// stored in the newly created attribute. Returns attribute id of the newly
|
// stored in the newly created attribute. Returns attribute id of the newly
|
||||||
// created attribute.
|
// created attribute or -1 in case of failure.
|
||||||
int AddAttribute(const GeometryAttribute &att, bool identity_mapping,
|
int AddAttribute(const GeometryAttribute &att, bool identity_mapping,
|
||||||
AttributeValueIndex::ValueType num_attribute_values);
|
AttributeValueIndex::ValueType num_attribute_values);
|
||||||
|
|
||||||
|
// Creates and returns a new attribute or nullptr in case of failure. This
|
||||||
|
// method is similar to AddAttribute(), except that it returns the new
|
||||||
|
// attribute instead of adding it to the point cloud.
|
||||||
|
std::unique_ptr<PointAttribute> CreateAttribute(
|
||||||
|
const GeometryAttribute &att, bool identity_mapping,
|
||||||
|
AttributeValueIndex::ValueType num_attribute_values) const;
|
||||||
|
|
||||||
// Assigns an attribute id to a given PointAttribute. If an attribute with
|
// Assigns an attribute id to a given PointAttribute. If an attribute with
|
||||||
// the same attribute id already exists, it is deleted.
|
// the same attribute id already exists, it is deleted.
|
||||||
virtual void SetAttribute(int att_id, std::unique_ptr<PointAttribute> pa);
|
virtual void SetAttribute(int att_id, std::unique_ptr<PointAttribute> pa);
|
||||||
@ -101,11 +108,13 @@ class PointCloud {
|
|||||||
// attribute ids of all subsequent attributes.
|
// attribute ids of all subsequent attributes.
|
||||||
virtual void DeleteAttribute(int att_id);
|
virtual void DeleteAttribute(int att_id);
|
||||||
|
|
||||||
#ifdef DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
|
#ifdef DRACO_ATTRIBUTE_VALUES_DEDUPLICATION_SUPPORTED
|
||||||
// Deduplicates all attribute values (all attribute entries with the same
|
// Deduplicates all attribute values (all attribute entries with the same
|
||||||
// value are merged into a single entry).
|
// value are merged into a single entry).
|
||||||
virtual bool DeduplicateAttributeValues();
|
virtual bool DeduplicateAttributeValues();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DRACO_ATTRIBUTE_INDICES_DEDUPLICATION_SUPPORTED
|
||||||
// Removes duplicate point ids (two point ids are duplicate when all of their
|
// Removes duplicate point ids (two point ids are duplicate when all of their
|
||||||
// attributes are mapped to the same entry ids).
|
// attributes are mapped to the same entry ids).
|
||||||
virtual void DeduplicatePointIds();
|
virtual void DeduplicatePointIds();
|
||||||
@ -173,7 +182,7 @@ class PointCloud {
|
|||||||
void set_num_points(PointIndex::ValueType num) { num_points_ = num; }
|
void set_num_points(PointIndex::ValueType num) { num_points_ = num; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#ifdef DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
|
#ifdef DRACO_ATTRIBUTE_INDICES_DEDUPLICATION_SUPPORTED
|
||||||
// Applies id mapping of deduplicated points (called by DeduplicatePointIds).
|
// Applies id mapping of deduplicated points (called by DeduplicatePointIds).
|
||||||
virtual void ApplyPointIdDeduplication(
|
virtual void ApplyPointIdDeduplication(
|
||||||
const IndexTypeVector<PointIndex, PointIndex> &id_map,
|
const IndexTypeVector<PointIndex, PointIndex> &id_map,
|
||||||
|
@ -61,12 +61,14 @@ void PointCloudBuilder::SetAttributeValuesForAllPoints(
|
|||||||
|
|
||||||
std::unique_ptr<PointCloud> PointCloudBuilder::Finalize(
|
std::unique_ptr<PointCloud> PointCloudBuilder::Finalize(
|
||||||
bool deduplicate_points) {
|
bool deduplicate_points) {
|
||||||
#ifdef DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
|
|
||||||
if (deduplicate_points) {
|
if (deduplicate_points) {
|
||||||
|
#ifdef DRACO_ATTRIBUTE_VALUES_DEDUPLICATION_SUPPORTED
|
||||||
point_cloud_->DeduplicateAttributeValues();
|
point_cloud_->DeduplicateAttributeValues();
|
||||||
point_cloud_->DeduplicatePointIds();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef DRACO_ATTRIBUTE_INDICES_DEDUPLICATION_SUPPORTED
|
||||||
|
point_cloud_->DeduplicatePointIds();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
return std::move(point_cloud_);
|
return std::move(point_cloud_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Save the decoded geometry into a file.
|
// Save the decoded geometry into a file.
|
||||||
// TODO(ostava): Currently only .ply and .obj are supported.
|
// TODO(fgalligan): Change extension code to look for '.'.
|
||||||
const std::string extension = draco::parser::ToLower(
|
const std::string extension = draco::parser::ToLower(
|
||||||
options.output.size() >= 4
|
options.output.size() >= 4
|
||||||
? options.output.substr(options.output.size() - 4)
|
? options.output.substr(options.output.size() - 4)
|
||||||
@ -167,7 +167,9 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
printf("Invalid extension of the output file. Use either .ply or .obj\n");
|
printf(
|
||||||
|
"Invalid extension of the output file. Use either .ply, .obj, or "
|
||||||
|
".gltf\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
printf("Decoded geometry saved to %s (%" PRId64 " ms to decode)\n",
|
printf("Decoded geometry saved to %s (%" PRId64 " ms to decode)\n",
|
||||||
|
@ -316,7 +316,7 @@ int main(int argc, char **argv) {
|
|||||||
pc->GetNamedAttributeId(draco::GeometryAttribute::GENERIC, 0));
|
pc->GetNamedAttributeId(draco::GeometryAttribute::GENERIC, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef DRACO_ATTRIBUTE_DEDUPLICATION_SUPPORTED
|
#ifdef DRACO_ATTRIBUTE_INDICES_DEDUPLICATION_SUPPORTED
|
||||||
// If any attribute has been deleted, run deduplication of point indices again
|
// If any attribute has been deleted, run deduplication of point indices again
|
||||||
// as some points can be possibly combined.
|
// as some points can be possibly combined.
|
||||||
if (options.tex_coords_deleted || options.normals_deleted ||
|
if (options.tex_coords_deleted || options.normals_deleted ||
|
||||||
|
5
testdata/triangle.obj
vendored
Normal file
5
testdata/triangle.obj
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
v 0.123 0.6514 0.000001
|
||||||
|
v 0.342 0.1234 0.000002
|
||||||
|
v 0.156 0.8422 0.000003
|
||||||
|
|
||||||
|
f 1 2 3
|
6
testdata/triangle_with_degenerate_tex_coords.obj
vendored
Normal file
6
testdata/triangle_with_degenerate_tex_coords.obj
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
v 0.123 0.6514 0.000001
|
||||||
|
v 0.342 0.1234 0.000002
|
||||||
|
v 0.156 0.8422 0.000003
|
||||||
|
vt 0.0 0.0 0.0
|
||||||
|
|
||||||
|
f 1/1 2/1 3/1
|
Loading…
x
Reference in New Issue
Block a user