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

Dialog to define the extents of a 3D box. More...

#include <ecvBoundingBoxEditorDlg.h>

Inheritance diagram for ccBoundingBoxEditorDlg:
Collaboration diagram for ccBoundingBoxEditorDlg:

Public Slots

virtual int exec ()
 

Public Member Functions

 ccBoundingBoxEditorDlg (QWidget *parent=0)
 Default constructor. More...
 
const ccBBoxgetBox () 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...
 

Detailed Description

Dialog to define the extents of a 3D box.

Definition at line 16 of file ecvBoundingBoxEditorDlg.h.

Constructor & Destructor Documentation

◆ ccBoundingBoxEditorDlg()

Member Function Documentation

◆ cancel

void ccBoundingBoxEditorDlg::cancel ( )
protectedslot

Definition at line 281 of file ecvBoundingBoxEditorDlg.cpp.

References m_currentBBox, and m_initBBox.

Referenced by ccBoundingBoxEditorDlg().

◆ checkBaseInclusion()

◆ exec

int ccBoundingBoxEditorDlg::exec ( )
virtualslot

◆ forceKeepSquare()

void ccBoundingBoxEditorDlg::forceKeepSquare ( bool  state)

Forces the 'keep square' mode.

Definition at line 169 of file ecvBoundingBoxEditorDlg.cpp.

Referenced by ccComputeOctreeDlg::ccComputeOctreeDlg().

◆ fromClipboardClicked

◆ getBox()

const ccBBox& ccBoundingBoxEditorDlg::getBox ( ) const
inline

Returns bounding box.

Definition at line 25 of file ecvBoundingBoxEditorDlg.h.

References m_currentBBox.

Referenced by cc2Point5DimEditor::getCustomBBox(), and ccComputeOctreeDlg::getCustomBBox().

◆ getBoxAxes()

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().

◆ keepSquare()

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().

◆ onAxisValueChanged

void ccBoundingBoxEditorDlg::onAxisValueChanged ( double  )
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().

◆ reflectChanges

◆ resetToDefault

void ccBoundingBoxEditorDlg::resetToDefault ( )
protectedslot

◆ resetToLast

void ccBoundingBoxEditorDlg::resetToLast ( )
protectedslot

◆ saveBoxAndAccept

void ccBoundingBoxEditorDlg::saveBoxAndAccept ( )
protectedslot

◆ set2DMode()

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().

◆ setBaseBBox()

void ccBoundingBoxEditorDlg::setBaseBBox ( const ccBBox box,
bool  isMinimal = true 
)

Sets the (minimal) base box.

Parameters
boxbase box
isMinimalset 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().

◆ setBoxAxes()

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().

◆ showBoxAxes()

void ccBoundingBoxEditorDlg::showBoxAxes ( bool  state)

Whether to display or not the box axes.

Definition at line 404 of file ecvBoundingBoxEditorDlg.cpp.

Referenced by ccBoundingBoxEditorDlg().

◆ showInclusionWarning()

void ccBoundingBoxEditorDlg::showInclusionWarning ( bool  state)
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.

◆ squareModeActivated

void ccBoundingBoxEditorDlg::squareModeActivated ( bool  state)
protectedslot

◆ toClipboardClicked

◆ updateCurrentBBox

void ccBoundingBoxEditorDlg::updateCurrentBBox ( double  dummy = 0.0)
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().

◆ updateXWidth

void ccBoundingBoxEditorDlg::updateXWidth ( double  value)
protectedslot

◆ updateYWidth

void ccBoundingBoxEditorDlg::updateYWidth ( double  value)
protectedslot

◆ updateZWidth

void ccBoundingBoxEditorDlg::updateZWidth ( double  value)
protectedslot

Member Data Documentation

◆ m_baseBBox

ccBBox ccBoundingBoxEditorDlg::m_baseBBox
protected

◆ m_baseBoxIsMinimal

bool ccBoundingBoxEditorDlg::m_baseBoxIsMinimal
protected

Whether base box is minimal or not.

Definition at line 94 of file ecvBoundingBoxEditorDlg.h.

Referenced by checkBaseInclusion(), and setBaseBBox().

◆ m_currentBBox

◆ m_initBBox

ccBBox ccBoundingBoxEditorDlg::m_initBBox
protected

Box state at dialog start.

Definition at line 100 of file ecvBoundingBoxEditorDlg.h.

Referenced by cancel(), exec(), and setBaseBBox().

◆ m_showInclusionWarning

bool ccBoundingBoxEditorDlg::m_showInclusionWarning
protected

Whether to show 'inclusion' warning or not.

Definition at line 103 of file ecvBoundingBoxEditorDlg.h.

Referenced by checkBaseInclusion(), and showInclusionWarning().


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