![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Dialog to define the extents of a 3D box. More...
#include <ecvBoundingBoxEditorDlg.h>


Public Slots | |
| virtual int | exec () |
Public Member Functions | |
| ccBoundingBoxEditorDlg (QWidget *parent=0) | |
| Default constructor. More... | |
| const ccBBox & | getBox () const |
| Returns bounding box. More... | |
| void | setBaseBBox (const ccBBox &box, bool isMinimal=true) |
| Sets the (minimal) base box. More... | |
| void | setBoxAxes (const CCVector3 &X, const CCVector3 &Y, const CCVector3 &Z) |
| Sets the box axes. More... | |
| void | getBoxAxes (CCVector3d &X, CCVector3d &Y, CCVector3d &Z) |
| Returns the box axes. More... | |
| void | showInclusionWarning (bool state) |
| void | forceKeepSquare (bool state) |
| Forces the 'keep square' mode. More... | |
| bool | keepSquare () const |
| Returns whether 'keep square' mode is enabled or not. More... | |
| void | set2DMode (bool state, unsigned char dim) |
| Sets 2D mode (the line 'dim' will be hidden) More... | |
| void | showBoxAxes (bool state) |
| Whether to display or not the box axes. More... | |
Protected Slots | |
| void | squareModeActivated (bool) |
| void | resetToDefault () |
| void | resetToLast () |
| void | cancel () |
| void | saveBoxAndAccept () |
| void | updateXWidth (double) |
| void | updateYWidth (double) |
| void | updateZWidth (double) |
| void | updateCurrentBBox (double dummy=0.0) |
| Updates current box based on the dialog state. More... | |
| void | reflectChanges (int dummy=0) |
| Reflects changes on bbox. More... | |
| void | onAxisValueChanged (double) |
| Slot called anytime a component of the box axes is modified. More... | |
| void | fromClipboardClicked () |
| void | toClipboardClicked () |
Protected Member Functions | |
| void | checkBaseInclusion () |
| Checks if currentBox includes baseBox. More... | |
Protected Attributes | |
| ccBBox | m_baseBBox |
| Base box (invalid if none) More... | |
| bool | m_baseBoxIsMinimal |
| Whether base box is minimal or not. More... | |
| ccBBox | m_currentBBox |
| Current box. More... | |
| ccBBox | m_initBBox |
| Box state at dialog start. More... | |
| bool | m_showInclusionWarning |
| Whether to show 'inclusion' warning or not. More... | |
Dialog to define the extents of a 3D box.
Definition at line 16 of file ecvBoundingBoxEditorDlg.h.
|
explicit |
Default constructor.
Definition at line 19 of file ecvBoundingBoxEditorDlg.cpp.
References cancel(), checkBaseInclusion(), fromClipboardClicked(), cloudViewer::BoundingBoxTpl< T >::isValid(), onAxisValueChanged(), reflectChanges(), resetToDefault(), resetToLast(), s_lastBBox, saveBoxAndAccept(), showBoxAxes(), squareModeActivated(), toClipboardClicked(), updateCurrentBBox(), updateXWidth(), updateYWidth(), and updateZWidth().
|
protectedslot |
Definition at line 281 of file ecvBoundingBoxEditorDlg.cpp.
References m_currentBBox, and m_initBBox.
Referenced by ccBoundingBoxEditorDlg().
|
protected |
Checks if currentBox includes baseBox.
Definition at line 210 of file ecvBoundingBoxEditorDlg.cpp.
References cloudViewer::BoundingBoxTpl< T >::contains(), cloudViewer::BoundingBoxTpl< T >::isValid(), m_baseBBox, m_baseBoxIsMinimal, m_currentBBox, m_showInclusionWarning, cloudViewer::BoundingBoxTpl< T >::maxCorner(), and cloudViewer::BoundingBoxTpl< T >::minCorner().
Referenced by ccBoundingBoxEditorDlg(), resetToDefault(), resetToLast(), updateCurrentBBox(), updateXWidth(), updateYWidth(), and updateZWidth().
|
virtualslot |
Definition at line 273 of file ecvBoundingBoxEditorDlg.cpp.
References m_currentBBox, and m_initBBox.
Referenced by ccComputeOctreeDlg::ccComputeOctreeDlg(), and cc2Point5DimEditor::showGridBoxEditor().
| void ccBoundingBoxEditorDlg::forceKeepSquare | ( | bool | state | ) |
Forces the 'keep square' mode.
Definition at line 169 of file ecvBoundingBoxEditorDlg.cpp.
Referenced by ccComputeOctreeDlg::ccComputeOctreeDlg().
|
protectedslot |
Definition at line 482 of file ecvBoundingBoxEditorDlg.cpp.
References CVLog::Error(), ccGLMatrixTpl< float >::FromString(), cloudViewer::BoundingBoxTpl< T >::getCenter(), ccGLMatrixTpl< T >::getColumnAsVec3D(), ccGLMatrixTpl< T >::getTranslationAsVec3D(), m_currentBBox, reflectChanges(), and setBoxAxes().
Referenced by ccBoundingBoxEditorDlg().
|
inline |
Returns bounding box.
Definition at line 25 of file ecvBoundingBoxEditorDlg.h.
References m_currentBBox.
Referenced by cc2Point5DimEditor::getCustomBBox(), and ccComputeOctreeDlg::getCustomBBox().
| void ccBoundingBoxEditorDlg::getBoxAxes | ( | CCVector3d & | X, |
| CCVector3d & | Y, | ||
| CCVector3d & | Z | ||
| ) |
Returns the box axes.
Definition at line 435 of file ecvBoundingBoxEditorDlg.cpp.
References X.
Referenced by onAxisValueChanged(), saveBoxAndAccept(), and toClipboardClicked().
| bool ccBoundingBoxEditorDlg::keepSquare | ( | ) | const |
Returns whether 'keep square' mode is enabled or not.
Definition at line 165 of file ecvBoundingBoxEditorDlg.cpp.
Referenced by reflectChanges(), resetToDefault(), resetToLast(), updateXWidth(), updateYWidth(), and updateZWidth().
|
protectedslot |
Slot called anytime a component of the box axes is modified.
Definition at line 448 of file ecvBoundingBoxEditorDlg.cpp.
References Vector3Tpl< Type >::cross(), getBoxAxes(), Tuple3Tpl< Type >::u, and X.
Referenced by ccBoundingBoxEditorDlg().
|
protectedslot |
Reflects changes on bbox.
Definition at line 345 of file ecvBoundingBoxEditorDlg.cpp.
References fabs(), cloudViewer::BoundingBoxTpl< T >::getCenter(), cloudViewer::BoundingBoxTpl< T >::getDiagVec(), keepSquare(), m_currentBBox, cloudViewer::BoundingBoxTpl< T >::maxCorner(), cloudViewer::BoundingBoxTpl< T >::minCorner(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by ccBoundingBoxEditorDlg(), fromClipboardClicked(), resetToDefault(), resetToLast(), squareModeActivated(), updateXWidth(), updateYWidth(), and updateZWidth().
|
protectedslot |
Definition at line 221 of file ecvBoundingBoxEditorDlg.cpp.
References checkBaseInclusion(), keepSquare(), m_baseBBox, m_currentBBox, reflectChanges(), and squareModeActivated().
Referenced by ccBoundingBoxEditorDlg(), and setBaseBBox().
|
protectedslot |
Definition at line 232 of file ecvBoundingBoxEditorDlg.cpp.
References checkBaseInclusion(), keepSquare(), m_currentBBox, reflectChanges(), s_lastBBox, and squareModeActivated().
Referenced by ccBoundingBoxEditorDlg().
|
protectedslot |
Definition at line 243 of file ecvBoundingBoxEditorDlg.cpp.
References CVLog::Error(), getBoxAxes(), m_currentBBox, Vector3Tpl< Type >::norm2d(), Vector3Tpl< Type >::normalize(), s_lastBBox, and X.
Referenced by ccBoundingBoxEditorDlg().
| void ccBoundingBoxEditorDlg::set2DMode | ( | bool | state, |
| unsigned char | dim | ||
| ) |
Sets 2D mode (the line 'dim' will be hidden)
Definition at line 181 of file ecvBoundingBoxEditorDlg.cpp.
Referenced by cc2Point5DimEditor::showGridBoxEditor().
| void ccBoundingBoxEditorDlg::setBaseBBox | ( | const ccBBox & | box, |
| bool | isMinimal = true |
||
| ) |
Sets the (minimal) base box.
| box | base box |
| isMinimal | set whether the user must define a bounding-box at least as large as this one |
Definition at line 199 of file ecvBoundingBoxEditorDlg.cpp.
References cloudViewer::BoundingBoxTpl< T >::isValid(), m_baseBBox, m_baseBoxIsMinimal, m_initBBox, and resetToDefault().
Referenced by ccComputeOctreeDlg::ccComputeOctreeDlg(), and cc2Point5DimEditor::createBoundingBoxEditor().
| void ccBoundingBoxEditorDlg::setBoxAxes | ( | const CCVector3 & | X, |
| const CCVector3 & | Y, | ||
| const CCVector3 & | Z | ||
| ) |
Sets the box axes.
Definition at line 410 of file ecvBoundingBoxEditorDlg.cpp.
References Tuple3Tpl< Type >::x, X, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by fromClipboardClicked().
| void ccBoundingBoxEditorDlg::showBoxAxes | ( | bool | state | ) |
Whether to display or not the box axes.
Definition at line 404 of file ecvBoundingBoxEditorDlg.cpp.
Referenced by ccBoundingBoxEditorDlg().
|
inline |
Whether the warning about bounding box inclusion in the base one should be displayed or not True by default.
Definition at line 44 of file ecvBoundingBoxEditorDlg.h.
References m_showInclusionWarning.
|
protectedslot |
Definition at line 174 of file ecvBoundingBoxEditorDlg.cpp.
References m_currentBBox, MakeSquare(), and reflectChanges().
Referenced by ccBoundingBoxEditorDlg(), resetToDefault(), and resetToLast().
|
protectedslot |
Definition at line 508 of file ecvBoundingBoxEditorDlg.cpp.
References Vector3Tpl< PointCoordinateType >::fromArray(), getBoxAxes(), cloudViewer::BoundingBoxTpl< T >::getCenter(), m_currentBBox, CVLog::Print(), ccGLMatrixTpl< T >::setColumn(), ccGLMatrixTpl< T >::setTranslation(), ccGLMatrixTpl< T >::toString(), Tuple3Tpl< Type >::u, and X.
Referenced by ccBoundingBoxEditorDlg().
|
protectedslot |
Updates current box based on the dialog state.
Definition at line 318 of file ecvBoundingBoxEditorDlg.cpp.
References checkBaseInclusion(), cloudViewer::BoundingBoxTpl< T >::isValid(), m_baseBBox, and m_currentBBox.
Referenced by ccBoundingBoxEditorDlg(), updateXWidth(), updateYWidth(), and updateZWidth().
|
protectedslot |
Definition at line 288 of file ecvBoundingBoxEditorDlg.cpp.
References checkBaseInclusion(), cloudViewer::BoundingBoxTpl< T >::isValid(), keepSquare(), m_baseBBox, m_currentBBox, MakeSquare(), reflectChanges(), and updateCurrentBBox().
Referenced by ccBoundingBoxEditorDlg().
|
protectedslot |
Definition at line 298 of file ecvBoundingBoxEditorDlg.cpp.
References checkBaseInclusion(), cloudViewer::BoundingBoxTpl< T >::isValid(), keepSquare(), m_baseBBox, m_currentBBox, MakeSquare(), reflectChanges(), and updateCurrentBBox().
Referenced by ccBoundingBoxEditorDlg().
|
protectedslot |
Definition at line 308 of file ecvBoundingBoxEditorDlg.cpp.
References checkBaseInclusion(), cloudViewer::BoundingBoxTpl< T >::isValid(), keepSquare(), m_baseBBox, m_currentBBox, MakeSquare(), reflectChanges(), and updateCurrentBBox().
Referenced by ccBoundingBoxEditorDlg().
|
protected |
Base box (invalid if none)
Definition at line 91 of file ecvBoundingBoxEditorDlg.h.
Referenced by checkBaseInclusion(), resetToDefault(), setBaseBBox(), updateCurrentBBox(), updateXWidth(), updateYWidth(), and updateZWidth().
|
protected |
Whether base box is minimal or not.
Definition at line 94 of file ecvBoundingBoxEditorDlg.h.
Referenced by checkBaseInclusion(), and setBaseBBox().
|
protected |
Current box.
Definition at line 97 of file ecvBoundingBoxEditorDlg.h.
Referenced by cancel(), checkBaseInclusion(), exec(), fromClipboardClicked(), getBox(), reflectChanges(), resetToDefault(), resetToLast(), saveBoxAndAccept(), squareModeActivated(), toClipboardClicked(), updateCurrentBBox(), updateXWidth(), updateYWidth(), and updateZWidth().
|
protected |
Box state at dialog start.
Definition at line 100 of file ecvBoundingBoxEditorDlg.h.
Referenced by cancel(), exec(), and setBaseBBox().
|
protected |
Whether to show 'inclusion' warning or not.
Definition at line 103 of file ecvBoundingBoxEditorDlg.h.
Referenced by checkBaseInclusion(), and showInclusionWarning().