PeriDyno 1.0.0
Loading...
Searching...
No Matches
PointInteraction.cu
Go to the documentation of this file.
1#include "PointInteraction.h"
2#include <thrust/sort.h>
3#include <iostream>
4#include <OrbitCamera.h>
5
6namespace dyno
7{
8 __global__ void PI_PointInitializeArray(
9 DArray<int> intersected)
10 {
11 int pId = threadIdx.x + (blockIdx.x * blockDim.x);
12 if (pId >= intersected.size()) return;
13
14 intersected[pId] = 0;
15 }
16
17 __global__ void PI_PointMergeIntersectedIndexOR(
18 DArray<int> intersected1,
19 DArray<int> intersected2,
20 DArray<int> outIntersected,
21 DArray<int> outUnintersected)
22 {
23 int pId = threadIdx.x + (blockIdx.x * blockDim.x);
24 if (pId >= intersected1.size()) return;
25
26 if (intersected1[pId] == 0 && intersected2[pId] == 0)
27 outIntersected[pId] = 0;
28 else
29 outIntersected[pId] = 1;
30
31 outUnintersected[pId] = outIntersected[pId] == 1 ? 0 : 1;
32 }
33
34 __global__ void PI_PointMergeIntersectedIndexXOR(
35 DArray<int> intersected1,
36 DArray<int> intersected2,
37 DArray<int> outIntersected,
38 DArray<int> outUnintersected)
39 {
40 int pId = threadIdx.x + (blockIdx.x * blockDim.x);
41 if (pId >= intersected1.size()) return;
42
43 if (intersected1[pId] == intersected2[pId])
44 outIntersected[pId] = 0;
45 else
46 outIntersected[pId] = 1;
47
48 outUnintersected[pId] = outIntersected[pId] == 1 ? 0 : 1;
49 }
50
51 __global__ void PI_PointMergeIntersectedIndexC(
52 DArray<int> intersected1,
53 DArray<int> intersected2,
54 DArray<int> outIntersected,
55 DArray<int> outUnintersected)
56 {
57 int pId = threadIdx.x + (blockIdx.x * blockDim.x);
58 if (pId >= intersected1.size()) return;
59
60 if (intersected2[pId] == 1)
61 outIntersected[pId] = 0;
62 else
63 outIntersected[pId] = intersected1[pId];
64
65 outUnintersected[pId] = outIntersected[pId] == 1 ? 0 : 1;
66 }
67
68 template<typename TDataType>
69 PointInteraction<TDataType>::PointInteraction()
70 {
71 this->ray1 = TRay3D<Real>();
72 this->ray2 = TRay3D<Real>();
73 this->isPressed = false;
74
75 this->outOtherPointSet()->setDataPtr(std::make_shared<PointSet<TDataType>>());
76 this->outOtherPointSet()->getDataPtr()->getPoints().resize(0);
77 this->outSelectedPointSet()->setDataPtr(std::make_shared<PointSet<TDataType>>());
78 this->outSelectedPointSet()->getDataPtr()->getPoints().resize(0);
79 }
80
81 template<typename TDataType>
82 void PointInteraction<TDataType>::onEvent(PMouseEvent event)
83 {
84 if (!event.altKeyPressed()) {
85 if (camera == nullptr)
86 {
87 this->camera = event.camera;
88 }
89 this->varToggleMultiSelect()->setValue(false);
90 if (event.shiftKeyPressed() || event.controlKeyPressed())
91 {
92 this->varToggleMultiSelect()->setValue(true);
93 if (event.shiftKeyPressed() && !event.controlKeyPressed())
94 {
95 this->varMultiSelectionType()->getDataPtr()->setCurrentKey(0);
96 }
97 else if (!event.shiftKeyPressed() && event.controlKeyPressed())
98 {
99 this->varMultiSelectionType()->getDataPtr()->setCurrentKey(1);;
100 }
101 else if (event.shiftKeyPressed() && event.controlKeyPressed())
102 {
103 this->varMultiSelectionType()->getDataPtr()->setCurrentKey(2);;
104 }
105 }
106 if (event.actionType == AT_PRESS)
107 {
108 this->camera = event.camera;
109 this->isPressed = true;
110 //printf("Mouse pressed: Origin: %f %f %f; Direction: %f %f %f \n", event.ray.origin.x, event.ray.origin.y, event.ray.origin.z, event.ray.direction.x, event.ray.direction.y, event.ray.direction.z);
111 this->ray1.origin = event.ray.origin;
112 this->ray1.direction = event.ray.direction;
113 this->x1 = event.x;
114 this->y1 = event.y;
115 if (this->varPointPickingType()->getValue() == PickingTypeSelection::Both || this->varPointPickingType()->getValue() == PickingTypeSelection::Click)
116 {
117 this->calcIntersectClick();
118 this->printInfoClick();
119 }
120 }
121 else if (event.actionType == AT_RELEASE)
122 {
123 this->isPressed = false;
124 //printf("Mouse released: Origin: %f %f %f; Direction: %f %f %f \n", event.ray.origin.x, event.ray.origin.y, event.ray.origin.z, event.ray.direction.x, event.ray.direction.y, event.ray.direction.z);
125 this->ray2.origin = event.ray.origin;
126 this->ray2.direction = event.ray.direction;
127 this->x2 = event.x;
128 this->y2 = event.y;
129 if (this->varToggleMultiSelect()->getValue() && this->varTogglePicker()->getValue())
130 {
131 this->mergeIndex();
132 this->printInfoDragRelease();
133 }
134 }
135 else
136 {
137 //printf("Mouse repeated: Origin: %f %f %f; Direction: %f %f %f \n", event.ray.origin.x, event.ray.origin.y, event.ray.origin.z, event.ray.direction.x, event.ray.direction.y, event.ray.direction.z);
138 if (this->isPressed)
139 {
140 this->ray2.origin = event.ray.origin;
141 this->ray2.direction = event.ray.direction;
142 this->x2 = event.x;
143 this->y2 = event.y;
144 if (this->x2 == this->x1 && this->y2 == this->y1)
145 {
146 if (this->varPointPickingType()->getValue() == PickingTypeSelection::Both || this->varPointPickingType()->getValue() == PickingTypeSelection::Click)
147 this->calcIntersectClick();
148 }
149 else
150 {
151 if (this->varPointPickingType()->getValue() == PickingTypeSelection::Both || this->varPointPickingType()->getValue() == PickingTypeSelection::Drag)
152 {
153 this->calcIntersectDrag();
154 this->printInfoDragging();
155 }
156 }
157 }
158 }
159 }
160 }
161
162 template <typename Real, typename Coord>
163 __global__ void PI_CalIntersectedPointsRay(
164 DArray<Coord> points,
165 DArray<int> intersected,
166 DArray<int> unintersected,
167 DArray<Real> pointDistance,
168 TRay3D<Real> mouseray,
169 Real radius)
170 {
171 int pId = threadIdx.x + (blockIdx.x * blockDim.x);
172 if (pId >= points.size()) return;
173
174 TSphere3D<Real> sphere = TSphere3D<Real>(points[pId], radius);
175 TSegment3D<Real> seg;
176 int temp = mouseray.intersect(sphere, seg);
177 if (temp > 0 || intersected[pId] == 1)
178 {
179 intersected[pId] = 1;
180 pointDistance[pId] = abs(TPoint3D<Real>(points[pId][0], points[pId][1], points[pId][2]).distance(TPoint3D<Real>(mouseray.origin[0], mouseray.origin[1], mouseray.origin[2])));
181 }
182 else
183 {
184 intersected[pId] = 0;
185 pointDistance[pId] = 3.4E38;
186 }
187 unintersected[pId] = (intersected[pId] == 1 ? 0 : 1);
188 }
189
190 __global__ void PI_CalPointsNearest(
191 int min_index,
192 DArray<int> intersected,
193 DArray<int> unintersected
194 )
195 {
196 int pId = threadIdx.x + (blockIdx.x * blockDim.x);
197 if (pId >= intersected.size()) return;
198
199 if (intersected[pId] == 1)
200 {
201 if (pId != min_index)
202 {
203 intersected[pId] = 0;
204 unintersected[pId] = 1;
205 }
206 }
207 }
208
209
210 template <typename Real, typename Coord>
211 __global__ void PI_CalIntersectedPointsBox(
212 DArray<Coord> points,
213 DArray<int> intersected,
214 DArray<int> unintersected,
215 TPlane3D<Real> plane13,
216 TPlane3D<Real> plane42,
217 TPlane3D<Real> plane14,
218 TPlane3D<Real> plane32,
219 Real radius,
220 TRay3D<Real> mouseray)
221 {
222 int pId = threadIdx.x + (blockIdx.x * blockDim.x);
223 if (pId >= points.size()) return;
224
225 bool flag = false;
226 float temp1 = ((points[pId] - plane13.origin).dot(plane13.normal)) * ((points[pId] - plane42.origin).dot(plane42.normal));
227 float temp2 = ((points[pId] - plane14.origin).dot(plane14.normal)) * ((points[pId] - plane32.origin).dot(plane32.normal));
228 if (temp1 >= 0 && temp2 >= 0)
229 flag = true;
230
231 TSphere3D<Real> sphere = TSphere3D<Real>(points[pId], radius);
232 TSegment3D<Real> seg;
233 int temp = mouseray.intersect(sphere, seg);
234 if (temp > 0)
235 flag = flag || true;
236 if (flag || intersected[pId] == 1)
237 intersected[pId] = 1;
238 else
239 intersected[pId] = 0;
240 unintersected[pId] = (intersected[pId] == 1 ? 0 : 1);
241 }
242
243 template <typename Coord>
244 __global__ void PI_AssignOutPoints(
245 DArray<Coord> points,
246 DArray<Coord> intersected_points,
247 DArray<Coord> unintersected_points,
248 DArray<int> outPointIndex,
249 DArray<int> intersected,
250 DArray<int> unintersected,
251 DArray<int> intersected_o)
252 {
253 int pId = threadIdx.x + (blockIdx.x * blockDim.x);
254 if (pId >= points.size()) return;
255
256 if (intersected_o[pId] == 1)
257 {
258 intersected_points[intersected[pId]] = points[pId];
259 outPointIndex[intersected[pId]] = pId;
260 }
261 else
262 {
263 unintersected_points[unintersected[pId]] = points[pId];
264 }
265 }
266
267 template<typename TDataType>
268 void PointInteraction<TDataType>::calcPointIntersectClick()
269 {
270 auto& initialPointSet = this->inInitialPointSet()->getData();
271 auto& points = initialPointSet.getPoints();
272
273 DArray<int> intersected;
274 intersected.resize(points.size());
275 cuExecute(points.size(),
276 PI_PointInitializeArray,
277 intersected
278 );
279 DArray<int> unintersected;
280 unintersected.resize(points.size());
281 this->tempNumT = points.size();
282
283 DArray<Real> pointDistance;
284 pointDistance.resize(points.size());
285
286 cuExecute(points.size(),
287 PI_CalIntersectedPointsRay,
288 points,
289 intersected,
290 unintersected,
291 pointDistance,
292 this->ray1,
293 this->varInteractionRadius()->getData()
294 );
295
296 int min_index = thrust::min_element(thrust::device, pointDistance.begin(), pointDistance.begin() + pointDistance.size()) - pointDistance.begin();
297
298 cuExecute(intersected.size(),
299 PI_CalPointsNearest,
300 min_index,
301 intersected,
302 unintersected
303 );
304
305 this->tempPointIntersectedIndex.assign(intersected);
306
307 if (this->varToggleMultiSelect()->getData())
308 {
309 if (this->pointIntersectedIndex.size() == 0)
310 {
311 this->pointIntersectedIndex.resize(points.size());
312 cuExecute(points.size(),
313 PI_PointInitializeArray,
314 this->pointIntersectedIndex
315 )
316 }
317 DArray<int> outIntersected;
318 outIntersected.resize(intersected.size());
319 DArray<int> outUnintersected;
320 outUnintersected.resize(unintersected.size());
321 if (this->varMultiSelectionType()->getValue() == MultiSelectionType::OR)
322 {
323 cuExecute(points.size(),
324 PI_PointMergeIntersectedIndexOR,
325 this->pointIntersectedIndex,
326 intersected,
327 outIntersected,
328 outUnintersected
329 );
330 }
331 else if (this->varMultiSelectionType()->getValue() == MultiSelectionType::XOR)
332 {
333 cuExecute(points.size(),
334 PI_PointMergeIntersectedIndexXOR,
335 this->pointIntersectedIndex,
336 intersected,
337 outIntersected,
338 outUnintersected
339 );
340 }
341 else if (this->varMultiSelectionType()->getValue() == MultiSelectionType::C)
342 {
343 cuExecute(points.size(),
344 PI_PointMergeIntersectedIndexC,
345 this->pointIntersectedIndex,
346 intersected,
347 outIntersected,
348 outUnintersected
349 );
350 }
351 intersected.assign(outIntersected);
352 unintersected.assign(outUnintersected);
353 }
354 else
355 {
356 this->pointIntersectedIndex.assign(intersected);
357 }
358 DArray<int> intersected_o;
359 intersected_o.assign(intersected);
360
361 int intersected_size = thrust::reduce(thrust::device, intersected.begin(), intersected.begin() + intersected.size(), (int)0, thrust::plus<int>());
362 DArray<int> outPointIndex;
363 outPointIndex.resize(intersected_size);
364 thrust::exclusive_scan(thrust::device, intersected.begin(), intersected.begin() + intersected.size(), intersected.begin());
365 DArray<Coord> intersected_points;
366 intersected_points.resize(intersected_size);
367
368 int unintersected_size = thrust::reduce(thrust::device, unintersected.begin(), unintersected.begin() + unintersected.size(), (int)0, thrust::plus<int>());
369 thrust::exclusive_scan(thrust::device, unintersected.begin(), unintersected.begin() + unintersected.size(), unintersected.begin());
370 DArray<Coord> unintersected_points;
371 unintersected_points.resize(unintersected_size);
372
373 cuExecute(points.size(),
374 PI_AssignOutPoints,
375 points,
376 intersected_points,
377 unintersected_points,
378 outPointIndex,
379 intersected,
380 unintersected,
381 intersected_o
382 );
383 this->tempNumS = intersected_size;
384 this->outSelectedPointSet()->getDataPtr()->copyFrom(initialPointSet);
385 this->outSelectedPointSet()->getDataPtr()->setPoints(intersected_points);
386 this->outOtherPointSet()->getDataPtr()->copyFrom(initialPointSet);
387 this->outOtherPointSet()->getDataPtr()->setPoints(unintersected_points);
388 if (this->varToggleIndexOutput()->getValue())
389 {
390 this->outPointIndex()->getDataPtr()->assign(outPointIndex);
391 }
392 else
393 {
394 this->outPointIndex()->getDataPtr()->assign(intersected_o);
395 }
396 }
397
398 template<typename TDataType>
399 void PointInteraction<TDataType>::calcPointIntersectDrag()
400 {
401 if (x1 == x2)
402 {
403 x2 += 1.0f;
404 }
405 if (y1 == y2)
406 {
407 y2 += 1.0f;
408 }
409 TRay3D<Real> ray1 = this->camera->castRayInWorldSpace((float)x1, (float)y1);
410 TRay3D<Real> ray2 = this->camera->castRayInWorldSpace((float)x2, (float)y2);
411 TRay3D<Real> ray3 = this->camera->castRayInWorldSpace((float)x1, (float)y2);
412 TRay3D<Real> ray4 = this->camera->castRayInWorldSpace((float)x2, (float)y1);
413
414 TPlane3D<Real> plane13 = TPlane3D<Real>(ray1.origin, ray1.direction.cross(ray3.direction));
415 TPlane3D<Real> plane42 = TPlane3D<Real>(ray2.origin, ray2.direction.cross(ray4.direction));
416 TPlane3D<Real> plane14 = TPlane3D<Real>(ray4.origin, ray1.direction.cross(ray4.direction));
417 TPlane3D<Real> plane32 = TPlane3D<Real>(ray3.origin, ray2.direction.cross(ray3.direction));
418
419 auto& initialPointSet = this->inInitialPointSet()->getData();
420 auto& points = initialPointSet.getPoints();
421 DArray<int> intersected;
422 intersected.resize(points.size());
423 cuExecute(points.size(),
424 PI_PointInitializeArray,
425 intersected
426 );
427 DArray<int> unintersected;
428 unintersected.resize(points.size());
429 this->tempNumT = points.size();
430 cuExecute(points.size(),
431 PI_CalIntersectedPointsBox,
432 points,
433 intersected,
434 unintersected,
435 plane13,
436 plane42,
437 plane14,
438 plane32,
439 this->varInteractionRadius()->getData(),
440 this->ray1
441 );
442
443 this->tempPointIntersectedIndex.assign(intersected);
444
445 if (this->varToggleMultiSelect()->getData())
446 {
447 if (this->pointIntersectedIndex.size() == 0)
448 {
449 this->pointIntersectedIndex.resize(points.size());
450 cuExecute(points.size(),
451 PI_PointInitializeArray,
452 this->pointIntersectedIndex
453 )
454 }
455 DArray<int> outIntersected;
456 outIntersected.resize(intersected.size());
457 DArray<int> outUnintersected;
458 outUnintersected.resize(unintersected.size());
459 if (this->varMultiSelectionType()->getValue() == MultiSelectionType::OR)
460 {
461 cuExecute(points.size(),
462 PI_PointMergeIntersectedIndexOR,
463 this->pointIntersectedIndex,
464 intersected,
465 outIntersected,
466 outUnintersected
467 );
468 }
469 else if (this->varMultiSelectionType()->getValue() == MultiSelectionType::XOR)
470 {
471 cuExecute(points.size(),
472 PI_PointMergeIntersectedIndexXOR,
473 this->pointIntersectedIndex,
474 intersected,
475 outIntersected,
476 outUnintersected
477 );
478 }
479 else if (this->varMultiSelectionType()->getValue() == MultiSelectionType::C)
480 {
481 cuExecute(points.size(),
482 PI_PointMergeIntersectedIndexC,
483 this->pointIntersectedIndex,
484 intersected,
485 outIntersected,
486 outUnintersected
487 );
488 }
489 intersected.assign(outIntersected);
490 unintersected.assign(outUnintersected);
491 }
492 else
493 {
494 this->pointIntersectedIndex.assign(intersected);
495 }
496
497 DArray<int> intersected_o;
498 intersected_o.assign(intersected);
499
500 int intersected_size = thrust::reduce(thrust::device, intersected.begin(), intersected.begin() + intersected.size(), (int)0, thrust::plus<int>());
501 DArray<int> outPointIndex;
502 outPointIndex.resize(intersected_size);
503 thrust::exclusive_scan(thrust::device, intersected.begin(), intersected.begin() + intersected.size(), intersected.begin());
504 DArray<Coord> intersected_points;
505 intersected_points.resize(intersected_size);
506
507 int unintersected_size = thrust::reduce(thrust::device, unintersected.begin(), unintersected.begin() + unintersected.size(), (int)0, thrust::plus<int>());
508 thrust::exclusive_scan(thrust::device, unintersected.begin(), unintersected.begin() + unintersected.size(), unintersected.begin());
509 DArray<Coord> unintersected_points;
510 unintersected_points.resize(unintersected_size);
511
512 cuExecute(points.size(),
513 PI_AssignOutPoints,
514 points,
515 intersected_points,
516 unintersected_points,
517 outPointIndex,
518 intersected,
519 unintersected,
520 intersected_o
521 );
522 this->tempNumS = intersected_size;
523 this->outSelectedPointSet()->getDataPtr()->copyFrom(initialPointSet);
524 this->outSelectedPointSet()->getDataPtr()->setPoints(intersected_points);
525 this->outOtherPointSet()->getDataPtr()->copyFrom(initialPointSet);
526 this->outOtherPointSet()->getDataPtr()->setPoints(unintersected_points);
527 if (this->varToggleIndexOutput()->getValue())
528 {
529 this->outPointIndex()->getDataPtr()->assign(outPointIndex);
530 }
531 else
532 {
533 this->outPointIndex()->getDataPtr()->assign(intersected_o);
534 }
535 }
536
537 template<typename TDataType>
538 void PointInteraction<TDataType>::mergeIndex()
539 {
540 auto& initialPointSet = this->inInitialPointSet()->getData();
541 auto& points = initialPointSet.getPoints();
542 DArray<int> intersected;
543 intersected.resize(points.size());
544 cuExecute(points.size(),
545 PI_PointInitializeArray,
546 intersected
547 );
548 DArray<int> unintersected;
549 unintersected.resize(points.size());
550 this->tempNumT = points.size();
551
552 DArray<int> outIntersected;
553 outIntersected.resize(intersected.size());
554 DArray<int> outUnintersected;
555 outUnintersected.resize(unintersected.size());
556
557 if (this->varMultiSelectionType()->getValue() == MultiSelectionType::OR)
558 {
559 cuExecute(points.size(),
560 PI_PointMergeIntersectedIndexOR,
561 this->pointIntersectedIndex,
562 this->tempPointIntersectedIndex,
563 outIntersected,
564 outUnintersected
565 );
566 }
567 else if (this->varMultiSelectionType()->getValue() == MultiSelectionType::XOR)
568 {
569 cuExecute(points.size(),
570 PI_PointMergeIntersectedIndexXOR,
571 this->pointIntersectedIndex,
572 this->tempPointIntersectedIndex,
573 outIntersected,
574 outUnintersected
575 );
576 }
577 else if (this->varMultiSelectionType()->getValue() == MultiSelectionType::C)
578 {
579 cuExecute(points.size(),
580 PI_PointMergeIntersectedIndexC,
581 this->pointIntersectedIndex,
582 this->tempPointIntersectedIndex,
583 outIntersected,
584 outUnintersected
585 );
586 }
587
588 intersected.assign(outIntersected);
589 unintersected.assign(outUnintersected);
590 this->pointIntersectedIndex.assign(intersected);
591
592 DArray<int> intersected_o;
593 intersected_o.assign(intersected);
594
595 int intersected_size = thrust::reduce(thrust::device, intersected.begin(), intersected.begin() + intersected.size(), (int)0, thrust::plus<int>());
596 DArray<int> outPointIndex;
597 outPointIndex.resize(intersected_size);
598 thrust::exclusive_scan(thrust::device, intersected.begin(), intersected.begin() + intersected.size(), intersected.begin());
599 DArray<Coord> intersected_points;
600 intersected_points.resize(intersected_size);
601
602 int unintersected_size = thrust::reduce(thrust::device, unintersected.begin(), unintersected.begin() + unintersected.size(), (int)0, thrust::plus<int>());
603 thrust::exclusive_scan(thrust::device, unintersected.begin(), unintersected.begin() + unintersected.size(), unintersected.begin());
604 DArray<Coord> unintersected_points;
605 unintersected_points.resize(unintersected_size);
606
607 cuExecute(points.size(),
608 PI_AssignOutPoints,
609 points,
610 intersected_points,
611 unintersected_points,
612 outPointIndex,
613 intersected,
614 unintersected,
615 intersected_o
616 );
617 this->tempNumS = intersected_size;
618 this->outSelectedPointSet()->getDataPtr()->copyFrom(initialPointSet);
619 this->outSelectedPointSet()->getDataPtr()->setPoints(intersected_points);
620 this->outOtherPointSet()->getDataPtr()->copyFrom(initialPointSet);
621 this->outOtherPointSet()->getDataPtr()->setPoints(unintersected_points);
622 if (this->varToggleIndexOutput()->getValue())
623 {
624 this->outPointIndex()->getDataPtr()->assign(outPointIndex);
625 }
626 else
627 {
628 this->outPointIndex()->getDataPtr()->assign(intersected_o);
629 }
630 }
631
632 template<typename TDataType>
633 void PointInteraction<TDataType>::printInfoClick()
634 {
635 std::cout << "----------point picking: click----------" << std::endl;
636 std::cout << "multiple picking: " << this->varToggleMultiSelect()->getValue() << std::endl;
637 std::cout << "Interation radius:" << this->varInteractionRadius()->getValue() << std::endl;
638 std::cout << "selected num/ total num:" << this->tempNumS << "/" << this->tempNumT << std::endl;
639 }
640
641 template<typename TDataType>
642 void PointInteraction<TDataType>::printInfoDragging()
643 {
644 std::cout << "----------point picking: dragging----------" << std::endl;
645 std::cout << "multiple picking: " << this->varToggleMultiSelect()->getValue() << std::endl;
646 std::cout << "Interation radius:" << this->varInteractionRadius()->getValue() << std::endl;
647 std::cout << "selected num/ total num:" << this->tempNumS << "/" << this->tempNumT << std::endl;
648 }
649
650 template<typename TDataType>
651 void PointInteraction<TDataType>::printInfoDragRelease()
652 {
653 std::cout << "----------point picking: drag release----------" << std::endl;
654 std::cout << "multiple picking: " << this->varToggleMultiSelect()->getValue() << std::endl;
655 std::cout << "Interation radius:" << this->varInteractionRadius()->getValue() << std::endl;
656 std::cout << "selected num/ total num:" << this->tempNumS << "/" << this->tempNumT << std::endl;
657 }
658
659 template<typename TDataType>
660 void PointInteraction<TDataType>::calcIntersectClick()
661 {
662 if (this->varTogglePicker()->getData())
663 calcPointIntersectClick();
664 }
665
666 template<typename TDataType>
667 void PointInteraction<TDataType>::calcIntersectDrag()
668 {
669 if (this->varTogglePicker()->getData())
670 calcPointIntersectDrag();
671 }
672
673 DEFINE_CLASS(PointInteraction);
674}