 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
103 unsigned char pointSize = 1;
107 double opacity = 1.0;
125 this->pointSize = pointSize;
131 this->shadingMode = shadingMode;
137 this->shadingMode = shadingMode;
158 : lineWidth(
width), lineColor(
color), valid(false) {}
207 bool isRotate =
false;
208 bool applyEuler =
true;
209 bool isScale =
false;
210 bool isTranslate =
false;
211 bool isPositionChanged =
false;
213 double quaternion[4];
227 isPositionChanged =
true;
231 return isRotate || isScale || isTranslate || isPositionChanged;
235 bool updateTranslation =
true,
236 bool useEuler =
false) {
255 if (updateTranslation) {
265 setRotation(angle_deg, axis);
266 if (updateTranslation) {
272 bool updateTranslation =
true,
273 bool useEuler =
true) {
281 eulerZYX[0] = zAngle;
282 eulerZYX[1] = yAngle;
283 eulerZYX[2] = xAngle;
286 setRotation(zyxAngle[0], zyxAngle[1], zyxAngle[2]);
295 rotateParam.
angle = angle;
301 rotateParam.
angle = angle;
311 transVecStart = trans;
320 bool display3D =
false;
321 double textScale = 1.0;
322 double opacity = 1.0;
325 QFont font = QFont();
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)
548 double opacity = 1.0;
561 QPoint p4 = QPoint(-1, -1);
567 bool handleEnabled =
false;
574 :
type(t), viewID(id), viewport(port) {
582 : entity(obj),
type(t), viewID(id), viewport(port) {
@ WIDGET_T2D
Definition: ecvDrawContext.h:95
@ ECV_TRIANGLE_2D
Definition: ecvDrawContext.h:61
int normalDensity
Definition: ecvDrawContext.h:375
ccHObject * entity
Definition: ecvDrawContext.h:104
constexpr Rgbf defaultViewBkgColor(10/255.0f, 102/255.0f, 151/255.0f)
QSharedPointer< ccMaterial > Shared
Shared type.
Definition: ecvMaterial.h:33
void setShadingMode(SHADING_MODE shadingMode)
Definition: ecvDrawContext.h:136
@ CC_DRAW_3D
Definition: ecvDrawContext.h:331
@ ECV_TEXT2D
Definition: ecvDrawContext.h:71
PROPERTY_MODE property
Definition: ecvDrawContext.h:108
@ ECV_POINTSSIZE_PROPERTY
Definition: ecvDrawContext.h:35
bool drawRoundedPoints
Whether to draw rounded points (instead of sqaures)
Definition: ecvDrawContext.h:474
bool useVBOs
Use VBOs for faster display.
Definition: ecvDrawContext.h:457
normal_z x
Definition: my_point_types.h:165
unsigned char defaultPointSize
Definition: ecvDrawContext.h:383
ecvColor::Rgbub backgroundCol2
Definition: ecvDrawContext.h:434
QString hideId
Hide viewId.
Definition: ecvDrawContext.h:190
Definition: ecvDrawContext.h:98
unsigned minLODPointCount
Minimum number of points for activating LOD display.
Definition: ecvDrawContext.h:440
QString viewId
Display scalar field (prioritary on colors)
Definition: ecvDrawContext.h:100
void toEulerAngle(T &rz, T &ry, T &rx) const
Returns equivalent parameters: 3 rotation angles.
Definition: ecvGLMatrixTpl.h:422
@ ECV_2DLABLE_VIEWPORT
Definition: ecvDrawContext.h:67
QString viewID
Definition: ecvDrawContext.h:373
to be removed structure
Definition: ecvDrawContext.h:172
Double version of ccGLMatrixTpl.
Definition: ecvGLMatrix.h:56
math::float3 position
Definition: LineSetBuffers.cpp:44
@ CC_SKIP_ALL
Definition: ecvDrawContext.h:336
bool moreLODPointsAvailable
Wheter more points are available or not at the current level.
Definition: ecvDrawContext.h:444
@ ECV_WIREFRAME_MODE
Definition: ecvDrawContext.h:46
constexpr Rgb lightGrey(static_cast< ColorCompType >(MAX *0.8), static_cast< ColorCompType >(MAX *0.8), static_cast< ColorCompType >(MAX *0.8))
ecvColor::Rgbub labelDefaultBkgCol
Default label background color.
Definition: ecvDrawContext.h:424
ENTITY_TYPE hideType
Hide type.
Definition: ecvDrawContext.h:188
unsigned labelOpacity
Label background opacity.
Definition: ecvDrawContext.h:468
bool showSF
Display scalar field (prioritary on colors)
Definition: ecvDrawContext.h:27
ecvColor::Rgbaf defaultMeshFrontDiff
Default color for mesh (front side)
Definition: ecvDrawContext.h:408
@ ECV_MARK_POINT
Definition: ecvDrawContext.h:53
@ WIDGET_COORDINATE
Definition: ecvDrawContext.h:87
@ ECV_FACET
Definition: ecvDrawContext.h:58
void setOpacity(double op)
Definition: ecvDrawContext.h:146
@ ECV_NONE
Definition: ecvDrawContext.h:75
void setProperty(PROPERTY_MODE mode)
Definition: ecvDrawContext.h:134
constexpr Rgbub defaultLabelMarkerColor(MAX, 0, MAX)
bool showNorms
Display normals.
Definition: ecvDrawContext.h:31
float RadiansToDegrees(int radians)
Convert radians to degrees.
Definition: CVMath.h:71
unsigned char currentLODLevel
Current level for LOD display.
Definition: ecvDrawContext.h:442
math::float4 color
Definition: LineSetBuffers.cpp:46
void setLineWith(PointCoordinateType with)
Definition: ecvDrawContext.h:148
ENTITY_TYPE removeEntityType
Definition: ecvDrawContext.h:389
@ ECV_LINES_3D
Definition: ecvDrawContext.h:59
@ WIDGET_POLYGONMESH
Definition: ecvDrawContext.h:86
@ ECV_OCTREE
Definition: ecvDrawContext.h:56
Vector3Tpl< double > CCVector3d
Double 3D Vector.
Definition: CVGeom.h:804
@ CC_VIRTUAL_TRANS_ENABLED
Definition: ecvDrawContext.h:346
@ ECV_SURFACE_MODE
Definition: ecvDrawContext.h:47
ecvColor::Rgbaf defaultMeshBackDiff
Default color for mesh (back side)
Definition: ecvDrawContext.h:410
friend bool operator==(const removeInfo &first, const removeInfo &second)
Definition: ecvDrawContext.h:178
unsigned minLODTriangleCount
Minimum number of triangles for activating LOD display.
Definition: ecvDrawContext.h:451
@ ECV_POLYGON
Definition: ecvDrawContext.h:65
QString removeId
Remove viewId.
Definition: ecvDrawContext.h:176
int width
Definition: FileIOFactory.cpp:142
@ ECV_SHADING_GOURAUD
Definition: ecvDrawContext.h:42
@ ECV_ALL
Definition: ecvDrawContext.h:74
ImGuiContext * context
Definition: Window.cpp:76
PROPERTY_PARAM(ccHObject *obj, SHADING_MODE shadingMode)
Definition: ecvDrawContext.h:129
constexpr Rgbub defaultLabelBkgColor(MAX, MAX, MAX)
float labelMarkerSize
Label marker size (radius)
Definition: ecvDrawContext.h:460
ecvColor::Rgbub backgroundCol
Definition: ecvDrawContext.h:433
int size
Definition: FileIOFactory.cpp:130
Vector3Tpl< T > getTranslationAsVec3D() const
Returns a copy of the translation as a CCVector3.
Definition: ecvGLMatrixTpl.h:830
PROPERTY_PARAM(ccHObject *obj, unsigned char pointSize)
Definition: ecvDrawContext.h:122
normal_z y
Definition: my_point_types.h:168
Definition: ecvDrawContext.h:319
@ CC_FAST_ENTITY_PICKING
Definition: ecvDrawContext.h:342
@ WIDGET_CAPTION
Definition: ecvDrawContext.h:92
Mesh (triangle) material.
Definition: ecvMaterial.h:28
@ CC_DRAW_FOREGROUND
Definition: ecvDrawContext.h:332
@ ECV_LINEWITH_PROPERTY
Definition: ecvDrawContext.h:36
@ ECV_KDTREE
Definition: ecvDrawContext.h:57
bool visible
Definition: ecvDrawContext.h:380
@ ECV_2DLABLE
Definition: ecvDrawContext.h:66
unsigned dispNumberPrecision
Numerical precision (for displaying text)
Definition: ecvDrawContext.h:465
bool clearDepthLayer
Definition: ecvDrawContext.h:391
@ WIDGET_LINE_2D
Definition: ecvDrawContext.h:81
@ ECV_COLOR_PROPERTY
Definition: ecvDrawContext.h:37
constexpr Rgb yellow(MAX, MAX, 0)
ENTITY_TYPE removeType
Remove type.
Definition: ecvDrawContext.h:174
@ ECV_SHADING_PHONG
Definition: ecvDrawContext.h:42
@ ECV_LINES_2D
Definition: ecvDrawContext.h:60
@ WIDGET_TRIANGLE_2D
Definition: ecvDrawContext.h:82
Display parameters of a 3D entity.
Definition: ecvDrawContext.h:25
constexpr Rgb green(0, MAX, 0)
@ WIDGET_T3D
Definition: ecvDrawContext.h:94
SHADING_MODE shadingMode
Definition: ecvDrawContext.h:109
@ WIDGET_POLYLINE_2D
Definition: ecvDrawContext.h:89
@ WIDGET_LINE_3D
Definition: ecvDrawContext.h:90
@ WIDGET_POINTS_2D
Definition: ecvDrawContext.h:83
unsigned char defaultLineWidth
Definition: ecvDrawContext.h:381
CC_DRAWING_FLAGS
Definition: ecvDrawContext.h:329
MESH_RENDERING_MODE meshRenderingMode
Definition: ecvDrawContext.h:385
ccGLDrawContext()
Definition: ecvDrawContext.h:477
@ ECV_MESH
Definition: ecvDrawContext.h:54
bool decimateCloudOnMove
Whether to decimate big clouds when updating the 3D view.
Definition: ecvDrawContext.h:438
glDrawParams drawParam
Definition: ecvDrawContext.h:384
ENTITY_TYPE
Definition: ecvDrawContext.h:50
@ WIDGET_RECTANGLE_2D
Definition: ecvDrawContext.h:85
@ ECV_TEXT3D
Definition: ecvDrawContext.h:70
TransformInfo transformInfo
Definition: ecvDrawContext.h:370
@ CC_LIGHT_ENABLED
Definition: ecvDrawContext.h:333
float devicePixelRatio
Device pixel ratio (general 1, 2 on HD displays)
Definition: ecvDrawContext.h:399
bool visFiltering
Definition: ecvDrawContext.h:369
@ WIDGET_CIRCLE_2D
Definition: ecvDrawContext.h:84
ecvTextParam textParam
Definition: ecvDrawContext.h:371
ecvColor::Rgb defaultPolylineColor
Default color for polyline.
Definition: ecvDrawContext.h:415
ecvColor::Rgbub labelDefaultMarkerCol
Default label marker color.
Definition: ecvDrawContext.h:429
ecvColor::Rgb defaultMeshColor
Default color for mesh.
Definition: ecvDrawContext.h:412
@ WIDGET_IMAGE
Definition: ecvDrawContext.h:80
void getParameters(T &alpha_rad, Vector3Tpl< T > &axis3D, Vector3Tpl< T > &t3D) const
Definition: ecvGLMatrixTpl.h:741
@ ECV_SHADING_FLAT
Definition: ecvDrawContext.h:42
@ ECV_SHAPE
Definition: ecvDrawContext.h:55
ccMaterial::Shared defaultMat
Default material.
Definition: ecvDrawContext.h:405
SHADING_MODE
Definition: ecvDrawContext.h:42
bool drawBackgroundGradient
Definition: ecvDrawContext.h:435
ENTITY_TYPE hideShowEntityType
Definition: ecvDrawContext.h:386
int glW
GL screen widthecvColor.
Definition: ecvDrawContext.h:395
@ CC_SKIP_SELECTED
Definition: ecvDrawContext.h:335
Float version of ccGLMatrixTpl.
Definition: ecvGLMatrix.h:19
int glH
GL screen height.
Definition: ecvDrawContext.h:397
@ WIDGET_POLYLINE
Definition: ecvDrawContext.h:88
bool forceRedraw
Definition: ecvDrawContext.h:368
ecvColor::Rgb color
Definition: ecvDrawContext.h:105
Definition: ecvDrawContext.h:186
Colors namespace.
Definition: ecvColorTypes.h:32
ecvColor::Rgbub textDefaultCol
Default text color.
Definition: ecvDrawContext.h:422
@ ECV_CIRCLE_2D
Definition: ecvDrawContext.h:64
ecvColor::Rgbf viewDefaultBkgCol
Definition: ecvDrawContext.h:426
void setPointSize(unsigned char size)
Definition: ecvDrawContext.h:144
RGB color structure.
Definition: ecvColorTypes.h:49
@ WIDGET_BBOX
Definition: ecvDrawContext.h:79
@ ECV_RECTANGLE_2D
Definition: ecvDrawContext.h:62
int defaultViewPort
Definition: ecvDrawContext.h:374
ccScalarField * sfColorScaleToDisplay
Currently displayed color scale (the corresponding scalar field in fact)
Definition: ecvDrawContext.h:454
constexpr Rgbub defaultColor(MAX, MAX, MAX)
QString removeViewID
Definition: ecvDrawContext.h:388
@ ECV_POINTS_MODE
Definition: ecvDrawContext.h:45
float normalScale
Definition: ecvDrawContext.h:376
@ ECV_SENSOR
Definition: ecvDrawContext.h:73
ecvColor::Rgbub pointsDefaultCol
Default point color.
Definition: ecvDrawContext.h:418
@ ECV_SHADING_PROPERTY
Definition: ecvDrawContext.h:39
@ CC_SKIP_UNSELECTED
Definition: ecvDrawContext.h:334
ENTITY_TYPE entityType
Definition: ecvDrawContext.h:110
@ WIDGET_SPHERE
Definition: ecvDrawContext.h:91
bool decimateMeshOnMove
Whether to decimate big meshes when rotating the camera.
Definition: ecvDrawContext.h:449
bool clearColorLayer
Definition: ecvDrawContext.h:392
@ CC_DRAW_2D
Definition: ecvDrawContext.h:330
@ ECV_CAPTION
Definition: ecvDrawContext.h:68
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
WIDGETS_TYPE
Definition: ecvDrawContext.h:78
PROPERTY_PARAM(ccHObject *obj, double opacity)
Definition: ecvDrawContext.h:117
T * data()
Returns a pointer to internal data.
Definition: ecvGLMatrixTpl.h:810
unsigned char currentLineWidth
Definition: ecvDrawContext.h:382
@ CC_LOD_ACTIVATED
Definition: ecvDrawContext.h:345
@ ECV_HIERARCHY_OBJECT
Definition: ecvDrawContext.h:51
PROPERTY_MODE
Definition: ecvDrawContext.h:34
constexpr Rgb red(MAX, 0, 0)
#define CV_DB_LIB_API
Definition: CV_db.h:15
Display context.
Definition: ecvDrawContext.h:365
friend bool operator==(const hideInfo &first, const hideInfo &second)
Definition: ecvDrawContext.h:192
float renderZoom
Current zoom (screen to file rendering mode)
Definition: ecvDrawContext.h:402
float PointCoordinateType
Type of the coordinates of a (N-D) point.
Definition: CVTypes.h:16
normal_z z
Definition: my_point_types.h:165
MESH_RENDERING_MODE
Definition: ecvDrawContext.h:44
Type u[3]
Definition: CVGeom.h:139
@ ECV_OPACITY_PROPERTY
Definition: ecvDrawContext.h:38
PROPERTY_PARAM(ccHObject *obj, const ecvColor::Rgb &col)
Definition: ecvDrawContext.h:112
void setColor(const ecvColor::Rgb &col)
Definition: ecvDrawContext.h:140
@ ECV_IMAGE
Definition: ecvDrawContext.h:72
ecvColor::Rgbub pointsCurrentCol
Current point color.
Definition: ecvDrawContext.h:420
ecvColor::Rgbub bbDefaultCol
Default bounding-box color.
Definition: ecvDrawContext.h:431
float opacity
Definition: ecvDrawContext.h:378
static Vector3Tpl fromArray(const int a[3])
Constructor from an int array.
Definition: CVGeom.h:268
constexpr Rgbub defaultBkgColor(135, 206, 235)
@ ECV_SCALAR_BAR
Definition: ecvDrawContext.h:69
bool showColors
Display colors.
Definition: ecvDrawContext.h:29
char type
Definition: FileIOFactory.cpp:131
@ ECV_POLYLINE_2D
Definition: ecvDrawContext.h:63
@ WIDGET_SCALAR_BAR
Definition: ecvDrawContext.h:93
bool higherLODLevelsAvailable
Wheter higher levels are available or not.
Definition: ecvDrawContext.h:446
@ ECV_POINT_CLOUD
Definition: ecvDrawContext.h:52
A scalar field associated to display-related parameters.
Definition: ecvScalarField.h:19
float labelMarkerTextShift_pix
Shift for 3D label marker display (around the marker, in pixels)
Definition: ecvDrawContext.h:462
RGBA color structure.
Definition: ecvColorTypes.h:145
unsigned stereoPassIndex
Stereo pass index.
Definition: ecvDrawContext.h:471
int drawingFlags
Drawing options (see below)
Definition: ecvDrawContext.h:367
@ CC_ENTITY_PICKING
Definition: ecvDrawContext.h:337