 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
10 #include <vtkSmartPointer.h>
12 #include <QKeySequence>
25 class vtkHardwareSelector;
26 class vtkRenderWindowInteractor;
63 QWidget* parent =
nullptr,
98 void setEnabled(
bool enabled,
bool setFocus =
false);
118 void pick(
double x,
double y,
double z);
130 double px,
double py,
double pz,
double nx,
double ny,
double nz);
139 void getCellNormal(vtkDataSet* dataset,
144 QPointer<ecvModalShortcut> m_shortcut;
145 QPointer<QWidget> m_contextWidget;
146 vtkRenderWindowInteractor* m_interactor =
nullptr;
147 vtkRenderer* m_renderer =
nullptr;
160 struct SelectionCache {
165 double normal[3] = {0, 0, 1};
void clearSelectionCache()
Clear the selection cache (ParaView-style optimization) Call this when the scene changes to invalidat...
Definition: cvPointPickingHelper.cpp:559
void setRenderer(vtkRenderer *renderer)
Set the VTK renderer for picking.
Definition: cvPointPickingHelper.cpp:104
@ Coordinates
Pick point coordinates only.
Definition: cvPointPickingHelper.h:48
normal_z x
Definition: my_point_types.h:165
bool copy
Definition: VtkUtils.cpp:74
double normal[3]
Definition: FileIOFactory.cpp:53
bool isEnabled() const
Check if shortcut is enabled.
Definition: cvPointPickingHelper.cpp:139
void pick(double x, double y, double z)
Emitted when a point is picked.
static bool PrintVerbose(const char *format,...)
Prints out a verbose formatted message in console.
Definition: CVLog.cpp:103
math::float3 position
Definition: LineSetBuffers.cpp:44
cvPointPickingHelper(const QKeySequence &keySequence, bool pickOnPoint, QWidget *parent=nullptr, PickOption pickOpt=Coordinates)
Constructor.
Definition: cvPointPickingHelper.cpp:47
void pickNormal(double px, double py, double pz, double nx, double ny, double nz)
Emitted when a point and normal are picked.
@ Normal
Pick normal only.
Definition: cvPointPickingHelper.h:49
bool pickOnPoint() const
Returns whether picking snaps to mesh points.
Definition: cvPointPickingHelper.h:70
Definition: WidgetMap.h:20
static bool PrintDebug(const char *format,...)
Same as Print, but works only in Debug mode.
Definition: CVLog.cpp:153
~cvPointPickingHelper() override
Definition: cvPointPickingHelper.cpp:91
double normals[3]
Definition: TriangleMeshIO.cpp:54
@ CoordinatesAndNormal
Pick both coordinates and normal.
Definition: cvPointPickingHelper.h:50
normal_z y
Definition: my_point_types.h:168
void setEnabled(bool enabled, bool setFocus=false)
Enable or disable the shortcut.
Definition: cvPointPickingHelper.cpp:129
void setContextWidget(QWidget *widget)
Set the context widget for the shortcut.
Definition: cvPointPickingHelper.cpp:109
static ecvKeySequences & instance()
Definition: ecvKeySequences.cpp:52
PickOption
Definition: cvPointPickingHelper.h:47
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Definition: CVLog.cpp:133
PickOption getPickOption() const
Returns the pick option.
Definition: cvPointPickingHelper.h:75
ecvModalShortcut * addModalShortcut(const QKeySequence &keySequence, QAction *action, QWidget *parent)
Definition: ecvKeySequences.cpp:83
Definition: ccGuiPythonInstance.h:15
void setInteractor(vtkRenderWindowInteractor *interactor)
Set the VTK interactor for picking.
Definition: cvPointPickingHelper.cpp:98
normal_z z
Definition: my_point_types.h:165
cvPointPickingHelper is a helper class for supporting keyboard shortcut-based point picking in measur...
Definition: cvPointPickingHelper.h:43