2018-03-12 03:59:45 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2019-01-09 08:21:38 -06:00
|
|
|
// Copyright (C) 2018- Equinor ASA
|
2018-03-12 03:59:45 -05: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.
|
|
|
|
//
|
|
|
|
// 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>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-03-09 11:01:13 -06:00
|
|
|
#pragma once
|
|
|
|
|
2019-09-05 02:43:17 -05:00
|
|
|
|
2018-03-12 03:59:45 -05:00
|
|
|
#include "cvfMatrix4.h"
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
2018-03-09 11:01:13 -06:00
|
|
|
|
|
|
|
class RivSectionFlattner
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static size_t indexToNextValidPoint(const std::vector<cvf::Vec3d>& polyLine,
|
|
|
|
const cvf::Vec3d extrDir,
|
2018-03-12 03:59:45 -05:00
|
|
|
size_t idxToStartOfLineSegment);
|
2018-03-09 11:01:13 -06:00
|
|
|
|
|
|
|
static std::vector<cvf::Mat4d> calculateFlatteningCSsForPolyline(const std::vector<cvf::Vec3d> & polyLine,
|
|
|
|
const cvf::Vec3d& extrusionDir,
|
|
|
|
const cvf::Vec3d& startOffset,
|
2018-03-12 03:59:45 -05:00
|
|
|
cvf::Vec3d* endOffset);
|
2018-03-09 11:01:13 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
static cvf::Mat4d calculateSectionLocalFlatteningCS(const cvf::Vec3d& p1,
|
|
|
|
const cvf::Vec3d& p2,
|
2018-03-12 03:59:45 -05:00
|
|
|
const cvf::Vec3d& extrusionDir);
|
2018-03-09 11:01:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|