ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ccHObject Class Reference

Hierarchical CLOUDVIEWER Object. More...

#include <ecvHObject.h>

Inheritance diagram for ccHObject:
Collaboration diagram for ccHObject:

Public Types

enum  DEPENDENCY_FLAGS {
  DP_NONE = 0 , DP_NOTIFY_OTHER_ON_DELETE = 1 , DP_NOTIFY_OTHER_ON_UPDATE , DP_DELETE_OTHER = 8 ,
  DP_PARENT_OF_OTHER = 24
}
 Dependency flags. More...
 
enum  SelectionBehavior { SELECTION_AA_BBOX , SELECTION_FIT_BBOX , SELECTION_IGNORED }
 Behavior when selected. More...
 
using Container = std::vector< ccHObject * >
 Standard instances container (for children, etc.) More...
 
using Shared = QSharedPointer< ccHObject >
 Shared pointer. More...
 
using SharedContainer = std::vector< Shared >
 Shared instances container (for children, etc.) More...
 
using GlobalBoundingBox = cloudViewer::BoundingBoxTpl< double >
 Global (non-shifted) bounding-box. More...
 
- Public Types inherited from ccSerializableObject
enum  DeserializationFlags { DF_POINT_COORDS_64_BITS , DF_SCALAR_VAL_32_BITS = 2 }
 Deserialization flags (bit-field) More...
 
typedef QMultiMap< unsigned, unsigned > LoadedIDMap
 Map of loaded unique IDs (old ID --> new ID) More...
 

Public Member Functions

 ccHObject (QString name=QString())
 Default constructor. More...
 
 ccHObject (const ccHObject &object)
 Copy constructor. More...
 
virtual ~ccHObject () override
 Default destructor. More...
 
virtual bool IsEmpty () const
 
virtual Eigen::Vector3d GetMinBound () const
 Returns min bounds for geometry coordinates. More...
 
virtual Eigen::Vector2d GetMin2DBound () const
 
virtual Eigen::Vector3d GetMaxBound () const
 Returns max bounds for geometry coordinates. More...
 
virtual Eigen::Vector2d GetMax2DBound () const
 
virtual Eigen::Vector3d GetCenter () const
 Returns the center of the geometry coordinates. More...
 
virtual ccBBox GetAxisAlignedBoundingBox () const
 Returns an axis-aligned bounding box of the geometry. More...
 
virtual ecvOrientedBBox GetOrientedBoundingBox () const
 
virtual ccHObjectTransform (const Eigen::Matrix4d &transformation)
 Apply transformation (4x4 matrix) to the geometry coordinates. More...
 
virtual ccHObjectTranslate (const Eigen::Vector3d &translation, bool relative=true)
 Apply translation to the geometry coordinates. More...
 
virtual ccHObjectScale (const double s, const Eigen::Vector3d &center)
 Apply scaling to the geometry coordinates. Given a scaling factor $s$, and center $c$, a given point $p$ is transformed according to $s (p - c) + c$. More...
 
virtual ccHObjectScale (const double s)
 
virtual ccHObjectRotate (const Eigen::Matrix3d &R, const Eigen::Vector3d &center)
 Apply rotation to the geometry coordinates and normals. Given a rotation matrix $R$, and center $c$, a given point $p$ is transformed according to $R (p - c) + c$. More...
 
virtual ccHObjectRotate (const Eigen::Matrix3d &R)
 
QString getViewId () const
 
CV_CLASS_ENUM getClassID () const override
 Returns class ID. More...
 
bool isGroup () const
 Returns whether the instance is a group. More...
 
ccHObjectgetParent () const
 Returns parent object. More...
 
virtual QIcon getIcon () const
 Returns the icon associated to this entity. More...
 
void addDependency (ccHObject *otherObject, int flags, bool additive=true)
 Adds a new dependence (additive or not) More...
 
int getDependencyFlagsWith (const ccHObject *otherObject)
 Returns the dependency flags with a given object. More...
 
void removeDependencyWith (ccHObject *otherObject)
 Removes any dependency flags with a given object. More...
 
void removeDependencyFlag (ccHObject *otherObject, DEPENDENCY_FLAGS flag)
 Removes a given dependency flag. More...
 
virtual bool addChild (ccHObject *child, int dependencyFlags=DP_PARENT_OF_OTHER, int insertIndex=-1)
 Adds a child. More...
 
unsigned getChildrenNumber () const
 Returns the number of children. More...
 
unsigned int getChildCountRecursive () const
 Returns the total number of children under this object recursively. More...
 
ccHObjectgetChild (unsigned childPos) const
 Returns the ith child. More...
 
ccHObjectfind (unsigned uniqueID)
 Finds an entity in this object hierarchy. More...
 
unsigned filterChildren (Container &filteredChildren, bool recursive=false, CV_CLASS_ENUM filter=CV_TYPES::OBJECT, bool strict=false) const
 Collects the children corresponding to a certain pattern. More...
 
void detachChild (ccHObject *child)
 Detaches a specific child. More...
 
void detachAllChildren ()
 Removes a specific child. More...
 
void getTypeID_recursive (std::vector< removeInfo > &rmInfos, bool relative)
 
void getTypeID_recursive (std::vector< hideInfo > &hdInfos, bool relative)
 
void removeChild (ccHObject *child)
 
void removeChild (int pos)
 Removes a specific child given its index. More...
 
void removeAllChildren ()
 Removes all children. More...
 
int getChildIndex (const ccHObject *aChild) const
 Returns child index. More...
 
void swapChildren (unsigned firstChildIndex, unsigned secondChildIndex)
 Swaps two children. More...
 
int getIndex () const
 Returns index relatively to its parent or -1 if no parent. More...
 
void transferChild (ccHObject *child, ccHObject &newParent)
 Transfer a given child to another parent. More...
 
void transferChildren (ccHObject &newParent, bool forceFatherDependent=false)
 Transfer all children to another parent. More...
 
ccHObjectgetFirstChild () const
 Shortcut: returns first child. More...
 
ccHObjectgetLastChild () const
 Shortcut: returns last child. More...
 
bool isAncestorOf (const ccHObject *anObject) const
 Returns true if the current object is an ancestor of the specified one. More...
 
void removeFromRenderScreen (bool recursive=true)
 
void hideObject_recursive (bool recursive)
 
void hideBB (CC_DRAW_CONTEXT context)
 
void showBB (CC_DRAW_CONTEXT context)
 
virtual ccBBox getOwnBB (bool withGLFeatures=false)
 Returns the entity's own bounding-box. More...
 
void setRedrawFlagRecursive (bool redraw=false)
 
void setForceRedrawRecursive (bool redraw=false)
 
void setPointSizeRecursive (int pSize)
 
void setLineWidthRecursive (PointCoordinateType width)
 
virtual ccBBox getBB_recursive (bool withGLFeatures=false, bool onlyEnabledChildren=true)
 Returns the bounding-box of this entity and it's children. More...
 
virtual GlobalBoundingBox getOwnGlobalBB (bool withGLFeatures=false)
 
virtual bool getOwnGlobalBB (CCVector3d &minCorner, CCVector3d &maxCorner)
 
virtual GlobalBoundingBox getGlobalBB_recursive (bool withGLFeatures=false, bool onlyEnabledChildren=true)
 Returns the global bounding-box of this entity and it's children. More...
 
virtual ccBBox getDisplayBB_recursive (bool relative)
 Returns the bounding-box of this entity and it's children WHEN DISPLAYED. More...
 
virtual ccBBox getOwnFitBB (ccGLMatrix &trans)
 Returns best-fit bounding-box (if available) More...
 
virtual void drawBB (CC_DRAW_CONTEXT &context, const ecvColor::Rgb &col)
 Draws the entity (and its children) bounding-box. More...
 
void draw (CC_DRAW_CONTEXT &context) override
 Draws entity and its children. More...
 
void updateNameIn3DRecursive ()
 
void setHideShowType (CC_DRAW_CONTEXT &context)
 
void setRemoveType (CC_DRAW_CONTEXT &context)
 
ENTITY_TYPE getEntityType () const
 
virtual void redrawDisplay (bool forceRedraw=true, bool only2D=false)
 Redraws associated display. More...
 
bool getAbsoluteGLTransformation (ccGLMatrix &trans) const
 
virtual bool isDisplayed () const
 Returns whether the object is actually displayed (visible) or not. More...
 
virtual bool isBranchEnabled () const
 Returns whether the object and all its ancestors are enabled. More...
 
virtual void redrawDisplay_recursive (bool p)
 
virtual void refreshDisplay_recursive (bool p)
 
virtual void setSelected_recursive (bool p)
 
virtual void toggleActivation_recursive ()
 
virtual void toggleVisibility_recursive ()
 
virtual void toggleColors_recursive ()
 
virtual void resetGLTransformationHistory_recursive ()
 
virtual void toggleNormals_recursive ()
 
virtual void toggleSF_recursive ()
 
virtual void toggleShowName_recursive ()
 
unsigned findMaxUniqueID_recursive () const
 Returns the max 'unique ID' of this entity and its siblings. More...
 
void applyGLTransformation_recursive (const ccGLMatrix *trans=nullptr)
 Applies the active OpenGL transformation to the entity (recursive) More...
 
virtual void notifyGeometryUpdate ()
 
bool isSerializable () const override
 Returns whether object is serializable of not. More...
 
bool toFile (QFile &out, short dataVersion) const override
 Saves data to binary stream. More...
 
bool fromFile (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
 Loads data from binary stream. More...
 
short minimumFileVersion () const override
 Returns the minimum file version required to save this instance. More...
 
bool fromFileNoChildren (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap)
 Custom version of ccSerializableObject::fromFile. More...
 
virtual bool isShareable () const
 Returns whether object is shareable or not. More...
 
virtual void setSelectionBehavior (SelectionBehavior mode)
 Sets selection behavior (when displayed) More...
 
virtual SelectionBehavior getSelectionBehavior () const
 Returns selection behavior. More...
 
virtual unsigned getUniqueIDForDisplay () const
 Returns object unqiue ID used for display. More...
 
virtual const ccGLMatrixgetGLTransformationHistory () const
 Returns the transformation 'history' matrix. More...
 
virtual void setGLTransformationHistory (const ccGLMatrix &mat)
 Sets the transformation 'history' matrix (handle with care!) More...
 
virtual void resetGLTransformationHistory ()
 Resets the transformation 'history' matrix. More...
 
bool pushDisplayState () override
 Pushes the current display state (overridden) More...
 
void popDisplayState (bool apply=true) override
 Pops the last pushed display state (overridden) More...
 
- Public Member Functions inherited from ccObject
 ccObject (QString name=QString())
 Default constructor. More...
 
 ccObject (const ccObject &object)
 Copy constructor. More...
 
virtual QString getName () const
 Returns object name. More...
 
virtual void setName (const QString &name)
 Sets object name. More...
 
virtual void setRemoveFlag (bool removeFlag)
 Sets removeFlag. More...
 
virtual bool getRemoveFlag ()
 Returns removeFlag. More...
 
virtual unsigned getUniqueID () const
 Returns object unique ID. More...
 
virtual void setUniqueID (unsigned ID)
 Changes unique ID. More...
 
virtual bool isEnabled () const
 Returns whether the object is enabled or not. More...
 
virtual void setEnabled (bool state)
 Sets the "enabled" property. More...
 
virtual void toggleActivation ()
 Toggles the "enabled" property. More...
 
virtual bool isLocked () const
 Returns whether the object is locked or not. More...
 
virtual void setLocked (bool state)
 Sets the "enabled" property. More...
 
bool isLeaf () const
 
bool isCustom () const
 
bool isHierarchy () const
 
bool isKindOf (CV_CLASS_ENUM type) const
 
bool isA (CV_CLASS_ENUM type) const
 
QVariant getMetaData (const QString &key) const
 Returns a given associated meta data. More...
 
bool removeMetaData (const QString &key)
 Removes a given associated meta-data. More...
 
void setMetaData (const QString &key, const QVariant &data)
 Sets a meta-data element. More...
 
void setMetaData (const QVariantMap &dataset, bool overwrite=false)
 Sets several meta-data elements at a time. More...
 
bool hasMetaData (const QString &key) const
 Returns whether a meta-data element with the given key exists or not. More...
 
const QVariantMap & metaData () const
 Returns meta-data map (const only) More...
 
void setBaseName (const QString &baseName)
 
QString getBaseName () const
 
void setFullPath (const QString &fullPaht)
 
QString getFullPath () const
 
- Public Member Functions inherited from ccSerializableObject
virtual ~ccSerializableObject ()=default
 Destructor. More...
 
- Public Member Functions inherited from ccDrawableObject
 ccDrawableObject ()
 Default constructor. More...
 
 ccDrawableObject (const ccDrawableObject &object)
 Copy constructor. More...
 
virtual ~ccDrawableObject ()=default
 
virtual bool isVisible () const
 Returns whether entity is visible or not. More...
 
virtual void setVisible (bool state)
 Sets entity visibility. More...
 
virtual void toggleVisibility ()
 Toggles visibility. More...
 
virtual bool isRedraw () const
 Returns whether entity is to be redraw. More...
 
virtual void setRedraw (bool state)
 Sets entity redraw mode. More...
 
virtual void setForceRedraw (bool state)
 Sets force redraw. More...
 
virtual void setFixedId (bool state)
 
virtual bool isFixedId ()
 
virtual bool isVisibilityLocked () const
 Returns whether visibility is locked or not. More...
 
virtual void lockVisibility (bool state)
 Locks/unlocks visibility. More...
 
virtual bool isSelected () const
 Returns whether entity is selected or not. More...
 
virtual void setSelected (bool state)
 Selects/Unselects entity. More...
 
virtual void getDrawingParameters (glDrawParams &params) const
 Returns main OpenGL parameters for this entity. More...
 
virtual bool hasColors () const
 Returns whether colors are enabled or not. More...
 
virtual bool colorsShown () const
 Returns whether colors are shown or not. More...
 
virtual void showColors (bool state)
 Sets colors visibility. More...
 
virtual void toggleColors ()
 Toggles colors display state. More...
 
virtual bool hasNormals () const
 Returns whether normals are enabled or not. More...
 
virtual bool normalsShown () const
 Returns whether normals are shown or not. More...
 
virtual void showNormals (bool state)
 Sets normals visibility. More...
 
virtual void toggleNormals ()
 Toggles normals display state. More...
 
virtual bool hasDisplayedScalarField () const
 Returns whether an active scalar field is available or not. More...
 
virtual bool hasScalarFields () const
 Returns whether one or more scalar fields are instantiated. More...
 
virtual void showSF (bool state)
 Sets active scalarfield visibility. More...
 
virtual void toggleSF ()
 Toggles SF display state. More...
 
virtual bool sfShown () const
 Returns whether active scalar field is visible. More...
 
virtual void toggleMaterials ()
 Toggles material display state. More...
 
virtual void showNameIn3D (bool state)
 Sets whether name should be displayed in 3D. More...
 
virtual bool nameShownIn3D () const
 Returns whether name is displayed in 3D or not. More...
 
virtual void toggleShowName ()
 Toggles name in 3D display state. More...
 
virtual bool isColorOverridden () const
 
virtual const ecvColor::RgbgetTempColor () const
 Returns current temporary (unique) color. More...
 
virtual void setTempColor (const ecvColor::Rgb &col, bool autoActivate=true)
 Sets current temporary (unique) More...
 
virtual void enableTempColor (bool state)
 Set temporary color activation state. More...
 
virtual float getOpacity () const
 
virtual void setOpacity (float opacity)
 Set opacity activation state. More...
 
virtual void setGLTransformation (const ccGLMatrix &trans)
 Associates entity with a GL transformation (rotation + translation) More...
 
virtual void enableGLTransformation (bool state)
 Enables/disables associated GL transformation. More...
 
virtual bool isGLTransEnabled () const
 Returns whether a GL transformation is enabled or not. More...
 
virtual const ccGLMatrixgetGLTransformation () const
 Returns associated GL transformation. More...
 
virtual void resetGLTransformation ()
 Resets associated GL transformation. More...
 
virtual void rotateGL (const ccGLMatrix &rotMat)
 Multiplies (left) current GL transformation by a rotation matrix. More...
 
virtual void translateGL (const CCVector3 &trans)
 Translates current GL transformation by a rotation matrix. More...
 
virtual void removeAllClipPlanes ()
 Removes all clipping planes (if any) More...
 
virtual bool addClipPlanes (const ccClipPlane &plane)
 Registers a new clipping plane. More...
 
virtual void toggleClipPlanes (CC_DRAW_CONTEXT &context, bool enable)
 Enables or disables clipping planes (OpenGL) More...
 
virtual void applyDisplayState (const DisplayState &state)
 Applies a display state. More...
 

Static Public Member Functions

static ccHObjectNew (CV_CLASS_ENUM objectType, const char *name=nullptr)
 Static factory. More...
 
static ccHObjectNew (const QString &pluginId, const QString &classId, const char *name=nullptr)
 Static factory (version to be used by external plugin factories) More...
 
static Eigen::Vector3d ComputeMinBound (const std::vector< Eigen::Vector3d > &points)
 Compute min bound of a list points. More...
 
static Eigen::Vector3d ComputeMaxBound (const std::vector< Eigen::Vector3d > &points)
 Compute max bound of a list points. More...
 
static Eigen::Vector3d ComputeCenter (const std::vector< Eigen::Vector3d > &points)
 Computer center of a list of points. More...
 
static void ResizeAndPaintUniformColor (std::vector< Eigen::Vector3d > &colors, std::size_t size, const Eigen::Vector3d &color)
 Resizes the colors vector and paints a uniform color. More...
 
static void TransformPoints (const Eigen::Matrix4d &transformation, std::vector< Eigen::Vector3d > &points)
 Transforms all points with the transformation matrix. More...
 
static void TransformNormals (const Eigen::Matrix4d &transformation, std::vector< Eigen::Vector3d > &normals)
 Transforms the normals with the transformation matrix. More...
 
static void TransformCovariances (const Eigen::Matrix4d &transformation, std::vector< Eigen::Matrix3d > &covariances)
 Transforms all covariance matrices with the transformation. More...
 
static void TranslatePoints (const Eigen::Vector3d &translation, std::vector< Eigen::Vector3d > &points, bool relative)
 Apply translation to the geometry coordinates. More...
 
static void ScalePoints (const double scale, std::vector< Eigen::Vector3d > &points, const Eigen::Vector3d &center)
 Scale the coordinates of all points by the scaling factor scale. More...
 
static void RotatePoints (const Eigen::Matrix3d &R, std::vector< Eigen::Vector3d > &points, const Eigen::Vector3d &center)
 Rotate all points with the rotation matrix R. More...
 
static void RotateNormals (const Eigen::Matrix3d &R, std::vector< Eigen::Vector3d > &normals)
 Rotate all normals with the rotation matrix R. More...
 
static void RotateCovariances (const Eigen::Matrix3d &R, std::vector< Eigen::Matrix3d > &covariances)
 Rotate all covariance matrices with the rotation matrix R. More...
 
static Eigen::Matrix3d GetRotationMatrixFromXYZ (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from XYZ RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromYZX (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from YZX RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromZXY (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from ZXY RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromXZY (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from XZY RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromZYX (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from ZYX RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromYXZ (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from YXZ RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromAxisAngle (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from AxisAngle RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromQuaternion (const Eigen::Vector4d &rotation)
 Get Rotation Matrix from Quaternion. More...
 
static Eigen::Matrix3d GetRotationMatrixFromEulerAngle (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from Euler angle. More...
 
- Static Public Member Functions inherited from ccObject
static unsigned GetCurrentDBVersion ()
 Returns current database version. More...
 
static void SetUniqueIDGenerator (ccUniqueIDGenerator::Shared generator)
 Sets the unique ID generator. More...
 
static ccUniqueIDGenerator::Shared GetUniqueIDGenerator ()
 Returns the unique ID generator. More...
 
static unsigned GetNextUniqueID ()
 Returns a new unassigned unique ID. More...
 
static unsigned GetLastUniqueID ()
 Returns last assigned unique ID. More...
 
static CV_CLASS_ENUM ReadClassIDFromFile (QFile &in, short dataVersion)
 Helper: reads out class ID from a binary stream. More...
 
- Static Public Member Functions inherited from ccSerializableObject
static bool WriteError ()
 Sends a custom error message (write error) and returns 'false'. More...
 
static bool ReadError ()
 Sends a custom error message (read error) and returns 'false'. More...
 
static bool MemoryError ()
 Sends a custom error message (not enough memory) and returns 'false'. More...
 
static bool CorruptError ()
 Sends a custom error message (corrupted file) and returns 'false'. More...
 

Protected Member Functions

virtual void setParent (ccHObject *anObject)
 Sets parent object. More...
 
virtual void drawMeOnly (CC_DRAW_CONTEXT &context)
 Draws the entity only (not its children) More...
 
virtual void applyGLTransformation (const ccGLMatrix &trans)
 Applies a GL transformation to the entity. More...
 
virtual bool toFile_MeOnly (QFile &out, short dataVersion) const
 Save own object data. More...
 
virtual bool fromFile_MeOnly (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap)
 Loads own object data. More...
 
virtual short minimumFileVersion_MeOnly () const
 
virtual void drawNameIn3D ()
 Draws the entity name in 3D. More...
 
virtual void onDeletionOf (const ccHObject *obj)
 This method is called when another object is deleted. More...
 
virtual void onUpdateOf (ccHObject *obj)
 This method is called when another object (geometry) is updated. More...
 
- Protected Member Functions inherited from ccObject
virtual bool getFlagState (CV_OBJECT_FLAG flag) const
 Returns flag state. More...
 
virtual void setFlagState (CV_OBJECT_FLAG flag, bool state)
 Sets flag state. More...
 
bool toFile (QFile &out, short dataVersion) const override
 Saves data to binary stream. More...
 
short minimumFileVersion () const override
 Returns the minimum file version required to save this instance. More...
 
bool fromFile (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
 Reimplemented from ccSerializableObject::fromFile. More...
 

Protected Attributes

ccHObjectm_parent
 Parent. More...
 
Container m_children
 Children. More...
 
SelectionBehavior m_selectionBehavior
 Selection behavior. More...
 
std::map< ccHObject *, int > m_dependencies
 Dependencies map. More...
 
ccGLMatrix m_glTransHistory
 Cumulative GL transformation. More...
 
bool m_isDeleting
 Flag to safely handle dependencies when the object is being deleted. More...
 
- Protected Attributes inherited from ccObject
QString m_name
 Object name. More...
 
QString m_baseName
 
QString m_filePath
 
bool m_removeFlag
 
unsigned m_flags
 Object flags. More...
 
QVariantMap m_metaData
 Associated meta-data. More...
 
- Protected Attributes inherited from ccDrawableObject
bool m_fixedId
 
bool m_modelRedraw
 
bool m_forceRedraw
 
float m_opacity
 
bool m_visible
 Specifies whether the object is visible or not. More...
 
bool m_selected
 Specifies whether the object is selected or not. More...
 
bool m_lockedVisibility
 Specifies whether the visibility can be changed by user or not. More...
 
bool m_colorsDisplayed
 Specifies whether colors should be displayed. More...
 
bool m_normalsDisplayed
 Specifies whether normals should be displayed. More...
 
bool m_sfDisplayed
 Specifies whether scalar field should be displayed. More...
 
ecvColor::Rgb m_tempColor
 Temporary (unique) color. More...
 
bool m_colorIsOverridden
 Temporary (unique) color activation state. More...
 
ccGLMatrix m_glTrans
 Current GL transformation. More...
 
bool m_glTransEnabled
 Current GL transformation activation state. More...
 
bool m_showNameIn3D
 Whether name is displayed in 3D or not. More...
 
CCVector3d m_nameIn3DPos
 Last 2D position of the '3D' name. More...
 
ccClipPlaneSet m_clipPlanes
 Active clipping planes (used for display only) More...
 
std::vector< DisplayState::Sharedm_displayStateStack
 The stack of pushed display states. More...
 

Detailed Description

Hierarchical CLOUDVIEWER Object.

Definition at line 25 of file ecvHObject.h.

Member Typedef Documentation

◆ Container

using ccHObject::Container = std::vector<ccHObject*>

Standard instances container (for children, etc.)

Definition at line 337 of file ecvHObject.h.

◆ GlobalBoundingBox

Global (non-shifted) bounding-box.

Definition at line 436 of file ecvHObject.h.

◆ Shared

using ccHObject::Shared = QSharedPointer<ccHObject>

Shared pointer.

Definition at line 340 of file ecvHObject.h.

◆ SharedContainer

using ccHObject::SharedContainer = std::vector<Shared>

Shared instances container (for children, etc.)

Definition at line 343 of file ecvHObject.h.

Member Enumeration Documentation

◆ DEPENDENCY_FLAGS

Dependency flags.

Enumerator
DP_NONE 

no dependency

DP_NOTIFY_OTHER_ON_DELETE 

notify 'other' when deleted (will call ccHObject::onDeletionOf)

DP_NOTIFY_OTHER_ON_UPDATE 

notify 'other' when its geometry is modified (will call ccHObject::onUpdateOf)

DP_DELETE_OTHER 

delete 'other' before deleting itself

DP_PARENT_OF_OTHER 

same as DP_DELETE_OTHER + declares itself as parent of 'other'

Definition at line 257 of file ecvHObject.h.

◆ SelectionBehavior

Behavior when selected.

Enumerator
SELECTION_AA_BBOX 
SELECTION_FIT_BBOX 
SELECTION_IGNORED 

Definition at line 605 of file ecvHObject.h.

Constructor & Destructor Documentation

◆ ccHObject() [1/2]

ccHObject::ccHObject ( QString  name = QString())

Default constructor.

Parameters
nameobject name (optional)

Referenced by ccGeoObject::generateInterior(), ccGeoObject::generateLower(), and ccGeoObject::generateUpper().

◆ ccHObject() [2/2]

ccHObject::ccHObject ( const ccHObject object)

Copy constructor.

◆ ~ccHObject()

virtual ccHObject::~ccHObject ( )
overridevirtual

Default destructor.

Member Function Documentation

◆ addChild()

virtual bool ccHObject::addChild ( ccHObject child,
int  dependencyFlags = DP_PARENT_OF_OTHER,
int  insertIndex = -1 
)
virtual

Adds a child.

Warning
by default (i.e. with the DP_PARENT_OF_OTHER flag) the child's parent will be automatically replaced by this instance. Moreover the child will be deleted
    \param child child instance
    \param dependencyFlags dependency flags
    \param insertIndex insertion index (if <0, child is simply appended
to the children list)
Returns
success

Referenced by ccPointPairRegistrationDlg::addAlignedPoint(), ecvAnnotationsTool::addAssociatedEntity(), ecvFilterTool::addAssociatedEntity(), ecvMeasurementTool::addAssociatedEntity(), ccDBRoot::addElement(), ccGraphicalTransformationTool::addEntity(), ccMeasurementRecorder::addFittingPoint(), ccCompass::addGeoObject(), ccMeasurementRecorder::addMeasurementPoint(), ccPointPairRegistrationDlg::addReferencePoint(), ccGraphicalSegmentationTool::applySegmentation(), FacetsClassifier::ByOrientation(), ccTracePolylineTool::ccTracePolylineTool(), ExtractSIFT::compute(), GeneralFilters::compute(), MLSSmoothingUpsampling::compute(), ProjectionFilter::compute(), StatisticalOutliersRemover::compute(), CorrespondenceMatching::compute(), TemplateAlignment::compute(), DONSegmentation::compute(), EuclideanClusterSegmentation::compute(), MinimumCutSegmentation::compute(), RegionGrowingSegmentation::compute(), SACSegmentation::compute(), ConvexConcaveHullReconstruction::compute(), GreedyTriangulation::compute(), MarchingCubeReconstruction::compute(), NurbsCurveFitting::compute(), NurbsSurfaceReconstruction::compute(), PoissonReconstruction::compute(), qVoxFallProcess::Compute(), qSRA::computeCloud2ProfileRadialDist(), contourPoly(), contourPoly2(), DistanceMapGenerationTool::ConvertConicalMapToMesh(), DistanceMapGenerationTool::ConvertProfileToMesh(), ConvertToGroup(), ccCompass::convertToPointCloud(), ccEntityAction::ConvexHull(), qFacets::createFacets(), ccCropTool::Crop(), ccCompass::distributeSelection(), qCSF::doAction(), qPoissonRecon::doAction(), qCanupoPlugin::doClassifyAction(), ccGraphicalSegmentationTool::doExportSegmentationPolyline(), q3DMASCPlugin::doTrainAction(), ccDBRoot::dropMimeData(), ccCompass::estimateStrain(), ccRasterizeTool::exportContourLines(), ccPointPropertiesDlg::exportCurrentLabel(), StereogramDialog::exportCurrentSelection(), ccCommandLineParser::exportEntity(), qFacets::exportFacets(), ccVolumeCalcTool::exportGridAsCloud(), ccGraphicalTransformationTool::exportNewEntities(), GrainsAsEllipsoids::exportResultsAsCloud(), ecvFilterTool::exportSlice(), ccPointListPickingDlg::exportToNewPolyline(), ccContourExtractor::ExtractConcaveHull2D(), ccContourExtractor::ExtractFlatContour(), CC_ITEM_TREE::findOrCreateContainer(), ccTraceTool::finishCurrentTrace(), G3Point::G3PointAction::fit(), ccCompass::fitPlaneToGeoObject(), FromFbxMesh(), ccRasterizeTool::generateCloud(), ccRasterizeTool::generateContours(), ccGeoObject::generateInterior(), ccGeoObject::generateLower(), ccRasterizeTool::generateMesh(), ccGeoObject::generateUpper(), G3Point::G3PointAction::getBorders(), GetConeProfile(), ccCompass::getInsertPoint(), MainWindow::getSelectedEntityBbox(), ccCommandLineParser::importFile(), ccCompass::importFoliations(), ccCompassImport::importFoliations(), ccCompass::importLineations(), ccCompassImport::importLineations(), STEPFilter::importStepFile(), ProfileLoader::Load(), IcmFilter::LoadCalibratedImages(), CSVMatrixFilter::loadFile(), PhotoScanFilter::loadFile(), PcdFilter::loadFile(), IcmFilter::loadFile(), PovFilter::loadFile(), SalomeHydroFilter::loadFile(), SinusxFilter::loadFile(), SoiFilter::loadFile(), SimpleBinFilter::loadFile(), DRCFilter::loadFile(), E57Filter::loadFile(), FBXFilter::loadFile(), LASFWFFilter::loadFile(), LasIOFilter::loadFile(), LASFilter::loadFile(), RDBFilter::loadFile(), LoadImage(), qSRA::loadProfile(), LoadScan(), main(), NodeStructureToTree(), ccTracePolylineTool::onItemPicked(), MainWindow::onItemPicked(), ccTraceTool::pickupTrace(), ccFitPlaneTool::pointPicked(), ccLineationTool::pointPicked(), ccNoteTool::pointPicked(), ccPinchNodeTool::pointPicked(), ccThicknessTool::pointPicked(), ccTraceTool::pointPicked(), ccTracePolylineTool::polylineOverSampling(), CommandDelaunayTri::process(), CommandRasterize::process(), CommandVolume25D::process(), FacetsClassifier::ProcessFamiliy(), ccPointListPickingDlg::processPickedPoint(), cloudViewer::geometry::pybind_geometry_classes(), ccEntityAction::RansacSegmentation(), cloudViewer::io::ReadTriangleMeshFromGLTF(), ccCompass::recalculateFitPlanes(), qCanupo2DViewDialog::resetBoundary(), ccCommandLineParser::saveClouds(), ccCommandLineParser::saveMeshes(), ccMeasurementRecorder::setPlane(), ecvPoissonReconDlg::start(), DistanceMapGenerationDlg::toggleOverlayGrid(), Cloth::toMesh(), qCanupo2DViewDialog::trainClassifier(), ccCompass::tryLoading(), GrainsAsEllipsoids::updateMeshAndLineSet(), and ccPointPairRegistrationDlg::zoomGlobalOnRegistrationEntities().

◆ addDependency()

void ccHObject::addDependency ( ccHObject otherObject,
int  flags,
bool  additive = true 
)

Adds a new dependence (additive or not)

Parameters
otherObjectother object
flagsdependency flags (see DEPENDENCY_FLAGS)
additivewhether we should 'add' the flag(s) if there's already a dependence with the other object or not

Referenced by ccDBRoot::dropMimeData(), and MainWindow::putObjectBackIntoDBTree().

◆ applyGLTransformation()

virtual void ccHObject::applyGLTransformation ( const ccGLMatrix trans)
protectedvirtual

Applies a GL transformation to the entity.

this = rotMat*(this-rotCenter)+(rotCenter+trans)

Parameters
transa ccGLMatrix structure

Reimplemented in ccSensor, ccPolyline, ccPointCloud, ccMesh, ccGenericPrimitive, ccFacet, and ccCircle.

◆ applyGLTransformation_recursive()

◆ ComputeCenter()

static Eigen::Vector3d ccHObject::ComputeCenter ( const std::vector< Eigen::Vector3d > &  points)
static

Computer center of a list of points.

◆ ComputeMaxBound()

static Eigen::Vector3d ccHObject::ComputeMaxBound ( const std::vector< Eigen::Vector3d > &  points)
static

Compute max bound of a list points.

◆ ComputeMinBound()

static Eigen::Vector3d ccHObject::ComputeMinBound ( const std::vector< Eigen::Vector3d > &  points)
static

Compute min bound of a list points.

◆ detachAllChildren()

void ccHObject::detachAllChildren ( )

Removes a specific child.

Warning
This method may delete the child if the DP_PARENT_OF_OTHER dependency flag is set for this child (use detachChild if you want to avoid deletion). Detaches all children

Referenced by ccGraphicalTransformationTool::clear(), define_ccObject(), PhotoScanFilter::loadFile(), PovFilter::loadFile(), and ccCompass::tryLoading().

◆ detachChild()

void ccHObject::detachChild ( ccHObject child)

◆ draw()

void ccHObject::draw ( CC_DRAW_CONTEXT context)
overridevirtual

◆ drawBB()

virtual void ccHObject::drawBB ( CC_DRAW_CONTEXT context,
const ecvColor::Rgb col 
)
virtual

Draws the entity (and its children) bounding-box.

Reimplemented in ccPolyline.

Referenced by ccPolyline::drawBB().

◆ drawMeOnly()

virtual void ccHObject::drawMeOnly ( CC_DRAW_CONTEXT context)
inlineprotectedvirtual

◆ drawNameIn3D()

virtual void ccHObject::drawNameIn3D ( )
protectedvirtual

Draws the entity name in 3D.

Names is displayed at the center of the bounding box by default.

Reimplemented in ccSphere.

◆ filterChildren()

unsigned ccHObject::filterChildren ( Container filteredChildren,
bool  recursive = false,
CV_CLASS_ENUM  filter = CV_TYPES::OBJECT,
bool  strict = false 
) const

Collects the children corresponding to a certain pattern.

Parameters
filteredChildrenresult container
recursivespecifies if the search should be recursive
filterpattern for children selection
strictwhether the search is strict on the type (i.e 'isA') or not (i.e. 'isKindOf')
Returns
number of collected children

Referenced by MainWindow::addToDB(), ccGraphicalSegmentationTool::applySegmentation(), FacetsClassifier::ByOrientation(), Classify3DMASCDialog::Classify3DMASCDialog(), DistanceMapGenerationDlg::clearOverlaySymbols(), DistanceMapGenerationDlg::clearView(), ccCompass::convertToPointCloud(), ccDBRoot::data(), ccCompass::distributeSelection(), qPCV::doAction(), ccGraphicalSegmentationTool::doActionUseExistingPolyline(), ccCompass::estimateP21(), ccCompass::estimateStrain(), ccCompass::estimateStructureNormals(), JsonRPCPlugin::execute(), StereogramDialog::exportCurrentSelection(), ccDBRoot::exportImages(), ccCompass::exportToSVG(), BasePclModule::getAllEntitiesOfType(), GetDefaultContainer(), qFacets::getFacetsInCurrentSelection(), ccPointListPickingDlg::getPickedPoints(), ccCommandLineParser::importFile(), StereogramWidget::init(), ccPointListPickingDlg::linkWithCloud(), PovFilter::loadFile(), ccTracePolylineTool::polylineOverSampling(), CommandRANSAC::process(), qCanupoClassifDialog::qCanupoClassifDialog(), qCanupoTrainingDialog::qCanupoTrainingDialog(), qM3C2Dialog::qM3C2Dialog(), ReadCloud(), ccCompass::recalculateFitPlanes(), CorrespondenceMatchingDialog::refreshCloudComboBox(), TemplateAlignmentDialog::refreshCloudComboBox(), MinimumCutSegmentationDlg::refreshLabelComboBox(), GeneralFiltersDlg::refreshPolylineComboBox(), ccColorScaleEditorDialog::saveCurrentScale(), ccCompassExport::saveSVG(), PovFilter::saveToFile(), E57Filter::saveToFile(), ccDBRoot::selectChildrenByTypeAndName(), Classify3DMASCDialog::setCloudRoles(), ccDBRoot::showContextMenu(), DistanceMapGenerationDlg::toggleOverlayGrid(), and StereogramDialog::updateFacetsFilter().

◆ find()

◆ findMaxUniqueID_recursive()

unsigned ccHObject::findMaxUniqueID_recursive ( ) const

Returns the max 'unique ID' of this entity and its siblings.

◆ fromFile()

bool ccHObject::fromFile ( QFile &  in,
short  dataVersion,
int  flags,
LoadedIDMap oldToNewIDMap 
)
overridevirtual

Loads data from binary stream.

Parameters
ininput file (already opened)
dataVersionfile version (for version-specific deserialization)
flagsdeserialization flags (see ccSerializableObject::DeserializationFlags)
oldToNewIDMapmap to link old IDs with new IDs
Returns
success
Note: When implementing, use dataVersion checks to handle different
versions:
  • if (dataVersion >= X) { read new field } else { use default value } This ensures forward compatibility with older file formats.

Reimplemented from ccSerializableObject.

◆ fromFile_MeOnly()

virtual bool ccHObject::fromFile_MeOnly ( QFile &  in,
short  dataVersion,
int  flags,
LoadedIDMap oldToNewIDMap 
)
protectedvirtual

◆ fromFileNoChildren()

bool ccHObject::fromFileNoChildren ( QFile &  in,
short  dataVersion,
int  flags,
LoadedIDMap oldToNewIDMap 
)

Custom version of ccSerializableObject::fromFile.

This is used to load only the object's part of a stream (and not its children)

Parameters
ininput file (already opened)
dataVersionfile version
flagsdeserialization flags (see ccSerializableObject::DeserializationFlags)
oldToNewIDMapmap to link old IDs with new IDs
Returns
success

◆ getAbsoluteGLTransformation()

bool ccHObject::getAbsoluteGLTransformation ( ccGLMatrix trans) const

Returns the absolute transformation (i.e. the actual displayed GL transforamtion) of an entity

Parameters
[out]transabsolute transformation
Returns
whether a GL transformation is actually enabled or not

◆ GetAxisAlignedBoundingBox()

◆ getBB_recursive()

virtual ccBBox ccHObject::getBB_recursive ( bool  withGLFeatures = false,
bool  onlyEnabledChildren = true 
)
virtual

Returns the bounding-box of this entity and it's children.

Parameters
withGLFeatureswhether to take into account display-only elements (if any)
onlyEnabledChildrenonly consider the 'enabled' children
Returns
bounding-box

Referenced by ecvAnnotationsTool::addAssociatedEntity(), MainWindow::addToDB(), ccDBRoot::alignCameraWithEntity(), ccTopologyRelation::constructGraphic(), ccPropertiesTreeDelegate::fillWithHObject(), ccPropertiesTreeDelegate::fillWithViewProperties(), ccApplyTransformationDlg::initFromDipAndDipDir(), IcmFilter::loadFile(), and ecvAnnotationsTool::reset().

◆ GetCenter()

◆ getChild()

ccHObject* ccHObject::getChild ( unsigned  childPos) const
inline

Returns the ith child.

Parameters
childPoschild position
Returns
child object (or nullptr if wrong position)

Definition at line 325 of file ecvHObject.h.

Referenced by ecvFilterTool::addAssociatedEntity(), ecvMeasurementTool::addAssociatedEntity(), ccGraphicalTransformationTool::addEntity(), ccGraphicalSegmentationTool::addEntity(), ccCompass::addGeoObject(), MainWindow::addToDB(), ccPointPairRegistrationDlg::align(), ccGraphicalTransformationTool::apply(), ccGraphicalTransformationTool::cancel(), ccPointPairRegistrationDlg::clear(), ccComparisonDlg::computeDistances(), ccEntityAction::computeNormals(), JsonRPCPlugin::execute(), ccDBRoot::expandElement(), ccDBRoot::expandOrCollapseHoveredBranch(), ccGraphicalTransformationTool::exportNewEntities(), ecvFilterTool::exportSlice(), CC_ITEM_TREE::findItemInHierarchy(), ccCompass::fitPlaneToGeoObject(), ccDBRoot::gatherRecursiveInformation(), ccGeoObject::generateInterior(), ccGeoObject::generateLower(), ccGeoObject::generateUpper(), ccCompass::getInsertPoint(), ccCompass::hideAllPointClouds(), ccPointPairRegistrationDlg::label2DMove(), DistanceMapGenerationDlg::labelFontSizeChanged(), PhotoScanFilter::loadFile(), E57Filter::loadFile(), LASFilter::loadFile(), ccCompass::onSave(), DistanceMapGenerationDlg::overlayGridColorChanged(), DistanceMapGenerationDlg::overlaySymbolsColorChanged(), DistanceMapGenerationDlg::overlaySymbolsSizeChanged(), ccTraceTool::pickupTrace(), ccNoteTool::pointPicked(), cloudViewer::geometry::pybind_geometry_classes(), ccCompass::recalculateFitPlanes(), ccCompass::recurseLabels(), ccCompass::recurseNormals(), ccCompass::recurseStipple(), ccPointPairRegistrationDlg::removeAlignedPoint(), ccPointPairRegistrationDlg::removeRefPoint(), ccPointPairRegistrationDlg::reset(), ccCompassExport::saveCSV(), PcdFilter::saveToFile(), SalomeHydroFilter::saveToFile(), SinusxFilter::saveToFile(), MascaretFilter::saveToFile(), E57Filter::saveToFile(), FBXFilter::saveToFile(), ccCompassExport::saveXML(), ccEntityAction::setColor(), ccPointPairRegistrationDlg::showAlignedEntities(), ccPointPairRegistrationDlg::showReferenceEntities(), ccDBRoot::sortSelectedEntitiesChildren(), ecvFilterTool::stop(), ccEntityAction::toggleProperty(), ccCompass::tryLoading(), ccDBRoot::unloadAll(), ccPointPairRegistrationDlg::updateAlignedMarkers(), ccPointPairRegistrationDlg::updateAllMarkers(), ccPointPairRegistrationDlg::updateRefMarkers(), and ccCompass::writeToXML().

◆ getChildCountRecursive()

unsigned int ccHObject::getChildCountRecursive ( ) const

Returns the total number of children under this object recursively.

Returns
Number of children

Referenced by ccDBRoot::data(), and define_ccObject().

◆ getChildIndex()

int ccHObject::getChildIndex ( const ccHObject aChild) const

Returns child index.

Referenced by ccDBRoot::addElement(), define_ccObject(), and ccDBRoot::dropMimeData().

◆ getChildrenNumber()

unsigned ccHObject::getChildrenNumber ( ) const
inline

Returns the number of children.

Returns
children number

Definition at line 312 of file ecvHObject.h.

Referenced by ecvFilterTool::addAssociatedEntity(), ecvMeasurementTool::addAssociatedEntity(), ccDBRoot::addElement(), ccGraphicalTransformationTool::addEntity(), ccGraphicalSegmentationTool::addEntity(), MainWindow::addToDB(), ccPointPairRegistrationDlg::align(), ccGraphicalTransformationTool::apply(), ccGraphicalTransformationTool::cancel(), ccPointListPickingDlg::cancelAndExit(), ccPointPairRegistrationDlg::clear(), CorrespondenceMatching::compute(), DONSegmentation::compute(), EuclideanClusterSegmentation::compute(), SACSegmentation::compute(), NurbsCurveFitting::compute(), ccComparisonDlg::computeDistances(), ccEntityAction::computeNormals(), qFacets::createFacets(), ecvMeasurementTool::createMeasurementTool(), ccDBRoot::data(), define_ccObject(), ccDBRoot::deleteSelectedEntities(), q3DMASCPlugin::doTrainAction(), ccDBRoot::dropMimeData(), ccDBRoot::expandElement(), ccDBRoot::expandOrCollapseHoveredBranch(), StereogramDialog::exportCurrentSelection(), qFacets::exportFacets(), qFacets::extractFacets(), ccPropertiesTreeDelegate::fillWithHObject(), ccPropertiesTreeDelegate::fillWithViewProperties(), CC_ITEM_TREE::findItemInHierarchy(), ccCompass::fitPlaneToGeoObject(), ccDBRoot::gatherRecursiveInformation(), ccGeoObject::generateInterior(), ccGeoObject::generateLower(), ccGeoObject::generateUpper(), ecvAnnotationsTool::getNumberOfAssociatedEntity(), ecvFilterTool::getNumberOfAssociatedEntity(), ecvMeasurementTool::getNumberOfAssociatedEntity(), ccGraphicalTransformationTool::getNumberOfValidEntities(), MainWindow::getSelectedEntityBbox(), ccCompass::hideAllPointClouds(), ccPointPairRegistrationDlg::label2DMove(), DistanceMapGenerationDlg::labelFontSizeChanged(), PhotoScanFilter::loadFile(), E57Filter::loadFile(), FBXFilter::loadFile(), LASFilter::loadFile(), q3DMASCPlugin::onNewSelection(), DistanceMapGenerationDlg::overlayGridColorChanged(), DistanceMapGenerationDlg::overlaySymbolsColorChanged(), DistanceMapGenerationDlg::overlaySymbolsSizeChanged(), ccTraceTool::pickupTrace(), ccPointListPickingDlg::processPickedPoint(), ccDBRoot::removeElement(), ccDBRoot::removeElements(), ecvAnnotationsTool::reset(), ccPointPairRegistrationDlg::reset(), ccDBRoot::rowCount(), PcdFilter::saveToFile(), SalomeHydroFilter::saveToFile(), SinusxFilter::saveToFile(), MascaretFilter::saveToFile(), E57Filter::saveToFile(), FBXFilter::saveToFile(), ccCompassExport::saveXML(), ccDBRoot::selectChildrenByTypeAndName(), ccEntityAction::setColor(), ccPropertiesTreeDelegate::setEditorData(), ccPointPairRegistrationDlg::showAlignedEntities(), ccDBRoot::showContextMenu(), ccPointPairRegistrationDlg::showReferenceEntities(), ccDBRoot::sortSelectedEntitiesChildren(), ccGraphicalTransformationTool::start(), ecvMeasurementTool::start(), ccEntityAction::toggleProperty(), ccCompass::tryLoading(), ccDBRoot::unloadAll(), ccPointPairRegistrationDlg::unstackAligned(), ccPointPairRegistrationDlg::unstackRef(), ccPointPairRegistrationDlg::updateAllMarkers(), ccCompass::writeToXML(), and ccPointPairRegistrationDlg::zoomGlobalOnRegistrationEntities().

◆ getClassID()

◆ getDependencyFlagsWith()

int ccHObject::getDependencyFlagsWith ( const ccHObject otherObject)

Returns the dependency flags with a given object.

Parameters
otherObjectother object

Referenced by ccDBRoot::dropMimeData(), and MainWindow::removeObjectTemporarilyFromDBTree().

◆ getDisplayBB_recursive()

virtual ccBBox ccHObject::getDisplayBB_recursive ( bool  relative)
virtual

Returns the bounding-box of this entity and it's children WHEN DISPLAYED.

Children's GL transformation is taken into account (if enabled).

Parameters
relativewhether the bounding-box is relative (i.e. in the entity's local coordinate system) or absolute (in which case the parent's GL transformation will be taken into account)
displayif not null, this method will return the bounding-box of this entity (and its children) in the specified 3D view (i.e. potentially not visible)
Returns
bounding-box

Referenced by define_ccObject(), ecvAnnotationsTool::getSelectedEntityBbox(), ecvFilterTool::getSelectedEntityBbox(), MainWindow::getSelectedEntityBbox(), DistanceMapGenerationDlg::update(), ccRasterizeTool::updateGridAndDisplay(), ccVolumeCalcTool::updateGridAndDisplay(), qCanupo2DViewDialog::updateZoom(), ccPointPairRegistrationDlg::zoomGlobalOnRegistrationEntities(), and MainWindow::zoomOnEntities().

◆ getEntityType()

ENTITY_TYPE ccHObject::getEntityType ( ) const

◆ getFirstChild()

ccHObject* ccHObject::getFirstChild ( ) const
inline

◆ getGlobalBB_recursive()

virtual GlobalBoundingBox ccHObject::getGlobalBB_recursive ( bool  withGLFeatures = false,
bool  onlyEnabledChildren = true 
)
virtual

Returns the global bounding-box of this entity and it's children.

Parameters
withGLFeatureswhether to take into account display-only elements (if any)
onlyEnabledChildrenonly consider the 'enabled' children
Returns
bounding-box

◆ getGLTransformationHistory()

virtual const ccGLMatrix& ccHObject::getGLTransformationHistory ( ) const
inlinevirtual

Returns the transformation 'history' matrix.

Reimplemented in ccMesh, and ccGenericPrimitive.

Definition at line 631 of file ecvHObject.h.

Referenced by define_ccObject(), SaveScan(), and ccPropertiesTreeDelegate::setEditorData().

◆ getIcon()

virtual QIcon ccHObject::getIcon ( ) const
virtual

Returns the icon associated to this entity.

ccDBRoot will call this method: if an invalid icon is returned the default icon for that type will be used instead.

Returns
invalid icon by default (to be re-implemented by child class)

Referenced by ccDBRoot::data().

◆ getIndex()

int ccHObject::getIndex ( ) const

Returns index relatively to its parent or -1 if no parent.

Referenced by define_ccObject(), and ccDBRoot::parent().

◆ getLastChild()

ccHObject* ccHObject::getLastChild ( ) const
inline

Shortcut: returns last child.

Definition at line 400 of file ecvHObject.h.

Referenced by define_ccObject().

◆ GetMax2DBound()

virtual Eigen::Vector2d ccHObject::GetMax2DBound ( ) const
inlinevirtual

◆ GetMaxBound()

◆ GetMin2DBound()

virtual Eigen::Vector2d ccHObject::GetMin2DBound ( ) const
inlinevirtual

◆ GetMinBound()

◆ GetOrientedBoundingBox()

◆ getOwnBB()

◆ getOwnFitBB()

virtual ccBBox ccHObject::getOwnFitBB ( ccGLMatrix trans)
virtual

Returns best-fit bounding-box (if available)

Warning
Only suitable for leaf objects (i.e. without children) Therefore children bboxes are always ignored.
This method is not supported by all entities! (returns the axis-aligned bounding-box by default).
Parameters
[out]transassociated transformation (so that the bounding-box can be displayed in the right position!)
Returns
fit bounding-box

Reimplemented in ccQuadric, ccPlane, ccGBLSensor, ccDisc, and ccCameraSensor.

Referenced by ccPropertiesTreeDelegate::fillWithHObject().

◆ getOwnGlobalBB() [1/2]

virtual GlobalBoundingBox ccHObject::getOwnGlobalBB ( bool  withGLFeatures = false)
virtual

Returns the entity's own global bounding-box (with global/non-shifted coordinates - if relevant) Children bounding-boxes are ignored. May differ from the (local) bounding-box if the entity is shifted

Parameters
withGLFeatureswhether to take into account display-only elements (if any)
Returns
global bounding-box

Reimplemented in ccShiftedObject.

◆ getOwnGlobalBB() [2/2]

virtual bool ccHObject::getOwnGlobalBB ( CCVector3d minCorner,
CCVector3d maxCorner 
)
virtual

Returns the entity's own global bounding-box (with global/non-shifted coordinates - if relevant) Children bounding-boxes are ignored. By default this method returns the local bounding-box! But it may differ from the (local) bounding-box if the entity is shifted.

Parameters
[out]minCornermin global bounding-box corner
[out]maxCornermax global bounding-box corner
Returns
whether the bounding box is valid or not

Reimplemented in ccShiftedObject.

◆ getParent()

ccHObject* ccHObject::getParent ( ) const
inline

Returns parent object.

Returns
parent object (nullptr if no parent)

Definition at line 245 of file ecvHObject.h.

Referenced by ccDBRoot::addElement(), ccGraphicalTransformationTool::addEntity(), ccGraphicalTransformationTool::apply(), ccGraphicalSegmentationTool::applySegmentation(), FacetsClassifier::ByOrientation(), CanDetachCloud(), qCanupoProcess::Classify(), qFacets::classifyFacetsByAngle(), ccPointListPickingDlg::clearLastLabel(), ccEntityAction::clearProperty(), ExtractSIFT::compute(), GeneralFilters::compute(), MLSSmoothingUpsampling::compute(), ProjectionFilter::compute(), StatisticalOutliersRemover::compute(), CorrespondenceMatching::compute(), TemplateAlignment::compute(), DONSegmentation::compute(), EuclideanClusterSegmentation::compute(), MinimumCutSegmentation::compute(), RegionGrowingSegmentation::compute(), SACSegmentation::compute(), ConvexConcaveHullReconstruction::compute(), GreedyTriangulation::compute(), MarchingCubeReconstruction::compute(), NurbsCurveFitting::compute(), NurbsSurfaceReconstruction::compute(), PoissonReconstruction::compute(), qM3C2Process::Compute(), ccEntityAction::ConvexHull(), define_ccObject(), ccDBRoot::deleteSelectedEntities(), qPCV::doAction(), ccDBRoot::dropMimeData(), ccVolumeCalcTool::exportGridAsCloud(), ccGraphicalTransformationTool::exportNewEntities(), ecvFilterTool::exportSlice(), ccTraceTool::finishCurrentTrace(), ccDBRoot::flags(), ccRasterizeTool::generateCloud(), ccRasterizeTool::generateMesh(), G3Point::G3PointAction::getBorders(), ccGeoObject::getGeoObjectParent(), ccGeoObject::getGeoObjectRegion(), qM3C2Tools::GuessBestParams(), ccCommandLineParser::importFile(), ccDBRoot::parent(), ccTraceTool::pickupTrace(), CommandClearNormals::process(), CommandExtractVertices::process(), FacetsClassifier::ProcessFamiliy(), cloudViewer::geometry::pybind_geometry_classes(), ccEntityAction::RansacSegmentation(), ReadCloud(), ccCompass::recalculateFitPlanes(), MainWindow::removeFromDB(), MainWindow::removeObjectTemporarilyFromDBTree(), RemoveUnusedLabelsAndUpdateTheOthers(), ccColorScaleEditorDialog::saveCurrentScale(), ccEntityAction::setColor(), SetEnabled_recursive(), ecvPoissonReconDlg::start(), ccCompass::tryLoading(), and GrainsAsEllipsoids::updateMeshAndLineSet().

◆ GetRotationMatrixFromAxisAngle()

static Eigen::Matrix3d ccHObject::GetRotationMatrixFromAxisAngle ( const Eigen::Vector3d &  rotation)
static

Get Rotation Matrix from AxisAngle RotationType.

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ GetRotationMatrixFromEulerAngle()

static Eigen::Matrix3d ccHObject::GetRotationMatrixFromEulerAngle ( const Eigen::Vector3d &  rotation)
static

Get Rotation Matrix from Euler angle.

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ GetRotationMatrixFromQuaternion()

static Eigen::Matrix3d ccHObject::GetRotationMatrixFromQuaternion ( const Eigen::Vector4d &  rotation)
static

Get Rotation Matrix from Quaternion.

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ GetRotationMatrixFromXYZ()

static Eigen::Matrix3d ccHObject::GetRotationMatrixFromXYZ ( const Eigen::Vector3d &  rotation)
static

Get Rotation Matrix from XYZ RotationType.

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ GetRotationMatrixFromXZY()

static Eigen::Matrix3d ccHObject::GetRotationMatrixFromXZY ( const Eigen::Vector3d &  rotation)
static

Get Rotation Matrix from XZY RotationType.

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ GetRotationMatrixFromYXZ()

static Eigen::Matrix3d ccHObject::GetRotationMatrixFromYXZ ( const Eigen::Vector3d &  rotation)
static

Get Rotation Matrix from YXZ RotationType.

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ GetRotationMatrixFromYZX()

static Eigen::Matrix3d ccHObject::GetRotationMatrixFromYZX ( const Eigen::Vector3d &  rotation)
static

Get Rotation Matrix from YZX RotationType.

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ GetRotationMatrixFromZXY()

static Eigen::Matrix3d ccHObject::GetRotationMatrixFromZXY ( const Eigen::Vector3d &  rotation)
static

Get Rotation Matrix from ZXY RotationType.

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ GetRotationMatrixFromZYX()

static Eigen::Matrix3d ccHObject::GetRotationMatrixFromZYX ( const Eigen::Vector3d &  rotation)
static

Get Rotation Matrix from ZYX RotationType.

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ getSelectionBehavior()

virtual SelectionBehavior ccHObject::getSelectionBehavior ( ) const
inlinevirtual

Returns selection behavior.

Definition at line 621 of file ecvHObject.h.

Referenced by ccPropertiesTreeDelegate::fillWithHObject().

◆ getTypeID_recursive() [1/2]

void ccHObject::getTypeID_recursive ( std::vector< hideInfo > &  hdInfos,
bool  relative 
)

◆ getTypeID_recursive() [2/2]

void ccHObject::getTypeID_recursive ( std::vector< removeInfo > &  rmInfos,
bool  relative 
)

◆ getUniqueIDForDisplay()

virtual unsigned ccHObject::getUniqueIDForDisplay ( ) const
inlinevirtual

Returns object unqiue ID used for display.

Reimplemented in ccPolyline, ccPointCloud, and ccMesh.

Definition at line 626 of file ecvHObject.h.

References ccObject::getUniqueID().

◆ getViewId()

◆ hideBB()

void ccHObject::hideBB ( CC_DRAW_CONTEXT  context)

Referenced by ccDBRoot::setData().

◆ hideObject_recursive()

void ccHObject::hideObject_recursive ( bool  recursive)

◆ isAncestorOf()

◆ isBranchEnabled()

virtual bool ccHObject::isBranchEnabled ( ) const
virtual

Returns whether the object and all its ancestors are enabled.

◆ isDisplayed()

virtual bool ccHObject::isDisplayed ( ) const
virtual

Returns whether the object is actually displayed (visible) or not.

Referenced by ccThicknessTool::onNewSelection().

◆ IsEmpty()

◆ isGroup()

bool ccHObject::isGroup ( ) const
inline

◆ isSerializable()

◆ isShareable()

virtual bool ccHObject::isShareable ( ) const
inlinevirtual

Returns whether object is shareable or not.

If object is father dependent and 'shared', it won't be deleted but 'released' instead.

Reimplemented in ccMaterialSet, ccArray< Type, N, ComponentType >, ccArray< CompressedNormType, 1, CompressedNormType >, ccArray< TexCoords2D, 2, float >, ccArray< ecvColor::Rgba, 4, ColorCompType >, ccArray< CCVector3, 3, PointCoordinateType >, and ccArray< ecvColor::Rgb, 3, ColorCompType >.

Definition at line 602 of file ecvHObject.h.

◆ minimumFileVersion()

short ccHObject::minimumFileVersion ( ) const
overridevirtual

Returns the minimum file version required to save this instance.

To be overridden by subclasses to indicate their minimum required version. This enables the system to determine:

  • Forward compatibility: newer software can read older files (dataVersion check in fromFile)
  • Backward compatibility: determine minimum version needed to save current data
    Returns
    minimum file version required for this object

Implements ccSerializableObject.

◆ minimumFileVersion_MeOnly()

◆ New() [1/2]

static ccHObject* ccHObject::New ( const QString &  pluginId,
const QString &  classId,
const char *  name = nullptr 
)
static

Static factory (version to be used by external plugin factories)

Two strings are used as keys, one for the plugin name and one for the class name. Those strings will typically be saved as metadata of a custom object

◆ New() [2/2]

static ccHObject* ccHObject::New ( CV_CLASS_ENUM  objectType,
const char *  name = nullptr 
)
static

Static factory.

Warning: objects depending on other structures (such as meshes or polylines that should be linked with point clouds playing the role of vertices) are returned 'naked'.

Parameters
objectTypeobject type
nameobject name (optional)
Returns
instantiated object (if type is valid) or 0

◆ notifyGeometryUpdate()

virtual void ccHObject::notifyGeometryUpdate ( )
virtual

Notifies all dependent entities that the geometry of this entity has changed

Reimplemented in ccPointCloud.

Referenced by define_ccObject(), and MainWindow::putObjectBackIntoDBTree().

◆ onDeletionOf()

virtual void ccHObject::onDeletionOf ( const ccHObject obj)
protectedvirtual

This method is called when another object is deleted.

For internal use.

Reimplemented in cloudViewer::geometry::Image, ccMesh, ccImage, and cc2DLabel.

◆ onUpdateOf()

virtual void ccHObject::onUpdateOf ( ccHObject obj)
inlineprotectedvirtual

This method is called when another object (geometry) is updated.

For internal use.

Reimplemented in ccSubMesh, and ccMesh.

Definition at line 706 of file ecvHObject.h.

◆ popDisplayState()

void ccHObject::popDisplayState ( bool  apply = true)
overridevirtual

Pops the last pushed display state (overridden)

Reimplemented from ccDrawableObject.

Referenced by ccGraphicalSegmentationTool::addEntity(), and ccGraphicalSegmentationTool::prepareEntityForRemoval().

◆ pushDisplayState()

bool ccHObject::pushDisplayState ( )
overridevirtual

Pushes the current display state (overridden)

Reimplemented from ccDrawableObject.

Referenced by ccGraphicalSegmentationTool::addEntity().

◆ redrawDisplay()

◆ redrawDisplay_recursive()

virtual void ccHObject::redrawDisplay_recursive ( bool  p)
inlinevirtual

Definition at line 536 of file ecvHObject.h.

◆ refreshDisplay_recursive()

virtual void ccHObject::refreshDisplay_recursive ( bool  p)
inlinevirtual

Definition at line 539 of file ecvHObject.h.

◆ removeAllChildren()

◆ removeChild() [1/2]

◆ removeChild() [2/2]

void ccHObject::removeChild ( int  pos)

Removes a specific child given its index.

Warning
This method may delete the child if the DP_PARENT_OF_OTHER dependency flag is set for this child (use detachChild if you want to avoid deletion).

◆ removeDependencyFlag()

void ccHObject::removeDependencyFlag ( ccHObject otherObject,
DEPENDENCY_FLAGS  flag 
)

Removes a given dependency flag.

Parameters
otherObjectother object
flagdependency flag to remove (see DEPENDENCY_FLAGS)

Referenced by ccDBRoot::dropMimeData().

◆ removeDependencyWith()

void ccHObject::removeDependencyWith ( ccHObject otherObject)

Removes any dependency flags with a given object.

Parameters
otherObjectother object

Referenced by FacetsClassifier::ByOrientation(), ccPointListPickingDlg::clearLastLabel(), MainWindow::removeFromDB(), and MainWindow::removeObjectTemporarilyFromDBTree().

◆ removeFromRenderScreen()

void ccHObject::removeFromRenderScreen ( bool  recursive = true)

◆ resetGLTransformationHistory()

virtual void ccHObject::resetGLTransformationHistory ( )
inlinevirtual

Resets the transformation 'history' matrix.

Definition at line 639 of file ecvHObject.h.

Referenced by define_ccObject().

◆ resetGLTransformationHistory_recursive()

virtual void ccHObject::resetGLTransformationHistory_recursive ( )
inlinevirtual

Definition at line 550 of file ecvHObject.h.

Referenced by FBXFilter::loadFile(), and LoadScan().

◆ ResizeAndPaintUniformColor()

static void ccHObject::ResizeAndPaintUniformColor ( std::vector< Eigen::Vector3d > &  colors,
std::size_t  size,
const Eigen::Vector3d &  color 
)
static

Resizes the colors vector and paints a uniform color.

Parameters
colorsAn array of eigen vectors specifies colors in RGB.
sizeThe resultant size of the colors array.
colorThe final color in which the colors will be painted.

◆ Rotate() [1/2]

virtual ccHObject& ccHObject::Rotate ( const Eigen::Matrix3d &  R)
inlinevirtual

Definition at line 190 of file ecvHObject.h.

◆ Rotate() [2/2]

virtual ccHObject& ccHObject::Rotate ( const Eigen::Matrix3d &  R,
const Eigen::Vector3d &  center 
)
inlinevirtual

Apply rotation to the geometry coordinates and normals. Given a rotation matrix $R$, and center $c$, a given point $p$ is transformed according to $R (p - c) + c$.

Parameters
RA 3x3 rotation matrix
centerRotation center that is used for the rotation.

Reimplemented in cloudViewer::geometry::VoxelGrid, cloudViewer::geometry::Octree, cloudViewer::geometry::LineSet, ccPolyline, ccPointCloud, ecvOrientedBBox, cloudViewer::geometry::ecvMeshBase, ccMesh, ccFacet, ccBBox, and cloudViewer::visualization::PointCloudPicker.

Definition at line 186 of file ecvHObject.h.

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ RotateCovariances()

static void ccHObject::RotateCovariances ( const Eigen::Matrix3d &  R,
std::vector< Eigen::Matrix3d > &  covariances 
)
static

Rotate all covariance matrices with the rotation matrix R.

Parameters
RA 3x3 rotation matrix
covariancesA list of covariance matrices to be transformed.

◆ RotateNormals()

static void ccHObject::RotateNormals ( const Eigen::Matrix3d &  R,
std::vector< Eigen::Vector3d > &  normals 
)
static

Rotate all normals with the rotation matrix R.

Parameters
RA 3x3 rotation matrix
normalsA list of normals to be transformed.

◆ RotatePoints()

static void ccHObject::RotatePoints ( const Eigen::Matrix3d &  R,
std::vector< Eigen::Vector3d > &  points,
const Eigen::Vector3d &  center 
)
static

Rotate all points with the rotation matrix R.

Parameters
RA 3x3 rotation matrix defines the axis of rotation and the norm the angle around this axis.
pointsA list of points to be transformed.
centerRotation center that is used for the rotation.

◆ Scale() [1/2]

virtual ccHObject& ccHObject::Scale ( const double  s)
inlinevirtual

Definition at line 179 of file ecvHObject.h.

References Scale().

Referenced by Scale().

◆ Scale() [2/2]

virtual ccHObject& ccHObject::Scale ( const double  s,
const Eigen::Vector3d &  center 
)
inlinevirtual

Apply scaling to the geometry coordinates. Given a scaling factor $s$, and center $c$, a given point $p$ is transformed according to $s (p - c) + c$.

Parameters
scaleThe scale parameter that is multiplied to the points/vertices of the geometry.
centerScale center that is used to resize the geometry.

Reimplemented in ecvOrientedBBox, cloudViewer::geometry::VoxelGrid, cloudViewer::geometry::Octree, cloudViewer::geometry::LineSet, ccPolyline, ccPointCloud, cloudViewer::geometry::ecvMeshBase, ccMesh, ccFacet, ccBBox, and cloudViewer::visualization::PointCloudPicker.

Definition at line 176 of file ecvHObject.h.

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ ScalePoints()

static void ccHObject::ScalePoints ( const double  scale,
std::vector< Eigen::Vector3d > &  points,
const Eigen::Vector3d &  center 
)
static

Scale the coordinates of all points by the scaling factor scale.

Parameters
scaleIf true, the scale is applied relative to the center of the geometry. Otherwise, the scale is directly applied to the geometry, i.e. relative to the origin.
pointsA list of points to be transformed.
centerIf true, then the scale is applied to the centered geometry.

◆ setForceRedrawRecursive()

void ccHObject::setForceRedrawRecursive ( bool  redraw = false)

◆ setGLTransformationHistory()

virtual void ccHObject::setGLTransformationHistory ( const ccGLMatrix mat)
inlinevirtual

Sets the transformation 'history' matrix (handle with care!)

Definition at line 635 of file ecvHObject.h.

Referenced by define_ccObject().

◆ setHideShowType()

void ccHObject::setHideShowType ( CC_DRAW_CONTEXT context)

◆ setLineWidthRecursive()

void ccHObject::setLineWidthRecursive ( PointCoordinateType  width)

◆ setParent()

virtual void ccHObject::setParent ( ccHObject anObject)
inlineprotectedvirtual

Sets parent object.

Definition at line 652 of file ecvHObject.h.

◆ setPointSizeRecursive()

void ccHObject::setPointSizeRecursive ( int  pSize)

◆ setRedrawFlagRecursive()

◆ setRemoveType()

void ccHObject::setRemoveType ( CC_DRAW_CONTEXT context)

◆ setSelected_recursive()

virtual void ccHObject::setSelected_recursive ( bool  p)
inlinevirtual

Definition at line 541 of file ecvHObject.h.

◆ setSelectionBehavior()

virtual void ccHObject::setSelectionBehavior ( SelectionBehavior  mode)
inlinevirtual

Sets selection behavior (when displayed)

WARNING: SELECTION_FIT_BBOX relies on the 'ccDrawableObject::getFitBB' method (which is not supported by all entities).

Definition at line 616 of file ecvHObject.h.

Referenced by ccTraceTool::finishCurrentTrace(), and ccFitPlaneTool::pointPicked().

◆ showBB()

void ccHObject::showBB ( CC_DRAW_CONTEXT  context)

Referenced by ccDBRoot::setData().

◆ swapChildren()

void ccHObject::swapChildren ( unsigned  firstChildIndex,
unsigned  secondChildIndex 
)

Swaps two children.

Referenced by define_ccObject(), and ccDBRoot::sortSelectedEntitiesChildren().

◆ toFile()

bool ccHObject::toFile ( QFile &  out,
short  dataVersion 
) const
overridevirtual

Saves data to binary stream.

Parameters
outoutput file (already opened)
dataVersiontarget file version (for forward/backward compatibility)
Returns
success

Reimplemented from ccSerializableObject.

◆ toFile_MeOnly()

virtual bool ccHObject::toFile_MeOnly ( QFile &  out,
short  dataVersion 
) const
protectedvirtual

◆ toggleActivation_recursive()

virtual void ccHObject::toggleActivation_recursive ( )
inlinevirtual

Definition at line 543 of file ecvHObject.h.

◆ toggleColors_recursive()

virtual void ccHObject::toggleColors_recursive ( )
inlinevirtual

Definition at line 547 of file ecvHObject.h.

Referenced by ccEntityAction::toggleProperty().

◆ toggleNormals_recursive()

virtual void ccHObject::toggleNormals_recursive ( )
inlinevirtual

Definition at line 553 of file ecvHObject.h.

Referenced by ccEntityAction::toggleProperty().

◆ toggleSF_recursive()

virtual void ccHObject::toggleSF_recursive ( )
inlinevirtual

Definition at line 556 of file ecvHObject.h.

Referenced by ccEntityAction::toggleProperty().

◆ toggleShowName_recursive()

virtual void ccHObject::toggleShowName_recursive ( )
inlinevirtual

Definition at line 559 of file ecvHObject.h.

Referenced by ccEntityAction::toggleProperty().

◆ toggleVisibility_recursive()

virtual void ccHObject::toggleVisibility_recursive ( )
inlinevirtual

Definition at line 545 of file ecvHObject.h.

Referenced by ccEntityAction::toggleProperty().

◆ transferChild()

void ccHObject::transferChild ( ccHObject child,
ccHObject newParent 
)

Transfer a given child to another parent.

◆ transferChildren()

void ccHObject::transferChildren ( ccHObject newParent,
bool  forceFatherDependent = false 
)

Transfer all children to another parent.

Referenced by ccFitPlane::Fit(), and ccCompass::mergeGeoObjects().

◆ Transform()

virtual ccHObject& ccHObject::Transform ( const Eigen::Matrix4d &  transformation)
inlinevirtual

◆ TransformCovariances()

static void ccHObject::TransformCovariances ( const Eigen::Matrix4d &  transformation,
std::vector< Eigen::Matrix3d > &  covariances 
)
static

Transforms all covariance matrices with the transformation.

Parameters
transformation4x4 matrix for transformation.
covariancesA list of covariance matrices to be transformed.

◆ TransformNormals()

static void ccHObject::TransformNormals ( const Eigen::Matrix4d &  transformation,
std::vector< Eigen::Vector3d > &  normals 
)
static

Transforms the normals with the transformation matrix.

Parameters
transformation4x4 matrix for transformation.
normalsA list of normals to be transformed.

◆ TransformPoints()

static void ccHObject::TransformPoints ( const Eigen::Matrix4d &  transformation,
std::vector< Eigen::Vector3d > &  points 
)
static

Transforms all points with the transformation matrix.

Parameters
transformation4x4 matrix for transformation.
pointsA list of points to be transformed.

◆ Translate()

virtual ccHObject& ccHObject::Translate ( const Eigen::Vector3d &  translation,
bool  relative = true 
)
inlinevirtual

Apply translation to the geometry coordinates.

Parameters
translationA 3D vector to transform the geometry.
relativeIf true, the translation is directly applied to the geometry. Otherwise, the geometry center is moved to the translation.

Reimplemented in cloudViewer::geometry::VoxelGrid, cloudViewer::geometry::Octree, cloudViewer::geometry::LineSet, ccPolyline, ccPointCloud, ecvOrientedBBox, cloudViewer::geometry::ecvMeshBase, ccMesh, ccFacet, ccBBox, and cloudViewer::visualization::PointCloudPicker.

Definition at line 165 of file ecvHObject.h.

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ TranslatePoints()

static void ccHObject::TranslatePoints ( const Eigen::Vector3d &  translation,
std::vector< Eigen::Vector3d > &  points,
bool  relative 
)
static

Apply translation to the geometry coordinates.

Parameters
translationA 3D vector to transform the geometry.
pointsA list of points to be transformed.
relativeIf true, the translation is directly applied to the \points. Otherwise, the center of the \points is moved to the translation.

◆ updateNameIn3DRecursive()

void ccHObject::updateNameIn3DRecursive ( )

Member Data Documentation

◆ m_children

Container ccHObject::m_children
protected

Children.

Definition at line 712 of file ecvHObject.h.

Referenced by ccGeoObject::setActive().

◆ m_dependencies

std::map<ccHObject*, int> ccHObject::m_dependencies
protected

Dependencies map.

First parameter: other object Second parameter: dependency flags (see DEPENDENCY_FLAGS)

Definition at line 721 of file ecvHObject.h.

◆ m_glTransHistory

ccGLMatrix ccHObject::m_glTransHistory
protected

Cumulative GL transformation.

History of all the applied transformations since the creation of the object as a single transformation.

Definition at line 727 of file ecvHObject.h.

◆ m_isDeleting

bool ccHObject::m_isDeleting
protected

Flag to safely handle dependencies when the object is being deleted.

Definition at line 730 of file ecvHObject.h.

◆ m_parent

ccHObject* ccHObject::m_parent
protected

Parent.

Definition at line 709 of file ecvHObject.h.

◆ m_selectionBehavior

SelectionBehavior ccHObject::m_selectionBehavior
protected

Selection behavior.

Definition at line 715 of file ecvHObject.h.


The documentation for this class was generated from the following file: