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

#include <ccCompass.h>

Inheritance diagram for ccCompass:
[legend]
Collaboration diagram for ccCompass:
[legend]

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
 
ccHObject * getInsertPoint ()
 
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
 
ccCompassDlg * m_dlg = nullptr
 
ccMapDlg * m_mapDlg = nullptr
 
ccTool * m_activeTool = nullptr
 
ccFitPlaneTool * m_fitPlaneTool
 
ccTraceTool * m_traceTool
 
ccLineationTool * m_lineationTool
 
ccThicknessTool * m_thicknessTool
 
ccTopologyTool * m_topologyTool
 
ccNoteTool * m_noteTool
 
ccPinchNodeTool * m_pinchNodeTool
 
ccGeoObject * m_geoObject
 
int m_geoObject_id = -1
 
std::vector< int > m_hiddenObjects
 
QString m_lastGeoObjectName = "GeoObject"
 
- Protected Attributes inherited from ccStdPluginInterface
ecvMainAppInterface * m_app
 Main application interface. More...
 

Additional Inherited Members

- Public Types inherited from ccPluginInterface
typedef QList< Contact > ContactList
 
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 ecvMainAppInterface * getMainAppInterface ()
 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 ccExternalFactory * getCustomObjectsFactory () 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...
 

Member Function Documentation

◆ addGeoObject

◆ addGeoObjectSS

void ccCompass::addGeoObjectSS ( )
protectedslot

References addGeoObject().

Referenced by doAction().

◆ addPinchNode

void ccCompass::addPinchNode ( )
protectedslot

◆ cleanupBeforeToolChange()

◆ convertToPointCloud

◆ distributeSelection

◆ doAction

void ccCompass::doAction ( )
protectedslot

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, ccCompassDlg::m_noteTool, 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

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(), e, 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, 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, x, Tuple3Tpl< Type >::y, y, Tuple3Tpl< Type >::z, and z.

Referenced by doAction().

◆ estimateStructureNormals

void ccCompass::estimateStructureNormals ( )
protectedslot

References 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, data, ecvMainAppInterface::dispToConsole(), dof, Vector3Tpl< Type >::dot(), e2, e3, ecvMainAppInterface::ERR_CONSOLE_MESSAGE, ccHObject::filterChildren(), ccShiftedObject::getGlobalScale(), ccShiftedObject::getGlobalShift(), cloudViewer::Neighbourhood::getLSPlaneX(), ecvMainAppInterface::getMainWindow(), cloudViewer::ReferenceCloud::getPoint(), cloudViewer::PointCloudTpl< T >::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, maxsize, 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(), ecvProgressDialog::start(), ccPluginInterface::start(), ecvMainAppInterface::STD_CONSOLE_MESSAGE, ecvProgressDialog::stop(), stride, tcDistance, ecvProgressDialog::update(), ccGeoObject::UPPER_BOUNDARY, ecvMainAppInterface::WRN_CONSOLE_MESSAGE, X, Tuple3Tpl< Type >::x, x, Tuple3Tpl< Type >::y, y, Tuple3Tpl< Type >::z, and 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

◆ mergeGeoObjects

◆ onAccept

void ccCompass::onAccept ( )
protectedslot

References ccTool::accept(), and m_activeTool.

Referenced by doAction().

◆ onClose

void ccCompass::onClose ( )
protectedslot

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

Referenced by doAction().

◆ onItemPicked

◆ onSave

◆ onUndo

void ccCompass::onUndo ( )
protectedslot

References m_activeTool, and ccTool::undo().

Referenced by doAction().

◆ pointPicked

◆ recalculateFitPlanes

◆ recalculateSelectedTraces

◆ recurseLabels

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

◆ recurseNormals

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

◆ recurseStipple

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

◆ setEquivalent

void ccCompass::setEquivalent ( )
protectedslot

◆ setFollows

void ccCompass::setFollows ( )
protectedslot

◆ setLineation

◆ setNote

◆ setPick

◆ setPlane

◆ setThickness

◆ setThickness2

void ccCompass::setThickness2 ( )
protectedslot

◆ setTrace

◆ setYoungerThan

◆ showHelp

void ccCompass::showHelp ( )
protectedslot

◆ startMeasuring

◆ startPicking()

◆ stopMeasuring

◆ stopPicking()

◆ 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

Referenced by onSave().

◆ writeObjectXML()

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

Referenced by writeToXML().

◆ writePlanes()

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

Referenced by onSave().

◆ writeToInterior

void ccCompass::writeToInterior ( )
protectedslot

References ccGeoObject::INTERIOR, m_mapDlg, and mapTo.

Referenced by doAction().

◆ writeToLower

void ccCompass::writeToLower ( )
protectedslot

References ccGeoObject::LOWER_BOUNDARY, m_mapDlg, and mapTo.

Referenced by doAction().

◆ writeToUpper

void ccCompass::writeToUpper ( )
protectedslot

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

Referenced by onSave().

◆ writeTracesSVG()

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

Referenced by exportToSVG().

Member Data Documentation

◆ costMode

int ccCompass::costMode = ccTrace::DARK
static

Referenced by eventFilter().

◆ drawName

bool ccCompass::drawName = false
static

◆ drawNormals

bool ccCompass::drawNormals = true
static

◆ drawStippled

bool ccCompass::drawStippled = true
static

◆ fitPlanes

bool ccCompass::fitPlanes = true
static

◆ m_action

QAction* ccCompass::m_action = nullptr
protected

◆ m_active

bool ccCompass::m_active = false
protected

Referenced by startMeasuring(), and stopMeasuring().

◆ m_activeTool

◆ m_dlg

◆ m_fitPlaneTool

ccFitPlaneTool* ccCompass::m_fitPlaneTool
protected

Referenced by doAction(), and setPlane().

◆ m_geoObject

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

Referenced by getInsertPoint().

◆ m_geoObject_id

int ccCompass::m_geoObject_id = -1
protected

◆ m_hiddenObjects

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

◆ m_lastGeoObjectName

QString ccCompass::m_lastGeoObjectName = "GeoObject"
protected

Referenced by addGeoObject().

◆ m_lineationTool

ccLineationTool* ccCompass::m_lineationTool
protected

Referenced by doAction(), and setLineation().

◆ m_main_window

QMainWindow* ccCompass::m_main_window = nullptr
protected

◆ m_mapDlg

ccMapDlg* ccCompass::m_mapDlg = nullptr
protected

◆ m_noteTool

ccNoteTool* ccCompass::m_noteTool
protected

Referenced by doAction(), and setNote().

◆ m_picking

bool ccCompass::m_picking = false
protected

Referenced by startPicking(), and stopPicking().

◆ m_pinchNodeTool

ccPinchNodeTool* ccCompass::m_pinchNodeTool
protected

Referenced by addPinchNode(), and doAction().

◆ m_thicknessTool

ccThicknessTool* ccCompass::m_thicknessTool
protected

Referenced by doAction(), and setThickness().

◆ m_topologyTool

ccTopologyTool* ccCompass::m_topologyTool
protected

Referenced by doAction(), and setYoungerThan().

◆ m_traceTool

ccTraceTool* ccCompass::m_traceTool
protected

Referenced by doAction(), and setTrace().

◆ mapMode

bool ccCompass::mapMode = false
static

◆ mapTo


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