50 void ccGeoObject::assignGID() {
52 _gID =
static_cast<unsigned int>(std::hash<std::string>{}(
53 QString::asprintf(
"%s%d",
getName().toLatin1().data(),
58 void ccGeoObject::init(
bool singleSurface) {
60 QVariantMap* map =
new QVariantMap();
62 map->insert(
"ccCompassType",
"GeoObjectSS");
65 map->insert(
"ccCompassType",
"GeoObject");
67 map->insert(
"GID",
getGID());
81 switch (mappingRegion) {
212 recurseChildren(c, active);
216 void ccGeoObject::recurseChildren(
ccHObject* par,
bool highlight) {
221 bool upperBoundary =
false;
223 while (p && highlight)
228 upperBoundary =
true;
268 recurseChildren(c, highlight);
286 QVariantMap* map =
new QVariantMap();
287 map->insert(
"ccCompassType",
"GeoInterior");
308 QVariantMap* map =
new QVariantMap();
309 map->insert(
"ccCompassType",
"GeoUpperBoundary");
329 QVariantMap* map =
new QVariantMap();
330 map->insert(
"ccCompassType",
"GeoLowerBoundary");
339 return object->getMetaData(
"ccCompassType")
341 .contains(
"GeoObject");
348 return object->getMetaData(
"ccCompassType")
350 .contains(
"GeoUpperBoundary");
357 return object->getMetaData(
"ccCompassType")
359 .contains(
"GeoLowerBoundary");
366 return object->getMetaData(
"ccCompassType")
368 .contains(
"GeoInterior");
375 return object->getMetaData(
"ccCompassType")
377 .contains(
"GeoObjectSS");
383 while (
object !=
nullptr) {
398 while (parent !=
nullptr &&
404 if (parent ==
nullptr) {
virtual void setVisible(bool state)
Sets entity visibility.
virtual void showNameIn3D(bool state)
Sets whether name should be displayed in 3D.
static bool isFitPlane(ccHObject *object)
int getRelationTo(ccGeoObject *obj, ccTopologyRelation **out=nullptr)
void setActive(bool active)
static ccGeoObject * getGeoObjectParent(ccHObject *object)
static bool isGeoObjectInterior(ccHObject *object)
static const int INTERIOR
static const int UPPER_BOUNDARY
ccPointCloud * m_associatedCloud
static int getGeoObjectRegion(ccHObject *object)
ccHObject * getRegion(int mappingRegion)
ccPointCloud * getAssociatedCloud()
ccTopologyRelation * addRelationTo(ccGeoObject *obj2, int type, ecvMainAppInterface *app)
static bool isGeoObjectLower(ccHObject *object)
static bool isGeoObject(ccHObject *object)
static bool isSingleSurfaceGeoObject(ccHObject *object)
ccGeoObject(QString name, ecvMainAppInterface *app, bool singleSurface)
static const int LOWER_BOUNDARY
static bool isGeoObjectUpper(ccHObject *object)
ecvMainAppInterface * m_app
Hierarchical CLOUDVIEWER Object.
ccHObject * find(unsigned uniqueID)
Finds an entity in this object hierarchy.
unsigned getChildrenNumber() const
Returns the number of children.
virtual bool addChild(ccHObject *child, int dependencyFlags=DP_PARENT_OF_OTHER, int insertIndex=-1)
Adds a child.
ccHObject * getParent() const
Returns parent object.
ccHObject(QString name=QString())
Default constructor.
ccHObject * getChild(unsigned childPos) const
Returns the ith child.
Container m_children
Children.
void setAlternate(bool isActive)
void setHighlight(bool isActive)
virtual QString getName() const
Returns object name.
virtual unsigned getUniqueID() const
Returns object unique ID.
void setMetaData(const QString &key, const QVariant &data)
Sets a meta-data element.
QVariant getMetaData(const QString &key) const
Returns a given associated meta data.
bool hasMetaData(const QString &key) const
Returns whether a meta-data element with the given key exists or not.
virtual void setEnabled(bool state)
Sets the "enabled" property.
static bool isPinchNode(ccHObject *obj)
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
static bool isPointPair(ccHObject *object)
static int invertType(int type)
static const int NOT_OLDER_THAN
static const int IMMEDIATELY_PRECEDES
static const int OLDER_THAN
void constructGraphic(ccGeoObject *older, ccGeoObject *younger)
static bool isTopologyRelation(ccHObject *obj)
static bool isTrace(ccHObject *object)
Main application interface (for plugins)
virtual ccHObject * dbRootObject()=0
Returns DB root (as a ccHObject)
virtual void addToDB(ccHObject *obj, bool updateZoom=false, bool autoExpandDBTree=true, bool checkDimensions=false, bool autoRedraw=true)=0
virtual void dispToConsole(QString message, ConsoleMessageLevel level=STD_CONSOLE_MESSAGE)=0