///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2011-2012 Statoil ASA, Ceetron AS // // 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 // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include "cvfMath.h" #include "cvfObject.h" #include "cvfVector3.h" namespace cvf { class BoundingBox; } #include //================================================================================================== /// //================================================================================================== class RigWellPath : public cvf::Object { public: std::vector m_wellPathPoints; std::vector m_measuredDepths; const std::vector& wellPathPoints() const; const std::vector& measureDepths() const; std::vector trueVerticalDepths() const; RigWellPath(); void setDatumElevation( double value ); bool hasDatumElevation() const; double datumElevation() const; double rkbDiff() const; cvf::Vec3d interpolatedVectorValuesAlongWellPath( const std::vector& vectors, double measuredDepth, double* horizontalLengthAlongWellToStartClipPoint = nullptr ) const; cvf::Vec3d interpolatedPointAlongWellPath( double measuredDepth, double* horizontalLengthAlongWellToStartClipPoint = nullptr ) const; double wellPathAzimuthAngle( const cvf::Vec3d& position ) const; void twoClosestPoints( const cvf::Vec3d& position, cvf::Vec3d* p1, cvf::Vec3d* p2 ) const; std::pair, std::vector> clippedPointSubset( double startMD, double endMD, double* horizontalLengthAlongWellToStartClipPoint = nullptr ) const; std::vector wellPathPointsIncludingInterpolatedIntersectionPoint( double intersectionMeasuredDepth ) const; static bool isAnyPointInsideBoundingBox( const std::vector& points, const cvf::BoundingBox& boundingBox ); static std::vector clipPolylineStartAboveZ( const std::vector& polyLine, double maxZ, double* horizontalLengthAlongWellToClipPoint, size_t* indexToFirstVisibleSegment ); private: bool m_hasDatumElevation; double m_datumElevation; };