OGLplus  (0.59.0) a C++ wrapper for rendering APIs

interlace_node.hpp
Go to the documentation of this file.
1 #ifndef OGLPLUS_TEXGEN_INTERLACE_NODE_HPP
9 #define OGLPLUS_TEXGEN_INTERLACE_NODE_HPP
10 
11 #include "base_node.hpp"
12 #include "fallback_input.hpp"
13 
14 namespace eagine::oglp::texgen {
15 
16 enum class interlace_mode { columns, rows, layers };
17 
18 class interlace_output : public base_output {
19 private:
20  interlace_mode _mode;
21 
22  friend class interlace_node;
23 
24 public:
25  interlace_output(node_intf& parent, interlace_mode);
26 
27  interlace_output(node_intf& parent)
28  : interlace_output(parent, interlace_mode::rows) {}
29 
30  string_view type_name() override;
31 
32  slot_data_type value_type() override;
33 
34  std::ostream& definitions(std::ostream& out, compile_context& ctxt) override;
35 };
36 
37 class interlace_node : public single_output_node<interlace_output> {
38 public:
39  interlace_node& set_mode(interlace_mode mode) {
40  _output._mode = mode;
41  return *this;
42  }
43 };
44 
45 } // namespace eagine::oglp::texgen
46 
47 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY)
48 #include <oglplus/texgen/interlace_node.inl>
49 #endif
50 
51 #endif // OGLPLUS_TEXGEN_INTERLACE_NODE_HPP
value_type
Value tree value element data type enumeration.
Definition: interface.hpp:27
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
static constexpr auto rows(const matrix< T, C, R, RM, V > &) noexcept
Returns then number of matrix rows.
Definition: matrix.hpp:87

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).