cleanup code

This commit is contained in:
2019-11-26 10:06:30 +01:00
parent 2e4561c32a
commit 9eafcecde9
2 changed files with 3 additions and 112 deletions

View File

@@ -170,17 +170,12 @@ public:
void reset(bool clear_keypoints) noexcept;
std::vector<Keypoint> compute() noexcept;
};
int m_layer = 0;
int m_dir_kp = 0;
bool m_dir_valid = false;
glm::vec2 m_dir_ref = { 1, 0 };
float m_dir_ref_angle = 0;
float m_dir_dist = 0;
float m_dir_step = 10;
float m_dir_angle = 0;
float m_dir_init = 0;
float m_curve = 0;
float m_dist = 0;
float m_step = 0;
float m_max_size = FLT_MAX;
bool m_filter_points = true;
@@ -194,18 +189,17 @@ public:
std::vector<Keypoint> m_keypoints;
std::vector<std::pair<glm::vec3, float>> m_hold_points;
std::vector<StrokeSample> m_samples;
int m_last_kp;
std::mt19937 prng;
SamplesInterpolator m_interp_main;
SamplesInterpolator m_interp_dir;
void start(const std::shared_ptr<Brush>& brush);
void add_point(glm::vec3 pos, float pressure);
void reset(bool clear_keypoints = false);
bool has_sample();
bool need_dir() const noexcept;
std::vector<StrokeSample> compute_samples();
std::vector<StrokeSample> compute_samples_old();
StrokeSample randomize_sample(const glm::vec3& pos, float pressure, float curve_angle);
SamplesInterpolator m_interp_main;
SamplesInterpolator m_interp_dir;
void randomize_prng();
float rnd_nor() { return float((double)prng() / (double)prng.max()); }; // normalized [0, +1]