Go to the documentation of this file. 1 #ifndef OGLPLUS_TEXGEN_VORONOI2D_NODE_HPP
9 #define OGLPLUS_TEXGEN_VORONOI2D_NODE_HPP
14 namespace eagine::oglp::texgen {
16 enum class voronoi_output_type {
25 class voronoi2d_output :
public base_output {
27 input_with_const_default<float[2]>& _input;
28 input_with_const_default<float[2]>& _cells;
29 voronoi_output_type _type;
38 input_with_const_default<
float[2]>&,
39 input_with_const_default<
float[2]>&,
40 voronoi_output_type type);
48 std::ostream& definitions(std::ostream& out, compile_context& ctxt) override;
50 std::ostream& expression(std::ostream& out, compile_context& ctxt) override;
53 class voronoi2d_node : public base_node {
55 input_with_const_default<float[2]> _input;
56 input_with_const_default<float[2]> _cells;
58 voronoi2d_output _distance1;
59 voronoi2d_output _distance2;
60 voronoi2d_output _distance3;
61 voronoi2d_output _cell_coord;
62 voronoi2d_output _cell_center;
63 voronoi2d_output _input_cell_center;
68 voronoi2d_node& set_cell_count(
float x,
float y) {
69 _cells.fallback().set(x, y);
86 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY)
87 #include <oglplus/texgen/voronoi2d_node.inl>
90 #endif // OGLPLUS_TEXGEN_VORONOI2D_NODE_HPP
value_type
Value tree value element data type enumeration.
Definition: interface.hpp:27
std::ptrdiff_t span_size_t
Signed span size type used by eagine.
Definition: types.hpp:36
basic_string_span< const char > string_view
Alias for const string views.
Definition: string_span.hpp:116
static auto type_name(const T &) noexcept -> std::string
Returns the demangled name for type T.
Definition: type_name.hpp:24