qCC version 2.13.alpha (Qt) - 31 May 2022
Main CloudCompare application (GUI & command line)
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
ccGraphicalTransformationTool Class Reference

Dialog + mechanism for graphical transformation of entities. More...

#include <ccGraphicalTransformationTool.h>

Inheritance diagram for ccGraphicalTransformationTool:
Inheritance graph
[legend]
Collaboration diagram for ccGraphicalTransformationTool:
Collaboration graph
[legend]

Public Member Functions

 ccGraphicalTransformationTool (QWidget *parent)
 Default constructor.
 
virtual ~ccGraphicalTransformationTool ()
 Default destructor.
 
virtual bool linkWith (ccGLWindow *win) override
 
virtual bool start () override
 
virtual void stop (bool state) override
 
void clearAdvModeEntities ()
 unselect all advanced mode references
 
bool addEntity (ccHObject *anObject)
 Adds an entity to the 'selected' entities set. More...
 
unsigned getNumberOfValidEntities () const
 Returns the number of valid entities (see addEntity)
 
const ccHObject & getValidEntities () const
 Returns the 'to be transformed' entities set (see addEntity)
 
void setRotationCenter (CCVector3d &center)
 Sets the rotation center.
 
ccGLMatrixd arbitraryVectorTranslation (const CCVector3 &vec)
 Returns the transform for translating along an arbitrary vector.
 
ccGLMatrixd arbitraryVectorRotation (double angle, const CCVector3d &)
 Returns the transform for rotation around an arbitrary vector.
 

Protected Types

enum  rotComboBoxItems {
  XYZ , X , Y , Z ,
  NONE
}
 rotComboBox enum
 

Protected Member Functions

void apply ()
 Applies transformation to selected entities.
 
void reset ()
 Resets transformation.
 
void cancel ()
 Cancels (no transformation is applied)
 
void pause (bool)
 Pauses the transformation mode.
 
void advModeToggle (bool state)
 Togggles the visibility of the advanced mode ui.
 
void advTranslateRefUpdate (int index)
 Updates the transform for advanced mode rotation when translate ref changed.
 
void advRotateRefUpdate (int index)
 Updates the transform for advanced mode rotation when rotate ref changed.
 
void advRotateComboBoxUpdate (int index)
 
void advRefAxisRadioToggled (bool state)
 Updates the axis center of rotation to the ref object in adv rotate/translate mode.
 
void advObjectAxisRadioToggled (bool state)
 Updates the axis center of rotation to the object center in adv rotate/translate mode.
 
void updateDisplayMessage ()
 Updates the top center display message according to the mode.
 
void glTranslate (const CCVector3d &)
 Applies translation (graphically) to selected entities.
 
void glRotate (const ccGLMatrixd &)
 Applies rotation (graphically) to selected entities.
 
void onShortcutTriggered (int)
 To capture overridden shortcuts (pause button, etc.)
 
void clear ()
 Clear all variables and 'unlink' dialog.
 
void updateAllGLTransformations ()
 Updates all selected entities GL transformation matrices.
 
void populateAdvModeItems ()
 Sets Advanced translate/rotation mode reference items.
 
bool setAdvTranslationTransform (ccHObject *translateRef)
 Sets the translation transform used in advanced translate/rotate mode.
 
bool setAdvRotationAxis (ccHObject *rotateRef, rotComboBoxItems selectedAxis)
 Sets the rotation transform used in advaced translate/rotate mode.
 
bool entityInTransformList (ccHObject *entity)
 Check if the entitry is in m_toTransform.
 

Protected Attributes

bool m_advMode
 Flag for advanced mode.
 
bool m_advRotateRefIsChild
 Flag if the rotation reference object is in m_toTransform.
 
bool m_advTranslateRefIsChild
 Flag if the translate reference object is in m_toTransform.
 
ccHObject m_toTransform
 List of entities to be transformed.
 
ccHObject * m_advTranslateRef = nullptr
 Current advanced translate mode ref object.
 
ccHObject * m_advRotateRef = nullptr
 Current advanced rotate mode ref object.
 
ccGLMatrixd m_rotation
 Current rotation.
 
CCVector3d m_translation
 Current translation.
 
ccGLMatrixd m_position
 Current position.
 
ccGLMatrixd m_advTranslationTransform
 Transform used in advanced translate/rotate mode.
 
CCVector3d m_advRotationAxis
 Current rotation axis vector for adv translate/rotate mode (not neccesarily rotation center)
 
CCVector3d m_advRotationRefObjCenter
 Current reference object for rotation center point.
 
CCVector3d m_rotationCenter
 Rotation center. More...
 
ccHObject::Container m_advancedModeObjectList
 Objects found in the dbtree for adv transate/rotate.
 

Detailed Description

Dialog + mechanism for graphical transformation of entities.

Mouse driven rotation and translation of selected entities at screen.

Member Function Documentation

◆ addEntity()

bool ccGraphicalTransformationTool::addEntity ( ccHObject *  anObject)

Adds an entity to the 'selected' entities set.

Only the 'selected' entities are moved.

Returns
success, if the entity is eligible for graphical transformation

Member Data Documentation

◆ m_rotationCenter

CCVector3d ccGraphicalTransformationTool::m_rotationCenter
protected

Rotation center.

The rotation center is actually the center of gravity of the selected 'entities'


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