MCPcopy Create free account
hub / github.com/PDAL/PDAL / parseQuants

Method parseQuants

plugins/draco/io/DracoWriter.cpp:124–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void DracoWriter::parseQuants()
125{
126 if (!m_userQuant.is_object()) {
127 if (std::string(m_userQuant.type_name()) == "null") return;
128 throw pdal_error("Option 'quantization' must be a JSON object, not a " +
129 std::string(m_userQuant.type_name()));
130 }
131 //Quantization levels are available for POSITION, NORMAL, TEX_COORD, COLOR,
132 //and GENERIC draco types
133 for (auto& entry : m_userQuant.items()) {
134 const std::string attribute = entry.key();
135 const int quant = entry.value().get<int>();
136 if (m_quant.find(attribute) == m_quant.end())
137 throw pdal_error("Quantization attribute " + attribute +
138 " is not a valid Draco Geometry Attribute");
139 m_quant[attribute] = quant;
140 }
141}
142
143
144DracoWriter::DimensionInfo *DracoWriter::findDimInfo(draco::GeometryAttribute::Type dt) {

Callers

nothing calls this directly

Calls 5

itemsMethod · 0.80
keyMethod · 0.45
valueMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected