#include <IndexFile.hpp>
Classes | |
struct | BuildNode |
struct | Node |
struct | Selection |
struct | SelectionTile |
Public Member Functions | |
IndexFile () | |
~IndexFile () | |
void | clear () |
void | translate (const Vector3< double > &v) |
const Box< double > & | boundary () const |
const Box< double > & | boundaryPoints () const |
size_t | size () const |
bool | empty () const |
void | selectLeaves (std::vector< SelectionTile > &selection, const Box< double > &window, size_t datasetId, size_t tileId) const |
void | selectLeaves (std::vector< Selection > &selection, const Box< double > &window, size_t id) const |
void | selectNodes (std::vector< Selection > &selection, const Box< double > &window, size_t id) const |
const Node * | selectNode (std::map< const Node *, uint64_t > &used, double x, double y, double z) const |
const Node * | selectLeaf (double x, double y, double z) const |
const Node * | root () const |
const Node * | next (const Node *node, size_t idx) const |
const Node * | prev (const Node *node) const |
const Node * | at (size_t idx) const |
Node * | at (size_t idx) |
Box< double > | boundary (const Node *node, const Box< double > &box) const |
void | read (const std::string &path) |
void | read (const std::string &path, uint64_t offset) |
void | read (ChunkFile &file) |
void | readPayload (ChunkFile &file, const ChunkFile::Chunk &chunk) |
void | write (const std::string &path) const |
void | write (ChunkFile &file) const |
void | insertBegin (const Box< double > &boundary, const Box< double > &boundaryPoints, size_t maxSize, size_t maxLevel=0, bool insertOnlyToLeaves=false) |
uint64_t | insert (double x, double y, double z) |
void | insertEnd () |
Static Public Attributes | |
static const uint32_t | CHUNK_TYPE = 0x38584449U |
Protected Member Functions | |
void | selectLeaves (std::vector< SelectionTile > &selection, const Box< double > &window, const Box< double > &boundary, size_t datasetId, size_t tileId, size_t idx) const |
void | selectLeaves (std::vector< Selection > &idxList, const Box< double > &window, const Box< double > &boundary, size_t idx, size_t id) const |
void | selectNodes (std::vector< Selection > &idxList, const Box< double > &window, const Box< double > &boundary, size_t idx, size_t id) const |
const Node * | selectNode (std::map< const Node *, uint64_t > &used, double x, double y, double z, const Box< double > &boundary, size_t idx) const |
const Node * | selectLeaf (double x, double y, double z, const Box< double > &boundary, size_t idx) const |
void | divide (Box< double > &boundary, double x, double y, double z, uint64_t code) const |
uint64_t | insertEndToLeaves (Node *data, BuildNode *node, uint32_t prev, uint32_t &idx, uint64_t &from) |
size_t | countNodes () const |
size_t | countNodes (BuildNode *node) const |
Protected Attributes | |
Box< double > | boundary_ |
Box< double > | boundaryFile_ |
Box< double > | boundaryPoints_ |
Box< double > | boundaryPointsFile_ |
std::vector< Node > | nodes_ |
std::shared_ptr< BuildNode > | root_ |
size_t | maxSize_ |
size_t | maxLevel_ |
bool | insertOnlyToLeaves_ |
Friends | |
void | toJson (Json &out, const IndexFile &in) |
IndexFile::IndexFile | ( | ) |
IndexFile::~IndexFile | ( | ) |
|
inline |
|
inline |
|
inline |
Referenced by Query::applyCamera(), boundary(), divide(), insertBegin(), selectLeaf(), selectLeaves(), selectLeaves(), selectNode(), and selectNodes().
|
inline |
Referenced by insertBegin().
void IndexFile::clear | ( | ) |
Referenced by insertBegin(), IndexFileBuilder::start(), and IndexFileBuilder::stateNodeInsert().
|
protected |
Referenced by countNodes(), countNodes(), and insertEnd().
|
protected |
|
protected |
Referenced by boundary(), selectLeaf(), selectLeaves(), selectLeaves(), selectNode(), and selectNodes().
|
inline |
Referenced by selectLeaves(), selectLeaves(), and selectNodes().
uint64_t IndexFile::insert | ( | double | x, |
double | y, | ||
double | z ) |
Referenced by IndexFileBuilder::stateMainInsert(), and IndexFileBuilder::stateNodeInsert().
void IndexFile::insertBegin | ( | const Box< double > & | boundary, |
const Box< double > & | boundaryPoints, | ||
size_t | maxSize, | ||
size_t | maxLevel = 0, | ||
bool | insertOnlyToLeaves = false ) |
<
Referenced by IndexFileBuilder::stateMainBegin(), and IndexFileBuilder::stateNodeInsert().
void IndexFile::insertEnd | ( | ) |
Referenced by IndexFileBuilder::stateMainEnd(), and IndexFileBuilder::stateNodeInsert().
|
protected |
Referenced by insertEnd(), and insertEndToLeaves().
const IndexFile::Node * IndexFile::next | ( | const Node * | node, |
size_t | idx ) const |
Referenced by boundary(), and write().
const IndexFile::Node * IndexFile::prev | ( | const Node * | node | ) | const |
Referenced by boundary(), insertEnd(), insertEndToLeaves(), and write().
void IndexFile::read | ( | ChunkFile & | file | ) |
void IndexFile::read | ( | const std::string & | path | ) |
Referenced by read(), read(), and PageData::readPage().
void IndexFile::read | ( | const std::string & | path, |
uint64_t | offset ) |
void IndexFile::readPayload | ( | ChunkFile & | file, |
const ChunkFile::Chunk & | chunk ) |
Referenced by read().
const IndexFile::Node * IndexFile::root | ( | ) | const |
Referenced by prev().
const IndexFile::Node * IndexFile::selectLeaf | ( | double | x, |
double | y, | ||
double | z ) const |
Referenced by selectLeaf(), and selectLeaf().
|
protected |
|
protected |
void IndexFile::selectLeaves | ( | std::vector< Selection > & | selection, |
const Box< double > & | window, | ||
size_t | id ) const |
|
protected |
void IndexFile::selectLeaves | ( | std::vector< SelectionTile > & | selection, |
const Box< double > & | window, | ||
size_t | datasetId, | ||
size_t | tileId ) const |
const IndexFile::Node * IndexFile::selectNode | ( | std::map< const Node *, uint64_t > & | used, |
double | x, | ||
double | y, | ||
double | z ) const |
Referenced by selectNode(), selectNode(), and IndexFileBuilder::stateMainSort().
|
protected |
|
protected |
void IndexFile::selectNodes | ( | std::vector< Selection > & | selection, |
const Box< double > & | window, | ||
size_t | id ) const |
Referenced by selectNodes(), and selectNodes().
|
inline |
Referenced by IndexFileBuilder::nextState(), selectLeaf(), selectNode(), and write().
void IndexFile::translate | ( | const Vector3< double > & | v | ) |
Referenced by PageData::readPage().
void IndexFile::write | ( | ChunkFile & | file | ) | const |
void IndexFile::write | ( | const std::string & | path | ) | const |
|
protected |
Referenced by clear(), insert(), insertBegin(), readPayload(), selectLeaf(), selectLeaves(), selectLeaves(), selectNode(), selectNodes(), and translate().
|
protected |
Referenced by clear(), insertBegin(), readPayload(), translate(), and write().
|
protected |
Referenced by clear(), insertBegin(), readPayload(), and translate().
|
protected |
Referenced by clear(), insertBegin(), readPayload(), translate(), and write().
|
static |
Signature "IDX8".
Referenced by readPayload(), and write().
|
protected |
Referenced by insert(), insertBegin(), and insertEnd().
|
protected |
Referenced by insert(), and insertBegin().
|
protected |
Referenced by insert(), and insertBegin().
|
protected |
Referenced by boundary(), clear(), insertEnd(), next(), prev(), readPayload(), root(), selectLeaf(), selectLeaves(), selectLeaves(), selectNode(), selectNodes(), and write().
|
protected |
Referenced by clear(), countNodes(), insert(), insertBegin(), and insertEnd().