Go to the documentation of this file. 1 #ifndef OGLPLUS_TEXGEN_HONEYCOMB_NODE_HPP
9 #define OGLPLUS_TEXGEN_HONEYCOMB_NODE_HPP
14 namespace eagine::oglp::texgen {
16 enum class honeycomb_direction { vertical, horizontal };
18 enum class honeycomb_output_type { cell_coord, cell_center, distance };
20 class honeycomb_output :
public base_output {
22 input_with_const_default<float[2]>& _cells;
23 honeycomb_direction& _direction;
24 honeycomb_output_type _type;
31 input_with_const_default<
float[2]>&,
32 honeycomb_direction& direction,
33 honeycomb_output_type type);
39 std::ostream& definitions(std::ostream& out, compile_context& ctxt)
override;
41 std::ostream& expression(std::ostream& out, compile_context& ctxt)
override;
44 class honeycomb_node :
public base_node {
46 input_with_const_default<float[2]> _cells;
47 honeycomb_direction _direction{honeycomb_direction::vertical};
49 honeycomb_output _cell_coord;
50 honeycomb_output _cell_center;
51 honeycomb_output _distance;
56 honeycomb_node& set_cell_count(
float x,
float y) {
57 _cells.fallback().set(x, y);
74 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY)
75 #include <oglplus/texgen/honeycomb_node.inl>
78 #endif // OGLPLUS_TEXGEN_HONEYCOMB_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