Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
segmentation.hpp
Go to the documentation of this file.
1/*
2 SEGMENTATION.hpp - Partitioning of a timeline for organising the render graph.
3
4 Copyright (C)
5 2023, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12*/
13
14
36#ifndef STEAM_FIXTURE_SEGMENTATION_H
37#define STEAM_FIXTURE_SEGMENTATION_H
38
39
43#include "lib/format-string.hpp"
44#include "lib/nocopy.hpp"
45
46#include <list>
47#include <optional>
48#include <functional>
49
50
51namespace steam {
52namespace fixture {
53
54 namespace error = lumiera::error;
55
56 using std::list;
58 using util::_Fmt;
59
60 using OptTime = std::optional<lib::time::Time>;
61
77 {
79 list<Segment> segments_;
80
81 protected:
83 : segments_{1}
84 { }
85
86 public:
87 virtual ~Segmentation();
88
89 size_t
90 size() const
91 {
92 return segments_.size();
93 }
94
95 Segment const&
97 {
98 for (auto& seg : segments_)
99 if (seg.after() > time)
100 return seg;
101 throw error::State (_Fmt{"Fixture datastructure corrupted: Time %s not covered"} % time);
102 }
103
104 auto
105 eachSeg() const
106 {
108 }
109
110
112 Segment const&
113 splitSplice (OptTime start, OptTime after, engine::ExitNodes&& modelLink =ExitNodes{});
114
115
116 protected:
118 void
120 {
121 for (fixture::Segment& seg : segments_)
122 seg.exitNode = move(rewrite (seg.exitNode));
123 }
124 };
125
126
127
128}} // namespace steam::fixture
129#endif /*STEAM_FIXTURE_SEGMENTATION_H*/
basic constant internal time value.
Binding and access point from a given Segment to access the actual render nodes.
For the purpose of building and rendering, the fixture (for each timeline) is partitioned such that e...
Definition segment.hpp:60
For the purpose of building and rendering, the fixture (for each timeline) is partitioned such that e...
list< Segment > segments_
segments of the engine in ordered sequence.
Segment const & splitSplice(OptTime start, OptTime after, engine::ExitNodes &&modelLink=ExitNodes{})
rework the existing Segmentation to include a new Segment as specified
virtual ~Segmentation()
this is an interface
void adaptSpecification(std::function< NodeGraphAttachment(NodeGraphAttachment const &)> rewrite)
Segment const & operator[](TimeValue time) const
Any copy and copy construction prohibited.
Definition nocopy.hpp:38
A front-end for using printf-style formatting.
Front-end for printf-style string template interpolation.
Preconfigured adapters for some STL container standard usage situations.
_SeqT< CON >::Range eachElm(CON &coll)
LumieraError< LERR_(STATE)> State
Definition error.hpp:209
std::deque< engine::ExitNode > ExitNodes
Definition exit-node.hpp:43
std::optional< lib::time::Time > OptTime
Steam-Layer implementation namespace root.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Building block of the backbone of the low-level (render node) model.
a family of time value like entities and their relationships.