2018-03-12 09:59:45 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2019-01-09 15:21:38 +01:00
|
|
|
// Copyright (C) 2018- Equinor ASA
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2018-03-12 09:59:45 +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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2018-03-12 09:59:45 +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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2018-03-12 09:59:45 +01:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
2018-03-09 18:01:13 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
2018-03-12 09:59:45 +01:00
|
|
|
#include "cvfMatrix4.h"
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
2021-08-26 08:13:03 +02:00
|
|
|
class RivSectionFlattener
|
2018-03-09 18:01:13 +01:00
|
|
|
{
|
|
|
|
|
public:
|
2023-02-26 10:48:40 +01:00
|
|
|
static size_t indexToNextValidPoint( const std::vector<cvf::Vec3d>& polyLine, const cvf::Vec3d extrDir, size_t idxToStartOfLineSegment );
|
2018-03-09 18:01:13 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
static std::vector<cvf::Mat4d> calculateFlatteningCSsForPolyline( const std::vector<cvf::Vec3d>& polyLine,
|
|
|
|
|
const cvf::Vec3d& extrusionDir,
|
|
|
|
|
const cvf::Vec3d& startOffset,
|
|
|
|
|
cvf::Vec3d* endOffset );
|
2018-03-09 18:01:13 +01:00
|
|
|
|
|
|
|
|
private:
|
2023-02-26 10:48:40 +01:00
|
|
|
static cvf::Mat4d calculateSectionLocalFlatteningCS( const cvf::Vec3d& p1, const cvf::Vec3d& p2, const cvf::Vec3d& extrusionDir );
|
2018-03-09 18:01:13 +01:00
|
|
|
};
|