49 #ifndef STATUSVIEWNODE_C 50 #define STATUSVIEWNODE_C 54 #include "StatusViewNodeT.hh" 55 #include <ACG/Scenegraph/DrawModes.hh> 66 StatusViewNodeT<MeshT>::StatusViewNodeT(
68 const std::string& _name,
74 statusNode_(_statusNode),
76 handleNode_(_handleNode),
77 featureNode_(_featureNode),
78 statusNodeVis_(false),
80 handleNodeVis_(false),
81 featureNodeVis_(false)
87 template <
class MeshT>
95 for (
int i = 0; i < 4; ++i)
96 singleLayers[i].removeLayer(0u);
98 for (
unsigned int i = 0; i < _drawMode.
getNumLayers(); ++i)
102 switch (props->primitive())
114 for (
int i = 0; i < 4; ++i)
117 if (singleLayers[i].getNumLayers() == 0)
123 case 0: defaultProps.primitive(DrawModes::PRIMITIVE_POLYGON);
break;
124 case 1: defaultProps.primitive(DrawModes::PRIMITIVE_EDGE);
break;
125 case 2: defaultProps.primitive(DrawModes::PRIMITIVE_HALFEDGE);
break;
126 case 3: defaultProps.primitive(DrawModes::PRIMITIVE_POINT);
break;
130 singleLayers[i].
addLayer(&defaultProps);
137 areaNode_->enter(_state, singleLayers[i]);
138 areaNode_->draw(_state, singleLayers[i]);
139 areaNode_->leave(_state, singleLayers[i]);
144 handleNode_->enter(_state, singleLayers[i]);
145 handleNode_->draw(_state, singleLayers[i]);
146 handleNode_->leave(_state, singleLayers[i]);
151 featureNode_->enter(_state, singleLayers[i]);
152 featureNode_->draw(_state, singleLayers[i]);
153 featureNode_->leave(_state, singleLayers[i]);
158 statusNode_->enter(_state, singleLayers[i]);
159 statusNode_->draw(_state, singleLayers[i]);
160 statusNode_->leave(_state, singleLayers[i]);
168 template <
class MeshT>
179 for (
int i = 0; i < 4; ++i)
180 singleLayers[i].removeLayer(0u);
182 for (
unsigned int i = 0; i < _drawMode.
getNumLayers(); ++i)
186 switch (props->primitive())
199 for (
int i = 0; i < 4; ++i)
202 if (singleLayers[i].getNumLayers() == 0)
208 case 0: defaultProps.primitive(DrawModes::PRIMITIVE_POLYGON);
break;
209 case 1: defaultProps.primitive(DrawModes::PRIMITIVE_EDGE);
break;
210 case 2: defaultProps.primitive(DrawModes::PRIMITIVE_HALFEDGE);
break;
211 case 3: defaultProps.primitive(DrawModes::PRIMITIVE_POINT);
break;
215 singleLayers[i].
addLayer(&defaultProps);
235 template <
class MeshT>
238 statusNodeVis_ = statusNode_ && statusNode_->visible();
239 areaNodeVis_ = areaNode_ && areaNode_->visible();
240 handleNodeVis_ = handleNode_ && handleNode_->visible();
241 featureNodeVis_ = featureNode_ && featureNode_->visible();
253 featureNode_->hide();
258 template <
class MeshT>
268 featureNode_->show();
275 #endif // STATUSVIEWNODE_C
Namespace providing different geometric functions concerning angles.
void draw(GLState &, const DrawModes::DrawMode &) override
Draw this node using the draw modes _drawMode.
void addLayer(const DrawModeProperties *_props)
add another layer on top of this drawmode
DrawModeProperties stores a set of properties that defines, how to render an object.
void setDrawModeProperties(const DrawModeProperties *_props)
set the base properties of this draw mode
void getRenderObjects(IRenderer *_renderer, GLState &_state, const DrawModes::DrawMode &_drawMode, const Material *_mat) override
Deferred draw call with shader based renderer.
void getRenderObjects(IRenderer *_renderer, GLState &_state, const DrawModes::DrawMode &_drawMode, const class Material *_mat) override
support for shader-pipeline
void enter(GLState &_state, const DrawModes::DrawMode &_drawmode) override
const DrawModeProperties * getLayer(unsigned int _i) const
returns the property set at layer i
void leave(GLState &_state, const DrawModes::DrawMode &_drawmode) override
size_t getNumLayers() const
returns the layer count