40 void setStorage(
const std::string &proj,
unsigned long long id,
unsigned long long version) { projectName = proj; entityID = id, entityVersion = version; };
45 void setEdgeColor(
double color[3]) { edgeColorRGB[0] = color[0]; edgeColorRGB[1] = color[1]; edgeColorRGB[2] = color[2]; };
59 double getNodeX(
size_t index) {
return coordX[index]; }
60 double getNodeY(
size_t index) {
return coordY[index]; }
61 double getNodeZ(
size_t index) {
return coordZ[index]; }
67 void loadMeshData(bsoncxx::builder::basic::document &doc);
68 void loadCoordinates(
unsigned long long meshNodesID,
unsigned long long meshNodesVersion,
double *&coordX,
double *&coordY,
double *&coordZ);
69 void loadFaces(
unsigned long long meshFacesID,
unsigned long long meshFacesVersion,
double *coordX,
double *coordY,
double *coordZ);
70 void loadFace(
unsigned long long faceStorageID,
unsigned long long faceStorageVersion,
double *coordX,
double *coordY,
double *coordZ, osg::Node *&faceNode, osg::Node *&edgeNode);
71 osg::Node *createFaceNode(bsoncxx::document::view view,
double *coordX,
double *coordY,
double *coordZ);
72 osg::Node *createFaceNodeBackwardCompatible(bsoncxx::document::view view,
double *coordX,
double *coordY,
double *coordZ);
73 osg::Node *createEdgeNode(bsoncxx::document::view view,
double *coordX,
double *coordY,
double *coordZ);
74 osg::Node *createEdgeNodeBackwardCompatible(bsoncxx::document::view view,
double *coordX,
double *coordY,
double *coordZ);
75 void addEdge(
size_t p1,
size_t p2, std::map<std::pair<size_t, size_t>,
bool> &edgeMap);
76 void setFaceStatus(
int face,
bool visible,
bool forward,
bool doublesided,
bool transparent,
bool wireframe,
double r,
double g,
double b,
SceneNodeBase *owner);
77 void setTransparent(osg::Geometry *faceGeometry,
bool transparent);
78 void recursivelySetDisplayEdges(
bool displayEdges,
SceneNodeBase *root);
79 void getPrefetchForAllChildNodes(
SceneNodeBase *root, std::string &projectName, std::list<std::pair<unsigned long long, unsigned long long>> &prefetchIDs);
80 void addTriangleVerticesAndNormals(bsoncxx::array::view::const_iterator &item, osg::ref_ptr<osg::Vec3Array> &vertices, osg::ref_ptr<osg::Vec3Array> &normals,
size_t &nVertex,
size_t &nNormal);
81 void addTriangleVerticesAndNormalsOrder1(bsoncxx::array::view::const_iterator &item, osg::ref_ptr<osg::Vec3Array> &vertices, osg::ref_ptr<osg::Vec3Array> &normals,
size_t &nVertex,
size_t &nNormal);
82 void addTriangleVerticesAndNormalsOrder2(bsoncxx::array::view::const_iterator &item, osg::ref_ptr<osg::Vec3Array> &vertices, osg::ref_ptr<osg::Vec3Array> &normals,
size_t &nVertex,
size_t &nNormal);
83 void addTriangleVerticesAndNormalsOrder3(bsoncxx::array::view::const_iterator &item, osg::ref_ptr<osg::Vec3Array> &vertices, osg::ref_ptr<osg::Vec3Array> &normals,
size_t &nVertex,
size_t &nNormal);
84 void addTriangleEdges(bsoncxx::array::view::const_iterator &item, std::map<std::pair<size_t, size_t>,
bool> &edgeMap);
85 void addTriangleEdgesOrder1(bsoncxx::array::view::const_iterator &item, std::map<std::pair<size_t, size_t>,
bool> &edgeMap);
86 void addTriangleEdgesOrder2(bsoncxx::array::view::const_iterator &item, std::map<std::pair<size_t, size_t>,
bool> &edgeMap);
87 void addTriangleEdgesOrder3(bsoncxx::array::view::const_iterator &item, std::map<std::pair<size_t, size_t>,
bool> &edgeMap);
88 void addTriangle(
size_t n1Index,
size_t n2Index,
size_t n3Index, osg::ref_ptr<osg::Vec3Array> &vertices, osg::ref_ptr<osg::Vec3Array> &normals,
size_t &nVertex,
size_t &nNormal);
89 void averageNormals(
size_t n1Index,
size_t n2Index,
size_t n3Index, osg::ref_ptr<osg::Vec3Array> &normals,
size_t &nNormalBase);
90 void averageNormals(
size_t n1Index,
size_t n2Index,
size_t n3Index,
size_t n4Index,
size_t n5Index,
size_t n6Index, osg::ref_ptr<osg::Vec3Array> &normals,
size_t &nNormalBase);
92 std::map<int, osg::Node *> faceTriangles;
93 std::map<int, osg::Node *> faceEdges;
95 std::string projectName;
96 unsigned long long entityID;
97 unsigned long long entityVersion;
98 bool needsInitialization;
100 bool displayTetEdges;
102 double edgeColorRGB[3];
103 double *coordX, *coordY, *coordZ;
107 std::map<int, std::vector < std::pair<bool, SceneNodeMeshItem*> >> faceOwners;
109 std::map<int, FaceStatus> faceStatusCache;