ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ccTopologyTool.h
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 #pragma once
9 
11 #include <ecvColorTypes.h>
12 
13 #include "ccGeoObject.h"
14 #include "ccTool.h"
15 #include "ccTopologyRelation.h"
16 
17 /*
18 Tool used to assign topology (timing) relationships between different
19 GeoObjects.
20 */
21 class ccTopologyTool : public ccTool {
22 public:
24  virtual ~ccTopologyTool();
25 
26  // called when the tool is set to active (for initialization)
27  virtual void toolActivated() override;
28 
29  // called when the tool is set to disactive (for cleanup)
30  virtual void toolDisactivated() override;
31 
32  // called when the selection is changed while this tool is active
33  virtual void onNewSelection(
34  const ccHObject::Container& selectedEntities) override;
35 
36  // called when "Return" or "Space" is pressed, or the "Accept Button" is
37  // clicked
38  void accept() override; // do nothing
39 
40  // called when the "Escape" is pressed, or the "Cancel" button is clicked
41  void cancel() override; // do nothing
42 protected:
43  int m_firstPick = -1; // first object of a (pairwise) topology relationship
44 public:
45  static int RELATIONSHIP; // used to define the topology relationship being
46  // assigned (possible values are in
47  // ccTopologyRelation)
48 };
std::vector< ccHObject * > Container
Standard instances container (for children, etc.)
Definition: ecvHObject.h:337
Definition: ccTool.h:18
void cancel() override
static int RELATIONSHIP
virtual void toolActivated() override
virtual ~ccTopologyTool()
virtual void onNewSelection(const ccHObject::Container &selectedEntities) override
void accept() override
virtual void toolDisactivated() override