VtkPickCallback is a vtkCommand that implements functionality when picking a vtk object through a vtkCellPicker.
Definition at line 28 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 28 of file VtkPickCallback.cpp.
31{
32 auto* picker = static_cast<vtkCellPicker*>(caller);
33 if (picker->GetCellId() < 0)
34 {
35
36 }
37 else
38 {
39 vtkActor* actor = picker->GetActor();
40 if (actor)
41 {
43 }
44
45 double* pos = picker->GetPickPosition();
46 INFO(
"Picked cell id is: {:d}", picker->GetCellId());
47 INFO(
"Picked position is: {:f} {:f} {:f}", pos[0], pos[1], pos[2]);
48 }
49}
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: