mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #5003 from OPM/feature-fix-point-manipulators-in-comparison-view
Feature fix point manipulators in comparison view
This commit is contained in:
@@ -70,10 +70,12 @@ void RicTextAnnotation3dEditor::configureAndUpdateUi( const QString& uiConfigNam
|
|||||||
{
|
{
|
||||||
RimTextAnnotation* textAnnot = dynamic_cast<RimTextAnnotation*>( this->pdmObject() );
|
RimTextAnnotation* textAnnot = dynamic_cast<RimTextAnnotation*>( this->pdmObject() );
|
||||||
RiuViewer* ownerRiuViewer = dynamic_cast<RiuViewer*>( ownerViewer() );
|
RiuViewer* ownerRiuViewer = dynamic_cast<RiuViewer*>( ownerViewer() );
|
||||||
|
Rim3dView* view = mainOrComparisonView();
|
||||||
|
|
||||||
if ( !textAnnot || !textAnnot->isActive() )
|
if ( !textAnnot || !textAnnot->isActive() || !view )
|
||||||
{
|
{
|
||||||
m_cvfModel->removeAllParts();
|
if ( m_cvfModel.notNull() ) m_cvfModel->removeAllParts();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,16 +96,12 @@ void RicTextAnnotation3dEditor::configureAndUpdateUi( const QString& uiConfigNam
|
|||||||
SLOT( slotAnchorUpdated( const cvf::Vec3d&, const cvf::Vec3d& ) ) );
|
SLOT( slotAnchorUpdated( const cvf::Vec3d&, const cvf::Vec3d& ) ) );
|
||||||
|
|
||||||
m_cvfModel = new cvf::ModelBasicList;
|
m_cvfModel = new cvf::ModelBasicList;
|
||||||
ownerRiuViewer->addStaticModelOnce( m_cvfModel.p() );
|
ownerRiuViewer->addStaticModelOnce( m_cvfModel.p(), isInComparisonView() );
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::ref<caf::DisplayCoordTransform> dispXf;
|
cvf::ref<caf::DisplayCoordTransform> dispXf = view->displayCoordTransform();
|
||||||
double handleSize = 1.0;
|
double handleSize = 0.7 * view->ownerCase()->characteristicCellSize();
|
||||||
{
|
|
||||||
dispXf = ownerRiuViewer->ownerReservoirView()->displayCoordTransform();
|
|
||||||
Rim3dView* view = dynamic_cast<Rim3dView*>( ownerRiuViewer->ownerReservoirView() );
|
|
||||||
handleSize = 0.7 * view->ownerCase()->characteristicCellSize();
|
|
||||||
}
|
|
||||||
cvf::Vec3d labelPos( textAnnot->m_labelPointXyd() );
|
cvf::Vec3d labelPos( textAnnot->m_labelPointXyd() );
|
||||||
labelPos.z() *= -1.0;
|
labelPos.z() *= -1.0;
|
||||||
m_labelManipulator->setOrigin( dispXf->transformToDisplayCoord( labelPos ) );
|
m_labelManipulator->setOrigin( dispXf->transformToDisplayCoord( labelPos ) );
|
||||||
@@ -145,6 +143,7 @@ void RicTextAnnotation3dEditor::slotLabelUpdated( const cvf::Vec3d& origin, cons
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePoint( textAnnot->m_labelPointXyd.uiCapability(), origin );
|
updatePoint( textAnnot->m_labelPointXyd.uiCapability(), origin );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,6 +158,7 @@ void RicTextAnnotation3dEditor::slotAnchorUpdated( const cvf::Vec3d& origin, con
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePoint( textAnnot->m_anchorPointXyd.uiCapability(), origin );
|
updatePoint( textAnnot->m_anchorPointXyd.uiCapability(), origin );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,11 +167,11 @@ void RicTextAnnotation3dEditor::slotAnchorUpdated( const cvf::Vec3d& origin, con
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicTextAnnotation3dEditor::updatePoint( caf::PdmUiFieldHandle* uiField, const cvf::Vec3d& newPos )
|
void RicTextAnnotation3dEditor::updatePoint( caf::PdmUiFieldHandle* uiField, const cvf::Vec3d& newPos )
|
||||||
{
|
{
|
||||||
cvf::ref<caf::DisplayCoordTransform> dispXf;
|
Rim3dView* view = mainOrComparisonView();
|
||||||
{
|
|
||||||
RiuViewer* viewer = dynamic_cast<RiuViewer*>( ownerViewer() );
|
if ( !view ) return;
|
||||||
dispXf = viewer->ownerReservoirView()->displayCoordTransform();
|
|
||||||
}
|
cvf::ref<caf::DisplayCoordTransform> dispXf = view->displayCoordTransform();
|
||||||
|
|
||||||
cvf::Vec3d domainPos = dispXf->transformToDomainCoord( newPos );
|
cvf::Vec3d domainPos = dispXf->transformToDomainCoord( newPos );
|
||||||
domainPos.z() = -domainPos.z();
|
domainPos.z() = -domainPos.z();
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "cafPdmUi3dObjectEditorHandle.h"
|
#include "WellPathCommands/PointTangentManipulator/Ric3dObjectEditorHandle.h"
|
||||||
|
|
||||||
class RicPointTangentManipulator;
|
class RicPointTangentManipulator;
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ class ModelBasicList;
|
|||||||
class QString;
|
class QString;
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
class RicTextAnnotation3dEditor : public caf::PdmUi3dObjectEditorHandle
|
class RicTextAnnotation3dEditor : public Ric3dObjectEditorHandle
|
||||||
{
|
{
|
||||||
CAF_PDM_UI_3D_OBJECT_EDITOR_HEADER_INIT;
|
CAF_PDM_UI_3D_OBJECT_EDITOR_HEADER_INIT;
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicWellPathFormationsImportFileFeature.h
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RicPolylineTargetsPickEventHandler.h
|
${CMAKE_CURRENT_LIST_DIR}/RicPolylineTargetsPickEventHandler.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicNewPolylineTargetFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicNewPolylineTargetFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicDeletePolylineTargetFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicDeletePolylineTargetFeature.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/Ric3dObjectEditorHandle.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicPointTangentManipulator.h
|
${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicPointTangentManipulator.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicWellTarget3dEditor.h
|
${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicWellTarget3dEditor.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicWellPathGeometry3dEditor.h
|
${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicWellPathGeometry3dEditor.h
|
||||||
@@ -43,6 +44,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicWellPathFormationsImportFileFeature.cpp
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RicPolylineTargetsPickEventHandler.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicPolylineTargetsPickEventHandler.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicNewPolylineTargetFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicNewPolylineTargetFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicDeletePolylineTargetFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicDeletePolylineTargetFeature.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/Ric3dObjectEditorHandle.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicPointTangentManipulator.cpp
|
${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicPointTangentManipulator.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicWellTarget3dEditor.cpp
|
${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicWellTarget3dEditor.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicWellPathGeometry3dEditor.cpp
|
${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicWellPathGeometry3dEditor.cpp
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2019- Equinor ASA
|
||||||
|
//
|
||||||
|
// 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.
|
||||||
|
//
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "Ric3dObjectEditorHandle.h"
|
||||||
|
|
||||||
|
#include "Rim3dView.h"
|
||||||
|
#include "RiuViewer.h"
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Rim3dView* Ric3dObjectEditorHandle::mainOrComparisonView()
|
||||||
|
{
|
||||||
|
RiuViewer* viewer = dynamic_cast<RiuViewer*>( ownerViewer() );
|
||||||
|
|
||||||
|
if ( !viewer ) return nullptr;
|
||||||
|
|
||||||
|
if ( isInComparisonView() )
|
||||||
|
{
|
||||||
|
if ( viewer->currentScene( isInComparisonView() ) )
|
||||||
|
{
|
||||||
|
Rim3dView* view = dynamic_cast<Rim3dView*>( viewer->ownerReservoirView() );
|
||||||
|
|
||||||
|
if ( view )
|
||||||
|
{
|
||||||
|
return view->activeComparisonView();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return dynamic_cast<Rim3dView*>( viewer->ownerReservoirView() );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2019- Equinor ASA
|
||||||
|
//
|
||||||
|
// 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 "cafPdmUi3dObjectEditorHandle.h"
|
||||||
|
|
||||||
|
class Rim3dView;
|
||||||
|
|
||||||
|
class Ric3dObjectEditorHandle : public caf::PdmUi3dObjectEditorHandle
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
Rim3dView* mainOrComparisonView();
|
||||||
|
};
|
||||||
@@ -31,6 +31,7 @@
|
|||||||
#include "cvfModelBasicList.h"
|
#include "cvfModelBasicList.h"
|
||||||
#include "cvfPart.h"
|
#include "cvfPart.h"
|
||||||
#include "cvfRay.h"
|
#include "cvfRay.h"
|
||||||
|
#include "cvfRayIntersectSpec.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
@@ -104,6 +105,9 @@ bool RicPointTangentManipulator::eventFilter( QObject* obj, QEvent* inputEvent )
|
|||||||
|
|
||||||
if ( m_partManager->isManipulatorActive() )
|
if ( m_partManager->isManipulatorActive() )
|
||||||
{
|
{
|
||||||
|
m_isDraggingInComparisonView = m_viewer->isMousePosWithinComparisonView( mouseEvent->x(),
|
||||||
|
mouseEvent->y() );
|
||||||
|
|
||||||
emit notifySelected();
|
emit notifySelected();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -117,17 +121,14 @@ bool RicPointTangentManipulator::eventFilter( QObject* obj, QEvent* inputEvent )
|
|||||||
{
|
{
|
||||||
QMouseEvent* mouseEvent = static_cast<QMouseEvent*>( inputEvent );
|
QMouseEvent* mouseEvent = static_cast<QMouseEvent*>( inputEvent );
|
||||||
|
|
||||||
// qDebug() << "Inside mouse move";
|
cvf::ref<cvf::RayIntersectSpec> rayIs =
|
||||||
// qDebug() << mouseEvent->pos();
|
m_viewer->rayIntersectSpecFromWindowCoordinates( mouseEvent->pos().x(),
|
||||||
|
mouseEvent->pos().y(),
|
||||||
|
m_isDraggingInComparisonView );
|
||||||
|
|
||||||
int translatedMousePosX = mouseEvent->pos().x();
|
if ( !rayIs.isNull() && rayIs->ray() )
|
||||||
int translatedMousePosY = m_viewer->height() - mouseEvent->pos().y();
|
|
||||||
|
|
||||||
cvf::ref<cvf::Ray> ray = m_viewer->mainCamera()->rayFromWindowCoordinates( translatedMousePosX,
|
|
||||||
translatedMousePosY );
|
|
||||||
if ( !ray.isNull() )
|
|
||||||
{
|
{
|
||||||
m_partManager->updateManipulatorFromRay( ray.p() );
|
m_partManager->updateManipulatorFromRay( rayIs->ray() );
|
||||||
|
|
||||||
cvf::Vec3d origin;
|
cvf::Vec3d origin;
|
||||||
cvf::Vec3d tangent;
|
cvf::Vec3d tangent;
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QPointer<caf::Viewer> m_viewer;
|
QPointer<caf::Viewer> m_viewer;
|
||||||
|
bool m_isDraggingInComparisonView = false;
|
||||||
|
|
||||||
cvf::ref<RicPointTangentManipulatorPartMgr> m_partManager;
|
cvf::ref<RicPointTangentManipulatorPartMgr> m_partManager;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -46,8 +46,9 @@
|
|||||||
RicPointTangentManipulatorPartMgr::RicPointTangentManipulatorPartMgr()
|
RicPointTangentManipulatorPartMgr::RicPointTangentManipulatorPartMgr()
|
||||||
: m_tangentOnStartManipulation( cvf::Vec3d::UNDEFINED )
|
: m_tangentOnStartManipulation( cvf::Vec3d::UNDEFINED )
|
||||||
, m_originOnStartManipulation( cvf::Vec3d::UNDEFINED )
|
, m_originOnStartManipulation( cvf::Vec3d::UNDEFINED )
|
||||||
, m_currentHandleIndex( cvf::UNDEFINED_SIZE_T )
|
, m_activeHandle( NONE )
|
||||||
, m_handleSize( 1.0 )
|
, m_handleSize( 1.0 )
|
||||||
|
, m_isGeometryUpdateNeeded( true )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +67,7 @@ void RicPointTangentManipulatorPartMgr::setOrigin( const cvf::Vec3d& origin )
|
|||||||
m_origin = origin;
|
m_origin = origin;
|
||||||
if ( m_originOnStartManipulation.isUndefined() ) m_originOnStartManipulation = origin;
|
if ( m_originOnStartManipulation.isUndefined() ) m_originOnStartManipulation = origin;
|
||||||
|
|
||||||
clearAllGeometryAndParts();
|
m_isGeometryUpdateNeeded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -79,7 +80,7 @@ void RicPointTangentManipulatorPartMgr::setTangent( const cvf::Vec3d& tangent )
|
|||||||
m_tangent = tangent;
|
m_tangent = tangent;
|
||||||
if ( m_tangentOnStartManipulation.isUndefined() ) m_tangentOnStartManipulation = m_tangent;
|
if ( m_tangentOnStartManipulation.isUndefined() ) m_tangentOnStartManipulation = m_tangent;
|
||||||
|
|
||||||
clearAllGeometryAndParts();
|
m_isGeometryUpdateNeeded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -88,6 +89,8 @@ void RicPointTangentManipulatorPartMgr::setTangent( const cvf::Vec3d& tangent )
|
|||||||
void RicPointTangentManipulatorPartMgr::setHandleSize( double handleSize )
|
void RicPointTangentManipulatorPartMgr::setHandleSize( double handleSize )
|
||||||
{
|
{
|
||||||
m_handleSize = handleSize;
|
m_handleSize = handleSize;
|
||||||
|
|
||||||
|
m_isGeometryUpdateNeeded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -104,7 +107,7 @@ void RicPointTangentManipulatorPartMgr::originAndTangent( cvf::Vec3d* origin, cv
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RicPointTangentManipulatorPartMgr::isManipulatorActive() const
|
bool RicPointTangentManipulatorPartMgr::isManipulatorActive() const
|
||||||
{
|
{
|
||||||
return m_currentHandleIndex != cvf::UNDEFINED_SIZE_T;
|
return m_activeHandle != NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -112,14 +115,19 @@ bool RicPointTangentManipulatorPartMgr::isManipulatorActive() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicPointTangentManipulatorPartMgr::appendPartsToModel( cvf::ModelBasicList* model )
|
void RicPointTangentManipulatorPartMgr::appendPartsToModel( cvf::ModelBasicList* model )
|
||||||
{
|
{
|
||||||
if ( !m_handleParts.size() )
|
if ( m_handleParts.empty() )
|
||||||
{
|
{
|
||||||
recreateAllGeometryAndParts();
|
recreateAllGeometryAndParts();
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( size_t i = 0; i < m_handleParts.size(); i++ )
|
if ( m_isGeometryUpdateNeeded )
|
||||||
{
|
{
|
||||||
model->addPart( m_handleParts.at( i ) );
|
createGeometryOnly();
|
||||||
|
}
|
||||||
|
|
||||||
|
for ( auto& idPartIt : m_handleParts )
|
||||||
|
{
|
||||||
|
model->addPart( idPartIt.second.p() );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( auto activeModePart : m_activeDragModeParts )
|
for ( auto activeModePart : m_activeDragModeParts )
|
||||||
@@ -142,14 +150,14 @@ void RicPointTangentManipulatorPartMgr::tryToActivateManipulator( const cvf::Hit
|
|||||||
|
|
||||||
if ( !pickedPart ) return;
|
if ( !pickedPart ) return;
|
||||||
|
|
||||||
for ( size_t i = 0; i < m_handleParts.size(); i++ )
|
for ( auto& idPartIt : m_handleParts )
|
||||||
{
|
{
|
||||||
if ( pickedPart == m_handleParts.at( i ) )
|
if ( pickedPart == idPartIt.second.p() )
|
||||||
{
|
{
|
||||||
m_initialPickPoint = intersectionPoint;
|
m_initialPickPoint = intersectionPoint;
|
||||||
m_tangentOnStartManipulation = m_tangent;
|
m_tangentOnStartManipulation = m_tangent;
|
||||||
m_originOnStartManipulation = m_origin;
|
m_originOnStartManipulation = m_origin;
|
||||||
m_currentHandleIndex = i;
|
m_activeHandle = idPartIt.first;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -162,7 +170,7 @@ void RicPointTangentManipulatorPartMgr::updateManipulatorFromRay( const cvf::Ray
|
|||||||
{
|
{
|
||||||
if ( !isManipulatorActive() ) return;
|
if ( !isManipulatorActive() ) return;
|
||||||
|
|
||||||
if ( m_handleIds[m_currentHandleIndex] == HORIZONTAL_PLANE )
|
if ( m_activeHandle == HORIZONTAL_PLANE )
|
||||||
{
|
{
|
||||||
cvf::Plane plane;
|
cvf::Plane plane;
|
||||||
plane.setFromPointAndNormal( m_origin, cvf::Vec3d::Z_AXIS );
|
plane.setFromPointAndNormal( m_origin, cvf::Vec3d::Z_AXIS );
|
||||||
@@ -173,7 +181,7 @@ void RicPointTangentManipulatorPartMgr::updateManipulatorFromRay( const cvf::Ray
|
|||||||
|
|
||||||
m_origin = newOrigin;
|
m_origin = newOrigin;
|
||||||
}
|
}
|
||||||
else if ( m_handleIds[m_currentHandleIndex] == VERTICAL_AXIS )
|
else if ( m_activeHandle == VERTICAL_AXIS )
|
||||||
{
|
{
|
||||||
cvf::Plane plane;
|
cvf::Plane plane;
|
||||||
cvf::Vec3d planeNormal = ( newMouseRay->direction() ^ cvf::Vec3d::Z_AXIS ) ^ cvf::Vec3d::Z_AXIS;
|
cvf::Vec3d planeNormal = ( newMouseRay->direction() ^ cvf::Vec3d::Z_AXIS ) ^ cvf::Vec3d::Z_AXIS;
|
||||||
@@ -193,7 +201,7 @@ void RicPointTangentManipulatorPartMgr::updateManipulatorFromRay( const cvf::Ray
|
|||||||
}
|
}
|
||||||
// m_tangent = newTangent;
|
// m_tangent = newTangent;
|
||||||
|
|
||||||
clearAllGeometryAndParts();
|
m_isGeometryUpdateNeeded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -201,59 +209,35 @@ void RicPointTangentManipulatorPartMgr::updateManipulatorFromRay( const cvf::Ray
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicPointTangentManipulatorPartMgr::endManipulator()
|
void RicPointTangentManipulatorPartMgr::endManipulator()
|
||||||
{
|
{
|
||||||
m_currentHandleIndex = cvf::UNDEFINED_SIZE_T;
|
m_activeHandle = NONE;
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RicPointTangentManipulatorPartMgr::clearAllGeometryAndParts()
|
|
||||||
{
|
|
||||||
m_handleIds.clear();
|
|
||||||
m_handleParts.clear();
|
|
||||||
m_activeDragModeParts.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicPointTangentManipulatorPartMgr::recreateAllGeometryAndParts()
|
void RicPointTangentManipulatorPartMgr::recreateAllGeometryAndParts()
|
||||||
{
|
|
||||||
createAllHandleParts();
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RicPointTangentManipulatorPartMgr::createAllHandleParts()
|
|
||||||
{
|
{
|
||||||
createHorizontalPlaneHandle();
|
createHorizontalPlaneHandle();
|
||||||
createVerticalAxisHandle();
|
createVerticalAxisHandle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicPointTangentManipulatorPartMgr::createGeometryOnly()
|
||||||
|
{
|
||||||
|
m_handleParts[HORIZONTAL_PLANE]->setDrawable( createHorizontalPlaneGeo().p() );
|
||||||
|
m_handleParts[VERTICAL_AXIS]->setDrawable( createVerticalAxisGeo().p() );
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicPointTangentManipulatorPartMgr::createHorizontalPlaneHandle()
|
void RicPointTangentManipulatorPartMgr::createHorizontalPlaneHandle()
|
||||||
{
|
{
|
||||||
using namespace cvf;
|
using namespace cvf;
|
||||||
cvf::ref<cvf::Vec3fArray> vertexArray = new cvf::Vec3fArray( 6 );
|
|
||||||
|
|
||||||
vertexArray->set( 0, {-1, -1, 0} );
|
ref<cvf::DrawableGeo> geo = createHorizontalPlaneGeo();
|
||||||
vertexArray->set( 1, {1, -1, 0} );
|
|
||||||
vertexArray->set( 2, {1, 1, 0} );
|
|
||||||
vertexArray->set( 3, {-1, -1, 0} );
|
|
||||||
vertexArray->set( 4, {1, 1, 0} );
|
|
||||||
vertexArray->set( 5, {-1, 1, 0} );
|
|
||||||
|
|
||||||
Vec3f origin( m_origin );
|
|
||||||
for ( cvf::Vec3f& vx : *vertexArray )
|
|
||||||
{
|
|
||||||
vx *= 0.5 * m_handleSize;
|
|
||||||
vx += origin;
|
|
||||||
}
|
|
||||||
|
|
||||||
ref<DrawableGeo> geo = createTriangelDrawableGeo( vertexArray.p() );
|
|
||||||
|
|
||||||
HandleType handleId = HORIZONTAL_PLANE;
|
HandleType handleId = HORIZONTAL_PLANE;
|
||||||
cvf::Color4f color = cvf::Color4f( 1.0f, 0.0f, 1.0f, 0.5f );
|
cvf::Color4f color = cvf::Color4f( 1.0f, 0.0f, 1.0f, 0.5f );
|
||||||
@@ -262,15 +246,56 @@ void RicPointTangentManipulatorPartMgr::createHorizontalPlaneHandle()
|
|||||||
addHandlePart( geo.p(), color, handleId, partName );
|
addHandlePart( geo.p(), color, handleId, partName );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
cvf::ref<cvf::DrawableGeo> RicPointTangentManipulatorPartMgr::createHorizontalPlaneGeo()
|
||||||
|
{
|
||||||
|
using namespace cvf;
|
||||||
|
|
||||||
|
cvf::ref<cvf::Vec3fArray> vertexArray = new cvf::Vec3fArray( 6 );
|
||||||
|
|
||||||
|
vertexArray->set( 0, { -1, -1, 0 } );
|
||||||
|
vertexArray->set( 1, { 1, -1, 0 } );
|
||||||
|
vertexArray->set( 2, { 1, 1, 0 } );
|
||||||
|
vertexArray->set( 3, { -1, -1, 0 } );
|
||||||
|
vertexArray->set( 4, { 1, 1, 0 } );
|
||||||
|
vertexArray->set( 5, { -1, 1, 0 } );
|
||||||
|
|
||||||
|
Vec3f origin( m_origin );
|
||||||
|
for ( cvf::Vec3f& vx : *vertexArray )
|
||||||
|
{
|
||||||
|
vx *= 0.5 * m_handleSize;
|
||||||
|
vx += origin;
|
||||||
|
}
|
||||||
|
|
||||||
|
return createTriangelDrawableGeo( vertexArray.p() );
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicPointTangentManipulatorPartMgr::createVerticalAxisHandle()
|
void RicPointTangentManipulatorPartMgr::createVerticalAxisHandle()
|
||||||
|
{
|
||||||
|
using namespace cvf;
|
||||||
|
cvf::ref<cvf::DrawableGeo> geo = createVerticalAxisGeo();
|
||||||
|
|
||||||
|
HandleType handleId = VERTICAL_AXIS;
|
||||||
|
cvf::Color4f color = cvf::Color4f( 0.0f, 0.2f, 0.8f, 0.5f );
|
||||||
|
cvf::String partName( "PointTangentManipulator Vertical Axis Handle" );
|
||||||
|
|
||||||
|
addHandlePart( geo.p(), color, handleId, partName );
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
cvf::ref<cvf::DrawableGeo> RicPointTangentManipulatorPartMgr::createVerticalAxisGeo()
|
||||||
{
|
{
|
||||||
using namespace cvf;
|
using namespace cvf;
|
||||||
|
|
||||||
cvf::ref<cvf::GeometryBuilderTriangles> geomBuilder = new cvf::GeometryBuilderTriangles;
|
cvf::ref<cvf::GeometryBuilderTriangles> geomBuilder = new cvf::GeometryBuilderTriangles;
|
||||||
cvf::GeometryUtils::createBox( {-0.3f, -0.3f, -1.0f}, {0.3f, 0.3f, 1.0f}, geomBuilder.p() );
|
cvf::GeometryUtils::createBox( { -0.3f, -0.3f, -1.0f }, { 0.3f, 0.3f, 1.0f }, geomBuilder.p() );
|
||||||
|
|
||||||
cvf::ref<cvf::Vec3fArray> vertexArray = geomBuilder->vertices();
|
cvf::ref<cvf::Vec3fArray> vertexArray = geomBuilder->vertices();
|
||||||
cvf::ref<cvf::UIntArray> indexArray = geomBuilder->triangles();
|
cvf::ref<cvf::UIntArray> indexArray = geomBuilder->triangles();
|
||||||
@@ -282,13 +307,7 @@ void RicPointTangentManipulatorPartMgr::createVerticalAxisHandle()
|
|||||||
vx += origin;
|
vx += origin;
|
||||||
}
|
}
|
||||||
|
|
||||||
ref<DrawableGeo> geo = createIndexedTriangelDrawableGeo( vertexArray.p(), indexArray.p() );
|
return createIndexedTriangelDrawableGeo( vertexArray.p(), indexArray.p() );
|
||||||
|
|
||||||
HandleType handleId = VERTICAL_AXIS;
|
|
||||||
cvf::Color4f color = cvf::Color4f( 0.0f, 0.2f, 0.8f, 0.5f );
|
|
||||||
cvf::String partName( "PointTangentManipulator Vertical Axis Handle" );
|
|
||||||
|
|
||||||
addHandlePart( geo.p(), color, handleId, partName );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@@ -369,9 +388,7 @@ void RicPointTangentManipulatorPartMgr::addHandlePart( cvf::DrawableGeo* geo,
|
|||||||
const cvf::String& partName )
|
const cvf::String& partName )
|
||||||
{
|
{
|
||||||
cvf::ref<cvf::Part> handlePart = createPart( geo, color, partName );
|
cvf::ref<cvf::Part> handlePart = createPart( geo, color, partName );
|
||||||
|
m_handleParts[handleId] = handlePart;
|
||||||
m_handleParts.push_back( handlePart.p() );
|
|
||||||
m_handleIds.push_back( handleId );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -25,6 +25,8 @@
|
|||||||
#include "cvfMatrix4.h"
|
#include "cvfMatrix4.h"
|
||||||
#include "cvfVector3.h"
|
#include "cvfVector3.h"
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
|
||||||
namespace cvf
|
namespace cvf
|
||||||
{
|
{
|
||||||
class ModelBasicList;
|
class ModelBasicList;
|
||||||
@@ -49,7 +51,8 @@ public:
|
|||||||
HORIZONTAL_PLANE,
|
HORIZONTAL_PLANE,
|
||||||
VERTICAL_AXIS,
|
VERTICAL_AXIS,
|
||||||
AZIMUTH,
|
AZIMUTH,
|
||||||
INCLINATION
|
INCLINATION,
|
||||||
|
NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -69,12 +72,14 @@ public:
|
|||||||
void appendPartsToModel( cvf::ModelBasicList* model );
|
void appendPartsToModel( cvf::ModelBasicList* model );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void createAllHandleParts();
|
void createGeometryOnly();
|
||||||
void clearAllGeometryAndParts();
|
|
||||||
void recreateAllGeometryAndParts();
|
void recreateAllGeometryAndParts();
|
||||||
|
|
||||||
void createHorizontalPlaneHandle();
|
void createHorizontalPlaneHandle();
|
||||||
void createVerticalAxisHandle();
|
cvf::ref<cvf::DrawableGeo> createHorizontalPlaneGeo();
|
||||||
|
|
||||||
|
void createVerticalAxisHandle();
|
||||||
|
cvf::ref<cvf::DrawableGeo> createVerticalAxisGeo();
|
||||||
|
|
||||||
void addHandlePart( cvf::DrawableGeo* geo, const cvf::Color4f& color, HandleType handleId, const cvf::String& partName );
|
void addHandlePart( cvf::DrawableGeo* geo, const cvf::Color4f& color, HandleType handleId, const cvf::String& partName );
|
||||||
|
|
||||||
@@ -89,14 +94,16 @@ private:
|
|||||||
static cvf::ref<cvf::Part> createPart( cvf::DrawableGeo* geo, const cvf::Color4f& color, const cvf::String& partName );
|
static cvf::ref<cvf::Part> createPart( cvf::DrawableGeo* geo, const cvf::Color4f& color, const cvf::String& partName );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
size_t m_currentHandleIndex;
|
std::map<HandleType, cvf::ref<cvf::Part>> m_handleParts; // These arrays have the same length
|
||||||
std::vector<HandleType> m_handleIds; // These arrays have the same length
|
cvf::Collection<cvf::Part> m_activeDragModeParts;
|
||||||
cvf::Collection<cvf::Part> m_handleParts; // These arrays have the same length
|
|
||||||
cvf::Collection<cvf::Part> m_activeDragModeParts;
|
cvf::Vec3d m_origin;
|
||||||
cvf::Vec3d m_origin;
|
cvf::Vec3d m_tangent;
|
||||||
cvf::Vec3d m_tangent;
|
double m_handleSize;
|
||||||
double m_handleSize;
|
bool m_isGeometryUpdateNeeded;
|
||||||
cvf::Vec3d m_initialPickPoint;
|
|
||||||
cvf::Vec3d m_tangentOnStartManipulation;
|
HandleType m_activeHandle;
|
||||||
cvf::Vec3d m_originOnStartManipulation;
|
cvf::Vec3d m_initialPickPoint;
|
||||||
|
cvf::Vec3d m_tangentOnStartManipulation;
|
||||||
|
cvf::Vec3d m_originOnStartManipulation;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ void RicPolyline3dEditor::configureAndUpdateUi( const QString& uiConfigName )
|
|||||||
for ( auto target : targets )
|
for ( auto target : targets )
|
||||||
{
|
{
|
||||||
auto targetEditor = new RicPolylineTarget3dEditor;
|
auto targetEditor = new RicPolylineTarget3dEditor;
|
||||||
targetEditor->setViewer( ownerViewer() );
|
targetEditor->setViewer( ownerViewer(), isInComparisonView() );
|
||||||
targetEditor->setPdmObject( target );
|
targetEditor->setPdmObject( target );
|
||||||
m_targetEditors.push_back( targetEditor );
|
m_targetEditors.push_back( targetEditor );
|
||||||
targetEditor->updateUi();
|
targetEditor->updateUi();
|
||||||
|
|||||||
@@ -71,10 +71,12 @@ void RicPolylineTarget3dEditor::configureAndUpdateUi( const QString& uiConfigNam
|
|||||||
{
|
{
|
||||||
RimPolylineTarget* target = dynamic_cast<RimPolylineTarget*>( this->pdmObject() );
|
RimPolylineTarget* target = dynamic_cast<RimPolylineTarget*>( this->pdmObject() );
|
||||||
RiuViewer* ownerRiuViewer = dynamic_cast<RiuViewer*>( ownerViewer() );
|
RiuViewer* ownerRiuViewer = dynamic_cast<RiuViewer*>( ownerViewer() );
|
||||||
|
Rim3dView* view = mainOrComparisonView();
|
||||||
|
|
||||||
if ( !target || !target->isEnabled() )
|
if ( !target || !target->isEnabled() || !view )
|
||||||
{
|
{
|
||||||
m_cvfModel->removeAllParts();
|
if ( m_cvfModel.notNull() ) m_cvfModel->removeAllParts();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,16 +95,11 @@ void RicPolylineTarget3dEditor::configureAndUpdateUi( const QString& uiConfigNam
|
|||||||
QObject::connect( m_manipulator, SIGNAL( notifySelected() ), this, SLOT( slotSelectedIn3D() ) );
|
QObject::connect( m_manipulator, SIGNAL( notifySelected() ), this, SLOT( slotSelectedIn3D() ) );
|
||||||
QObject::connect( m_manipulator, SIGNAL( notifyDragFinished() ), this, SLOT( slotDragFinished() ) );
|
QObject::connect( m_manipulator, SIGNAL( notifyDragFinished() ), this, SLOT( slotDragFinished() ) );
|
||||||
m_cvfModel = new cvf::ModelBasicList;
|
m_cvfModel = new cvf::ModelBasicList;
|
||||||
ownerRiuViewer->addStaticModelOnce( m_cvfModel.p() );
|
ownerRiuViewer->addStaticModelOnce( m_cvfModel.p(), isInComparisonView() );
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::ref<caf::DisplayCoordTransform> dispXf;
|
cvf::ref<caf::DisplayCoordTransform> dispXf = view->displayCoordTransform();
|
||||||
double handleSize = 1.0;
|
double handleSize = 0.7 * view->ownerCase()->characteristicCellSize();
|
||||||
{
|
|
||||||
dispXf = ownerRiuViewer->ownerReservoirView()->displayCoordTransform();
|
|
||||||
Rim3dView* view = dynamic_cast<Rim3dView*>( ownerRiuViewer->ownerReservoirView() );
|
|
||||||
handleSize = 0.7 * view->ownerCase()->characteristicCellSize();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_manipulator->setOrigin( dispXf->transformToDisplayCoord( target->targetPointXYZ() ) );
|
m_manipulator->setOrigin( dispXf->transformToDisplayCoord( target->targetPointXYZ() ) );
|
||||||
// m_manipulator->setTangent(target->tangent());
|
// m_manipulator->setTangent(target->tangent());
|
||||||
@@ -131,17 +128,14 @@ void RicPolylineTarget3dEditor::cleanupBeforeSettingPdmObject()
|
|||||||
void RicPolylineTarget3dEditor::slotUpdated( const cvf::Vec3d& origin, const cvf::Vec3d& tangent )
|
void RicPolylineTarget3dEditor::slotUpdated( const cvf::Vec3d& origin, const cvf::Vec3d& tangent )
|
||||||
{
|
{
|
||||||
RimPolylineTarget* target = dynamic_cast<RimPolylineTarget*>( this->pdmObject() );
|
RimPolylineTarget* target = dynamic_cast<RimPolylineTarget*>( this->pdmObject() );
|
||||||
|
Rim3dView* view = mainOrComparisonView();
|
||||||
|
|
||||||
if ( !target )
|
if ( !target || !view )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::ref<caf::DisplayCoordTransform> dispXf;
|
cvf::ref<caf::DisplayCoordTransform> dispXf = view->displayCoordTransform();
|
||||||
{
|
|
||||||
RiuViewer* viewer = dynamic_cast<RiuViewer*>( ownerViewer() );
|
|
||||||
dispXf = viewer->ownerReservoirView()->displayCoordTransform();
|
|
||||||
}
|
|
||||||
|
|
||||||
RimUserDefinedPolylinesAnnotation* polylineDef;
|
RimUserDefinedPolylinesAnnotation* polylineDef;
|
||||||
target->firstAncestorOrThisOfTypeAsserted( polylineDef );
|
target->firstAncestorOrThisOfTypeAsserted( polylineDef );
|
||||||
@@ -155,6 +149,9 @@ void RicPolylineTarget3dEditor::slotUpdated( const cvf::Vec3d& origin, const cvf
|
|||||||
target->enableFullUpdate( true );
|
target->enableFullUpdate( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicPolylineTarget3dEditor::slotSelectedIn3D()
|
void RicPolylineTarget3dEditor::slotSelectedIn3D()
|
||||||
{
|
{
|
||||||
RimPolylineTarget* target = dynamic_cast<RimPolylineTarget*>( this->pdmObject() );
|
RimPolylineTarget* target = dynamic_cast<RimPolylineTarget*>( this->pdmObject() );
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "cafPdmUi3dObjectEditorHandle.h"
|
#include "Ric3dObjectEditorHandle.h"
|
||||||
|
|
||||||
class RicPointTangentManipulator;
|
class RicPointTangentManipulator;
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ class ModelBasicList;
|
|||||||
class QString;
|
class QString;
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
class RicPolylineTarget3dEditor : public caf::PdmUi3dObjectEditorHandle
|
class RicPolylineTarget3dEditor : public Ric3dObjectEditorHandle
|
||||||
{
|
{
|
||||||
CAF_PDM_UI_3D_OBJECT_EDITOR_HEADER_INIT;
|
CAF_PDM_UI_3D_OBJECT_EDITOR_HEADER_INIT;
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ void RicWellPathGeometry3dEditor::configureAndUpdateUi( const QString& uiConfigN
|
|||||||
for ( auto target : targets )
|
for ( auto target : targets )
|
||||||
{
|
{
|
||||||
auto targetEditor = new RicWellTarget3dEditor;
|
auto targetEditor = new RicWellTarget3dEditor;
|
||||||
targetEditor->setViewer( ownerViewer() );
|
targetEditor->setViewer( ownerViewer(), isInComparisonView() );
|
||||||
targetEditor->setPdmObject( target );
|
targetEditor->setPdmObject( target );
|
||||||
m_targetEditors.push_back( targetEditor );
|
m_targetEditors.push_back( targetEditor );
|
||||||
targetEditor->updateUi();
|
targetEditor->updateUi();
|
||||||
|
|||||||
@@ -74,10 +74,12 @@ void RicWellTarget3dEditor::configureAndUpdateUi( const QString& uiConfigName )
|
|||||||
{
|
{
|
||||||
RimWellPathTarget* target = dynamic_cast<RimWellPathTarget*>( this->pdmObject() );
|
RimWellPathTarget* target = dynamic_cast<RimWellPathTarget*>( this->pdmObject() );
|
||||||
RiuViewer* ownerRiuViewer = dynamic_cast<RiuViewer*>( ownerViewer() );
|
RiuViewer* ownerRiuViewer = dynamic_cast<RiuViewer*>( ownerViewer() );
|
||||||
|
Rim3dView* view = mainOrComparisonView();
|
||||||
|
|
||||||
if ( !target || !target->isEnabled() )
|
if ( !target || !target->isEnabled() || !view )
|
||||||
{
|
{
|
||||||
m_cvfModel->removeAllParts();
|
if ( m_cvfModel.notNull() ) m_cvfModel->removeAllParts();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,27 +94,26 @@ void RicWellTarget3dEditor::configureAndUpdateUi( const QString& uiConfigName )
|
|||||||
if ( m_manipulator.isNull() )
|
if ( m_manipulator.isNull() )
|
||||||
{
|
{
|
||||||
m_manipulator = new RicPointTangentManipulator( ownerRiuViewer );
|
m_manipulator = new RicPointTangentManipulator( ownerRiuViewer );
|
||||||
|
|
||||||
QObject::connect( m_manipulator,
|
QObject::connect( m_manipulator,
|
||||||
SIGNAL( notifyUpdate( const cvf::Vec3d&, const cvf::Vec3d& ) ),
|
SIGNAL( notifyUpdate( const cvf::Vec3d&, const cvf::Vec3d& ) ),
|
||||||
this,
|
this,
|
||||||
SLOT( slotUpdated( const cvf::Vec3d&, const cvf::Vec3d& ) ) );
|
SLOT( slotUpdated( const cvf::Vec3d&, const cvf::Vec3d& ) ) );
|
||||||
|
|
||||||
QObject::connect( m_manipulator, SIGNAL( notifySelected() ), this, SLOT( slotSelectedIn3D() ) );
|
QObject::connect( m_manipulator, SIGNAL( notifySelected() ), this, SLOT( slotSelectedIn3D() ) );
|
||||||
QObject::connect( m_manipulator, SIGNAL( notifyDragFinished() ), this, SLOT( slotDragFinished() ) );
|
QObject::connect( m_manipulator, SIGNAL( notifyDragFinished() ), this, SLOT( slotDragFinished() ) );
|
||||||
|
|
||||||
m_cvfModel = new cvf::ModelBasicList;
|
m_cvfModel = new cvf::ModelBasicList;
|
||||||
ownerRiuViewer->addStaticModelOnce( m_cvfModel.p() );
|
ownerRiuViewer->addStaticModelOnce( m_cvfModel.p(), isInComparisonView() );
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::ref<caf::DisplayCoordTransform> dispXf;
|
cvf::ref<caf::DisplayCoordTransform> dispXf = view->displayCoordTransform();
|
||||||
double handleSize = 1.0;
|
double handleSize = 0.7 * view->ownerCase()->characteristicCellSize();
|
||||||
{
|
|
||||||
dispXf = ownerRiuViewer->ownerReservoirView()->displayCoordTransform();
|
|
||||||
Rim3dView* view = dynamic_cast<Rim3dView*>( ownerRiuViewer->ownerReservoirView() );
|
|
||||||
handleSize = 0.7 * view->ownerCase()->characteristicCellSize();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_manipulator->setOrigin( dispXf->transformToDisplayCoord( target->targetPointXYZ() + geomDef->referencePointXyz() ) );
|
m_manipulator->setOrigin( dispXf->transformToDisplayCoord( target->targetPointXYZ() + geomDef->referencePointXyz() ) );
|
||||||
m_manipulator->setTangent( target->tangent() );
|
m_manipulator->setTangent( target->tangent() );
|
||||||
m_manipulator->setHandleSize( handleSize );
|
m_manipulator->setHandleSize( handleSize );
|
||||||
|
|
||||||
m_cvfModel->removeAllParts();
|
m_cvfModel->removeAllParts();
|
||||||
m_manipulator->appendPartsToModel( m_cvfModel.p() );
|
m_manipulator->appendPartsToModel( m_cvfModel.p() );
|
||||||
|
|
||||||
@@ -140,17 +141,14 @@ void RicWellTarget3dEditor::cleanupBeforeSettingPdmObject()
|
|||||||
void RicWellTarget3dEditor::slotUpdated( const cvf::Vec3d& origin, const cvf::Vec3d& tangent )
|
void RicWellTarget3dEditor::slotUpdated( const cvf::Vec3d& origin, const cvf::Vec3d& tangent )
|
||||||
{
|
{
|
||||||
RimWellPathTarget* target = dynamic_cast<RimWellPathTarget*>( this->pdmObject() );
|
RimWellPathTarget* target = dynamic_cast<RimWellPathTarget*>( this->pdmObject() );
|
||||||
|
Rim3dView* view = mainOrComparisonView();
|
||||||
|
|
||||||
if ( !target )
|
if ( !target || !view )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::ref<caf::DisplayCoordTransform> dispXf;
|
cvf::ref<caf::DisplayCoordTransform> dispXf = view->displayCoordTransform();
|
||||||
{
|
|
||||||
RiuViewer* viewer = dynamic_cast<RiuViewer*>( ownerViewer() );
|
|
||||||
dispXf = viewer->ownerReservoirView()->displayCoordTransform();
|
|
||||||
}
|
|
||||||
|
|
||||||
RimWellPathGeometryDef* geomDef;
|
RimWellPathGeometryDef* geomDef;
|
||||||
target->firstAncestorOrThisOfTypeAsserted( geomDef );
|
target->firstAncestorOrThisOfTypeAsserted( geomDef );
|
||||||
@@ -164,6 +162,9 @@ void RicWellTarget3dEditor::slotUpdated( const cvf::Vec3d& origin, const cvf::Ve
|
|||||||
target->enableFullUpdate( true );
|
target->enableFullUpdate( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicWellTarget3dEditor::slotSelectedIn3D()
|
void RicWellTarget3dEditor::slotSelectedIn3D()
|
||||||
{
|
{
|
||||||
RimWellPathTarget* target = dynamic_cast<RimWellPathTarget*>( this->pdmObject() );
|
RimWellPathTarget* target = dynamic_cast<RimWellPathTarget*>( this->pdmObject() );
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "cafPdmUi3dObjectEditorHandle.h"
|
#include "Ric3dObjectEditorHandle.h"
|
||||||
|
|
||||||
class RicPointTangentManipulator;
|
class RicPointTangentManipulator;
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ class ModelBasicList;
|
|||||||
class QString;
|
class QString;
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
class RicWellTarget3dEditor : public caf::PdmUi3dObjectEditorHandle
|
class RicWellTarget3dEditor : public Ric3dObjectEditorHandle
|
||||||
{
|
{
|
||||||
CAF_PDM_UI_3D_OBJECT_EDITOR_HEADER_INIT;
|
CAF_PDM_UI_3D_OBJECT_EDITOR_HEADER_INIT;
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|||||||
@@ -64,9 +64,11 @@ PdmUi3dObjectEditorHandle::~PdmUi3dObjectEditorHandle()
|
|||||||
/// to be cast able to whatever is needed in subclasses.
|
/// to be cast able to whatever is needed in subclasses.
|
||||||
/// Not allowed to change. Should be constructor argument, but makes factory stuff difficult.
|
/// Not allowed to change. Should be constructor argument, but makes factory stuff difficult.
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void PdmUi3dObjectEditorHandle::setViewer(QWidget* ownerViewer)
|
void PdmUi3dObjectEditorHandle::setViewer(QWidget* ownerViewer, bool inComparisonView)
|
||||||
{
|
{
|
||||||
CAF_ASSERT(m_ownerViewer.isNull());
|
CAF_ASSERT(m_ownerViewer.isNull());
|
||||||
m_ownerViewer = ownerViewer;
|
m_ownerViewer = ownerViewer;
|
||||||
|
m_isInComparisonView = inComparisonView;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -75,14 +75,15 @@ public:
|
|||||||
PdmUi3dObjectEditorHandle();
|
PdmUi3dObjectEditorHandle();
|
||||||
~PdmUi3dObjectEditorHandle() override;
|
~PdmUi3dObjectEditorHandle() override;
|
||||||
|
|
||||||
void setViewer(QWidget* ownerViewer);
|
void setViewer(QWidget* ownerViewer, bool isInComparisonView);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QWidget* ownerViewer() const { return m_ownerViewer;}
|
QWidget* ownerViewer() const { return m_ownerViewer;}
|
||||||
|
bool isInComparisonView() const { return m_isInComparisonView; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
QPointer<QWidget> m_ownerViewer;
|
||||||
QPointer<QWidget> m_ownerViewer;
|
bool m_isInComparisonView;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,13 +109,28 @@ void PdmUiSelection3dEditorVisualizer::onSelectionManagerSelectionChanged( const
|
|||||||
if (!editor3dTypeName.isEmpty())
|
if (!editor3dTypeName.isEmpty())
|
||||||
{
|
{
|
||||||
PdmObjectHandle* itemObject = dynamic_cast<PdmObjectHandle*>(item);
|
PdmObjectHandle* itemObject = dynamic_cast<PdmObjectHandle*>(item);
|
||||||
if (itemObject)
|
if ( itemObject )
|
||||||
{
|
{
|
||||||
PdmUi3dObjectEditorHandle* editor3d = caf::Factory<PdmUi3dObjectEditorHandle, QString>::instance()->create(editor3dTypeName);
|
// Editor in main view
|
||||||
editor3d->setViewer(m_ownerViewer);
|
{
|
||||||
editor3d->setPdmObject(itemObject);
|
PdmUi3dObjectEditorHandle* editor3d = caf::Factory<PdmUi3dObjectEditorHandle, QString>::instance()->create(editor3dTypeName);
|
||||||
m_active3DEditors.emplace_back(editor3d);
|
editor3d->setViewer(m_ownerViewer, false);
|
||||||
editor3d->updateUi();
|
editor3d->setPdmObject(itemObject);
|
||||||
|
m_active3DEditors.emplace_back(editor3d);
|
||||||
|
editor3d->updateUi();
|
||||||
|
}
|
||||||
|
|
||||||
|
QVariant isComparisonActive = m_ownerViewer->property("cafViewer_IsComparisonViewActive");
|
||||||
|
|
||||||
|
// Editor in comparison view
|
||||||
|
if (!isComparisonActive.isNull() && isComparisonActive.isValid() && isComparisonActive.toBool())
|
||||||
|
{
|
||||||
|
PdmUi3dObjectEditorHandle* editor3d = caf::Factory<PdmUi3dObjectEditorHandle, QString>::instance()->create(editor3dTypeName);
|
||||||
|
editor3d->setViewer(m_ownerViewer, true);
|
||||||
|
editor3d->setPdmObject(itemObject);
|
||||||
|
m_active3DEditors.emplace_back(editor3d);
|
||||||
|
editor3d->updateUi();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,7 +133,8 @@ caf::Viewer::Viewer(const QGLFormat& format, QWidget* parent)
|
|||||||
m_parallelProjectionLightDirection(0, 0, -1), // Light directly from behind
|
m_parallelProjectionLightDirection(0, 0, -1), // Light directly from behind
|
||||||
m_comparisonViewOffset(0, 0, 0),
|
m_comparisonViewOffset(0, 0, 0),
|
||||||
m_comparisonWindowNormalizedRect(0.5f, 0.0f, 0.5f, 1.0f),
|
m_comparisonWindowNormalizedRect(0.5f, 0.0f, 0.5f, 1.0f),
|
||||||
m_isComparisonFollowingAnimation(true)
|
m_isComparisonFollowingAnimation(true),
|
||||||
|
m_isComparisonViewActiveFlag(false)
|
||||||
{
|
{
|
||||||
#if QT_VERSION >= 0x050000
|
#if QT_VERSION >= 0x050000
|
||||||
m_layoutWidget = new QWidget(parent);
|
m_layoutWidget = new QWidget(parent);
|
||||||
@@ -353,6 +354,14 @@ cvf::Rectf caf::Viewer::comparisonViewVisibleNormalizedRect() const
|
|||||||
return m_comparisonWindowNormalizedRect;
|
return m_comparisonWindowNormalizedRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool caf::Viewer::isComparisonViewActive() const
|
||||||
|
{
|
||||||
|
return m_isComparisonViewActiveFlag;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
/// Set the scene to be rendered when the animation is inactive (Stopped)
|
/// Set the scene to be rendered when the animation is inactive (Stopped)
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -368,6 +377,7 @@ void caf::Viewer::setMainScene(cvf::Scene* scene, bool isForComparisonView )
|
|||||||
{
|
{
|
||||||
m_comparisonMainScene = scene;
|
m_comparisonMainScene = scene;
|
||||||
m_comparisonMainRendering->setScene(scene);
|
m_comparisonMainRendering->setScene(scene);
|
||||||
|
updateComparisonViewActiveFlag();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -648,11 +658,19 @@ cvf::ref<cvf::RayIntersectSpec> caf::Viewer::rayIntersectSpecFromWindowCoordinat
|
|||||||
{
|
{
|
||||||
bool mousePosIsWithinComparisonView = isMousePosWithinComparisonView(winPosX, winPosY);
|
bool mousePosIsWithinComparisonView = isMousePosWithinComparisonView(winPosX, winPosY);
|
||||||
|
|
||||||
|
return this->rayIntersectSpecFromWindowCoordinates(winPosX, winPosY, mousePosIsWithinComparisonView);
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
cvf::ref<cvf::RayIntersectSpec> caf::Viewer::rayIntersectSpecFromWindowCoordinates(int winPosX, int winPosY, bool isForComparisonView)
|
||||||
|
{
|
||||||
int translatedMousePosX = winPosX;
|
int translatedMousePosX = winPosX;
|
||||||
int translatedMousePosY = height() - winPosY;
|
int translatedMousePosY = height() - winPosY;
|
||||||
|
|
||||||
cvf::Rendering* renderingToInvestigate = mousePosIsWithinComparisonView ? m_comparisonMainRendering.p(): m_mainRendering.p();
|
cvf::Rendering* renderingToInvestigate = isForComparisonView ? m_comparisonMainRendering.p(): m_mainRendering.p();
|
||||||
|
|
||||||
return renderingToInvestigate->rayIntersectSpecFromWindowCoordinates(translatedMousePosX, translatedMousePosY);
|
return renderingToInvestigate->rayIntersectSpecFromWindowCoordinates(translatedMousePosX, translatedMousePosY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -952,6 +970,7 @@ void caf::Viewer::removeAllFrames(bool isForComparisonView)
|
|||||||
{
|
{
|
||||||
m_comparisonFrameScenes.clear();
|
m_comparisonFrameScenes.clear();
|
||||||
m_comparisonMainRendering->setScene(m_comparisonMainScene.p());
|
m_comparisonMainRendering->setScene(m_comparisonMainScene.p());
|
||||||
|
updateComparisonViewActiveFlag();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_animationControl->setNumFrames(static_cast<int>(frameCount()));
|
m_animationControl->setNumFrames(static_cast<int>(frameCount()));
|
||||||
@@ -978,6 +997,15 @@ bool caf::Viewer::isAnimationActive()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void caf::Viewer::updateComparisonViewActiveFlag()
|
||||||
|
{
|
||||||
|
m_isComparisonViewActiveFlag = m_comparisonMainRendering->scene() != nullptr;
|
||||||
|
this->setProperty("cafViewer_IsComparisonViewActive", QVariant(m_isComparisonViewActiveFlag));
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -995,10 +1023,12 @@ void caf::Viewer::setCurrentComparisonFrame(int frameIndex)
|
|||||||
if ( m_comparisonFrameScenes.size() > clampedFrameIndex && m_comparisonFrameScenes.at(clampedFrameIndex) != nullptr )
|
if ( m_comparisonFrameScenes.size() > clampedFrameIndex && m_comparisonFrameScenes.at(clampedFrameIndex) != nullptr )
|
||||||
{
|
{
|
||||||
m_comparisonMainRendering->setScene(m_comparisonFrameScenes.at(clampedFrameIndex));
|
m_comparisonMainRendering->setScene(m_comparisonFrameScenes.at(clampedFrameIndex));
|
||||||
|
updateComparisonViewActiveFlag();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_comparisonMainRendering->setScene(nullptr);
|
m_comparisonMainRendering->setScene(nullptr);
|
||||||
|
updateComparisonViewActiveFlag();
|
||||||
}
|
}
|
||||||
|
|
||||||
update();
|
update();
|
||||||
@@ -1040,16 +1070,21 @@ void caf::Viewer::slotSetCurrentFrame(int frameIndex)
|
|||||||
if ( m_comparisonFrameScenes.size() > clampedFrameIndex && m_comparisonFrameScenes.at(clampedFrameIndex) != nullptr )
|
if ( m_comparisonFrameScenes.size() > clampedFrameIndex && m_comparisonFrameScenes.at(clampedFrameIndex) != nullptr )
|
||||||
{
|
{
|
||||||
m_comparisonMainRendering->setScene(m_comparisonFrameScenes.at(clampedFrameIndex));
|
m_comparisonMainRendering->setScene(m_comparisonFrameScenes.at(clampedFrameIndex));
|
||||||
|
updateComparisonViewActiveFlag();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_comparisonMainRendering->setScene(nullptr);
|
m_comparisonMainRendering->setScene(nullptr);
|
||||||
|
updateComparisonViewActiveFlag();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
void caf::Viewer::releaseOGlResourcesForCurrentFrame()
|
void caf::Viewer::releaseOGlResourcesForCurrentFrame()
|
||||||
{
|
{
|
||||||
if (isAnimationActive())
|
if (isAnimationActive())
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ public:
|
|||||||
|
|
||||||
void setComparisonViewVisibleNormalizedRect( const cvf::Rectf& visibleRect );
|
void setComparisonViewVisibleNormalizedRect( const cvf::Rectf& visibleRect );
|
||||||
cvf::Rectf comparisonViewVisibleNormalizedRect() const;
|
cvf::Rectf comparisonViewVisibleNormalizedRect() const;
|
||||||
|
bool isComparisonViewActive() const;
|
||||||
|
|
||||||
// Set the main scene : the scene active when the animation is not active. (Stopped)
|
// Set the main scene : the scene active when the animation is not active. (Stopped)
|
||||||
void setMainScene(cvf::Scene* scene, bool isForComparisonView = false);
|
void setMainScene(cvf::Scene* scene, bool isForComparisonView = false);
|
||||||
@@ -151,8 +152,10 @@ public:
|
|||||||
// Test whether it is any point in doing navigation etc.
|
// Test whether it is any point in doing navigation etc.
|
||||||
bool canRender() const;
|
bool canRender() const;
|
||||||
|
|
||||||
|
cvf::ref<cvf::RayIntersectSpec> rayIntersectSpecFromWindowCoordinates(int winPosX, int winPosY, bool isForComparisonView);
|
||||||
cvf::ref<cvf::RayIntersectSpec> rayIntersectSpecFromWindowCoordinates(int winPosX, int winPosY);
|
cvf::ref<cvf::RayIntersectSpec> rayIntersectSpecFromWindowCoordinates(int winPosX, int winPosY);
|
||||||
bool rayPick(int winPosX, int winPosY, cvf::HitItemCollection* pickedPoints, cvf::Vec3d* rayGlobalOrigin = nullptr) ;
|
bool rayPick(int winPosX, int winPosY, cvf::HitItemCollection* pickedPoints, cvf::Vec3d* rayGlobalOrigin = nullptr) ;
|
||||||
|
|
||||||
bool isMousePosWithinComparisonView(int winPosX, int winPosY);
|
bool isMousePosWithinComparisonView(int winPosX, int winPosY);
|
||||||
|
|
||||||
cvf::OverlayItem* overlayItem(int winPosX, int winPosY);
|
cvf::OverlayItem* overlayItem(int winPosX, int winPosY);
|
||||||
@@ -263,6 +266,8 @@ private:
|
|||||||
cvf::Collection<cvf::Scene> m_comparisonFrameScenes;
|
cvf::Collection<cvf::Scene> m_comparisonFrameScenes;
|
||||||
cvf::Collection<cvf::Model> m_comparisonStaticModels;
|
cvf::Collection<cvf::Model> m_comparisonStaticModels;
|
||||||
bool m_isComparisonFollowingAnimation;
|
bool m_isComparisonFollowingAnimation;
|
||||||
|
bool m_isComparisonViewActiveFlag;
|
||||||
|
void updateComparisonViewActiveFlag();
|
||||||
|
|
||||||
cvf::Vec3d m_comparisonViewOffset;
|
cvf::Vec3d m_comparisonViewOffset;
|
||||||
cvf::ref<cvf::RenderingScissor> m_comparisonRenderingScissor;
|
cvf::ref<cvf::RenderingScissor> m_comparisonRenderingScissor;
|
||||||
|
|||||||
31
doc/well-target-3deditor.plantuml
Normal file
31
doc/well-target-3deditor.plantuml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
@startuml
|
||||||
|
|
||||||
|
class RicPointTangentManipulator{
|
||||||
|
eventFilter()
|
||||||
|
}
|
||||||
|
|
||||||
|
class RicPointTangentManipulatorPartMgr {
|
||||||
|
appendPartsToModel()
|
||||||
|
}
|
||||||
|
Viewer <|-- RiuViewer
|
||||||
|
RiuViewer ----* PdmUiSelection3dEditorVisualizer
|
||||||
|
|
||||||
|
RicPointTangentManipulator -* RicPointTangentManipulatorPartMgr
|
||||||
|
|
||||||
|
PdmUiObjectEditorHandle <|-- PdmUi3dObjectEditorHandle
|
||||||
|
|
||||||
|
RicWellTarget3dEditor --* RicPointTangentManipulator
|
||||||
|
|
||||||
|
RicWellPathGeometry3dEditor -* "n" RicWellTarget3dEditor
|
||||||
|
PdmUi3dObjectEditorHandle <|-- RicWellPathGeometry3dEditor
|
||||||
|
|
||||||
|
RicPointTangentManipulator ..up.> "installEventFilter()" Viewer
|
||||||
|
|
||||||
|
PdmUi3dObjectEditorHandle <|-- Ric3dObjectEditorHandle
|
||||||
|
Ric3dObjectEditorHandle <|-- RicWellTarget3dEditor
|
||||||
|
|
||||||
|
PdmUiSelection3dEditorVisualizer --* "n" PdmUi3dObjectEditorHandle
|
||||||
|
Viewer ..down.> "eventFilter()" RicPointTangentManipulator
|
||||||
|
|
||||||
|
|
||||||
|
@enduml
|
||||||
Reference in New Issue
Block a user