ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvDrawContext.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 #include <CVGeom.h>
11 
12 #include <QFont>
13 #include <QImage>
14 #include <QPoint>
15 #include <QRect>
16 
17 #include "ecvColorTypes.h"
18 #include "ecvGLMatrix.h"
19 #include "ecvMaterial.h"
20 
21 class ccHObject;
22 class ccScalarField;
23 
25 struct glDrawParams {
27  bool showSF;
29  bool showColors;
31  bool showNorms;
32 };
33 
40 };
41 
43 
48 };
49 
76 };
77 
96 };
97 
100  QString viewId;
101  int viewport = 0;
102  PointCoordinateType lineWidth = 2;
103  unsigned char pointSize = 1;
106 
107  double opacity = 1.0;
111 
113  : entity(obj),
114  color(col),
115  property(PROPERTY_MODE::ECV_COLOR_PROPERTY) {}
116 
117  PROPERTY_PARAM(ccHObject* obj, double opacity)
118  : entity(obj),
119  opacity(opacity),
120  property(PROPERTY_MODE::ECV_OPACITY_PROPERTY) {}
121 
122  PROPERTY_PARAM(ccHObject* obj, unsigned char pointSize)
123  : entity(obj), property(PROPERTY_MODE::ECV_POINTSSIZE_PROPERTY) {
124  if (pointSize > 1) {
125  this->pointSize = pointSize;
126  }
127  }
128 
130  : entity(obj), property(PROPERTY_MODE::ECV_SHADING_PROPERTY) {
131  this->shadingMode = shadingMode;
132  }
133 
134  inline void setProperty(PROPERTY_MODE mode) { property = mode; }
135 
136  inline void setShadingMode(SHADING_MODE shadingMode) {
137  this->shadingMode = shadingMode;
138  }
139 
140  inline void setColor(const ecvColor::Rgb& col) {
141  color = const_cast<ecvColor::Rgb&>(col);
142  }
143 
144  inline void setPointSize(unsigned char size) { pointSize = size; }
145 
146  inline void setOpacity(double op) { opacity = op; }
147 
148  inline void setLineWith(PointCoordinateType with) { lineWidth = with; }
149 };
150 
154  float lineWidth;
156  bool valid;
158  : lineWidth(width), lineColor(color), valid(false) {}
159 
161  const CCVector3& ed,
162  float width = 2,
164  : lineSt(st),
165  lineEd(ed),
166  lineWidth(width),
167  lineColor(color),
168  valid(true) {}
169 };
170 
176  QString removeId;
177 
178  friend bool operator==(const removeInfo& first, const removeInfo& second) {
179  return (first.removeType == second.removeType &&
180  first.removeId == second.removeId)
181  ? true
182  : false;
183  }
184 };
185 
190  QString hideId;
191 
192  friend bool operator==(const hideInfo& first, const hideInfo& second) {
193  return (first.hideType == second.hideType &&
194  first.hideId == second.hideId)
195  ? true
196  : false;
197  }
198 };
199 
201  struct RotateParam {
202  double angle;
204  };
205 
207  bool isRotate = false;
208  bool applyEuler = true;
209  bool isScale = false;
210  bool isTranslate = false;
211  bool isPositionChanged = false;
212 
213  double quaternion[4];
214 
216 
219 
222 
224 
225  void setPostion(const CCVector3& pos) {
226  position = pos;
227  isPositionChanged = true;
228  }
229 
230  bool isApplyTransform() const {
231  return isRotate || isScale || isTranslate || isPositionChanged;
232  }
233 
234  void setTransformation(const ccGLMatrixd& transform,
235  bool updateTranslation = true,
236  bool useEuler = false) {
237  if (useEuler) {
238  // double phi_rad, theta_rad, psi_rad;
239  // CCVector3d t3D;
240  // transform.getParameters(phi_rad, theta_rad, psi_rad,
241  // t3D);
242  // setRotation(cloudViewer::RadiansToDegrees(psi_rad),
243  // cloudViewer::RadiansToDegrees(theta_rad),
244  // cloudViewer::RadiansToDegrees(phi_rad));
245  // if (updateTranslation)
246  // {
247  // setTranslationStart(CCVector3::fromArray(transform.getTranslationAsVec3D().u));
248  // }
249 
250  double rz, ry, rx;
251  transform.toEulerAngle(rz, ry, rx);
252  setRotation(cloudViewer::RadiansToDegrees(rz),
255  if (updateTranslation) {
256  setTranslationStart(CCVector3::fromArray(
257  transform.getTranslationAsVec3D().u));
258  }
259 
260  } else {
261  double angle_rad;
262  CCVector3d axis, trans;
263  transform.getParameters(angle_rad, axis, trans);
264  double angle_deg = cloudViewer::RadiansToDegrees(angle_rad);
265  setRotation(angle_deg, axis);
266  if (updateTranslation) {
267  setTranslationStart(CCVector3::fromArray(trans.u));
268  }
269  }
270  }
271  void setTransformation(const ccGLMatrix& transform,
272  bool updateTranslation = true,
273  bool useEuler = true) {
274  setTransformation(ccGLMatrixd(transform.data()), updateTranslation,
275  useEuler);
276  }
277 
278  void setRotation(double zAngle, double yAngle, double xAngle) {
279  isRotate = true;
280  applyEuler = true;
281  eulerZYX[0] = zAngle;
282  eulerZYX[1] = yAngle;
283  eulerZYX[2] = xAngle;
284  }
285  void setRotation(double zyxAngle[3]) {
286  setRotation(zyxAngle[0], zyxAngle[1], zyxAngle[2]);
287  }
288 
289  void setRotation(double angle, double x, double y, double z) {
290  setRotation(angle, CCVector3d(x, y, z));
291  }
292  void setRotation(double angle, const CCVector3& axis) {
293  isRotate = true;
294  applyEuler = false;
295  rotateParam.angle = angle;
296  rotateParam.rotAxis = axis;
297  }
298  void setRotation(double angle, const CCVector3d& axis) {
299  isRotate = true;
300  applyEuler = false;
301  rotateParam.angle = angle;
302  rotateParam.rotAxis = CCVector3::fromArray(axis.u);
303  }
304 
305  void setScale(const CCVector3& scale) {
306  isScale = true;
307  scaleXYZ = scale;
308  }
309  void setTranslationStart(const CCVector3& trans) {
310  isTranslate = true;
311  transVecStart = trans;
312  }
313  void setTranslationEnd(const CCVector3& trans) {
314  isTranslate = true;
315  transVecEnd = trans;
316  }
317 };
318 
320  bool display3D = false;
321  double textScale = 1.0;
322  double opacity = 1.0;
323  CCVector3d textPos = CCVector3d(0.0, 0.0, 0.0);
324  QString text = "";
325  QFont font = QFont();
326 };
327 
328 // Drawing flags (type: short)
330  CC_DRAW_2D = 0x0001,
331  CC_DRAW_3D = 0x0002,
336  CC_SKIP_ALL = 0x0030, // = CC_SKIP_UNSELECTED | CC_SKIP_SELECTED
337  CC_ENTITY_PICKING = 0x0040, // formerly named CC_DRAW_ENTITY_NAMES
338  // CC_FREE_FLAG = 0x0080, // UNUSED (formerly
339  // CC_DRAW_POINT_NAMES)
340  // CC_FREE_FLAG = 0x0100, // UNUSED (formerly
341  // CC_DRAW_TRI_NAMES)
342  CC_FAST_ENTITY_PICKING = 0x0200, // formerly named CC_DRAW_FAST_NAMES_ONLY
343  // UNUSED (formerly CC_DRAW_ANY_NAMES = CC_DRAW_ENTITY_NAMES |
344  // CC_DRAW_POINT_NAMES | CC_DRAW_TRI_NAMES) CC_FREE_FLAG = 0x03C0,
347 };
348 
349 // Drawing flags testing macros (see ccDrawableObject)
350 #define MACRO_Draw2D(context) (context.drawingFlags & CC_DRAW_2D)
351 #define MACRO_Draw3D(context) (context.drawingFlags & CC_DRAW_3D)
352 #define MACRO_EntityPicking(context) (context.drawingFlags & CC_ENTITY_PICKING)
353 #define MACRO_FastEntityPicking(context) \
354  (context.drawingFlags & CC_FAST_ENTITY_PICKING)
355 #define MACRO_SkipUnselected(context) \
356  (context.drawingFlags & CC_SKIP_UNSELECTED)
357 #define MACRO_SkipSelected(context) (context.drawingFlags & CC_SKIP_SELECTED)
358 #define MACRO_LightIsEnabled(context) (context.drawingFlags & CC_LIGHT_ENABLED)
359 #define MACRO_Foreground(context) (context.drawingFlags & CC_DRAW_FOREGROUND)
360 #define MACRO_LODActivated(context) (context.drawingFlags & CC_LOD_ACTIVATED)
361 #define MACRO_VirtualTransEnabled(context) \
362  (context.drawingFlags & CC_VIRTUAL_TRANS_ENABLED)
363 
372 
373  QString viewID;
376  float normalScale;
377 
378  float opacity;
379 
380  bool visible;
381  unsigned char defaultLineWidth;
382  unsigned char currentLineWidth;
383  unsigned char defaultPointSize;
387 
388  QString removeViewID;
390 
393 
395  int glW;
397  int glH;
400 
402  float renderZoom;
403 
406 
413 
416 
425 
427 
432 
436 
442  unsigned char currentLODLevel;
447 
452 
455 
457  bool useVBOs;
458 
463 
466 
468  unsigned labelOpacity;
469 
471  unsigned stereoPassIndex;
472 
475 
476  // Default constructor
478  : drawingFlags(0),
479  forceRedraw(true),
480  visFiltering(false),
481  viewID("unnamed"),
482  defaultViewPort(0),
483  normalDensity(100),
484  normalScale(0.02f),
485  opacity(1.0),
486  visible(true),
487  defaultLineWidth(2),
489  defaultPointSize(1),
491  removeViewID("unnamed"),
493  clearDepthLayer(true),
494  clearColorLayer(true),
495  glW(0),
496  glH(0),
497  devicePixelRatio(1.0f),
498  renderZoom(1.0f),
499  defaultMat(new ccMaterial("default")),
514  decimateCloudOnMove(true),
515  minLODPointCount(10000000),
516  currentLODLevel(0),
517  moreLODPointsAvailable(false),
519  decimateMeshOnMove(true),
520  minLODTriangleCount(2500000),
521  sfColorScaleToDisplay(nullptr),
522  useVBOs(true),
523  labelMarkerSize(5),
526  labelOpacity(100),
527  stereoPassIndex(0),
528  drawRoundedPoints(false) {}
529 };
530 
532 
534 public:
535  /*for general*/
538  QString viewID;
539  int viewport = 0;
541 
543 
544  int fontSize = 10;
545 
546  /*for image*/
547  QImage image;
548  double opacity = 1.0;
549 
550  /*for text*/
551  QString text;
552 
553  /*for rectangle*/
554  bool filled = true;
555  QRect rect;
556 
557  /*for 2D line or triangle*/
558  QPoint p1;
559  QPoint p2;
560  QPoint p3;
561  QPoint p4 = QPoint(-1, -1);
562 
563  /*for circle, sphere or mark point*/
564  float radius;
567  bool handleEnabled = false;
568 
569  /*for 3D line*/
571 
572  // Default constructor
573  WIDGETS_PARAMETER(WIDGETS_TYPE t, QString id = "id", int port = 0)
574  : type(t), viewID(id), viewport(port) {
575  context.viewID = viewID;
576  }
577 
579  WIDGETS_TYPE t,
580  QString id = "id",
581  int port = 0)
582  : entity(obj), type(t), viewID(id), viewport(port) {
583  context.viewID = viewID;
584  }
585 
586  void setLineWidget(const LineWidget& line) { lineWidget = line; }
587 };
WIDGET_T2D
@ WIDGET_T2D
Definition: ecvDrawContext.h:95
ECV_TRIANGLE_2D
@ ECV_TRIANGLE_2D
Definition: ecvDrawContext.h:61
TransformInfo::setTranslationEnd
void setTranslationEnd(const CCVector3 &trans)
Definition: ecvDrawContext.h:313
ccGLDrawContext::normalDensity
int normalDensity
Definition: ecvDrawContext.h:375
WIDGETS_PARAMETER::radius
float radius
Definition: ecvDrawContext.h:564
PROPERTY_PARAM::entity
ccHObject * entity
Definition: ecvDrawContext.h:104
ecvMaterial.h
WIDGETS_PARAMETER::WIDGETS_PARAMETER
WIDGETS_PARAMETER(WIDGETS_TYPE t, QString id="id", int port=0)
Definition: ecvDrawContext.h:573
ecvColor::defaultViewBkgColor
constexpr Rgbf defaultViewBkgColor(10/255.0f, 102/255.0f, 151/255.0f)
WIDGETS_PARAMETER::setLineWidget
void setLineWidget(const LineWidget &line)
Definition: ecvDrawContext.h:586
ccMaterial::Shared
QSharedPointer< ccMaterial > Shared
Shared type.
Definition: ecvMaterial.h:33
PROPERTY_PARAM::setShadingMode
void setShadingMode(SHADING_MODE shadingMode)
Definition: ecvDrawContext.h:136
CC_DRAW_3D
@ CC_DRAW_3D
Definition: ecvDrawContext.h:331
LineWidget::LineWidget
LineWidget(float width=2.0f, const ecvColor::Rgb &color=ecvColor::red)
Definition: ecvDrawContext.h:157
ECV_TEXT2D
@ ECV_TEXT2D
Definition: ecvDrawContext.h:71
PROPERTY_PARAM::property
PROPERTY_MODE property
Definition: ecvDrawContext.h:108
ECV_POINTSSIZE_PROPERTY
@ ECV_POINTSSIZE_PROPERTY
Definition: ecvDrawContext.h:35
ccGLDrawContext::drawRoundedPoints
bool drawRoundedPoints
Whether to draw rounded points (instead of sqaures)
Definition: ecvDrawContext.h:474
ccGLDrawContext::useVBOs
bool useVBOs
Use VBOs for faster display.
Definition: ecvDrawContext.h:457
x
normal_z x
Definition: my_point_types.h:165
ccGLDrawContext::defaultPointSize
unsigned char defaultPointSize
Definition: ecvDrawContext.h:383
TransformInfo::setScale
void setScale(const CCVector3 &scale)
Definition: ecvDrawContext.h:305
ccGLDrawContext::backgroundCol2
ecvColor::Rgbub backgroundCol2
Definition: ecvDrawContext.h:434
hideInfo::hideId
QString hideId
Hide viewId.
Definition: ecvDrawContext.h:190
ecvColorTypes.h
PROPERTY_PARAM
Definition: ecvDrawContext.h:98
ccGLDrawContext::minLODPointCount
unsigned minLODPointCount
Minimum number of points for activating LOD display.
Definition: ecvDrawContext.h:440
WIDGETS_PARAMETER::entity
ccHObject * entity
Definition: ecvDrawContext.h:536
PROPERTY_PARAM::viewId
QString viewId
Display scalar field (prioritary on colors)
Definition: ecvDrawContext.h:100
ccGLMatrixTpl::toEulerAngle
void toEulerAngle(T &rz, T &ry, T &rx) const
Returns equivalent parameters: 3 rotation angles.
Definition: ecvGLMatrixTpl.h:422
TransformInfo::eulerZYX
CCVector3d eulerZYX
Definition: ecvDrawContext.h:215
TransformInfo::setTransformation
void setTransformation(const ccGLMatrixd &transform, bool updateTranslation=true, bool useEuler=false)
Definition: ecvDrawContext.h:234
ECV_2DLABLE_VIEWPORT
@ ECV_2DLABLE_VIEWPORT
Definition: ecvDrawContext.h:67
ccGLDrawContext::viewID
QString viewID
Definition: ecvDrawContext.h:373
WIDGETS_PARAMETER::lineWidget
LineWidget lineWidget
Definition: ecvDrawContext.h:570
removeInfo
to be removed structure
Definition: ecvDrawContext.h:172
ccGLMatrixd
Double version of ccGLMatrixTpl.
Definition: ecvGLMatrix.h:56
TransformInfo::RotateParam::rotAxis
CCVector3 rotAxis
Definition: ecvDrawContext.h:203
position
math::float3 position
Definition: LineSetBuffers.cpp:44
CC_SKIP_ALL
@ CC_SKIP_ALL
Definition: ecvDrawContext.h:336
TransformInfo::setRotation
void setRotation(double angle, double x, double y, double z)
Definition: ecvDrawContext.h:289
ccGLDrawContext::moreLODPointsAvailable
bool moreLODPointsAvailable
Wheter more points are available or not at the current level.
Definition: ecvDrawContext.h:444
ECV_WIREFRAME_MODE
@ ECV_WIREFRAME_MODE
Definition: ecvDrawContext.h:46
ecvColor::lightGrey
constexpr Rgb lightGrey(static_cast< ColorCompType >(MAX *0.8), static_cast< ColorCompType >(MAX *0.8), static_cast< ColorCompType >(MAX *0.8))
ccGLDrawContext::labelDefaultBkgCol
ecvColor::Rgbub labelDefaultBkgCol
Default label background color.
Definition: ecvDrawContext.h:424
hideInfo::hideType
ENTITY_TYPE hideType
Hide type.
Definition: ecvDrawContext.h:188
TransformInfo::setRotation
void setRotation(double angle, const CCVector3d &axis)
Definition: ecvDrawContext.h:298
TransformInfo::isApplyTransform
bool isApplyTransform() const
Definition: ecvDrawContext.h:230
ccGLDrawContext::labelOpacity
unsigned labelOpacity
Label background opacity.
Definition: ecvDrawContext.h:468
glDrawParams::showSF
bool showSF
Display scalar field (prioritary on colors)
Definition: ecvDrawContext.h:27
ccGLDrawContext::defaultMeshFrontDiff
ecvColor::Rgbaf defaultMeshFrontDiff
Default color for mesh (front side)
Definition: ecvDrawContext.h:408
LineWidget::valid
bool valid
Definition: ecvDrawContext.h:156
ECV_MARK_POINT
@ ECV_MARK_POINT
Definition: ecvDrawContext.h:53
WIDGET_COORDINATE
@ WIDGET_COORDINATE
Definition: ecvDrawContext.h:87
ECV_FACET
@ ECV_FACET
Definition: ecvDrawContext.h:58
PROPERTY_PARAM::setOpacity
void setOpacity(double op)
Definition: ecvDrawContext.h:146
ECV_NONE
@ ECV_NONE
Definition: ecvDrawContext.h:75
TransformInfo::setRotation
void setRotation(double angle, const CCVector3 &axis)
Definition: ecvDrawContext.h:292
PROPERTY_PARAM::setProperty
void setProperty(PROPERTY_MODE mode)
Definition: ecvDrawContext.h:134
ecvColor::defaultLabelMarkerColor
constexpr Rgbub defaultLabelMarkerColor(MAX, 0, MAX)
glDrawParams::showNorms
bool showNorms
Display normals.
Definition: ecvDrawContext.h:31
WIDGETS_PARAMETER::pos
CCVector2 pos
Definition: ecvDrawContext.h:566
cloudViewer::RadiansToDegrees
float RadiansToDegrees(int radians)
Convert radians to degrees.
Definition: CVMath.h:71
ccGLDrawContext::currentLODLevel
unsigned char currentLODLevel
Current level for LOD display.
Definition: ecvDrawContext.h:442
color
math::float4 color
Definition: LineSetBuffers.cpp:46
TransformInfo::transVecEnd
CCVector3 transVecEnd
Definition: ecvDrawContext.h:221
PROPERTY_PARAM::setLineWith
void setLineWith(PointCoordinateType with)
Definition: ecvDrawContext.h:148
ccGLDrawContext::removeEntityType
ENTITY_TYPE removeEntityType
Definition: ecvDrawContext.h:389
ECV_LINES_3D
@ ECV_LINES_3D
Definition: ecvDrawContext.h:59
WIDGET_POLYGONMESH
@ WIDGET_POLYGONMESH
Definition: ecvDrawContext.h:86
ECV_OCTREE
@ ECV_OCTREE
Definition: ecvDrawContext.h:56
CCVector3d
Vector3Tpl< double > CCVector3d
Double 3D Vector.
Definition: CVGeom.h:804
WIDGETS_PARAMETER::viewID
QString viewID
Definition: ecvDrawContext.h:538
CC_VIRTUAL_TRANS_ENABLED
@ CC_VIRTUAL_TRANS_ENABLED
Definition: ecvDrawContext.h:346
ECV_SURFACE_MODE
@ ECV_SURFACE_MODE
Definition: ecvDrawContext.h:47
ccGLDrawContext::defaultMeshBackDiff
ecvColor::Rgbaf defaultMeshBackDiff
Default color for mesh (back side)
Definition: ecvDrawContext.h:410
removeInfo::operator==
friend bool operator==(const removeInfo &first, const removeInfo &second)
Definition: ecvDrawContext.h:178
ccGLDrawContext::minLODTriangleCount
unsigned minLODTriangleCount
Minimum number of triangles for activating LOD display.
Definition: ecvDrawContext.h:451
ECV_POLYGON
@ ECV_POLYGON
Definition: ecvDrawContext.h:65
removeInfo::removeId
QString removeId
Remove viewId.
Definition: ecvDrawContext.h:176
width
int width
Definition: FileIOFactory.cpp:142
Vector2Tpl< PointCoordinateType >
ECV_SHADING_GOURAUD
@ ECV_SHADING_GOURAUD
Definition: ecvDrawContext.h:42
ECV_ALL
@ ECV_ALL
Definition: ecvDrawContext.h:74
context
ImGuiContext * context
Definition: Window.cpp:76
PROPERTY_PARAM::PROPERTY_PARAM
PROPERTY_PARAM(ccHObject *obj, SHADING_MODE shadingMode)
Definition: ecvDrawContext.h:129
TransformInfo::transVecStart
CCVector3 transVecStart
Definition: ecvDrawContext.h:220
ecvColor::defaultLabelBkgColor
constexpr Rgbub defaultLabelBkgColor(MAX, MAX, MAX)
ccGLDrawContext::labelMarkerSize
float labelMarkerSize
Label marker size (radius)
Definition: ecvDrawContext.h:460
ccGLDrawContext::backgroundCol
ecvColor::Rgbub backgroundCol
Definition: ecvDrawContext.h:433
TransformInfo
Definition: ecvDrawContext.h:200
size
int size
Definition: FileIOFactory.cpp:130
ccGLMatrixTpl::getTranslationAsVec3D
Vector3Tpl< T > getTranslationAsVec3D() const
Returns a copy of the translation as a CCVector3.
Definition: ecvGLMatrixTpl.h:830
PROPERTY_PARAM::PROPERTY_PARAM
PROPERTY_PARAM(ccHObject *obj, unsigned char pointSize)
Definition: ecvDrawContext.h:122
LineWidget::lineSt
CCVector3 lineSt
Definition: ecvDrawContext.h:152
y
normal_z y
Definition: my_point_types.h:168
WIDGETS_PARAMETER::center
CCVector3 center
Definition: ecvDrawContext.h:565
TransformInfo::RotateParam
Definition: ecvDrawContext.h:201
ecvTextParam
Definition: ecvDrawContext.h:319
CC_FAST_ENTITY_PICKING
@ CC_FAST_ENTITY_PICKING
Definition: ecvDrawContext.h:342
WIDGET_CAPTION
@ WIDGET_CAPTION
Definition: ecvDrawContext.h:92
TransformInfo::setTransformation
void setTransformation(const ccGLMatrix &transform, bool updateTranslation=true, bool useEuler=true)
Definition: ecvDrawContext.h:271
ccMaterial
Mesh (triangle) material.
Definition: ecvMaterial.h:28
CC_DRAW_FOREGROUND
@ CC_DRAW_FOREGROUND
Definition: ecvDrawContext.h:332
ECV_LINEWITH_PROPERTY
@ ECV_LINEWITH_PROPERTY
Definition: ecvDrawContext.h:36
Vector3Tpl< PointCoordinateType >
ECV_KDTREE
@ ECV_KDTREE
Definition: ecvDrawContext.h:57
ccGLDrawContext::visible
bool visible
Definition: ecvDrawContext.h:380
ECV_2DLABLE
@ ECV_2DLABLE
Definition: ecvDrawContext.h:66
ccGLDrawContext::dispNumberPrecision
unsigned dispNumberPrecision
Numerical precision (for displaying text)
Definition: ecvDrawContext.h:465
ccGLDrawContext::clearDepthLayer
bool clearDepthLayer
Definition: ecvDrawContext.h:391
WIDGET_LINE_2D
@ WIDGET_LINE_2D
Definition: ecvDrawContext.h:81
ECV_COLOR_PROPERTY
@ ECV_COLOR_PROPERTY
Definition: ecvDrawContext.h:37
ecvColor::yellow
constexpr Rgb yellow(MAX, MAX, 0)
LineWidget
Definition: ecvDrawContext.h:151
removeInfo::removeType
ENTITY_TYPE removeType
Remove type.
Definition: ecvDrawContext.h:174
TransformInfo::setTranslationStart
void setTranslationStart(const CCVector3 &trans)
Definition: ecvDrawContext.h:309
ECV_SHADING_PHONG
@ ECV_SHADING_PHONG
Definition: ecvDrawContext.h:42
ECV_LINES_2D
@ ECV_LINES_2D
Definition: ecvDrawContext.h:60
WIDGET_TRIANGLE_2D
@ WIDGET_TRIANGLE_2D
Definition: ecvDrawContext.h:82
TransformInfo::position
CCVector3 position
Definition: ecvDrawContext.h:223
glDrawParams
Display parameters of a 3D entity.
Definition: ecvDrawContext.h:25
ecvColor::green
constexpr Rgb green(0, MAX, 0)
WIDGET_T3D
@ WIDGET_T3D
Definition: ecvDrawContext.h:94
PROPERTY_PARAM::shadingMode
SHADING_MODE shadingMode
Definition: ecvDrawContext.h:109
TransformInfo::scaleXYZ
CCVector3 scaleXYZ
the x y z scale
Definition: ecvDrawContext.h:218
WIDGET_POLYLINE_2D
@ WIDGET_POLYLINE_2D
Definition: ecvDrawContext.h:89
WIDGET_LINE_3D
@ WIDGET_LINE_3D
Definition: ecvDrawContext.h:90
WIDGET_POINTS_2D
@ WIDGET_POINTS_2D
Definition: ecvDrawContext.h:83
ccGLDrawContext::defaultLineWidth
unsigned char defaultLineWidth
Definition: ecvDrawContext.h:381
WIDGETS_PARAMETER::WIDGETS_PARAMETER
WIDGETS_PARAMETER(ccHObject *obj, WIDGETS_TYPE t, QString id="id", int port=0)
Definition: ecvDrawContext.h:578
CC_DRAWING_FLAGS
CC_DRAWING_FLAGS
Definition: ecvDrawContext.h:329
CVGeom.h
WIDGETS_PARAMETER::p3
QPoint p3
Definition: ecvDrawContext.h:560
ccGLDrawContext::meshRenderingMode
MESH_RENDERING_MODE meshRenderingMode
Definition: ecvDrawContext.h:385
ccGLDrawContext::ccGLDrawContext
ccGLDrawContext()
Definition: ecvDrawContext.h:477
ECV_MESH
@ ECV_MESH
Definition: ecvDrawContext.h:54
ccGLDrawContext::decimateCloudOnMove
bool decimateCloudOnMove
Whether to decimate big clouds when updating the 3D view.
Definition: ecvDrawContext.h:438
ccGLDrawContext::drawParam
glDrawParams drawParam
Definition: ecvDrawContext.h:384
ENTITY_TYPE
ENTITY_TYPE
Definition: ecvDrawContext.h:50
WIDGET_RECTANGLE_2D
@ WIDGET_RECTANGLE_2D
Definition: ecvDrawContext.h:85
ECV_TEXT3D
@ ECV_TEXT3D
Definition: ecvDrawContext.h:70
ccGLDrawContext::transformInfo
TransformInfo transformInfo
Definition: ecvDrawContext.h:370
CC_LIGHT_ENABLED
@ CC_LIGHT_ENABLED
Definition: ecvDrawContext.h:333
ccGLDrawContext::devicePixelRatio
float devicePixelRatio
Device pixel ratio (general 1, 2 on HD displays)
Definition: ecvDrawContext.h:399
ccGLDrawContext::visFiltering
bool visFiltering
Definition: ecvDrawContext.h:369
WIDGET_CIRCLE_2D
@ WIDGET_CIRCLE_2D
Definition: ecvDrawContext.h:84
ccGLDrawContext::textParam
ecvTextParam textParam
Definition: ecvDrawContext.h:371
ccGLDrawContext::defaultPolylineColor
ecvColor::Rgb defaultPolylineColor
Default color for polyline.
Definition: ecvDrawContext.h:415
ccGLDrawContext::labelDefaultMarkerCol
ecvColor::Rgbub labelDefaultMarkerCol
Default label marker color.
Definition: ecvDrawContext.h:429
ccGLDrawContext::defaultMeshColor
ecvColor::Rgb defaultMeshColor
Default color for mesh.
Definition: ecvDrawContext.h:412
WIDGET_IMAGE
@ WIDGET_IMAGE
Definition: ecvDrawContext.h:80
WIDGETS_PARAMETER::p1
QPoint p1
Definition: ecvDrawContext.h:558
ccGLMatrixTpl::getParameters
void getParameters(T &alpha_rad, Vector3Tpl< T > &axis3D, Vector3Tpl< T > &t3D) const
Definition: ecvGLMatrixTpl.h:741
ECV_SHADING_FLAT
@ ECV_SHADING_FLAT
Definition: ecvDrawContext.h:42
ECV_SHAPE
@ ECV_SHAPE
Definition: ecvDrawContext.h:55
ccGLDrawContext::defaultMat
ccMaterial::Shared defaultMat
Default material.
Definition: ecvDrawContext.h:405
SHADING_MODE
SHADING_MODE
Definition: ecvDrawContext.h:42
ccGLDrawContext::drawBackgroundGradient
bool drawBackgroundGradient
Definition: ecvDrawContext.h:435
ccGLDrawContext::hideShowEntityType
ENTITY_TYPE hideShowEntityType
Definition: ecvDrawContext.h:386
ccGLDrawContext::glW
int glW
GL screen widthecvColor.
Definition: ecvDrawContext.h:395
CC_SKIP_SELECTED
@ CC_SKIP_SELECTED
Definition: ecvDrawContext.h:335
TransformInfo::rotateParam
RotateParam rotateParam
Definition: ecvDrawContext.h:206
LineWidget::lineWidth
float lineWidth
Definition: ecvDrawContext.h:154
WIDGETS_PARAMETER::image
QImage image
Definition: ecvDrawContext.h:547
ccGLMatrix
Float version of ccGLMatrixTpl.
Definition: ecvGLMatrix.h:19
ccGLDrawContext::glH
int glH
GL screen height.
Definition: ecvDrawContext.h:397
WIDGETS_PARAMETER::p2
QPoint p2
Definition: ecvDrawContext.h:559
WIDGET_POLYLINE
@ WIDGET_POLYLINE
Definition: ecvDrawContext.h:88
ccGLDrawContext::forceRedraw
bool forceRedraw
Definition: ecvDrawContext.h:368
PROPERTY_PARAM::color
ecvColor::Rgb color
Definition: ecvDrawContext.h:105
hideInfo
Definition: ecvDrawContext.h:186
ecvColor
Colors namespace.
Definition: ecvColorTypes.h:32
ccGLDrawContext::textDefaultCol
ecvColor::Rgbub textDefaultCol
Default text color.
Definition: ecvDrawContext.h:422
ECV_CIRCLE_2D
@ ECV_CIRCLE_2D
Definition: ecvDrawContext.h:64
ccGLDrawContext::viewDefaultBkgCol
ecvColor::Rgbf viewDefaultBkgCol
Definition: ecvDrawContext.h:426
PROPERTY_PARAM::setPointSize
void setPointSize(unsigned char size)
Definition: ecvDrawContext.h:144
ecvColor::RgbTpl
RGB color structure.
Definition: ecvColorTypes.h:49
WIDGET_BBOX
@ WIDGET_BBOX
Definition: ecvDrawContext.h:79
LineWidget::lineColor
ecvColor::Rgb lineColor
Definition: ecvDrawContext.h:155
ECV_RECTANGLE_2D
@ ECV_RECTANGLE_2D
Definition: ecvDrawContext.h:62
ccGLDrawContext::defaultViewPort
int defaultViewPort
Definition: ecvDrawContext.h:374
ccGLDrawContext::sfColorScaleToDisplay
ccScalarField * sfColorScaleToDisplay
Currently displayed color scale (the corresponding scalar field in fact)
Definition: ecvDrawContext.h:454
ecvColor::defaultColor
constexpr Rgbub defaultColor(MAX, MAX, MAX)
ccGLDrawContext::removeViewID
QString removeViewID
Definition: ecvDrawContext.h:388
ECV_POINTS_MODE
@ ECV_POINTS_MODE
Definition: ecvDrawContext.h:45
ccGLDrawContext::normalScale
float normalScale
Definition: ecvDrawContext.h:376
ECV_SENSOR
@ ECV_SENSOR
Definition: ecvDrawContext.h:73
ccGLDrawContext::pointsDefaultCol
ecvColor::Rgbub pointsDefaultCol
Default point color.
Definition: ecvDrawContext.h:418
ECV_SHADING_PROPERTY
@ ECV_SHADING_PROPERTY
Definition: ecvDrawContext.h:39
WIDGETS_PARAMETER
Definition: ecvDrawContext.h:533
CC_SKIP_UNSELECTED
@ CC_SKIP_UNSELECTED
Definition: ecvDrawContext.h:334
TransformInfo::RotateParam::angle
double angle
Definition: ecvDrawContext.h:202
PROPERTY_PARAM::entityType
ENTITY_TYPE entityType
Definition: ecvDrawContext.h:110
WIDGET_SPHERE
@ WIDGET_SPHERE
Definition: ecvDrawContext.h:91
ccGLDrawContext::decimateMeshOnMove
bool decimateMeshOnMove
Whether to decimate big meshes when rotating the camera.
Definition: ecvDrawContext.h:449
ccGLDrawContext::clearColorLayer
bool clearColorLayer
Definition: ecvDrawContext.h:392
CC_DRAW_2D
@ CC_DRAW_2D
Definition: ecvDrawContext.h:330
ECV_CAPTION
@ ECV_CAPTION
Definition: ecvDrawContext.h:68
ccHObject
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
TransformInfo::setRotation
void setRotation(double zyxAngle[3])
Definition: ecvDrawContext.h:285
WIDGETS_TYPE
WIDGETS_TYPE
Definition: ecvDrawContext.h:78
PROPERTY_PARAM::PROPERTY_PARAM
PROPERTY_PARAM(ccHObject *obj, double opacity)
Definition: ecvDrawContext.h:117
ccGLMatrixTpl::data
T * data()
Returns a pointer to internal data.
Definition: ecvGLMatrixTpl.h:810
ccGLDrawContext::currentLineWidth
unsigned char currentLineWidth
Definition: ecvDrawContext.h:382
CC_LOD_ACTIVATED
@ CC_LOD_ACTIVATED
Definition: ecvDrawContext.h:345
ECV_HIERARCHY_OBJECT
@ ECV_HIERARCHY_OBJECT
Definition: ecvDrawContext.h:51
PROPERTY_MODE
PROPERTY_MODE
Definition: ecvDrawContext.h:34
ecvColor::red
constexpr Rgb red(MAX, 0, 0)
CV_DB_LIB_API
#define CV_DB_LIB_API
Definition: CV_db.h:15
ccGLDrawContext
Display context.
Definition: ecvDrawContext.h:365
hideInfo::operator==
friend bool operator==(const hideInfo &first, const hideInfo &second)
Definition: ecvDrawContext.h:192
ccGLDrawContext::renderZoom
float renderZoom
Current zoom (screen to file rendering mode)
Definition: ecvDrawContext.h:402
PointCoordinateType
float PointCoordinateType
Type of the coordinates of a (N-D) point.
Definition: CVTypes.h:16
z
normal_z z
Definition: my_point_types.h:165
MESH_RENDERING_MODE
MESH_RENDERING_MODE
Definition: ecvDrawContext.h:44
WIDGETS_PARAMETER::rect
QRect rect
Definition: ecvDrawContext.h:555
Tuple3Tpl::u
Type u[3]
Definition: CVGeom.h:139
ECV_OPACITY_PROPERTY
@ ECV_OPACITY_PROPERTY
Definition: ecvDrawContext.h:38
LineWidget::lineEd
CCVector3 lineEd
Definition: ecvDrawContext.h:153
PROPERTY_PARAM::PROPERTY_PARAM
PROPERTY_PARAM(ccHObject *obj, const ecvColor::Rgb &col)
Definition: ecvDrawContext.h:112
PROPERTY_PARAM::setColor
void setColor(const ecvColor::Rgb &col)
Definition: ecvDrawContext.h:140
ECV_IMAGE
@ ECV_IMAGE
Definition: ecvDrawContext.h:72
TransformInfo::setPostion
void setPostion(const CCVector3 &pos)
Definition: ecvDrawContext.h:225
ccGLDrawContext::pointsCurrentCol
ecvColor::Rgbub pointsCurrentCol
Current point color.
Definition: ecvDrawContext.h:420
ecvGLMatrix.h
ccGLDrawContext::bbDefaultCol
ecvColor::Rgbub bbDefaultCol
Default bounding-box color.
Definition: ecvDrawContext.h:431
ccGLDrawContext::opacity
float opacity
Definition: ecvDrawContext.h:378
LineWidget::LineWidget
LineWidget(const CCVector3 &st, const CCVector3 &ed, float width=2, const ecvColor::Rgb &color=ecvColor::red)
Definition: ecvDrawContext.h:160
Vector3Tpl< PointCoordinateType >::fromArray
static Vector3Tpl fromArray(const int a[3])
Constructor from an int array.
Definition: CVGeom.h:268
ecvColor::defaultBkgColor
constexpr Rgbub defaultBkgColor(135, 206, 235)
WIDGETS_PARAMETER::color
ecvColor::Rgbaf color
Definition: ecvDrawContext.h:540
ECV_SCALAR_BAR
@ ECV_SCALAR_BAR
Definition: ecvDrawContext.h:69
glDrawParams::showColors
bool showColors
Display colors.
Definition: ecvDrawContext.h:29
type
char type
Definition: FileIOFactory.cpp:131
ECV_POLYLINE_2D
@ ECV_POLYLINE_2D
Definition: ecvDrawContext.h:63
WIDGET_SCALAR_BAR
@ WIDGET_SCALAR_BAR
Definition: ecvDrawContext.h:93
WIDGETS_PARAMETER::type
WIDGETS_TYPE type
Definition: ecvDrawContext.h:537
WIDGETS_PARAMETER::context
CC_DRAW_CONTEXT context
Definition: ecvDrawContext.h:542
ccGLDrawContext::higherLODLevelsAvailable
bool higherLODLevelsAvailable
Wheter higher levels are available or not.
Definition: ecvDrawContext.h:446
TransformInfo::setRotation
void setRotation(double zAngle, double yAngle, double xAngle)
Definition: ecvDrawContext.h:278
ECV_POINT_CLOUD
@ ECV_POINT_CLOUD
Definition: ecvDrawContext.h:52
ccScalarField
A scalar field associated to display-related parameters.
Definition: ecvScalarField.h:19
ccGLDrawContext::labelMarkerTextShift_pix
float labelMarkerTextShift_pix
Shift for 3D label marker display (around the marker, in pixels)
Definition: ecvDrawContext.h:462
ecvColor::RgbaTpl
RGBA color structure.
Definition: ecvColorTypes.h:145
WIDGETS_PARAMETER::text
QString text
Definition: ecvDrawContext.h:551
ccGLDrawContext::stereoPassIndex
unsigned stereoPassIndex
Stereo pass index.
Definition: ecvDrawContext.h:471
ccGLDrawContext::drawingFlags
int drawingFlags
Drawing options (see below)
Definition: ecvDrawContext.h:367
CC_ENTITY_PICKING
@ CC_ENTITY_PICKING
Definition: ecvDrawContext.h:337