ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ccPointPair.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 <ecvCone.h>
12 #include <ecvCylinder.h>
13 #include <ecvPointCloud.h>
14 #include <ecvPolyline.h>
15 #include <ecvSphere.h>
16 
17 #include "ccMeasurement.h"
18 
19 /*
20 Template class, based around ccPolyline, that measurements comprising individual
21 or pairs of points can derive from.
22 */
23 class ccPointPair : public ccPolyline, public ccMeasurement {
24 public:
25  ccPointPair(ccPointCloud* associatedCloud);
26  ccPointPair(ccPolyline* obj); // used to construct from a polyline with the
27  // correct data
28 
29  virtual ~ccPointPair() {}
30 
31  virtual void updateMetadata() {};
32 
33  // get the direction of this pair (not normalized)
35 
36 protected:
37  // size that the point-markers are drawn
38  float m_relMarkerScale = 5.0f;
39 
40  // overidden from ccHObject
41  virtual void drawMeOnly(CC_DRAW_CONTEXT& context) override;
42 
43  // static functions
44 public:
45  // returns true if object is/was a ccPointPair (as defined by its MetaData)
46  static bool isPointPair(ccHObject* object);
47 };
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
ccPointPair(ccPointCloud *associatedCloud)
Definition: ccPointPair.cpp:18
virtual ~ccPointPair()
Definition: ccPointPair.h:29
virtual void drawMeOnly(CC_DRAW_CONTEXT &context) override
Draws the entity only (not its children)
Definition: ccPointPair.cpp:46
float m_relMarkerScale
Definition: ccPointPair.h:38
CCVector3 getDirection()
Definition: ccPointPair.cpp:35
virtual void updateMetadata()
Definition: ccPointPair.h:31
static bool isPointPair(ccHObject *object)
Colored polyline.
Definition: ecvPolyline.h:24
ImGuiContext * context
Definition: Window.cpp:76
Display context.