15 auto edgeInteractor = std::make_shared<EdgeInteraction<TDataType>>();
18 mapper = std::make_shared<QuadSetToTriangleSet<TDataType>>();
19 this->inTopology()->connect(
mapper->inQuadSet());
28 this->varToggleVisibleFilter()->connect(
surfaceInteractor->varToggleVisibleFilter());
31 this->varToggleIndexOutput()->connect(
edgeInteractor->varToggleIndexOutput());
32 this->varToggleIndexOutput()->connect(
pointInteractor->varToggleIndexOutput());
34 this->varInteractionRadius()->connect(
edgeInteractor->varInteractionRadius());
35 this->varInteractionRadius()->connect(
pointInteractor->varInteractionRadius());
52 auto surfaceRender1 = std::make_shared<GLSurfaceVisualModule>();
53 surfaceRender1->setColor(
Color(0.2f, 0.48f, 0.75f));
54 surfaceRender1->varAlpha()->setValue(0.95f);
55 this->
surfaceInteractor->outSelectedTriangleSet()->connect(surfaceRender1->inTriangleSet());
58 auto surfaceRender2 = std::make_shared<GLSurfaceVisualModule>();
59 surfaceRender2->setColor(
Color(0.8f, 0.52f, 0.25f));
60 surfaceRender2->varAlpha()->setValue(0.85f);
61 this->
surfaceInteractor->outOtherTriangleSet()->connect(surfaceRender2->inTriangleSet());
64 auto edgeRender1 = std::make_shared<GLWireframeVisualModule>();
65 this->varEdgeSelectedSize()->connect(edgeRender1->varRadius());
66 edgeRender1->setColor(
Color(0.8f, 0.0f, 0.0f));
67 this->
edgeInteractor->outSelectedEdgeSet()->connect(edgeRender1->inEdgeSet());
70 auto edgeRender2 = std::make_shared<GLWireframeVisualModule>();
71 this->varEdgeOtherSize()->connect(edgeRender2->varRadius());
72 edgeRender2->setColor(
Color(0.0f));
73 this->
edgeInteractor->outOtherEdgeSet()->connect(edgeRender2->inEdgeSet());
76 auto pointRender1 = std::make_shared<GLPointVisualModule>();
77 this->varPointSelectedSize()->connect(pointRender1->varPointSize());
78 pointRender1->setColor(
Color(1.0f, 0.0f, 0.0f));
79 this->
pointInteractor->outSelectedPointSet()->connect(pointRender1->inPointSet());
82 auto pointRender2 = std::make_shared<GLPointVisualModule>();
83 this->varPointOtherSize()->connect(pointRender2->varPointSize());
84 pointRender2->setColor(
Color(0.0f, 0.0f, 1.0f));
85 this->
pointInteractor->outOtherPointSet()->connect(pointRender2->inPointSet());
88 this->varInteractionRadius()->setRange(0.001f , 1.0f);
89 this->varInteractionRadius()->setValue(0.01f);
90 this->varPointSelectedSize()->setRange(0.0f, 0.5f);
91 this->varPointOtherSize()->setRange(0.0f,0.5f);
92 this->varEdgeSelectedSize()->setRange(0.0f, 0.5f);
93 this->varEdgeOtherSize()->setRange(0.0f, 0.5f);
94 this->varFloodAngle()->setRange(0.0f, 180.0f);
98 this->varPickingElementType()->attach(callback1);
102 this->varPickingType()->attach(callback2);
106 this->varMultiSelectionType()->attach(callback3);
128 this->inTopology()->getDataPtr()->update();
137 this->
surfaceInteractor->outSelectedTriangleSet()->getDataPtr()->getTriangles().resize(0);
138 this->
surfaceInteractor->outOtherTriangleSet()->getDataPtr()->copyFrom(this->
mapper->outTriangleSet()->getData());
142 this->
edgeInteractor->outOtherEdgeSet()->getDataPtr()->copyFrom(this->inTopology()->getData());
146 this->
pointInteractor->outOtherPointSet()->getDataPtr()->copyFrom(this->inTopology()->getData());
152 if (this->varPickingElementType()->getValue() == PickingElementTypeSelection::Surface)
158 else if (this->varPickingElementType()->getValue() == PickingElementTypeSelection::Edge)
164 else if (this->varPickingElementType()->getValue() == PickingElementTypeSelection::Point)
170 else if (this->varPickingElementType()->getValue() == PickingElementTypeSelection::All)
182 if (this->varPickingType()->getValue() == PickingTypeSelection::Click)
184 this->
surfaceInteractor->varSurfacePickingType()-> getDataPtr()->setCurrentKey(0);
185 this->
edgeInteractor->varEdgePickingType()->getDataPtr()->setCurrentKey(0);
186 this->
pointInteractor->varPointPickingType()->getDataPtr()->setCurrentKey(0);
188 else if (this->varPickingType()->getValue() == PickingTypeSelection::Drag)
190 this->
surfaceInteractor->varSurfacePickingType()->getDataPtr()->setCurrentKey(1);
191 this->
edgeInteractor->varEdgePickingType()->getDataPtr()->setCurrentKey(1);
192 this->
pointInteractor->varPointPickingType()->getDataPtr()->setCurrentKey(1);
194 else if (this->varPickingType()->getValue() == PickingTypeSelection::Both)
196 this->
surfaceInteractor->varSurfacePickingType()->getDataPtr()->setCurrentKey(2);
197 this->
edgeInteractor->varEdgePickingType()->getDataPtr()->setCurrentKey(2);
198 this->
pointInteractor->varPointPickingType()->getDataPtr()->setCurrentKey(2);
206 if (this->varMultiSelectionType()->getValue() == MultiSelectionType::OR)
208 this->
surfaceInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(0);
209 this->
edgeInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(0);
210 this->
pointInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(0);
212 else if (this->varMultiSelectionType()->getValue() == MultiSelectionType::XOR)
214 this->
surfaceInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(1);
215 this->
edgeInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(1);
216 this->
pointInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(1);
218 else if (this->varMultiSelectionType()->getValue() == MultiSelectionType::C)
220 this->
surfaceInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(2);
221 this->
edgeInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(2);
222 this->
pointInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(2);