![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Encapsulates selection data without exposing VTK types. More...
#include <cvSelectionData.h>
Public Types | |
| enum | FieldAssociation { CELLS = 0 , POINTS = 1 } |
| Field association for selection. More... | |
Public Member Functions | |
| cvSelectionData () | |
| Construct empty selection data. More... | |
| cvSelectionData (vtkIdTypeArray *vtkArray, int association) | |
| Construct from VTK selection array. More... | |
| cvSelectionData (const QVector< qint64 > &ids, FieldAssociation association) | |
| Construct from ID vector. More... | |
| cvSelectionData (const cvSelectionData &other) | |
| Copy constructor. More... | |
| cvSelectionData & | operator= (const cvSelectionData &other) |
| Assignment operator. More... | |
| ~cvSelectionData () | |
| Destructor. More... | |
| bool | isEmpty () const |
| Check if selection is empty. More... | |
| int | count () const |
| Get number of selected items. More... | |
| FieldAssociation | fieldAssociation () const |
| Get field association. More... | |
| QVector< qint64 > | ids () const |
| Get selected IDs as a vector (copy) More... | |
| vtkSmartPointer< vtkIdTypeArray > | vtkArray () const |
| Get the underlying VTK array (for internal use only) More... | |
| void | clear () |
| Clear the selection. More... | |
| QString | fieldTypeString () const |
| Get human-readable field type string. More... | |
| void | addActorInfo (const cvActorSelectionInfo &info) |
| Actor/Representation information (ParaView-style) More... | |
| void | setActorInfo (vtkActor *actor, vtkPolyData *polyData, double zValue=1.0) |
| Set actor information (single actor case) More... | |
| int | actorCount () const |
| Get number of actors in this selection. More... | |
| bool | hasActorInfo () const |
| Check if actor information is available. More... | |
| cvActorSelectionInfo | actorInfo (int index=0) const |
| Get actor info at index. More... | |
| QVector< cvActorSelectionInfo > | actorInfos () const |
| Get all actor infos. More... | |
| vtkActor * | primaryActor () const |
| Get the primary (front-most) actor. More... | |
| vtkPolyData * | primaryPolyData () const |
| Get the primary (front-most) polyData. More... | |
| void | clearActorInfo () |
| Clear actor information. More... | |
Encapsulates selection data without exposing VTK types.
This class provides a VTK-independent interface for selection data, hiding the underlying vtkIdTypeArray implementation.
Following ParaView's design pattern, this class can now store information about multiple selected actors/representations along with their selection data.
Definition at line 136 of file cvSelectionData.h.
Field association for selection.
| Enumerator | |
|---|---|
| CELLS | Selection applies to cells. |
| POINTS | Selection applies to points. |
Definition at line 141 of file cvSelectionData.h.
| cvSelectionData::cvSelectionData | ( | ) |
Construct empty selection data.
Definition at line 19 of file cvSelectionData.cpp.
| cvSelectionData::cvSelectionData | ( | vtkIdTypeArray * | vtkArray, |
| int | association | ||
| ) |
Construct from VTK selection array.
| vtkArray | The VTK array (will be deep copied) |
| association | Field association (0=cells, 1=points) |
Definition at line 23 of file cvSelectionData.cpp.
References vtkArray().
| cvSelectionData::cvSelectionData | ( | const QVector< qint64 > & | ids, |
| FieldAssociation | association | ||
| ) |
Construct from ID vector.
| ids | Vector of selected IDs |
| association | Field association |
Definition at line 45 of file cvSelectionData.cpp.
References ids().
| cvSelectionData::cvSelectionData | ( | const cvSelectionData & | other | ) |
Copy constructor.
Definition at line 58 of file cvSelectionData.cpp.
| cvSelectionData::~cvSelectionData | ( | ) |
Destructor.
Definition at line 109 of file cvSelectionData.cpp.
|
inline |
Get number of actors in this selection.
Definition at line 248 of file cvSelectionData.h.
Referenced by cvSelectionPipeline::combineSelections().
| cvActorSelectionInfo cvSelectionData::actorInfo | ( | int | index = 0 | ) | const |
Get actor info at index.
| index | Index in the list (0 = front-most) |
Note: List is sorted by Z-value (front to back)
Definition at line 173 of file cvSelectionData.cpp.
Referenced by cvSelectionPipeline::combineSelections().
|
inline |
Get all actor infos.
Definition at line 268 of file cvSelectionData.h.
| void cvSelectionData::addActorInfo | ( | const cvActorSelectionInfo & | info | ) |
Actor/Representation information (ParaView-style)
These methods provide access to information about which actors/ representations were involved in the selection, similar to ParaView's selectedRepresentations collection.
Add actor information to the selection
| info | Actor selection information |
Use this when performing hardware selection or when you need to track which specific actor was selected.
Definition at line 148 of file cvSelectionData.cpp.
References a.
Referenced by cvGenericSelectionTool::createSelectionFromPick().
| void cvSelectionData::clear | ( | ) |
Clear the selection.
Definition at line 137 of file cvSelectionData.cpp.
Referenced by cvSelectionPropertiesWidget::clearSelection().
| void cvSelectionData::clearActorInfo | ( | ) |
Clear actor information.
Definition at line 191 of file cvSelectionData.cpp.
| int cvSelectionData::count | ( | ) | const |
Get number of selected items.
Definition at line 119 of file cvSelectionData.cpp.
Referenced by cvSelectionFilter::combineAND(), cvSelectionFilter::combineOR(), cvSelectionAlgebra::complementOf(), cvSelectionAlgebra::differenceOf(), cvViewSelectionManager::expandSelection(), cvSelectionExporter::exportToMesh(), cvSelectionExporter::exportToPointCloud(), cvSelectionAlgebra::extractBoundary(), cvSelectionAlgebra::growPointSelection(), cvSelectionAlgebra::growSelection(), cvSelectionHighlighter::highlightSelection(), cvSelectionAlgebra::intersectionOf(), cvSelectionFilter::invert(), cvSelectionToolController::onSelectionFinished(), cvViewSelectionManager::setCurrentSelection(), cvSelectionAlgebra::shrinkPointSelection(), cvSelectionAlgebra::shrinkSelection(), cvSelectionAlgebra::symmetricDifferenceOf(), and cvSelectionAlgebra::unionOf().
|
inline |
Get field association.
Definition at line 193 of file cvSelectionData.h.
Referenced by cvSelectionAlgebra::areCompatible(), cvSelectionFilter::combineAND(), cvSelectionFilter::combineOR(), cvSelectionPipeline::combineSelections(), cvSelectionAlgebra::complementOf(), cvSelectionAlgebra::expandSelection(), cvSelectionExporter::exportFromSourceCloud(), cvSelectionExporter::exportFromSourceMesh(), cvSelectionExporter::exportToFile(), cvSelectionExporter::exportToMesh(), cvSelectionExporter::exportToPointCloud(), cvSelectionAlgebra::extractBoundary(), cvSelectionExporter::extractSelection(), cvSelectionFilter::filterByArea(), cvSelectionFilter::filterByAttributeComparison(), cvSelectionFilter::filterByAttributeRange(), cvSelectionFilter::filterByBoundingBox(), cvSelectionFilter::filterByDistanceFromPoint(), cvSelectionFilter::filterByNeighborCount(), cvSelectionFilter::filterByNormalAngle(), cvSelectionAlgebra::growPointSelection(), cvSelectionAlgebra::growSelection(), cvSelectionHighlighter::highlightSelection(), cvSelectionFilter::invert(), cvViewSelectionManager::setCurrentSelection(), cvSelectionAlgebra::shrinkPointSelection(), cvSelectionAlgebra::shrinkSelection(), and cvSelectionPropertiesWidget::updateSelection().
| QString cvSelectionData::fieldTypeString | ( | ) | const |
Get human-readable field type string.
Definition at line 143 of file cvSelectionData.cpp.
References CELLS.
Referenced by cvSelectionHighlighter::highlightSelection(), cvSelectionToolController::onSelectionFinished(), and cvViewSelectionManager::setCurrentSelection().
|
inline |
Check if actor information is available.
Definition at line 253 of file cvSelectionData.h.
Referenced by cvSelectionAlgebra::expandSelection(), cvRenderViewSelectionReaction::finalizeSelection(), cvSelectionBase::getPolyDataForSelection(), and cvGenericSelectionTool::getPolyDataForSelection().
| QVector< qint64 > cvSelectionData::ids | ( | ) | const |
Get selected IDs as a vector (copy)
Definition at line 124 of file cvSelectionData.cpp.
References result.
Referenced by cvSelectionFilter::combineAND(), cvSelectionFilter::combineOR(), cvSelectionAlgebra::complementOf(), cvSelectionData(), cvSelectionAlgebra::differenceOf(), cvSelectionAlgebra::expandSelection(), cvSelectionExporter::exportFromSourceCloud(), cvSelectionExporter::exportFromSourceMesh(), cvSelectionAlgebra::extractBoundary(), cvSelectionFilter::filterByArea(), cvSelectionFilter::filterByAttributeComparison(), cvSelectionFilter::filterByAttributeRange(), cvSelectionFilter::filterByBoundingBox(), cvSelectionFilter::filterByDistanceFromPoint(), cvSelectionFilter::filterByNeighborCount(), cvSelectionFilter::filterByNormalAngle(), cvSelectionAlgebra::growPointSelection(), cvSelectionAlgebra::growSelection(), cvSelectionAlgebra::intersectionOf(), cvSelectionFilter::invert(), cvSelectionAlgebra::shrinkPointSelection(), cvSelectionAlgebra::shrinkSelection(), cvSelectionAlgebra::symmetricDifferenceOf(), cvSelectionAlgebra::unionOf(), and cvSelectionPropertiesWidget::updateSelection().
| bool cvSelectionData::isEmpty | ( | ) | const |
Check if selection is empty.
Definition at line 114 of file cvSelectionData.cpp.
Referenced by cvSelectionAnnotationManager::addAnnotation(), cvSelectionAlgebra::areCompatible(), cvSelectionExporter::batchExportToFiles(), cvSelectionFilter::combineAND(), cvSelectionFilter::combineOR(), cvSelectionPipeline::combineSelections(), cvSelectionAlgebra::complementOf(), cvSelectionAlgebra::differenceOf(), cvViewSelectionManager::expandSelection(), cvSelectionAlgebra::expandSelection(), cvSelectionExporter::exportFromSourceCloud(), cvSelectionExporter::exportFromSourceMesh(), cvSelectionExporter::exportNumbered(), cvSelectionExporter::exportToFile(), cvSelectionExporter::exportToMesh(), cvSelectionExporter::exportToPointCloud(), cvSelectionAlgebra::extractBoundary(), cvSelectionExporter::extractSelection(), cvSelectionFilter::filterByArea(), cvSelectionFilter::filterByAttributeComparison(), cvSelectionFilter::filterByAttributeRange(), cvSelectionFilter::filterByBoundingBox(), cvSelectionFilter::filterByDistanceFromPoint(), cvSelectionFilter::filterByNeighborCount(), cvSelectionFilter::filterByNormalAngle(), cvRenderViewSelectionReaction::finalizeSelection(), cvSelectionAlgebra::growPointSelection(), cvSelectionAlgebra::growSelection(), cvGenericSelectionTool::hardwareSelectInRegion(), cvSelectionHighlighter::highlightSelection(), cvSelectionAlgebra::intersectionOf(), cvSelectionFilter::invert(), cvSelectionToolController::onSelectionFinished(), cvSelectionAlgebra::shrinkPointSelection(), cvSelectionAlgebra::shrinkSelection(), cvSelectionAlgebra::symmetricDifferenceOf(), cvSelectionAlgebra::unionOf(), and cvSelectionPropertiesWidget::updateSelection().
| cvSelectionData & cvSelectionData::operator= | ( | const cvSelectionData & | other | ) |
Assignment operator.
Definition at line 81 of file cvSelectionData.cpp.
| vtkActor * cvSelectionData::primaryActor | ( | ) | const |
Get the primary (front-most) actor.
This is the actor closest to the camera (smallest Z value)
Definition at line 181 of file cvSelectionData.cpp.
Referenced by cvSelectionAlgebra::expandSelection(), and cvRenderViewSelectionReaction::finalizeSelection().
| vtkPolyData * cvSelectionData::primaryPolyData | ( | ) | const |
Get the primary (front-most) polyData.
Definition at line 186 of file cvSelectionData.cpp.
Referenced by cvSelectionAlgebra::expandSelection(), cvSelectionBase::getPolyDataForSelection(), and cvGenericSelectionTool::getPolyDataForSelection().
| void cvSelectionData::setActorInfo | ( | vtkActor * | actor, |
| vtkPolyData * | polyData, | ||
| double | zValue = 1.0 |
||
| ) |
Set actor information (single actor case)
| actor | The selected actor |
| polyData | The associated polyData |
| zValue | Optional Z-buffer depth value |
Definition at line 159 of file cvSelectionData.cpp.
References cvActorSelectionInfo::actor, cvActorSelectionInfo::polyData, and cvActorSelectionInfo::zValue.
Referenced by cvSelectionAlgebra::expandSelection().
|
inline |
Get the underlying VTK array (for internal use only)
Definition at line 204 of file cvSelectionData.h.
Referenced by cvSelectionPipeline::combineSelections(), cvSelectionData(), cvSelectionExporter::extractSelection(), cvSelectionHighlighter::highlightSelection(), and cvViewSelectionManager::setCurrentSelection().