14 #include <boost/graph/graph_traits.hpp>
15 #include <boost/graph/properties.hpp>
24 #pragma warning(disable : 4146 26812 26451)
37 typename HalfedgeGraph,
59 draco::RAnsBitDecoder decoder;
60 draco::DecodeVarint(&size_bitmask,&
_buffer);
62 decoder.StartDecoding(&
_buffer);
63 for(
int i = 0; i < size_bitmask; i++)
65 bool next = decoder.DecodeNextBit();
66 bitmask.push_back(
next);
68 decoder.EndDecoding();
76 draco::DecodeVarint(&size_residuals,&
_buffer);
78 draco::SymbolBitDecoder symbolBitDecoder;
80 std::vector<uint32_t> residuals_uint;
81 int nb = size_residuals * 3 * nb_residuals;
82 residuals_uint.reserve(nb);
84 symbolBitDecoder.StartDecoding(&
_buffer);
85 for(
int i = 0; i < nb; i++)
89 residuals_uint.push_back(temp);
91 symbolBitDecoder.EndDecoding();
93 std::vector<int32_t> residuals_int;
94 residuals_int.resize(nb);
95 draco::ConvertSymbolsToSignedInts(residuals_uint.data(), nb, residuals_int.data());
97 for(
int i = 0; i < size_residuals; i++)
99 std::vector<Vector> paire;
100 paire.reserve(nb_residuals);
101 for(
int j = 0; j < nb_residuals; ++j)
103 paire.push_back(
Vector(residuals_int[3 * (nb_residuals*i + j) + 0],
104 residuals_int[3 * (nb_residuals*i + j) + 1],
105 residuals_int[3 * (nb_residuals*i + j) + 2]));
108 residuals.push_back(std::move(paire));