Shinya Kitaoka 810553
#pragma once
Shinya Kitaoka 810553
Toshihiro Shimizu 890ddd
#ifndef igs_motion_wind_pixel_h
Toshihiro Shimizu 890ddd
#define igs_motion_wind_pixel_h
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include <vector></vector>
Toshihiro Shimizu 890ddd
#include "igs_math_random.h"
Toshihiro Shimizu 890ddd
#include "igs_ifx_common.h" /* igs::image::rgba::siz */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef IGS_MOTION_WIND_EXPORT
Toshihiro Shimizu 890ddd
#define IGS_MOTION_WIND_EXPORT
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
namespace igs {
Shinya Kitaoka 120a6e
namespace motion_wind {
Shinya Kitaoka 120a6e
class IGS_MOTION_WIND_EXPORT pixel {
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  pixel(const bool blow_dark_sw, const bool blow_alpha_sw
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
        ,
Shinya Kitaoka 120a6e
        const unsigned long length_random_seed, const double length_min,
Shinya Kitaoka 120a6e
        const double length_max, const double length_bias,
Shinya Kitaoka 120a6e
        const bool length_ref_sw
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
        ,
Shinya Kitaoka 120a6e
        const unsigned long force_random_seed, const double force_min,
Shinya Kitaoka 120a6e
        const double force_max, const double force_bias, const bool force_ref_sw
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
        ,
Shinya Kitaoka 120a6e
        const unsigned long density_random_seed, const double density_min,
Shinya Kitaoka 120a6e
        const double density_max, const double density_bias,
Shinya Kitaoka 120a6e
        const bool density_ref_sw);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int change(const bool key_reset_sw
Shinya Kitaoka 120a6e
             /***, const int ref_channel
Toshihiro Shimizu 890ddd
	, const double *ref_pixel***/ /* ゼロなら参照しない */
Shinya Kitaoka 120a6e
             ,
Shinya Kitaoka 120a6e
             const double ref_val /* ゼロ以上なら有効値、マイナスなら無効 */
Shinya Kitaoka 120a6e
             ,
Shinya Kitaoka 120a6e
             const int channels, double *pixel_tgt);
Shinya Kitaoka 120a6e
  void clear(void);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  std::vector<double> table_; /* 減少テーブル */</double>
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  igs::math::random length_random_;   // default seed is 1
Shinya Kitaoka 120a6e
  igs::math::random force_random_;    // default seed is 1
Shinya Kitaoka 120a6e
  igs::math::random density_random_;  // default seed is 1
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  const bool blow_dark_sw_, blow_alpha_sw_;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  /* ref全体をセットするか否かは、参照画像があるかない(NULL)かで決める */
Shinya Kitaoka 120a6e
  const double length_min_, length_max_;
Shinya Kitaoka 120a6e
  const double length_bias_;
Shinya Kitaoka 120a6e
  const bool length_ref_sw_;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  const double force_min_, force_max_;
Shinya Kitaoka 120a6e
  const double force_bias_;
Shinya Kitaoka 120a6e
  const bool force_ref_sw_;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  const double density_min_, density_max_;
Shinya Kitaoka 120a6e
  const double density_bias_;
Shinya Kitaoka 120a6e
  const bool density_ref_sw_;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  double key_lightness_;
Shinya Kitaoka 120a6e
  double pixel_key_[igs::image::rgba::siz];
Shinya Kitaoka 120a6e
  long table_len_, table_pos_;
Shinya Kitaoka 120a6e
  double *table_array_;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  /* copy constructorを無効化 */
Shinya Kitaoka 120a6e
  pixel(const pixel &);
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  /* 代入演算子を無効化 */
Shinya Kitaoka 120a6e
  pixel &operator=(const pixel &);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif /* !igs_motion_wind_pixel_h */