GeoMech: show deformations in grid view (#8123)

Enable support in geomech view to show grid deformations
This commit is contained in:
jonjenssen
2021-10-07 02:12:42 +02:00
committed by GitHub
parent 0e620c8408
commit 7b78c2d35b
17 changed files with 361 additions and 51 deletions

View File

@@ -20,9 +20,12 @@
#pragma once
#include "cvfObject.h"
#include "cvfVector3.h"
#include "RivFemPartGeometryGenerator.h"
#include <vector>
namespace cvf
{
class StructGridInterface;
@@ -46,12 +49,14 @@ class RigFemPart;
class RivFemPartPartMgr : public cvf::Object
{
public:
explicit RivFemPartPartMgr( const RigFemPart* femPart, cvf::Vec3d displayOffset );
explicit RivFemPartPartMgr( const RigFemPart* part, cvf::Vec3d displayOffset );
~RivFemPartPartMgr() override;
void setTransform( cvf::Transform* scaleTransform );
void setCellVisibility( cvf::UByteArray* cellVisibilities );
cvf::ref<cvf::UByteArray> cellVisibility() { return m_cellVisibility; }
void setDisplacements( bool useDisplacements, double scalingFactor, const std::vector<cvf::Vec3f>& displacements );
void updateCellColor( cvf::Color4f color );
void updateCellResultColor( size_t timeStepIndex, RimGeoMechCellColors* cellResultColors );
@@ -66,6 +71,8 @@ private:
int m_partIdx;
cvf::cref<RigFemPart> m_part;
std::vector<cvf::Vec3f> m_displacedNodeCoordinates;
cvf::ref<cvf::Transform> m_scaleTransform;
float m_opacityLevel;
cvf::Color3f m_defaultColor;