OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
SceneNodeCartesianMeshItem.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#include <vector>
16
17#include <osg/Array>
18
19class Model;
21
23{
24public:
27
28 virtual void setTransparent(bool t) override;
29 virtual void setWireframe(bool w) override;
30 virtual void setVisible(bool v) override;
31 virtual void setHighlighted(bool h) override;
32
33 Model *getModel(void) { return model; };
34 void setModel(Model *m) { model = m; };
35
36 SceneNodeCartesianMesh *getMesh(void) { return mesh; };
37 void setMesh(SceneNodeCartesianMesh *m) { mesh = m; };
38
39 bool getIsVolume(void) { return isVolume; };
40
41 double getColorR(void) { return colorRGB[0]; };
42 double getColorG(void) { return colorRGB[1]; };
43 double getColorB(void) { return colorRGB[2]; };
44
45 virtual bool isItem1D(void) { return false; };
46 virtual bool isItem3D(void) { return true; };
47
48 void setFacesList(std::vector<int> &faces);
49 void setColor(double r, double g, double b) { colorRGB[0] = r; colorRGB[1] = g; colorRGB[2] = b; }
50
51private:
52 void updateVisibility(void);
53
54 Model *model;
56
57 double colorRGB[3];
58 bool isVolume;
59
60 std::vector<int> faceID;
61};
62
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 SceneNodeCartesianMesh.h:36
Definition SceneNodeCartesianMeshItem.h:23
virtual void setWireframe(bool w) override
Definition SceneNodeCartesianMeshItem.cpp:69
void setColor(double r, double g, double b)
Definition SceneNodeCartesianMeshItem.h:49
virtual void setTransparent(bool t) override
Definition SceneNodeCartesianMeshItem.cpp:61
SceneNodeCartesianMeshItem()
Definition SceneNodeCartesianMeshItem.cpp:22
Model * getModel(void)
Definition SceneNodeCartesianMeshItem.h:33
void setFacesList(std::vector< int > &faces)
Definition SceneNodeCartesianMeshItem.cpp:99
double getColorG(void)
Definition SceneNodeCartesianMeshItem.h:42
void setModel(Model *m)
Definition SceneNodeCartesianMeshItem.h:34
SceneNodeCartesianMesh * getMesh(void)
Definition SceneNodeCartesianMeshItem.h:36
virtual bool isItem1D(void)
Definition SceneNodeCartesianMeshItem.h:45
virtual ~SceneNodeCartesianMeshItem()
Definition SceneNodeCartesianMeshItem.cpp:31
double getColorR(void)
Definition SceneNodeCartesianMeshItem.h:41
bool getIsVolume(void)
Definition SceneNodeCartesianMeshItem.h:39
virtual void setVisible(bool v) override
Definition SceneNodeCartesianMeshItem.cpp:77
virtual bool isItem3D(void)
Definition SceneNodeCartesianMeshItem.h:46
virtual void setHighlighted(bool h) override
Definition SceneNodeCartesianMeshItem.cpp:90
double getColorB(void)
Definition SceneNodeCartesianMeshItem.h:43
void setMesh(SceneNodeCartesianMesh *m)
Definition SceneNodeCartesianMeshItem.h:37
Definition RubberbandOsgWrapper.h:22