ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvPlanarEntityInterface.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 
10 // CV_CORE_LIB
11 #include <CVGeom.h>
12 
13 // LOCAL
14 #include "ecvColorTypes.h"
15 #include "ecvDrawContext.h"
16 
19 public:
22  ccPlanarEntityInterface(unsigned int id);
23 
25  inline void showNormalVector(bool state) { m_showNormalVector = state; }
27  inline bool normalVectorIsShown() const { return m_showNormalVector; }
28 
30  virtual CCVector3 getNormal() const = 0;
31 
34  const CCVector3& pos,
35  float scale,
36  const ecvColor::Rgb* color = 0);
37 
39 
40 protected: // members
43  unsigned int m_uniqueId;
44 
45  QString m_bodyId;
46  QString m_headId;
47 };
math::float4 color
Interface for a planar entity.
void glDrawNormal(CC_DRAW_CONTEXT &context, const CCVector3 &pos, float scale, const ecvColor::Rgb *color=0)
Draws a normal vector (OpenGL)
void clearNormalVector(CC_DRAW_CONTEXT &context)
void showNormalVector(bool state)
Show normal vector.
bool normalVectorIsShown() const
Whether normal vector is shown or not.
ccPlanarEntityInterface(unsigned int id)
bool m_showNormalVector
Whether the facet normal vector should be displayed or not.
ccPlanarEntityInterface()
Default constructor.
virtual CCVector3 getNormal() const =0
Returns the entity normal.
RGB color structure.
Definition: ecvColorTypes.h:49
ImGuiContext * context
Definition: Window.cpp:76
Display context.