Skip to content

src/filters/triangle.h

Namespaces

Name
dakku
dakku namespace

Classes

Name
class dakku::TriangleFilter
triangle filter the weight falls off linearly from the filter center over the square extent of the filter

Source code

#ifndef DAKKU_FILTERS_Triangle_H_
#define DAKKU_FILTERS_Triangle_H_
#include <filters/fwd.h>

namespace dakku {
class DAKKU_EXPORT_FILTERS TriangleFilter : public Filter {
 public:
  using Filter::Filter;

  [[nodiscard]] float evaluate(const Point2f &p) const override;
};

DAKKU_EXPORT_FILTERS Filter *create_triangle_filter(float x_width, float y_width);

DAKKU_DECLARE_LUA_OBJECT(TriangleFilter, DAKKU_EXPORT_FILTERS);
}  // namespace dakku
#endif

Updated on 2022-04-30 at 15:46:11 +0000