 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
17 #include <vtkCellPicker.h>
18 #include <vtkHardwareSelector.h>
19 #include <vtkPointPicker.h>
20 #include <vtkSmartPointer.h>
26 class vtkRenderWindowInteractor;
64 m_useHardwareSelection(false),
65 m_captureZValues(true),
66 m_multipleSelectionMode(false),
67 m_interactor(nullptr),
68 m_renderer(nullptr) {}
166 QVector<cvActorSelectionInfo> getActorsAtPoint(
int x,
int y);
184 m_useHardwareSelection = enable;
203 m_multipleSelectionMode = enable;
231 void initializePickers();
243 vtkIdType pickAtPosition(
int x,
int y,
bool selectCells);
253 vtkIdType pickAtCursor(
bool selectCells);
260 m_interactor = interactor;
272 void setRenderer(vtkRenderer* renderer) { m_renderer = renderer; }
284 void setPickerTolerance(
double cellTolerance,
double pointTolerance);
296 vtkActor* getPickedActor(
bool selectCells);
306 vtkPolyData* getPickedPolyData(
bool selectCells);
315 bool getPickedPosition(
bool selectCells,
double position[3]);
345 int fieldAssociation);
354 vtkHardwareSelector* getHardwareSelector();
362 vtkHardwareSelector* configureHardwareSelector(
const int region[4],
363 int fieldAssociation);
368 QVector<cvActorSelectionInfo> extractActorInfo(
369 vtkHardwareSelector* selector, vtkSelection* vtkSel);
375 vtkSelection* vtkSel,
376 const QVector<cvActorSelectionInfo>& actorInfos);
388 vtkRenderer* getRenderer();
void addActorInfo(const cvActorSelectionInfo &info)
Actor/Representation information (ParaView-style)
Definition: cvSelectionData.cpp:148
@ SELECTION_SUBTRACTION
Subtract from selection (Shift)
int actorCount() const
Get number of actors in this selection.
Definition: cvSelectionData.h:248
normal_z x
Definition: my_point_types.h:165
@ SELECT_FRUSTUM_POINTS
Select points in frustum.
bool hasActorInfo() const
Check if actor information is available.
Definition: cvSelectionData.h:253
SelectionModifier
Selection modifiers for combining selections.
Definition: cvSelectionData.h:80
FieldAssociation fieldAssociation() const
Get field association.
Definition: cvSelectionData.h:193
unsigned int blockIndex
Block index for composite datasets.
Definition: cvSelectionData.h:114
QSet< T > qSetFromVector(const QVector< T > &vec)
Definition: QtCompat.h:1073
@ FRUSTUM_CELLS
Frustum cells.
Definition: cvSelectionPipeline.h:63
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
vtkRenderer * getCurrentRenderer(int viewport=0)
Definition: PCLVis.cpp:2924
FieldAssociation
Field association type.
Definition: cvSelectionPipeline.h:72
SelectionType
Selection type.
Definition: cvSelectionPipeline.h:60
@ FRUSTUM_POINTS
Frustum points.
Definition: cvSelectionPipeline.h:64
PclUtils::PCLVis * getPCLVis() const
Get PCLVis instance (for VTK-specific operations)
Definition: cvSelectionBase.cpp:33
virtual vtkPolyData * getPolyDataForSelection(const cvSelectionData *selectionData=nullptr)
Get polyData using ParaView-style priority (centralized method)
Definition: cvSelectionBase.cpp:72
core::Tensor result
Definition: VtkUtils.cpp:76
@ SELECTION_ADDITION
Add to selection (Ctrl)
CombineOperation
Selection combination methods (ParaView-style)
Definition: cvSelectionPipeline.h:389
normal_z y
Definition: my_point_types.h:168
double zValue
Z-buffer depth value (for front-to-back ordering)
Definition: cvSelectionData.h:112
int propId
Unique prop ID (from hardware selector)
Definition: cvSelectionData.h:113
@ SELECT_SURFACE_CELLS
Select cells on surface (rectangle)
@ OPERATION_ADDITION
Union (sel1 | sel2)
Definition: cvSelectionPipeline.h:391
bool isEmpty() const
Check if selection is empty.
Definition: cvSelectionData.cpp:114
@ SELECTION_DEFAULT
Replace selection (default)
cvActorSelectionInfo actorInfo(int index=0) const
Get actor info at index.
Definition: cvSelectionData.cpp:173
@ CELLS
Selection applies to cells.
Definition: cvSelectionData.h:142
vtkSmartPointer< vtkSelection > executeRectangleSelection(int region[4], SelectionType type)
Execute a rectangular selection.
Definition: cvSelectionPipeline.cpp:94
Selection pipeline abstraction layer.
Definition: cvSelectionPipeline.h:53
@ FIELD_ASSOCIATION_CELLS
Definition: cvSelectionPipeline.h:73
Central manager for all selection operations in the view.
Definition: cvViewSelectionManager.h:52
static cvSelectionData combineSelections(const cvSelectionData &sel1, const cvSelectionData &sel2, CombineOperation operation)
Combine two selections.
Definition: cvSelectionPipeline.cpp:983
int count() const
Get number of selected items.
Definition: cvSelectionData.cpp:119
vtkPolyData * polyData
The associated polyData (weak pointer)
Definition: cvSelectionData.h:111
cvSelectionPipeline * getPipeline()
Get the selection pipeline.
Definition: cvViewSelectionManager.h:214
a[190]
Definition: essential_matrix_poly.h:19
@ SELECTION_TOGGLE
Toggle selection (Ctrl+Shift)
QVector< qint64 > ids() const
Get selected IDs as a vector (copy)
Definition: cvSelectionData.cpp:124
@ POINTS
Selection applies to points.
Definition: cvSelectionData.h:143
bool hasValidPCLVis() const
Check if visualizer is valid and is PCLVis.
Definition: cvSelectionBase.cpp:41
static cvSelectionData convertToCvSelectionData(vtkSelection *selection, FieldAssociation fieldAssociation)
Convert vtkSelection to cvSelectionData with actor info (ParaView-style)
Definition: cvSelectionPipeline.cpp:804
@ OPERATION_TOGGLE
XOR (sel1 ^ sel2)
Definition: cvSelectionPipeline.h:393
@ OPERATION_DEFAULT
Replace (sel2 only)
Definition: cvSelectionPipeline.h:390
Encapsulates selection data without exposing VTK types.
Definition: cvSelectionData.h:136
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Definition: CVLog.cpp:133
Lightweight base class for all selection-related components.
Definition: cvSelectionBase.h:44
#define QPCL_ENGINE_LIB_API
Definition: qPCL.h:15
@ SELECT_FRUSTUM_CELLS
Select cells in frustum.
SelectionMode
Selection modes matching ParaView's SelectionMode enum.
Definition: cvSelectionData.h:36
QVector< T > qVectorFromSet(const QSet< T > &set)
Definition: QtCompat.h:1078
@ OPERATION_SUBTRACTION
Difference (sel1 & !sel2)
Definition: cvSelectionPipeline.h:392
@ SURFACE_CELLS
Surface cells (rectangle)
Definition: cvSelectionPipeline.h:61
FieldAssociation
Field association for selection.
Definition: cvSelectionData.h:141
@ SELECT_SURFACE_POINTS
Select points on surface (rectangle)
vtkPolyData * primaryPolyData() const
Get the primary (front-most) polyData.
Definition: cvSelectionData.cpp:186
@ SURFACE_POINTS
Surface points (rectangle)
Definition: cvSelectionPipeline.h:62
@ FIELD_ASSOCIATION_POINTS
Definition: cvSelectionPipeline.h:74
Information about a selected actor/representation.
Definition: cvSelectionData.h:109
vtkActor * actor
The selected actor (weak pointer)
Definition: cvSelectionData.h:110