3D Repo Bouncer  1.4
repo_structs.h
1 
18 #pragma once
19 
20 #include <unordered_map>
21 #include <cstdint>
22 #include "../../repo_bouncer_global.h"
23 #include "../../core/model/repo_node_utils.h"
24 
25 typedef struct {
26  std::unordered_map<std::string, std::vector<uint8_t>> geoFiles; //files where geometery are stored
27  std::unordered_map<std::string, std::vector<uint8_t>> x3dFiles; //back bone x3dom files
28  std::unordered_map<std::string, std::vector<uint8_t>> jsonFiles; //JSON mapping files
30 
32 {
33  std::vector<float> min;
34  std::vector<float> max;
35  std::vector<float> mid;// midpoint
36  repoUUID id;
37 
38  repo_mesh_entry_t() :mid({ 0, 0, 0 })
39  {
40  min = { 0, 0, 0 };
41  max = { 0, 0, 0 };
42  }
43 };
44 
45 namespace repo{
46  enum class PartitioningTreeType{ PARTITION_X, PARTITION_Y, PARTITION_Z, LEAF_NODE };
47  enum class DiffMode{ DIFF_BY_ID, DIFF_BY_NAME };
48 }
49 
51  repo::PartitioningTreeType type;
52  std::vector<repo_mesh_entry_t> meshes; //mesh ids if it is a leaf node
53  float pValue; //partitioning value if not
54  std::shared_ptr<repo_partitioning_tree_t> left;
55  std::shared_ptr<repo_partitioning_tree_t> right;
56 
57  //Construction of branch node
59  const repo::PartitioningTreeType &type,
60  const float &pValue,
61  std::shared_ptr<repo_partitioning_tree_t> left,
62  std::shared_ptr<repo_partitioning_tree_t> right)
63  : type(type), pValue(pValue),
64  left(left),
65  right(right){}
66 
67  //Construction of leaf node
69  const std::vector<repo_mesh_entry_t> &meshes)
70  :
71  type(repo::PartitioningTreeType::LEAF_NODE),
72  meshes(meshes), pValue(0),
73  left(std::shared_ptr<repo_partitioning_tree_t>(nullptr)),
74  right(std::shared_ptr<repo_partitioning_tree_t>(nullptr)){}
75 };
76 
78  std::vector<repoUUID> added; //nodes that does not exist on the other model
79  std::vector<repoUUID> modified; //nodes that exist on the other model but it is modified.
80  std::unordered_map<repoUUID, repoUUID, RepoUUIDHasher > correspondence;
81 };
Definition: repo_structs.h:31
Definition: repo_connection_pool_mongo.h:32
Definition: repo_structs.h:77
Definition: repo_structs.h:50
Definition: repo_structs.h:25