#12413 Surface: add "Fly to Object" functionality.

This commit is contained in:
Kristian Bendiksen committed 2025-05-30 13:09:58 +02:00
1 parent f26a268ab4
commit 3df99190d0
2 files changed
+22 -3

No files matched your search

@@ -363,3 +363,19 @@ bool RimSurface::isMeshLinesEnabledDefault() const
{
return false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::BoundingBox RimSurface::boundingBoxInDomainCoords() const
{
cvf::BoundingBox boundingBox;
if ( m_surfaceData.notNull() )
{
for ( const auto& vertex : m_surfaceData->vertices() )
boundingBox.add( vertex );
}
return boundingBox;
}
@@ -17,10 +17,11 @@
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafPdmField.h"
#include "cafPdmObject.h"
#include "Rim3dPropertiesInterface.h"
#include "cafPdmField.h"
#include "cafPdmFieldCvfColor.h"
#include "cafPdmObject.h"
#include "cafPdmProxyValueField.h"
#include "cvfObject.h"
@@ -31,7 +32,7 @@
class RimRegularLegendConfig;
class RigSurface;
class RimSurface : public caf::PdmObject
class RimSurface : public caf::PdmObject, public Rim3dPropertiesInterface
{
CAF_PDM_HEADER_INIT;
@@ -92,6 +93,8 @@ protected:
virtual bool updateSurfaceData() = 0;
virtual void clearCachedNativeData() = 0;
cvf::BoundingBox boundingBoxInDomainCoords() const override;
protected:
caf::PdmField<QString> m_userDescription;