Go to the documentation of this file. 1 #ifndef OGLPLUS_TEXGEN_MIX_NODE_HPP
9 #define OGLPLUS_TEXGEN_MIX_NODE_HPP
14 namespace eagine::oglp::texgen {
16 class mix_output :
public base_output {
18 input_with_const_default<float[4]>
zero;
19 input_with_const_default<float[4]> one;
20 input_with_const_default<float[1]> value;
22 mix_output(node_intf& parent);
28 std::ostream& definitions(std::ostream& out, compile_context& ctxt)
override;
31 class mix_node :
public single_output_node<mix_output> {
33 mix_node& set_zero(
float x,
float y,
float z,
float w) {
34 _output.zero.fallback().set(x, y, z, w);
38 mix_node& set_one(
float x,
float y,
float z,
float w) {
39 _output.one.fallback().set(x, y, z, w);
43 mix_node& set_value(
float v) {
44 _output.value.fallback().set(v);
55 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY)
56 #include <oglplus/texgen/mix_node.inl>
59 #endif // OGLPLUS_TEXGEN_MIX_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
static auto zero(basic_span< T, P, S > spn) -> std::enable_if_t< std::is_integral_v< T >||std::is_floating_point_v< T >, basic_span< T, P, S >>
Fills a span with zero value of type T.
Definition: span_algo.hpp:548