OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
SceneNodeMeshItem.h
Go to the documentation of this file.
1#pragma once
2
3namespace osg
4{
5 class Node;
6 class Switch;
7}
8
9#include "Geometry.h"
10#include "SceneNodeBase.h"
11#include "DataBase.h"
12
13#include <string>
14#include <map>
15
16#include <osg/Array>
17
18class Model;
19class SceneNodeMesh;
20
22{
23public:
25 virtual ~SceneNodeMeshItem();
26
27 virtual void setTransparent(bool t) override;
28 virtual void setWireframe(bool w) override;
29 virtual void setVisible(bool v) override;
30 virtual void setHighlighted(bool h) override;
31
32 void setStorage(const std::string &proj, unsigned long long id, unsigned long long version, long long tetEdgesID, long long tetEdgesVersion) { projectName = proj; entityID = id, entityVersion = version; meshDataTetEdgesID = tetEdgesID, meshDataTetEdgesVersion = tetEdgesVersion; };
33 void setNeedsInitialization(void) { needsInitialization = true; };
34
35 std::string getProjectName(void) { return projectName; };
36
37 Model *getModel(void) { return model; };
38 void setModel(Model *m) { model = m; };
39
40 SceneNodeMesh *getMesh(void) { return mesh; };
41 void setMesh(SceneNodeMesh *m) { mesh = m; };
42
43 void ensureDataLoaded(void);
44
45 bool getIsVolume(void) { return isVolume; };
46
47 double getColorR(void) { return colorRGB[0]; };
48 double getColorG(void) { return colorRGB[1]; };
49 double getColorB(void) { return colorRGB[2]; };
50
51 virtual void getPrefetch(std::string &projectName, std::list<std::pair<unsigned long long, unsigned long long>> &prefetchIDs) override;
52
53 virtual bool isItem1D(void) { return false; };
54 virtual bool isItem3D(void) { return true; };
55
56 void setDisplayTetEdges(bool displayEdges);
57
58 void updateObjectColor(double r, double g, double b);
59
60private:
61 void updateVisibility(void);
62 void loadEdgeData(void);
63
64 std::string projectName;
65 unsigned long long entityID;
66 unsigned long long entityVersion;
67 unsigned long long meshDataTetEdgesID;
68 unsigned long long meshDataTetEdgesVersion;
69 bool needsInitialization;
70
71 Model *model;
72 SceneNodeMesh *mesh;
73
74 double colorRGB[3];
75 bool isVolume;
76
77 osg::Node *tetEdges;
78
79 std::vector<int> faceID;
80};
81
Mesh m
Definition SelfIntersectionCheck.cpp:26
@ h
Definition SourceTarget.h:4
The Model class is the main interface to the model. There may be multiple instances of this class....
Definition Model.h:94
Definition SceneNodeBase.h:14
Definition SceneNodeMesh.h:35
Definition SceneNodeMeshItem.h:22
void setDisplayTetEdges(bool displayEdges)
Definition SceneNodeMeshItem.cpp:378
virtual void getPrefetch(std::string &projectName, std::list< std::pair< unsigned long long, unsigned long long > > &prefetchIDs) override
Definition SceneNodeMeshItem.cpp:203
double getColorB(void)
Definition SceneNodeMeshItem.h:49
std::string getProjectName(void)
Definition SceneNodeMeshItem.h:35
virtual void setTransparent(bool t) override
Definition SceneNodeMeshItem.cpp:149
bool getIsVolume(void)
Definition SceneNodeMeshItem.h:45
SceneNodeMesh * getMesh(void)
Definition SceneNodeMeshItem.h:40
Model * getModel(void)
Definition SceneNodeMeshItem.h:37
SceneNodeMeshItem()
Definition SceneNodeMeshItem.cpp:30
virtual bool isItem3D(void)
Definition SceneNodeMeshItem.h:54
virtual bool isItem1D(void)
Definition SceneNodeMeshItem.h:53
virtual ~SceneNodeMeshItem()
Definition SceneNodeMeshItem.cpp:46
void updateObjectColor(double r, double g, double b)
Definition SceneNodeMeshItem.cpp:401
double getColorR(void)
Definition SceneNodeMeshItem.h:47
virtual void setHighlighted(bool h) override
Definition SceneNodeMeshItem.cpp:194
void ensureDataLoaded(void)
Definition SceneNodeMeshItem.cpp:71
void setMesh(SceneNodeMesh *m)
Definition SceneNodeMeshItem.h:41
virtual void setWireframe(bool w) override
Definition SceneNodeMeshItem.cpp:163
void setModel(Model *m)
Definition SceneNodeMeshItem.h:38
void setNeedsInitialization(void)
Definition SceneNodeMeshItem.h:33
void setStorage(const std::string &proj, unsigned long long id, unsigned long long version, long long tetEdgesID, long long tetEdgesVersion)
Definition SceneNodeMeshItem.h:32
double getColorG(void)
Definition SceneNodeMeshItem.h:48
virtual void setVisible(bool v) override
Definition SceneNodeMeshItem.cpp:176
Definition RubberbandOsgWrapper.h:22