ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ccPinchNode.cpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #include "ccPinchNode.h"
9 
10 // pass ctors straight to PointPair
12  : ccPointPair(associatedCloud) {
14 }
15 
18 }
19 
21  // add metadata tag defining the ccCompass class type
22  QVariantMap* map = new QVariantMap();
23  map->insert("ccCompassType", "PinchNode");
24  setMetaData(*map, true);
25 
26  // set drawing stuff (not really metadata, but hey!)
31 }
32 
33 // returns true if object is a lineation
35  if (object->hasMetaData("ccCompassType")) {
36  return object->getMetaData("ccCompassType")
37  .toString()
38  .contains("PinchNode");
39  }
40  return false;
41 }
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
void setAlternateColor(const ecvColor::Rgb &col)
Definition: ccMeasurement.h:30
void setActiveColor(const ecvColor::Rgb &col)
Definition: ccMeasurement.h:29
void setDefaultColor(const ecvColor::Rgb &col)
Definition: ccMeasurement.h:25
void setHighlightColor(const ecvColor::Rgb &col)
Definition: ccMeasurement.h:26
void setMetaData(const QString &key, const QVariant &data)
Sets a meta-data element.
bool hasMetaData(const QString &key) const
Returns whether a meta-data element with the given key exists or not.
ccPinchNode(ccPointCloud *associatedCloud)
Definition: ccPinchNode.cpp:11
void updateMetadata() override
Definition: ccPinchNode.cpp:20
static bool isPinchNode(ccHObject *obj)
Definition: ccPinchNode.cpp:34
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Colored polyline.
Definition: ecvPolyline.h:24
constexpr Rgb blue(0, 0, MAX)
constexpr Rgb orange(MAX, MAX/2, 0)