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

split_node.hpp
Go to the documentation of this file.
1 #ifndef OGLPLUS_TEXGEN_SPLIT_NODE_HPP
9 #define OGLPLUS_TEXGEN_SPLIT_NODE_HPP
10 
11 #include "base_node.hpp"
12 #include "fallback_input.hpp"
13 #include <eagine/types.hpp>
14 
15 namespace eagine::oglp::texgen {
16 
17 class split_output : public base_output {
18 private:
19  input_with_const_default<float[4]>& _input;
20  span_size_t _index;
21 
22 public:
23  split_output(
24  node_intf& parent,
25  input_with_const_default<float[4]>& input,
26  valid_if_between<span_size_t, 0, 3> index);
27 
28  string_view type_name() override;
29 
30  slot_data_type value_type() override;
31 
32  std::ostream& definitions(std::ostream& out, compile_context& ctxt) override;
33 };
34 
35 class split_node : public base_node {
36 private:
37  input_with_const_default<float[4]> _input;
38  split_output _output_r;
39  split_output _output_g;
40  split_output _output_b;
41  split_output _output_a;
42 
43 public:
44  split_node();
45 
46  string_view type_name() override;
47 
48  span_size_t input_count() override;
49 
50  input_intf& input(span_size_t index) override;
51 
52  span_size_t output_count() override;
53 
54  output_intf& output(span_size_t index) override;
55 };
56 
57 } // namespace eagine::oglp::texgen
58 
59 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY)
60 #include <oglplus/texgen/split_node.inl>
61 #endif
62 
63 #endif // OGLPLUS_TEXGEN_SPLIT_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

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