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

#include <ccCompass.h>

Inheritance diagram for ccCompass:
Collaboration diagram for ccCompass:

Static Public Attributes

static bool drawName = false
 
static bool drawStippled = true
 
static bool drawNormals = true
 
static bool fitPlanes = true
 
static int costMode = ccTrace::DARK
 
static bool mapMode = false
 
static int mapTo = ccGeoObject::LOWER_BOUNDARY
 

Protected Slots

void doAction ()
 
bool startMeasuring ()
 
bool stopMeasuring (bool finalStop=false)
 
virtual void onItemPicked (const ccPickingListener::PickedItem &pi) override
 
void pointPicked (ccHObject *entity, unsigned itemIdx, int x, int y, const CCVector3 &P)
 
void onClose ()
 
void onAccept ()
 
void onSave ()
 
void onUndo ()
 
void enableMapMode ()
 
void enableMeasureMode ()
 
void setPick ()
 
void setLineation ()
 
void setPlane ()
 
void setTrace ()
 
void addPinchNode ()
 
void setThickness ()
 
void setThickness2 ()
 
void setYoungerThan ()
 
void setFollows ()
 
void setEquivalent ()
 
void setNote ()
 
void recalculateSelectedTraces ()
 
void mergeGeoObjects ()
 
void fitPlaneToGeoObject ()
 
void recalculateFitPlanes ()
 
void estimateStructureNormals ()
 
void estimateP21 ()
 
void estimateStrain ()
 
void convertToPointCloud ()
 
void distributeSelection ()
 
void importFoliations ()
 
void importLineations ()
 
void exportToSVG ()
 
void writeToInterior ()
 
void writeToUpper ()
 
void writeToLower ()
 
void addGeoObject (bool singleSurface=false)
 
void addGeoObjectSS ()
 
void hideAllPointClouds (ccHObject *o)
 
void toggleStipple (bool checked)
 
void recurseStipple (ccHObject *object, bool checked)
 
void toggleLabels (bool checked)
 
void recurseLabels (ccHObject *object, bool checked)
 
void toggleNormals (bool checked)
 
void recurseNormals (ccHObject *object, bool checked)
 
void showHelp ()
 

Protected Member Functions

virtual bool eventFilter (QObject *obj, QEvent *event) override
 
ccHObjectgetInsertPoint ()
 
void cleanupBeforeToolChange (bool autoRestartPicking=true)
 
bool startPicking ()
 
void stopPicking ()
 
void tryLoading ()
 
void tryLoading (ccHObject *obj, std::vector< int > *originals, std::vector< ccHObject * > *replacements)
 
int writePlanes (ccHObject *object, QTextStream *out, const QString &parentName=QString())
 
int writeTraces (ccHObject *object, QTextStream *out, const QString &parentName=QString())
 
int writeLineations (ccHObject *object, QTextStream *out, const QString &parentName=QString(), bool thickness=false)
 
int writeTracesSVG (ccHObject *object, QTextStream *out, int height, float zoom)
 
int writeToXML (const QString &filename)
 
int writeObjectXML (ccHObject *object, QXmlStreamWriter *out)
 
bool madeByMe (ccHObject *object)
 
- Protected Member Functions inherited from ccDefaultPluginInterface
 ccDefaultPluginInterface (const QString &resourcePath=QString())
 

Protected Attributes

QAction * m_action = nullptr
 
QMainWindow * m_main_window = nullptr
 
bool m_picking = false
 
bool m_active = false
 
ccCompassDlgm_dlg = nullptr
 
ccMapDlgm_mapDlg = nullptr
 
ccToolm_activeTool = nullptr
 
ccFitPlaneToolm_fitPlaneTool
 
ccTraceToolm_traceTool
 
ccLineationToolm_lineationTool
 
ccThicknessToolm_thicknessTool
 
ccTopologyToolm_topologyTool
 
ccNoteToolm_noteTool
 
ccPinchNodeToolm_pinchNodeTool
 
ccGeoObjectm_geoObject
 
int m_geoObject_id = -1
 
std::vector< int > m_hiddenObjects
 
QString m_lastGeoObjectName = "GeoObject"
 
- Protected Attributes inherited from ccStdPluginInterface
ecvMainAppInterfacem_app
 Main application interface. More...
 

Additional Inherited Members

- Public Types inherited from ccPluginInterface
typedef QList< ContactContactList
 
using ReferenceList = QList< Reference >
 
- Public Member Functions inherited from ccStdPluginInterface
 ccStdPluginInterface (const QString &resourcePath=QString())
 Default constructor. More...
 
virtual ~ccStdPluginInterface () override=default
 Destructor. More...
 
virtual CC_PLUGIN_TYPE getType () const override
 Returns plugin type (standard or OpenGL filter) More...
 
virtual void setMainAppInterface (ecvMainAppInterface *app)
 Sets application entry point. More...
 
virtual ecvMainAppInterfacegetMainAppInterface ()
 A callback pointer to the main app interface for use by plugins. More...
 
virtual void dispToConsole (QString message, ecvMainAppInterface::ConsoleMessageLevel level=ecvMainAppInterface::STD_CONSOLE_MESSAGE)
 Shortcut to ecvMainAppInterface::dispToConsole. More...
 
- Public Member Functions inherited from ccDefaultPluginInterface
virtual ~ccDefaultPluginInterface ()
 
virtual bool isCore () const override
 Is this plugin a core plugin? More...
 
virtual QString getName () const override
 Returns (short) name (for menu entry, etc.) More...
 
virtual QString getDescription () const override
 Returns long name/description (for tooltip, etc.) More...
 
virtual QIcon getIcon () const override
 Returns icon. More...
 
virtual ReferenceList getReferences () const override
 
virtual ContactList getAuthors () const override
 
virtual ContactList getMaintainers () const override
 
- Public Member Functions inherited from ccPluginInterface
virtual ~ccPluginInterface ()=default
 Virtual destructor. More...
 
virtual bool start ()
 Starts the plugin. More...
 
virtual ccExternalFactorygetCustomObjectsFactory () const
 Returns the plugin's custom object factory (if any) More...
 
virtual void registerCommands (ccCommandLineInterface *cmd)
 Optional: registers commands (for the command line mode) More...
 
- Public Member Functions inherited from ccPickingListener
virtual ~ccPickingListener ()=default
 
virtual void onItemPicked (const PickedItem &pi)=0
 Method called whenever an item is picked. More...
 

Detailed Description

Definition at line 34 of file ccCompass.h.

Member Function Documentation

◆ addGeoObject

◆ addGeoObjectSS

void ccCompass::addGeoObjectSS ( )
protectedslot

Definition at line 3675 of file ccCompass.cpp.

References addGeoObject().

Referenced by doAction().

◆ addPinchNode

void ccCompass::addPinchNode ( )
protectedslot

◆ cleanupBeforeToolChange()

◆ convertToPointCloud

◆ distributeSelection

◆ doAction

void ccCompass::doAction ( )
protectedslot

Definition at line 176 of file ccCompass.cpp.

References addGeoObject(), addGeoObjectSS(), addPinchNode(), convertToPointCloud(), ecvMainAppInterface::dispToConsole(), distributeSelection(), enableMapMode(), enableMeasureMode(), ecvMainAppInterface::ERR_CONSOLE_MESSAGE, estimateP21(), estimateStrain(), estimateStructureNormals(), exportToSVG(), fitPlaneToGeoObject(), ecvMainAppInterface::getActiveWindow(), ecvDisplayTools::GetCurrentScreen(), ecvMainAppInterface::getMainWindow(), importFoliations(), importLineations(), ccTool::initializeTool(), ccOverlayDialog::linkWith(), ccStdPluginInterface::m_app, ccMapDlg::m_create_geoObject, ccMapDlg::m_create_geoObjectSS, ccCompassDlg::m_distributeSelection, m_dlg, ccCompassDlg::m_equivalent, ccCompassDlg::m_estimateNormals, ccCompassDlg::m_estimateP21, ccCompassDlg::m_estimateStrain, ccCompassDlg::m_fitPlaneToGeoObject, m_fitPlaneTool, ccCompassDlg::m_follows, m_lineationTool, ccCompassDlg::m_loadFoliations, ccCompassDlg::m_loadLineations, m_mapDlg, ccCompassDlg::m_measure_thickness, ccCompassDlg::m_measure_thickness_twoPoint, ccCompassDlg::m_mergeSelected, m_noteTool, ccCompassDlg::m_noteTool, m_pinchNodeTool, ccCompassDlg::m_pinchTool, ccCompassDlg::m_recalculate, ccCompassDlg::m_recalculateFitPlanes, ccCompassDlg::m_showNames, ccCompassDlg::m_showNormals, ccCompassDlg::m_showStippled, m_thicknessTool, ccCompassDlg::m_toPointCloud, m_topologyTool, ccCompassDlg::m_toSVG, m_traceTool, ccCompassDlg::m_youngerThan, mergeGeoObjects(), onAccept(), onClose(), onSave(), onUndo(), recalculateFitPlanes(), recalculateSelectedTraces(), setEquivalent(), setFollows(), setLineation(), setNote(), setPick(), setPlane(), setThickness(), setThickness2(), setTrace(), setYoungerThan(), showHelp(), startMeasuring(), toggleLabels(), toggleNormals(), toggleStipple(), tryLoading(), writeToInterior(), writeToLower(), and writeToUpper().

◆ enableMapMode

◆ enableMeasureMode

◆ estimateP21

◆ estimateStrain

void ccCompass::estimateStrain ( )
protectedslot

Definition at line 2449 of file ccCompass.cpp.

References ccHObject::addChild(), cloudViewer::ScalarField::addElement(), ecvMainAppInterface::addToDB(), binSize, ecvColor::blue(), buildGraphics, cloudViewer::SquareMatrixTpl< Scalar >::clear(), Jacobi< Scalar >::ComputeEigenValuesAndVectors(), ccScalarField::computeMinAndMax(), Vector3Tpl< Type >::cross(), ecvMainAppInterface::dbRootObject(), ecvMainAppInterface::dispToConsole(), ecvMainAppInterface::ERR_CONSOLE_MESSAGE, exag, ccHObject::filterChildren(), ccGeoObject::getGeoObjectParent(), ccGeoObject::getGeoObjectRegion(), ecvMainAppInterface::getMainWindow(), cloudViewer::PointCloudTpl< T >::getPoint(), ccPointCloud::getPointNormal(), cloudViewer::PointCloudTpl< T >::getPointScalarValue(), cloudViewer::PointCloudTpl< T >::getScalarFieldIndexByName(), ecvMainAppInterface::getSelectedEntities(), cloudViewer::SquareMatrixTpl< Scalar >::getValue(), ecvProgressDialog::isCancelRequested(), ccObject::isEnabled(), ccSNECloud::isSNECloud(), ccTrace::isTrace(), ccGeoObject::LOWER_BOUNDARY, ccStdPluginInterface::m_app, max(), min(), Vector3Tpl< Type >::norm2(), normal, Vector3Tpl< Type >::normalize(), CV_TYPES::POINT_CLOUD, points, CV_TYPES::POLY_LINE, result, ccGenericPrimitive::setColor(), cloudViewer::PointCloudTpl< T >::setCurrentOutScalarField(), ecvProgressDialog::setInfo(), ccObject::setMetaData(), ecvProgressDialog::setMethodTitle(), ccGLMatrixTpl< T >::setTranslation(), cloudViewer::SquareMatrixTpl< Scalar >::setValue(), ccDrawableObject::showColors(), ccGenericMesh::showWired(), cloudViewer::PointCloudTpl< T >::size(), Jacobi< Scalar >::SortEigenValuesAndVectors(), ecvProgressDialog::start(), cloudViewer::SquareMatrixTpl< Scalar >::toGlMatrix(), cloudViewer::SquareMatrixTpl< Scalar >::toIdentity(), cloudViewer::SquareMatrixTpl< Scalar >::transposed(), ecvProgressDialog::update(), ccGeoObject::UPPER_BOUNDARY, useExternalSNE, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.

Referenced by doAction().

◆ estimateStructureNormals

void ccCompass::estimateStructureNormals ( )
protectedslot

Definition at line 1312 of file ccCompass.cpp.

References abs(), cloudViewer::ScalarField::addElement(), ccPointCloud::addNorm(), cloudViewer::PointCloudTpl< T >::addPoint(), ecvMainAppInterface::addToDB(), calcThickness, cloudViewer::ReferenceCloud::clear(), Jacobi< Scalar >::ComputeEigenValuesAndVectors(), cloudViewer::ScalarField::computeMinAndMax(), cloudViewer::DistanceComputationTools::computePoint2PlaneDistance(), count, ecvMainAppInterface::dispToConsole(), dist(), dof, Vector3Tpl< Type >::dot(), dot(), ecvMainAppInterface::ERR_CONSOLE_MESSAGE, ccHObject::filterChildren(), ccShiftedObject::getGlobalScale(), ccShiftedObject::getGlobalShift(), cloudViewer::Neighbourhood::getLSPlaneX(), ecvMainAppInterface::getMainWindow(), cloudViewer::PointCloudTpl< T >::getPoint(), cloudViewer::ReferenceCloud::getPoint(), cloudViewer::ReferenceCloud::getPointGlobalIndex(), ccTrace::getPointNormal(), ccPointCloud::getPointNormal(), ccGeoObject::getRegion(), cloudViewer::PointCloudTpl< T >::getScalarField(), ecvMainAppInterface::getSelectedEntities(), cloudViewer::ScalarField::getValue(), CV_TYPES::HIERARCHY_OBJECT, ecvProgressDialog::isCancelRequested(), ccGeoObject::isGeoObject(), ccPinchNode::isPinchNode(), ccGeoObject::isSingleSurfaceGeoObject(), ccTrace::isTrace(), likPower, logWishart(), logWishSF(), ccGeoObject::LOWER_BOUNDARY, ccStdPluginInterface::m_app, M_PI, cloudViewer::SquareMatrixTpl< Scalar >::m_values, max(), maxsize, min(), minsize, normal, ccPointCloud::normalsHaveChanged(), oversample, points, CV_TYPES::POLY_LINE, prior(), ecvMainAppInterface::refreshAll(), ccPointCloud::reserve(), ccPointCloud::reserveTheNormsTable(), result, ccPointCloud::setCurrentDisplayedScalarField(), ccShiftedObject::setGlobalScale(), ccShiftedObject::setGlobalShift(), ecvProgressDialog::setInfo(), ecvProgressDialog::setMethodTitle(), ccObject::setName(), ccPointCloud::setPointNormal(), cloudViewer::ScalarField::setValue(), ccDrawableObject::showSF(), ccPointCloud::shrinkToFit(), cloudViewer::PointCloudTpl< T >::size(), cloudViewer::ReferenceCloud::size(), size, Jacobi< Scalar >::SortEigenValuesAndVectors(), ccPluginInterface::start(), ecvProgressDialog::start(), ecvMainAppInterface::STD_CONSOLE_MESSAGE, ecvProgressDialog::stop(), stride, tcDistance, ecvProgressDialog::update(), ccGeoObject::UPPER_BOUNDARY, ecvMainAppInterface::WRN_CONSOLE_MESSAGE, Tuple3Tpl< Type >::x, X, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.

Referenced by doAction().

◆ eventFilter()

bool ccCompass::eventFilter ( QObject *  obj,
QEvent *  event 
)
overrideprotectedvirtual

◆ exportToSVG

◆ fitPlaneToGeoObject

◆ getInsertPoint()

◆ hideAllPointClouds

◆ importFoliations

◆ importLineations

◆ madeByMe()

bool ccCompass::madeByMe ( ccHObject object)
protected

Definition at line 759 of file ccCompass.cpp.

◆ mergeGeoObjects

◆ onAccept

void ccCompass::onAccept ( )
protectedslot

Definition at line 752 of file ccCompass.cpp.

References ccTool::accept(), and m_activeTool.

Referenced by doAction().

◆ onClose

void ccCompass::onClose ( )
protectedslot

Definition at line 742 of file ccCompass.cpp.

References ccTool::cancel(), m_activeTool, and stopMeasuring().

Referenced by doAction().

◆ onItemPicked

◆ onSave

◆ onUndo

void ccCompass::onUndo ( )
protectedslot

Definition at line 765 of file ccCompass.cpp.

References m_activeTool, and ccTool::undo().

Referenced by doAction().

◆ pointPicked

◆ recalculateFitPlanes

◆ recalculateSelectedTraces

◆ recurseLabels

void ccCompass::recurseLabels ( ccHObject object,
bool  checked 
)
protectedslot

Definition at line 3531 of file ccCompass.cpp.

References ccHObject::getChild(), ccFitPlane::isFitPlane(), and ccPointPair::isPointPair().

Referenced by toggleLabels().

◆ recurseNormals

void ccCompass::recurseNormals ( ccHObject object,
bool  checked 
)
protectedslot

◆ recurseStipple

void ccCompass::recurseStipple ( ccHObject object,
bool  checked 
)
protectedslot

◆ setEquivalent

void ccCompass::setEquivalent ( )
protectedslot

Definition at line 948 of file ccCompass.cpp.

References ccTopologyRelation::EQUIVALENCE, ccTopologyTool::RELATIONSHIP, and setYoungerThan().

Referenced by doAction().

◆ setFollows

void ccCompass::setFollows ( )
protectedslot

◆ setLineation

◆ setNote

void ccCompass::setNote ( )
protectedslot

◆ setPick

◆ setPlane

◆ setThickness

◆ setThickness2

void ccCompass::setThickness2 ( )
protectedslot

Definition at line 914 of file ccCompass.cpp.

References setThickness(), and ccThicknessTool::TWO_POINT_MODE.

Referenced by doAction().

◆ setTrace

◆ setYoungerThan

◆ showHelp

void ccCompass::showHelp ( )
protectedslot

Definition at line 3567 of file ccCompass.cpp.

References ecvMainAppInterface::getMainWindow(), and ccStdPluginInterface::m_app.

Referenced by doAction().

◆ startMeasuring

◆ startPicking()

◆ stopMeasuring

◆ stopPicking()

void ccCompass::stopPicking ( )
protected

◆ toggleLabels

void ccCompass::toggleLabels ( bool  checked)
protectedslot

◆ toggleNormals

void ccCompass::toggleNormals ( bool  checked)
protectedslot

◆ toggleStipple

void ccCompass::toggleStipple ( bool  checked)
protectedslot

◆ tryLoading() [1/2]

◆ tryLoading() [2/2]

◆ writeLineations()

int ccCompass::writeLineations ( ccHObject object,
QTextStream *  out,
const QString &  parentName = QString(),
bool  thickness = false 
)
protected

Definition at line 4434 of file ccCompass.cpp.

Referenced by onSave().

◆ writeObjectXML()

int ccCompass::writeObjectXML ( ccHObject object,
QXmlStreamWriter *  out 
)
protected

Definition at line 4523 of file ccCompass.cpp.

Referenced by writeToXML().

◆ writePlanes()

int ccCompass::writePlanes ( ccHObject object,
QTextStream *  out,
const QString &  parentName = QString() 
)
protected

Definition at line 4257 of file ccCompass.cpp.

Referenced by onSave().

◆ writeToInterior

void ccCompass::writeToInterior ( )
protectedslot

Definition at line 3677 of file ccCompass.cpp.

References ccGeoObject::INTERIOR, m_mapDlg, and mapTo.

Referenced by doAction().

◆ writeToLower

void ccCompass::writeToLower ( )
protectedslot

Definition at line 3695 of file ccCompass.cpp.

References ccGeoObject::LOWER_BOUNDARY, m_mapDlg, and mapTo.

Referenced by doAction().

◆ writeToUpper

void ccCompass::writeToUpper ( )
protectedslot

Definition at line 3686 of file ccCompass.cpp.

References m_mapDlg, mapTo, and ccGeoObject::UPPER_BOUNDARY.

Referenced by doAction().

◆ writeToXML()

◆ writeTraces()

int ccCompass::writeTraces ( ccHObject object,
QTextStream *  out,
const QString &  parentName = QString() 
)
protected

Definition at line 4370 of file ccCompass.cpp.

Referenced by onSave().

◆ writeTracesSVG()

int ccCompass::writeTracesSVG ( ccHObject object,
QTextStream *  out,
int  height,
float  zoom 
)
protected

Definition at line 4058 of file ccCompass.cpp.

Referenced by exportToSVG().

Member Data Documentation

◆ costMode

int ccCompass::costMode = ccTrace::DARK
static

Definition at line 264 of file ccCompass.h.

Referenced by eventFilter().

◆ drawName

bool ccCompass::drawName = false
static

Definition at line 258 of file ccCompass.h.

Referenced by ccFitPlane::ccFitPlane(), ccLineationTool::pointPicked(), and toggleLabels().

◆ drawNormals

bool ccCompass::drawNormals = true
static

Definition at line 260 of file ccCompass.h.

Referenced by ccFitPlane::ccFitPlane(), and toggleNormals().

◆ drawStippled

bool ccCompass::drawStippled = true
static

Definition at line 259 of file ccCompass.h.

Referenced by ccFitPlane::ccFitPlane(), and toggleStipple().

◆ fitPlanes

bool ccCompass::fitPlanes = true
static

Definition at line 263 of file ccCompass.h.

Referenced by eventFilter(), and ccTraceTool::finishCurrentTrace().

◆ m_action

QAction* ccCompass::m_action = nullptr
protected

Definition at line 177 of file ccCompass.h.

◆ m_active

bool ccCompass::m_active = false
protected

Definition at line 184 of file ccCompass.h.

Referenced by startMeasuring(), and stopMeasuring().

◆ m_activeTool

◆ m_dlg

◆ m_fitPlaneTool

ccFitPlaneTool* ccCompass::m_fitPlaneTool
protected

Definition at line 192 of file ccCompass.h.

Referenced by doAction(), and setPlane().

◆ m_geoObject

ccGeoObject* ccCompass::m_geoObject
protected
Initial value:
=
nullptr

Definition at line 201 of file ccCompass.h.

Referenced by getInsertPoint().

◆ m_geoObject_id

int ccCompass::m_geoObject_id = -1
protected

Definition at line 203 of file ccCompass.h.

Referenced by fitPlaneToGeoObject(), and getInsertPoint().

◆ m_hiddenObjects

std::vector<int> ccCompass::m_hiddenObjects
protected

Definition at line 204 of file ccCompass.h.

Referenced by cleanupBeforeToolChange(), and hideAllPointClouds().

◆ m_lastGeoObjectName

QString ccCompass::m_lastGeoObjectName = "GeoObject"
protected

Definition at line 207 of file ccCompass.h.

Referenced by addGeoObject().

◆ m_lineationTool

ccLineationTool* ccCompass::m_lineationTool
protected

Definition at line 194 of file ccCompass.h.

Referenced by doAction(), and setLineation().

◆ m_main_window

QMainWindow* ccCompass::m_main_window = nullptr
protected

Definition at line 180 of file ccCompass.h.

◆ m_mapDlg

ccMapDlg* ccCompass::m_mapDlg = nullptr
protected

◆ m_noteTool

ccNoteTool* ccCompass::m_noteTool
protected

Definition at line 197 of file ccCompass.h.

Referenced by doAction(), and setNote().

◆ m_picking

bool ccCompass::m_picking = false
protected

Definition at line 183 of file ccCompass.h.

Referenced by startPicking(), and stopPicking().

◆ m_pinchNodeTool

ccPinchNodeTool* ccCompass::m_pinchNodeTool
protected

Definition at line 198 of file ccCompass.h.

Referenced by addPinchNode(), and doAction().

◆ m_thicknessTool

ccThicknessTool* ccCompass::m_thicknessTool
protected

Definition at line 195 of file ccCompass.h.

Referenced by doAction(), and setThickness().

◆ m_topologyTool

ccTopologyTool* ccCompass::m_topologyTool
protected

Definition at line 196 of file ccCompass.h.

Referenced by doAction(), and setYoungerThan().

◆ m_traceTool

ccTraceTool* ccCompass::m_traceTool
protected

Definition at line 193 of file ccCompass.h.

Referenced by doAction(), and setTrace().

◆ mapMode

bool ccCompass::mapMode = false
static

◆ mapTo

int ccCompass::mapTo = ccGeoObject::LOWER_BOUNDARY
static

Definition at line 268 of file ccCompass.h.

Referenced by getInsertPoint(), writeToInterior(), writeToLower(), and writeToUpper().


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