MCPcopy Create free account
hub / github.com/comaps/comaps / ParseTriangles

Method ParseTriangles

libs/indexer/feature.cpp:586–610  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584}
585
586void FeatureType::ParseTriangles(int scale)
587{
588 if (!m_parsed.m_triangles)
589 {
590 ParseHeader2();
591
592 auto const headerGeomType = static_cast<HeaderGeomType>(Header(m_data) & HEADER_MASK_GEOMTYPE);
593 if (headerGeomType == HeaderGeomType::Area)
594 {
595 if (m_triangles.empty())
596 {
597 int const ind = GetScaleIndex(*m_loadInfo, scale, m_offsets.m_trg);
598 if (ind != -1)
599 {
600 ReaderSource<FilesContainerR::TReader> src(m_loadInfo->GetTrianglesReader(ind));
601 src.Skip(m_offsets.m_trg[ind]);
602 serial::LoadOuterTriangles(src, m_loadInfo->GetGeometryCodingParams(ind), m_triangles);
603 }
604 }
605
606 CalcRect(m_triangles, m_limitRect);
607 }
608 m_parsed.m_triangles = true;
609 }
610}
611
612FeatureType::GeomStat FeatureType::GetOuterTrianglesStats()
613{

Callers 1

is_drawableMethod · 0.80

Calls 8

GetScaleIndexFunction · 0.85
LoadOuterTrianglesFunction · 0.85
CalcRectFunction · 0.85
GetTrianglesReaderMethod · 0.80
HeaderFunction · 0.70
emptyMethod · 0.45
SkipMethod · 0.45

Tested by 1

is_drawableMethod · 0.64