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

reboxed.hpp
Go to the documentation of this file.
1 
9 #ifndef EAGINE_SHAPES_REBOXED_HPP
10 #define EAGINE_SHAPES_REBOXED_HPP
11 
12 #include "delegated.hpp"
13 #include <eagine/config/basic.hpp>
14 #include <utility>
15 
16 namespace eagine {
17 namespace shapes {
18 //------------------------------------------------------------------------------
22 class reboxed_gen : public delegated_gen {
23 
24 public:
25  reboxed_gen(std::shared_ptr<generator> gen) noexcept
26  : delegated_gen{std::move(gen)} {}
27 
28  void attrib_values(vertex_attrib_variant, span<float>) override;
29 };
30 //------------------------------------------------------------------------------
33 static inline auto rebox(std::shared_ptr<generator> gen) noexcept {
34  return std::make_unique<reboxed_gen>(std::move(gen));
35 }
36 //------------------------------------------------------------------------------
37 
38 } // namespace shapes
39 } // namespace eagine
40 
41 #if !EAGINE_LINK_LIBRARY || defined(EAGINE_IMPLEMENTING_LIBRARY)
42 #include <eagine/shapes/reboxed.inl>
43 #endif
44 
45 #endif // EAGINE_SHAPES_REBOXED_HPP
Common code is placed in this namespace.
Definition: eagine.hpp:21
Generator modifier recalculating the vertex box coords values.
Definition: reboxed.hpp:22
Class designating an vertex attribute variant in a shape generator.
Definition: vertex_attrib.hpp:104
static auto rebox(std::shared_ptr< generator > gen) noexcept
Constructs instances of reboxed_gen modifier.
Definition: reboxed.hpp:33
void attrib_values(vertex_attrib_variant, span< float >) override
Fetches the vertex attribute data for the specified variant as floats.
Base class for delegating shape generators based on other generators.
Definition: delegated.hpp:21

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