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 };
ccPlanarEntityInterface::m_uniqueId
unsigned int m_uniqueId
Definition: ecvPlanarEntityInterface.h:43
ecvColorTypes.h
ccPlanarEntityInterface::m_headId
QString m_headId
Definition: ecvPlanarEntityInterface.h:46
ccPlanarEntityInterface::getNormal
virtual CCVector3 getNormal() const =0
Returns the entity normal.
ccPlanarEntityInterface::clearNormalVector
void clearNormalVector(CC_DRAW_CONTEXT &context)
Definition: ecvPlanarEntityInterface.cpp:114
color
math::float4 color
Definition: LineSetBuffers.cpp:46
ccPlanarEntityInterface::normalVectorIsShown
bool normalVectorIsShown() const
Whether normal vector is shown or not.
Definition: ecvPlanarEntityInterface.h:27
ecvDrawContext.h
context
ImGuiContext * context
Definition: Window.cpp:76
ccPlanarEntityInterface::showNormalVector
void showNormalVector(bool state)
Show normal vector.
Definition: ecvPlanarEntityInterface.h:25
Vector3Tpl< PointCoordinateType >
ccPlanarEntityInterface::m_showNormalVector
bool m_showNormalVector
Whether the facet normal vector should be displayed or not.
Definition: ecvPlanarEntityInterface.h:42
ccPlanarEntityInterface::glDrawNormal
void glDrawNormal(CC_DRAW_CONTEXT &context, const CCVector3 &pos, float scale, const ecvColor::Rgb *color=0)
Draws a normal vector (OpenGL)
Definition: ecvPlanarEntityInterface.cpp:29
ccPlanarEntityInterface::m_bodyId
QString m_bodyId
Definition: ecvPlanarEntityInterface.h:45
CVGeom.h
ecvColor::RgbTpl
RGB color structure.
Definition: ecvColorTypes.h:49
ccGLDrawContext
Display context.
Definition: ecvDrawContext.h:365
ccPlanarEntityInterface::ccPlanarEntityInterface
ccPlanarEntityInterface()
Default constructor.
Definition: ecvPlanarEntityInterface.cpp:18
ccPlanarEntityInterface
Interface for a planar entity.
Definition: ecvPlanarEntityInterface.h:18