mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
committed by
Konstantin Pastbin
parent
c9cbb64f12
commit
76ffc99abd
44
libs/indexer/shared_load_info.hpp
Normal file
44
libs/indexer/shared_load_info.hpp
Normal file
@@ -0,0 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include "indexer/data_header.hpp"
|
||||
|
||||
#include "coding/files_container.hpp"
|
||||
#include "coding/geometry_coding.hpp"
|
||||
|
||||
#include "base/macros.hpp"
|
||||
|
||||
namespace feature
|
||||
{
|
||||
// This info is created once per FeaturesVector.
|
||||
class SharedLoadInfo
|
||||
{
|
||||
public:
|
||||
using Reader = FilesContainerR::TReader;
|
||||
|
||||
SharedLoadInfo(FilesContainerR const & cont, DataHeader const & header);
|
||||
|
||||
Reader GetDataReader() const;
|
||||
Reader GetGeometryReader(size_t ind) const;
|
||||
Reader GetTrianglesReader(size_t ind) const;
|
||||
|
||||
serial::GeometryCodingParams const & GetDefGeometryCodingParams() const
|
||||
{
|
||||
return m_header.GetDefGeometryCodingParams();
|
||||
}
|
||||
|
||||
serial::GeometryCodingParams GetGeometryCodingParams(int scaleIndex) const
|
||||
{
|
||||
return m_header.GetGeometryCodingParams(scaleIndex);
|
||||
}
|
||||
|
||||
int GetScalesCount() const { return static_cast<int>(m_header.GetScalesCount()); }
|
||||
int GetScale(int i) const { return m_header.GetScale(i); }
|
||||
int GetLastScale() const { return m_header.GetLastScale(); }
|
||||
|
||||
private:
|
||||
FilesContainerR const & m_cont;
|
||||
DataHeader const & m_header;
|
||||
|
||||
DISALLOW_COPY_AND_MOVE(SharedLoadInfo);
|
||||
};
|
||||
} // namespace feature
|
||||
Reference in New Issue
Block a user