ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvHObjectCaster.cpp
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 #include "ecvHObjectCaster.h"
9 
10 // types
11 #include "Image.h"
12 #include "LineSet.h"
13 #include "Octree.h"
14 #include "RGBDImage.h"
15 #include "VoxelGrid.h"
16 #include "ecv2DLabel.h"
17 #include "ecv2DViewportLabel.h"
18 #include "ecv2DViewportObject.h"
19 #include "ecvBBox.h"
20 #include "ecvBox.h"
21 #include "ecvCameraSensor.h"
22 #include "ecvCircle.h"
23 #include "ecvCone.h"
24 #include "ecvCoordinateSystem.h"
25 #include "ecvCylinder.h"
26 #include "ecvDisc.h"
27 #include "ecvDish.h"
28 #include "ecvExtru.h"
29 #include "ecvFacet.h"
30 #include "ecvGBLSensor.h"
31 #include "ecvGenericMesh.h"
32 #include "ecvGenericPointCloud.h"
33 #include "ecvGenericPrimitive.h"
34 #include "ecvHObject.h"
35 #include "ecvImage.h"
37 #include "ecvKdTree.h"
38 #include "ecvMesh.h"
39 #include "ecvOctree.h"
40 #include "ecvOctreeProxy.h"
41 #include "ecvOrientedBBox.h"
42 #include "ecvPlane.h"
43 #include "ecvPointCloud.h"
44 #include "ecvPolyline.h"
45 #include "ecvQuadric.h"
46 #include "ecvSensor.h"
47 #include "ecvShiftedObject.h"
48 #include "ecvSphere.h"
49 #include "ecvSubMesh.h"
50 #include "ecvTorus.h"
51 
52 /*** helpers ***/
53 
55  ccHObject* obj, bool* lockedVertices /*= nullptr*/) {
56  if (lockedVertices) {
57  *lockedVertices = false;
58  }
59 
60  if (obj) {
61  if (obj->isA(CV_TYPES::POINT_CLOUD)) {
62  return static_cast<ccPointCloud*>(obj);
63  } else if (obj->isKindOf(CV_TYPES::MESH)) {
64  ccGenericPointCloud* vertices =
65  static_cast<ccGenericMesh*>(obj)->getAssociatedCloud();
66  if (vertices) {
67  if (!obj->isA(CV_TYPES::MESH) &&
68  lockedVertices) // no need to 'lock' the vertices if the
69  // user works on the parent mesh
70  {
71  *lockedVertices = vertices->isLocked();
72  }
73  return ccHObjectCaster::ToPointCloud(vertices);
74  }
75  }
76  }
77 
78  return nullptr;
79 }
80 
82  ccHObject* obj, bool* lockedVertices /*= nullptr*/) {
83  if (lockedVertices) {
84  *lockedVertices = false;
85  }
86 
87  if (obj) {
88  if (obj->isKindOf(CV_TYPES::POINT_CLOUD)) {
89  return static_cast<ccGenericPointCloud*>(obj);
90  } else if (obj->isKindOf(CV_TYPES::MESH)) {
91  ccGenericPointCloud* vertices =
92  static_cast<ccGenericMesh*>(obj)->getAssociatedCloud();
93  if (vertices) {
94  if (!obj->isA(CV_TYPES::MESH) &&
95  lockedVertices) // no need to 'lock' the vertices if the
96  // user works on the parent mesh
97  {
98  *lockedVertices = vertices->isLocked();
99  }
100  return vertices;
101  }
102  }
103  }
104 
105  return nullptr;
106 }
107 
109  ccHObject* obj, bool* lockedVertices /*= nullptr*/) {
110  ccGenericPointCloud* cloud = ToGenericPointCloud(obj, lockedVertices);
111  if (cloud) return cloud;
112 
113  if (obj && obj->isKindOf(CV_TYPES::POLY_LINE)) {
114  if (lockedVertices) {
115  *lockedVertices = false;
116  }
117  return static_cast<ccPolyline*>(obj);
118  }
119 
120  return nullptr;
121 }
122 
124  return (obj && obj->isKindOf(CV_TYPES::MESH)
125  ? static_cast<ccGenericMesh*>(obj)
126  : nullptr);
127 }
128 
130  return (obj && (obj->isA(CV_TYPES::MESH) ||
132  ? static_cast<ccMesh*>(obj)
133  : nullptr);
134 }
135 
137  return (obj && obj->isA(CV_TYPES::SUB_MESH) ? static_cast<ccSubMesh*>(obj)
138  : nullptr);
139 }
140 
142  return (obj && obj->isA(CV_TYPES::POLY_LINE) ? static_cast<ccPolyline*>(obj)
143  : nullptr);
144 }
145 
147  return (obj && obj->isKindOf(CV_TYPES::CIRCLE) ? static_cast<ccCircle*>(obj)
148  : nullptr);
149 }
150 
152  return obj && obj->isA(CV_TYPES::FACET) ? static_cast<ccFacet*>(obj)
153  : nullptr;
154 }
155 
157  if (obj) {
158  if (obj->isA(CV_TYPES::FACET)) {
159  return static_cast<ccFacet*>(obj);
160  } else if (obj->isA(CV_TYPES::PLANE)) {
161  return static_cast<ccPlane*>(obj);
162  }
163  }
164  return nullptr;
165 }
166 
168  return obj && obj->isKindOf(CV_TYPES::PRIMITIVE)
169  ? static_cast<ccGenericPrimitive*>(obj)
170  : nullptr;
171 }
172 
174  return obj && obj->isA(CV_TYPES::SPHERE) ? static_cast<ccSphere*>(obj)
175  : nullptr;
176 }
177 
179  return obj && obj->isA(CV_TYPES::CYLINDER) ? static_cast<ccCylinder*>(obj)
180  : nullptr;
181 }
182 
184  return obj && obj->isKindOf(CV_TYPES::CONE) ? static_cast<ccCone*>(obj)
185  : nullptr;
186 }
187 
189  return obj && obj->isKindOf(CV_TYPES::QUADRIC)
190  ? static_cast<ccQuadric*>(obj)
191  : nullptr;
192 }
193 
195  return obj && obj->isKindOf(CV_TYPES::BOX) ? static_cast<ccBox*>(obj)
196  : nullptr;
197 }
198 
200  return obj && obj->isA(CV_TYPES::PLANE) ? static_cast<ccPlane*>(obj)
201  : nullptr;
202 }
203 
205  return obj && obj->isA(CV_TYPES::DISC) ? static_cast<ccDisc*>(obj)
206  : nullptr;
207 }
208 
210  return obj && obj->isA(CV_TYPES::DISH) ? static_cast<ccDish*>(obj)
211  : nullptr;
212 }
213 
215  return obj && obj->isA(CV_TYPES::EXTRU) ? static_cast<ccExtru*>(obj)
216  : nullptr;
217 }
218 
220  return obj && obj->isA(CV_TYPES::TORUS) ? static_cast<ccTorus*>(obj)
221  : nullptr;
222 }
223 
225  return obj && obj->isA(CV_TYPES::POINT_OCTREE)
226  ? static_cast<ccOctreeProxy*>(obj)
227  : nullptr;
228 }
229 
231  ccOctreeProxy* proxy = ToOctreeProxy(obj);
232  return proxy ? proxy->getOctree().data() : nullptr;
233 }
234 
236  return obj && obj->isA(CV_TYPES::POINT_KDTREE) ? static_cast<ccKdTree*>(obj)
237  : nullptr;
238 }
239 
241  return obj && obj->isKindOf(CV_TYPES::SENSOR) ? static_cast<ccSensor*>(obj)
242  : nullptr;
243 }
244 
246  return obj && obj->isA(CV_TYPES::GBL_SENSOR)
247  ? static_cast<ccGBLSensor*>(obj)
248  : nullptr;
249 }
250 
252  return obj && obj->isA(CV_TYPES::CAMERA_SENSOR)
253  ? static_cast<ccCameraSensor*>(obj)
254  : nullptr;
255 }
256 
258  return obj && obj->isKindOf(CV_TYPES::IMAGE) ? static_cast<ccImage*>(obj)
259  : nullptr;
260 }
261 
263  return obj && obj->isA(CV_TYPES::LABEL_2D) ? static_cast<cc2DLabel*>(obj)
264  : nullptr;
265 }
266 
268  return obj && obj->isA(CV_TYPES::VIEWPORT_2D_LABEL)
269  ? static_cast<cc2DViewportLabel*>(obj)
270  : nullptr;
271 }
272 
274  return obj && obj->isKindOf(CV_TYPES::VIEWPORT_2D_OBJECT)
275  ? static_cast<cc2DViewportObject*>(obj)
276  : nullptr;
277 }
278 
280  return obj && obj->isKindOf(CV_TYPES::TRANS_BUFFER)
281  ? static_cast<ccIndexedTransformationBuffer*>(obj)
282  : nullptr;
283 }
284 
285 using namespace cloudViewer;
286 
288  return obj && obj->isKindOf(CV_TYPES::IMAGE2)
289  ? static_cast<geometry::Image*>(obj)
290  : nullptr;
291 }
292 
294  return obj && obj->isKindOf(CV_TYPES::RGBD_IMAGE)
295  ? static_cast<geometry::RGBDImage*>(obj)
296  : nullptr;
297 }
298 
300  return obj && obj->isKindOf(CV_TYPES::VOXEL_GRID)
301  ? static_cast<geometry::VoxelGrid*>(obj)
302  : nullptr;
303 }
304 
306  return obj && obj->isKindOf(CV_TYPES::LINESET)
307  ? static_cast<geometry::LineSet*>(obj)
308  : nullptr;
309 }
310 
312  return obj && obj->isKindOf(CV_TYPES::POINT_OCTREE2)
313  ? static_cast<geometry::Octree*>(obj)
314  : nullptr;
315 }
316 
318  return obj && obj->isKindOf(CV_TYPES::BBOX) ? static_cast<ccBBox*>(obj)
319  : nullptr;
320 }
321 
323  return obj && obj->isKindOf(CV_TYPES::ORIENTED_BBOX)
324  ? static_cast<ecvOrientedBBox*>(obj)
325  : nullptr;
326 }
327 
329  return (obj && obj->isKindOf(CV_TYPES::COORDINATESYSTEM)
330  ? static_cast<ccCoordinateSystem*>(obj)
331  : nullptr);
332 }
333 
335  const ccHObject* sourceEntity,
336  ccHObject* destEntity,
337  std::vector<int>* newPointOrTriangleIndex /*=nullptr*/,
338  const ccHObject* sourceEntityProxy /*=nullptr*/,
339  ccHObject* destEntityProxy /*=nullptr*/) {
340  if (!sourceEntity || !destEntity) {
341  assert(false);
342  return false;
343  }
344 
345  bool sourceIsCloud = sourceEntity->isKindOf(CV_TYPES::POINT_CLOUD);
346  bool destIsCloud = destEntity->isKindOf(CV_TYPES::POINT_CLOUD);
347  bool sourceAndDestAreCloud = sourceIsCloud && destIsCloud;
348 
349  bool sourceIsMesh = sourceEntity->isKindOf(CV_TYPES::MESH);
350  bool destIsMesh = destEntity->isKindOf(CV_TYPES::MESH);
351  bool sourceAndDestAreMeshes = sourceIsMesh && destIsMesh;
352 
353  unsigned numberOfPointOrTriangle = 0;
354  if (sourceIsCloud)
355  numberOfPointOrTriangle =
356  static_cast<const ccGenericPointCloud*>(sourceEntity)->size();
357  else if (sourceIsMesh)
358  numberOfPointOrTriangle =
359  static_cast<const ccGenericMesh*>(sourceEntity)->size();
360 
361  if (newPointOrTriangleIndex) {
362  if (sourceEntity == destEntity) {
364  "[ccHObjectCaster::CloneChildren] Providing a "
365  "point/triangle correspondance map while the source and "
366  "destination entities are the same");
367  // we can live with that...
368  }
369 
370  if (!sourceAndDestAreCloud && !sourceAndDestAreMeshes) {
372  "[ccHObjectCaster::CloneChildren] A point/triangle "
373  "correspondance map can only work between 2 entities of "
374  "the same type");
375  return false;
376  }
377 
378  if (newPointOrTriangleIndex->size() != numberOfPointOrTriangle) {
380  "[ccHObjectCaster::CloneChildren] Mismatch between the "
381  "point/triangle correspondance map and the source entity "
382  "size");
383  return false;
384  }
385  }
386 
387  QMap<ccCameraSensor*, ccCameraSensor*> clonedCameraSensors;
388 
389  const ccHObject* currentSourceEntity =
390  (sourceEntityProxy ? sourceEntityProxy : sourceEntity);
391  ccHObject* currentDestEntity =
392  (destEntityProxy ? destEntityProxy : destEntity);
393 
394  // for each child
395  for (unsigned i = 0; i < currentSourceEntity->getChildrenNumber(); ++i) {
396  ccHObject* child = currentSourceEntity->getChild(i);
397 
398  switch (child->getClassID()) {
399  // 2D Label
400  case CV_TYPES::LABEL_2D: {
401  cc2DLabel* label = static_cast<cc2DLabel*>(child);
402 
403  // check if we can keep this label
404  bool keepThisLabel = true;
405  if (newPointOrTriangleIndex) {
406  for (unsigned i = 0; i < label->size(); ++i) {
407  const cc2DLabel::PickedPoint& pp =
408  label->getPickedPoint(i);
409  if (pp.entity() == sourceEntity &&
410  newPointOrTriangleIndex->at(pp.index) < 0) {
411  // this label relies on a point or triangle that has
412  // no correspondance in the destination entity
413  keepThisLabel = false;
414  break;
415  }
416  }
417  }
418 
419  if (keepThisLabel) {
420  cc2DLabel* clonedLabel = new cc2DLabel(*label);
421 
422  for (unsigned i = 0; i < label->size(); ++i) {
423  cc2DLabel::PickedPoint pp = label->getPickedPoint(i);
424  if (pp.entity() == sourceEntity) {
425  if (sourceIsCloud)
426  pp.cloud = static_cast<ccGenericPointCloud*>(
427  destEntity);
428  else
429  pp.mesh =
430  static_cast<ccGenericMesh*>(destEntity);
431 
432  if (newPointOrTriangleIndex) {
433  pp.index = static_cast<unsigned>(
434  newPointOrTriangleIndex->at(
435  pp.index)); // we've checked
436  // above that it's
437  // >= 0
438  }
439  }
440  clonedLabel->addPickedPoint(pp);
441  }
442  clonedLabel->setName(
443  label->getName()); // the label name is overridden
444  // by calls to addPickedPoint
445 
446  currentDestEntity->addChild(clonedLabel);
447  }
448  } break;
449 
450  // Image
451  case CV_TYPES::IMAGE: {
452  ccImage* image = static_cast<ccImage*>(child);
453  ccImage* clonedImage = new ccImage(*image);
454 
455  ccCameraSensor* camSensor = image->getAssociatedSensor();
456  if (camSensor) {
457  if (clonedCameraSensors.contains(camSensor)) {
458  // if we have already cloned the sensor on which this
459  // image depends, we can simply update the link
460  clonedImage->setAssociatedSensor(
461  clonedCameraSensors[camSensor]);
462  } else {
463  // else we have to clone the sensor
464  ccCameraSensor* clonedCamSensor =
465  new ccCameraSensor(*camSensor);
466  clonedCameraSensors.insert(camSensor, clonedCamSensor);
467 
468  clonedImage->setAssociatedSensor(clonedCamSensor);
469  clonedImage->addChild(clonedCamSensor);
470  }
471  }
472 
473  currentDestEntity->addChild(clonedImage);
474  } break;
475 
476  // Camera sensor
478  ccCameraSensor* camSensor = static_cast<ccCameraSensor*>(child);
479  ccCameraSensor* clonedCamSensor =
480  new ccCameraSensor(*camSensor);
481  clonedCameraSensors.insert(camSensor, clonedCamSensor);
482 
483  currentDestEntity->addChild(clonedCamSensor);
484  } break;
485 
486  // GBL sensor
487  case CV_TYPES::GBL_SENSOR: {
488  ccGBLSensor* gblSensor = static_cast<ccGBLSensor*>(child);
489  ccGBLSensor* clonedGBLSensor = new ccGBLSensor(*gblSensor);
490 
491  currentDestEntity->addChild(clonedGBLSensor);
492  } break;
493 
494  // 2D Viewport object
496  cc2DViewportObject* viewportObject =
497  static_cast<cc2DViewportObject*>(child);
498  ;
499  cc2DViewportObject* clonedViewportObject =
500  new cc2DViewportObject(*viewportObject);
501 
502  currentDestEntity->addChild(clonedViewportObject);
503  } break;
504 
505  // 2D Viewport label
507  cc2DViewportLabel* viewportLabel =
508  static_cast<cc2DViewportLabel*>(child);
509  ;
510  cc2DViewportLabel* clonedViewportLabel =
511  new cc2DViewportLabel(*viewportLabel);
512 
513  currentDestEntity->addChild(clonedViewportLabel);
514  } break;
515 
516  // Groups
518  ccHObject* newGroup = new ccHObject(*child);
519  // start (or proceed with) the recursion
520  if (CloneChildren(sourceEntity, destEntity,
521  newPointOrTriangleIndex, child, newGroup)) {
522  if (newGroup->getChildrenNumber() != 0) {
523  currentDestEntity->addChild(newGroup);
524  } else {
525  // empty group, no need to keep it
526  delete newGroup;
527  newGroup = nullptr;
528  }
529  } else {
530  // something bad happened
531  return false;
532  }
533  } break;
534 
535  // Meshes
536  case CV_TYPES::MESH: {
537  // TODO
538  } break;
539 
540  default: {
541  // nothing to do
542  } break;
543  }
544  }
545 
546  return true;
547 }
std::shared_ptr< core::Tensor > image
int size
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Definition: CVLog.cpp:133
2D label (typically attached to points)
Definition: ecv2DLabel.h:22
bool addPickedPoint(ccGenericPointCloud *cloud, unsigned pointIndex, bool entityCenter=false)
Adds a point to this label.
Definition: ecv2DLabel.cpp:400
const PickedPoint & getPickedPoint(unsigned index) const
Returns a given point.
Definition: ecv2DLabel.h:194
unsigned size() const
Returns current size.
Definition: ecv2DLabel.h:74
virtual QString getName() const override
Returns object name.
Definition: ecv2DLabel.cpp:196
2D viewport label
2D viewport object
Bounding box structure.
Definition: ecvBBox.h:25
Box (primitive)
Definition: ecvBox.h:16
Camera (projective) sensor.
Circle (as a polyline)
Definition: ecvCircle.h:16
Cone (primitive)
Definition: ecvCone.h:16
Coordinate System (primitive)
Cylinder (primitive)
Definition: ecvCylinder.h:16
Disc (primitive)
Definition: ecvDisc.h:16
Dish.
Definition: ecvDish.h:16
Profile extrusion (primitive)
Definition: ecvExtru.h:17
Facet.
Definition: ecvFacet.h:25
Ground-based Laser sensor.
Definition: ecvGBLSensor.h:26
Generic mesh interface.
A 3D cloud interface with associated features (color, normals, octree, etc.)
Generic primitive interface.
static ccPolyline * ToPolyline(ccHObject *obj)
Converts current object to ccPolyline (if possible)
static cloudViewer::geometry::RGBDImage * ToRGBDImage(ccHObject *obj)
static cloudViewer::geometry::Image * ToImage2(ccHObject *obj)
static ccOctreeProxy * ToOctreeProxy(ccHObject *obj)
Converts current object to ccOctreeProxy (if possible)
static cloudViewer::geometry::Octree * ToOctree2(ccHObject *obj)
static cc2DViewportLabel * To2DViewportLabel(ccHObject *obj)
Converts current object to cc2DViewportLabel (if possible)
static ccGBLSensor * ToGBLSensor(ccHObject *obj)
static ccCoordinateSystem * ToCoordinateSystem(ccHObject *obj)
Converts current object to ccCoordinateSystem (if possible)
static ccPlane * ToPlane(ccHObject *obj)
Converts current object to ccPlane (if possible)
static ccImage * ToImage(ccHObject *obj)
static cloudViewer::geometry::VoxelGrid * ToVoxelGrid(ccHObject *obj)
static ccBox * ToBox(ccHObject *obj)
Converts current object to ccBox (if possible)
static ccCone * ToCone(ccHObject *obj)
Converts current object to ccCone (if possible)
static ccIndexedTransformationBuffer * ToTransBuffer(ccHObject *obj)
Converts current object to ccIndexedTransformationBuffer (if possible)
static ccFacet * ToFacet(ccHObject *obj)
Converts current object to ccFacet (if possible)
static ccDish * ToDish(ccHObject *obj)
Converts current object to ccDish (if possible)
static ccBBox * ToBBox(ccHObject *obj)
static cloudViewer::geometry::LineSet * ToLineSet(ccHObject *obj)
static ccSphere * ToSphere(ccHObject *obj)
Converts current object to ccSphere (if possible)
static ccDisc * ToDisc(ccHObject *obj)
Converts current object to ccDisc (if possible)
static ccTorus * ToTorus(ccHObject *obj)
Converts current object to ccTorus (if possible)
static ccGenericMesh * ToGenericMesh(ccHObject *obj)
Converts current object to ccGenericMesh (if possible)
static ccCircle * ToCircle(ccHObject *obj)
Converts current object to ccCircle (if possible)
static ccQuadric * ToQuadric(ccHObject *obj)
Converts current object to ccQuadric (if possible)
static ecvOrientedBBox * ToOrientedBBox(ccHObject *obj)
static cc2DViewportObject * To2DViewportObject(ccHObject *obj)
Converts current object to cc2DViewportObject (if possible)
static ccSubMesh * ToSubMesh(ccHObject *obj)
Converts current object to ccSubMesh (if possible)
static ccSensor * ToSensor(ccHObject *obj)
Converts current object to ccSensor (if possible)
static ccMesh * ToMesh(ccHObject *obj)
Converts current object to ccMesh (if possible)
static ccGenericPrimitive * ToPrimitive(ccHObject *obj)
Converts current object to ccGenericPrimitive (if possible)
static ccOctree * ToOctree(ccHObject *obj)
Converts current object to ccOctree (if possible)
static ccShiftedObject * ToShifted(ccHObject *obj, bool *isLockedVertices=nullptr)
Converts current object to 'equivalent' ccShiftedObject.
static ccPlanarEntityInterface * ToPlanarEntity(ccHObject *obj)
Converts current object to ccPlanarEntityInterface (if possible)
static ccCameraSensor * ToCameraSensor(ccHObject *obj)
static ccKdTree * ToKdTree(ccHObject *obj)
Converts current object to ccKdTree (if possible)
static ccGenericPointCloud * ToGenericPointCloud(ccHObject *obj, bool *isLockedVertices=nullptr)
Converts current object to 'equivalent' ccGenericPointCloud.
static bool CloneChildren(const ccHObject *sourceEntity, ccHObject *destEntity, std::vector< int > *newPointOrTriangleIndex=nullptr, const ccHObject *sourceEntityProxy=nullptr, ccHObject *destEntityProxy=nullptr)
static ccExtru * ToExtru(ccHObject *obj)
Converts current object to ccExtru (if possible)
static ccCylinder * ToCylinder(ccHObject *obj)
Converts current object to ccCylinder (if possible)
static cc2DLabel * To2DLabel(ccHObject *obj)
Converts current object to cc2DLabel (if possible)
static ccPointCloud * ToPointCloud(ccHObject *obj, bool *isLockedVertices=nullptr)
Converts current object to 'equivalent' ccPointCloud.
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
unsigned getChildrenNumber() const
Returns the number of children.
Definition: ecvHObject.h:312
virtual bool addChild(ccHObject *child, int dependencyFlags=DP_PARENT_OF_OTHER, int insertIndex=-1)
Adds a child.
Definition: ecvHObject.cpp:534
ccHObject * getChild(unsigned childPos) const
Returns the ith child.
Definition: ecvHObject.h:325
CV_CLASS_ENUM getClassID() const override
Returns class ID.
Definition: ecvHObject.h:232
Generic image.
Definition: ecvImage.h:19
void setAssociatedSensor(ccCameraSensor *sensor)
Sets associated sensor.
Definition: ecvImage.cpp:130
KD-tree structure.
Definition: ecvKdTree.h:25
Triangular mesh.
Definition: ecvMesh.h:35
virtual bool isLocked() const
Returns whether the object is locked or not.
Definition: ecvObject.h:112
bool isA(CV_CLASS_ENUM type) const
Definition: ecvObject.h:131
virtual void setName(const QString &name)
Sets object name.
Definition: ecvObject.h:75
bool isKindOf(CV_CLASS_ENUM type) const
Definition: ecvObject.h:128
Octree structure proxy.
ccOctree::Shared getOctree() const
Returns the associated octree.
Octree structure.
Definition: ecvOctree.h:27
Interface for a planar entity.
Plane (primitive)
Definition: ecvPlane.h:18
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Colored polyline.
Definition: ecvPolyline.h:24
Quadric (primitive)
Definition: ecvQuadric.h:16
Generic sensor interface.
Definition: ecvSensor.h:27
Shifted entity interface.
Sphere (primitive)
Definition: ecvSphere.h:16
A sub-mesh.
Definition: ecvSubMesh.h:19
Torus (primitive)
Definition: ecvTorus.h:16
The Image class stores image with customizable width, height, num of channels and bytes per channel.
Definition: Image.h:33
LineSet define a sets of lines in 3D. A typical application is to display the point cloud corresponde...
Definition: LineSet.h:29
Octree datastructure.
Definition: Octree.h:250
RGBDImage is for a pair of registered color and depth images,.
Definition: RGBDImage.h:27
VoxelGrid is a collection of voxels which are aligned in grid.
Definition: VoxelGrid.h:64
@ SENSOR
Definition: CVTypes.h:116
@ HIERARCHY_OBJECT
Definition: CVTypes.h:103
@ VIEWPORT_2D_OBJECT
Definition: CVTypes.h:141
@ PRIMITIVE
Definition: CVTypes.h:119
@ MESH
Definition: CVTypes.h:105
@ GBL_SENSOR
Definition: CVTypes.h:117
@ IMAGE
Definition: CVTypes.h:114
@ COORDINATESYSTEM
Definition: CVTypes.h:145
@ TRANS_BUFFER
Definition: CVTypes.h:144
@ CONE
Definition: CVTypes.h:123
@ POINT_CLOUD
Definition: CVTypes.h:104
@ DISH
Definition: CVTypes.h:129
@ CIRCLE
Definition: CVTypes.h:113
@ VOXEL_GRID
Definition: CVTypes.h:151
@ LABEL_2D
Definition: CVTypes.h:140
@ POLY_LINE
Definition: CVTypes.h:112
@ POINT_KDTREE
Definition: CVTypes.h:111
@ FACET
Definition: CVTypes.h:109
@ SUB_MESH
Definition: CVTypes.h:106
@ LINESET
Definition: CVTypes.h:152
@ QUADRIC
Definition: CVTypes.h:131
@ RGBD_IMAGE
Definition: CVTypes.h:158
@ POINT_OCTREE
Definition: CVTypes.h:110
@ TORUS
Definition: CVTypes.h:122
@ EXTRU
Definition: CVTypes.h:130
@ IMAGE2
Definition: CVTypes.h:156
@ SPHERE
Definition: CVTypes.h:121
@ CAMERA_SENSOR
Definition: CVTypes.h:118
@ PLANE
Definition: CVTypes.h:120
@ POINT_OCTREE2
Definition: CVTypes.h:157
@ DISC
Definition: CVTypes.h:146
@ VIEWPORT_2D_LABEL
Definition: CVTypes.h:142
@ BBOX
Definition: CVTypes.h:154
@ CYLINDER
Definition: CVTypes.h:126
@ ORIENTED_BBOX
Definition: CVTypes.h:155
Generic file read and write utility for python interface.
Picked point descriptor.
Definition: ecv2DLabel.h:122
unsigned index
Point/triangle index.
Definition: ecv2DLabel.h:128
ccGenericMesh * mesh
Mesh.
Definition: ecv2DLabel.h:126
ccHObject * entity() const
Returns the associated entity (cloud or mesh)
Definition: ecv2DLabel.cpp:112
ccGenericPointCloud * cloud
Cloud.
Definition: ecv2DLabel.h:124