VtkPickCallback is a vtkCommand that implements functionality when picking a vtk object through a vtkCellPicker.
Definition at line 16 of file VtkPickCallback.h.
#include <VtkPickCallback.h>
|
| void | actorPicked (vtkProp3D *actor) |
| | Is emitted when an vtkActor was picked.
|
|
| void | Execute (vtkObject *caller, unsigned long eventId, void *callData) override |
◆ VtkPickCallback()
| VtkPickCallback::VtkPickCallback |
( |
| ) |
|
|
protected |
◆ actorPicked
| void VtkPickCallback::actorPicked |
( |
vtkProp3D * | actor | ) |
|
|
signal |
Is emitted when an vtkActor was picked.
Referenced by Execute().
◆ Execute()
| void VtkPickCallback::Execute |
( |
vtkObject * | caller, |
|
|
unsigned long | eventId, |
|
|
void * | callData ) |
|
override |
Definition at line 17 of file VtkPickCallback.cpp.
20{
21 auto* picker = static_cast<vtkCellPicker*>(caller);
22 if (picker->GetCellId() < 0)
23 {
24
25 }
26 else
27 {
28 vtkActor* actor = picker->GetActor();
29 if (actor)
30 {
32 }
33
34 double* pos = picker->GetPickPosition();
35 INFO(
"Picked cell id is: {:d}", picker->GetCellId());
36 INFO(
"Picked position is: {:f} {:f} {:f}", pos[0], pos[1], pos[2]);
37 }
38}
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
void actorPicked(vtkProp3D *actor)
Is emitted when an vtkActor was picked.
References actorPicked(), and INFO().
◆ New()
The documentation for this class was generated from the following files: