Shinya Kitaoka 810553
#pragma once
Shinya Kitaoka 810553
Toshihiro Shimizu 890ddd
#ifndef igs_maxmin_lens_matrix_h
Toshihiro Shimizu 890ddd
#define igs_maxmin_lens_matrix_h
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include <vector></vector>
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
namespace igs {
Shinya Kitaoka 120a6e
namespace maxmin {
Shinya Kitaoka 120a6e
const int diameter_from_outer_radius(const double outer_radius);
Shinya Kitaoka 120a6e
const double outer_radius_from_radius(const double radius,
Shinya Kitaoka 120a6e
                                      const double smooth_outer_range);
Toshihiro Shimizu 890ddd
const int alloc_and_shape_lens_matrix(
Shinya Kitaoka 120a6e
    const double radius  // 0=<
Shinya Kitaoka 120a6e
    ,
Shinya Kitaoka 120a6e
    const double outer_radius, const int polygon_number  // =2
Shinya Kitaoka 120a6e
    ,
Shinya Kitaoka 120a6e
    const double roll_degree  // 0<= ... <=360
Shinya Kitaoka 120a6e
    ,
Shinya Kitaoka 120a6e
    std::vector<int> &lens_offsets, std::vector<int> &lens_sizes,</int></int>
Shinya Kitaoka 120a6e
    std::vector<std::vector<double>> &lens_ratio);</std::vector<double>
Toshihiro Shimizu 890ddd
/*
Shinya Kitaoka 120a6e
        lens_offsetsとlens_sizesで影響範囲を表わすmatrixを表わす
Shinya Kitaoka 120a6e
        radiusは影響円の半径
Shinya Kitaoka 120a6e
        matrix(縦横)サイズ(lens_offsets.size())は
Shinya Kitaoka 120a6e
                円(radius)が入る最小整数値でかつ、
Shinya Kitaoka 120a6e
                1以上の奇数(1,3,5,6)値
Toshihiro Shimizu 890ddd
  */
Shinya Kitaoka 120a6e
const void reshape_lens_matrix(const double radius  // 0<=
Shinya Kitaoka 120a6e
                               ,
Shinya Kitaoka 120a6e
                               const double outer_radius,
Shinya Kitaoka 120a6e
                               const int odd_diameter,
Shinya Kitaoka 120a6e
                               const int polygon_number  // =2
Shinya Kitaoka 120a6e
                               ,
Shinya Kitaoka 120a6e
                               const double roll_degree  // 0<= ... <=360
Shinya Kitaoka 120a6e
                               ,
Shinya Kitaoka 120a6e
                               std::vector<int> &lens_offsets,</int>
Shinya Kitaoka 120a6e
                               std::vector<int> &lens_sizes,</int>
Shinya Kitaoka 120a6e
                               std::vector<std::vector<double>> &lens_ratio);</std::vector<double>
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif /* !igs_maxmin_lens_matrix_h */