15 auto edgeInteractor = std::make_shared<EdgeInteraction<TDataType>>();
24 this->varToggleVisibleFilter()->connect(
surfaceInteractor->varToggleVisibleFilter());
27 this->varToggleIndexOutput()->connect(
edgeInteractor->varToggleIndexOutput());
28 this->varToggleIndexOutput()->connect(
pointInteractor->varToggleIndexOutput());
30 this->varInteractionRadius()->connect(
edgeInteractor->varInteractionRadius());
31 this->varInteractionRadius()->connect(
pointInteractor->varInteractionRadius());
47 auto surfaceRender1 = std::make_shared<GLSurfaceVisualModule>();
48 surfaceRender1->setColor(
Color(0.2f, 0.48f, 0.75f));
49 surfaceRender1->varAlpha()->setValue(0.95f);
50 this->
surfaceInteractor->outSelectedTriangleSet()->connect(surfaceRender1->inTriangleSet());
53 auto surfaceRender2 = std::make_shared<GLSurfaceVisualModule>();
54 surfaceRender2->setColor(
Color(0.8f, 0.52f, 0.25f));
55 surfaceRender2->varAlpha()->setValue(0.85f);
56 this->
surfaceInteractor->outOtherTriangleSet()->connect(surfaceRender2->inTriangleSet());
59 auto edgeRender1 = std::make_shared<GLWireframeVisualModule>();
60 this->varEdgeSelectedSize()->connect(edgeRender1->varRadius());
61 edgeRender1->setColor(
Color(0.8f, 0.0f, 0.0f));
62 this->
edgeInteractor->outSelectedEdgeSet()->connect(edgeRender1->inEdgeSet());
65 auto edgeRender2 = std::make_shared<GLWireframeVisualModule>();
66 this->varEdgeOtherSize()->connect(edgeRender2->varRadius());
67 edgeRender2->setColor(
Color(0.0f));
68 this->
edgeInteractor->outOtherEdgeSet()->connect(edgeRender2->inEdgeSet());
71 auto pointRender1 = std::make_shared<GLPointVisualModule>();
72 this->varPointSelectedSize()->connect(pointRender1->varPointSize());
73 pointRender1->setColor(
Color(1.0f, 0.0f, 0.0f));
74 this->
pointInteractor->outSelectedPointSet()->connect(pointRender1->inPointSet());
77 auto pointRender2 = std::make_shared<GLPointVisualModule>();
78 this->varPointOtherSize()->connect(pointRender2->varPointSize());
79 pointRender2->setColor(
Color(0.0f, 0.0f, 1.0f));
80 this->
pointInteractor->outOtherPointSet()->connect(pointRender2->inPointSet());
83 this->varInteractionRadius()->setRange(0.001f , 1.0f);
84 this->varInteractionRadius()->setValue(0.01f);
85 this->varPointSelectedSize()->setRange(0.0f, 0.5f);
86 this->varPointOtherSize()->setRange(0.0f,0.5f);
87 this->varEdgeSelectedSize()->setRange(0.0f, 0.5f);
88 this->varEdgeOtherSize()->setRange(0.0f, 0.5f);
89 this->varFloodAngle()->setRange(0.0f, 180.0f);
93 this->varPickingElementType()->attach(callback1);
97 this->varPickingType()->attach(callback2);
101 this->varMultiSelectionType()->attach(callback3);
123 this->inTopology()->getDataPtr()->update();
131 this->
surfaceInteractor->outSelectedTriangleSet()->getDataPtr()->getTriangles().resize(0);
132 this->
surfaceInteractor->outOtherTriangleSet()->getDataPtr()->copyFrom(this->inTopology()->getData());
136 this->
edgeInteractor->outOtherEdgeSet()->getDataPtr()->copyFrom(this->inTopology()->getData());
140 this->
pointInteractor->outOtherPointSet()->getDataPtr()->copyFrom(this->inTopology()->getData());
146 if (this->varPickingElementType()->getValue() == PickingElementTypeSelection::Surface)
152 else if (this->varPickingElementType()->getValue() == PickingElementTypeSelection::Edge)
158 else if (this->varPickingElementType()->getValue() == PickingElementTypeSelection::Point)
164 else if (this->varPickingElementType()->getValue() == PickingElementTypeSelection::All)
176 if (this->varPickingType()->getValue() == PickingTypeSelection::Click)
178 this->
surfaceInteractor->varSurfacePickingType()-> getDataPtr()->setCurrentKey(0);
179 this->
edgeInteractor->varEdgePickingType()->getDataPtr()->setCurrentKey(0);
180 this->
pointInteractor->varPointPickingType()->getDataPtr()->setCurrentKey(0);
182 else if (this->varPickingType()->getValue() == PickingTypeSelection::Drag)
184 this->
surfaceInteractor->varSurfacePickingType()->getDataPtr()->setCurrentKey(1);
185 this->
edgeInteractor->varEdgePickingType()->getDataPtr()->setCurrentKey(1);
186 this->
pointInteractor->varPointPickingType()->getDataPtr()->setCurrentKey(1);
188 else if (this->varPickingType()->getValue() == PickingTypeSelection::Both)
190 this->
surfaceInteractor->varSurfacePickingType()->getDataPtr()->setCurrentKey(2);
191 this->
edgeInteractor->varEdgePickingType()->getDataPtr()->setCurrentKey(2);
192 this->
pointInteractor->varPointPickingType()->getDataPtr()->setCurrentKey(2);
200 if (this->varMultiSelectionType()->getValue() == MultiSelectionType::OR)
202 this->
surfaceInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(0);
203 this->
edgeInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(0);
204 this->
pointInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(0);
206 else if (this->varMultiSelectionType()->getValue() == MultiSelectionType::XOR)
208 this->
surfaceInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(1);
209 this->
edgeInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(1);
210 this->
pointInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(1);
212 else if (this->varMultiSelectionType()->getValue() == MultiSelectionType::C)
214 this->
surfaceInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(2);
215 this->
edgeInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(2);
216 this->
pointInteractor->varMultiSelectionType()->getDataPtr()->setCurrentKey(2);