tahoma2d/toonz/sources/toonzlib/sandor_fxs/BlurMatrix.h

39 lines
1.3 KiB
C
Raw Normal View History

2016-05-17 03:04:11 +12:00
#pragma once
2016-03-19 06:57:51 +13:00
// BlurMatrix.h: interface for the CBlurMatrix class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_BLURMATRIX_H__8298C171_0035_11D6_B94F_0040F674BE6A__INCLUDED_)
#define AFX_BLURMATRIX_H__8298C171_0035_11D6_B94F_0040F674BE6A__INCLUDED_
#include <vector>
#include "SError.h"
#include "SDef.h"
2016-06-15 18:43:10 +12:00
#define NBRS 10 // Number of Random Samples
typedef std::vector<SXYD> BLURSECTION;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
class CBlurMatrix {
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
bool m_isSAC; // Stop At Contour
bool m_isRS; // Random Sampling
std::vector<BLURSECTION> m_m[NBRS];
CBlurMatrix() : m_isSAC(false), m_isRS(false){};
CBlurMatrix(const CBlurMatrix &m); // throw(SBlurMatrixError);
CBlurMatrix(const double d, const int nb, const bool isSAC, const bool isRS);
// throw(SBlurMatrixError) ;
virtual ~CBlurMatrix();
void createRandom(const double d, const int nb); // throw(SBlurMatrixError);
void createEqual(const double d, const int nb); // throw(SBlurMatrixError);
void addPath(std::vector<BLURSECTION>::iterator pBS); // throw(exception);
void addPath(); // throw(SBlurMatrixError);
void print() const;
bool isIn(const std::vector<BLURSECTION> &m, const SXYD &xyd) const;
2016-03-19 06:57:51 +13:00
};
2016-06-15 18:43:10 +12:00
#endif // !defined(AFX_BLURMATRIX_H__8298C171_0035_11D6_B94F_0040F674BE6A__INCLUDED_)