Files
ResInsight/ApplicationLibCode/ModelVisualization/RivPolylinePartMgr.h
T

75 lines
2.5 KiB
C++
Raw Normal View History

2018-11-23 13:33:59 +01:00
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2018 equinor ASA
//
2018-11-23 13:33:59 +01: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.
//
2018-11-23 13:33:59 +01:00
// 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>
2018-11-23 13:33:59 +01:00
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cvfAssert.h"
#include "cvfObject.h"
#include "cvfVector3.h"
2021-01-26 13:08:21 +01:00
#include "cafPdmObject.h"
2018-11-23 13:33:59 +01:00
#include "cafPdmPointer.h"
#include <vector>
2018-11-23 13:33:59 +01:00
namespace cvf
{
class BoundingBox;
class Part;
class ModelBasicList;
class Transform;
class Font;
} // namespace cvf
2021-01-26 13:08:21 +01:00
2018-11-23 13:33:59 +01:00
namespace caf
{
class DisplayCoordTransform;
2018-11-23 13:33:59 +01:00
}
class Rim3dView;
2021-01-26 13:08:21 +01:00
class RimPolylinesDataInterface;
2021-01-26 13:08:21 +01:00
class RivPolylinePartMgr : public cvf::Object
2018-11-23 13:33:59 +01:00
{
public:
2021-01-26 13:08:21 +01:00
RivPolylinePartMgr( Rim3dView* view, RimPolylinesDataInterface* polylines, caf::PdmObject* collection );
~RivPolylinePartMgr() override;
2018-11-23 13:33:59 +01:00
void appendDynamicGeometryPartsToModel( cvf::ModelBasicList* model,
const caf::DisplayCoordTransform* displayXf,
const cvf::BoundingBox& boundingBox );
2018-11-23 13:33:59 +01:00
private:
2021-01-26 13:08:21 +01:00
bool isPolylinesInBoundingBox( std::vector<std::vector<cvf::Vec3d>> polyline, const cvf::BoundingBox& boundingBox );
void buildPolylineParts( const caf::DisplayCoordTransform* displayXf, const cvf::BoundingBox& boundingBox );
2021-01-26 13:08:21 +01:00
std::vector<std::vector<cvf::Vec3d>> getPolylinesPointsInDomain( bool snapToPlaneZ, double planeZ );
2023-02-26 10:48:40 +01:00
std::vector<std::vector<cvf::Vec3d>> transformPolylinesPointsToDisplay( const std::vector<std::vector<cvf::Vec3d>>& pointsInDomain,
const caf::DisplayCoordTransform* displayXf );
2021-01-26 13:08:21 +01:00
bool collectionVisible();
2018-11-23 13:33:59 +01:00
2021-01-26 13:08:21 +01:00
void clearAllGeometry();
2018-11-23 13:33:59 +01:00
2021-01-26 13:08:21 +01:00
RimPolylinesDataInterface* m_polylineInterface;
caf::PdmObject* m_viewCollection;
caf::PdmPointer<Rim3dView> m_rimView;
cvf::ref<cvf::Part> m_linePart;
cvf::ref<cvf::Part> m_spherePart;
2018-11-23 13:33:59 +01:00
};