2018-08-16 08:38:34 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2018-11-27 03:31:54 -06:00
|
|
|
// Copyright (C) 2018- equinor ASA
|
2018-08-16 08:38:34 -05:00
|
|
|
//
|
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "cvfBase.h"
|
|
|
|
#include "cvfObject.h"
|
|
|
|
#include "cvfMatrix4.h"
|
|
|
|
#include "cvfVector3.h"
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QPointer>
|
|
|
|
|
|
|
|
namespace cvf {
|
|
|
|
class Model;
|
|
|
|
class ModelBasicList;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
namespace caf {
|
|
|
|
class Viewer;
|
|
|
|
};
|
|
|
|
|
|
|
|
class QMouseEvent;
|
|
|
|
|
|
|
|
class RicPointTangentManipulatorPartMgr;
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==================================================================================================
|
|
|
|
class RicPointTangentManipulator : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit RicPointTangentManipulator(caf::Viewer* viewer);
|
2018-10-18 12:45:57 -05:00
|
|
|
~RicPointTangentManipulator() override;
|
2018-08-16 08:38:34 -05:00
|
|
|
|
|
|
|
void setOrigin(const cvf::Vec3d& origin);
|
|
|
|
void setTangent(const cvf::Vec3d& tangent);
|
2018-08-17 03:35:42 -05:00
|
|
|
void setHandleSize(double handleSize);
|
2018-08-16 08:38:34 -05:00
|
|
|
|
|
|
|
void appendPartsToModel(cvf::ModelBasicList* model);
|
|
|
|
|
|
|
|
signals:
|
2018-08-31 08:13:58 -05:00
|
|
|
void notifySelected();
|
2018-09-12 06:18:48 -05:00
|
|
|
void notifyDragFinished();
|
2018-08-16 08:38:34 -05:00
|
|
|
void notifyUpdate(const cvf::Vec3d& origin, const cvf::Vec3d& tangent);
|
|
|
|
|
|
|
|
protected:
|
2018-10-18 12:45:57 -05:00
|
|
|
bool eventFilter(QObject *obj, QEvent *event) override;
|
2018-08-16 08:38:34 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
QPointer<caf::Viewer> m_viewer;
|
|
|
|
|
|
|
|
cvf::ref<RicPointTangentManipulatorPartMgr> m_partManager;
|
|
|
|
};
|
|
|
|
|