2008-11-05 05:03:03 +01:00
|
|
|
/*
|
|
|
|
|
SEGMENTATION.hpp - Partitioning of a timeline for organising the render graph.
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2008-11-05 05:03:03 +01:00
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2008, Hermann Vosseler <Ichthyostega@web.de>
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2008-11-05 05:03:03 +01:00
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
|
modify it under the terms of the GNU General Public License as
|
2010-12-17 23:28:49 +01:00
|
|
|
published by the Free Software Foundation; either version 2 of
|
|
|
|
|
the License, or (at your option) any later version.
|
|
|
|
|
|
2008-11-05 05:03:03 +01:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2008-11-05 05:03:03 +01:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2008-11-05 05:03:03 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2016-11-03 18:22:31 +01:00
|
|
|
/** @file segmentation.hpp
|
2017-04-02 04:22:51 +02:00
|
|
|
** Part of the Fixture datastructure to manage time segments of constant structure.
|
|
|
|
|
** The Fixture is result of the build process and separation between high-level and
|
|
|
|
|
** low-level model. It's kind of an effective resulting timeline, and split into segments
|
|
|
|
|
** of constant wiring structure: whenever the processing nodes need to be wired differently
|
|
|
|
|
** for some timespan, we start a new segment of the timeline. This might be for the duration
|
|
|
|
|
** of a clip, or just for the duration of a transition, when the pipes of both clips need to
|
|
|
|
|
** be wired up in parallel.
|
|
|
|
|
**
|
2016-11-09 22:22:55 +01:00
|
|
|
** Within the Fixture, a Segment of the timeline is used as attachment point for all the
|
|
|
|
|
** render nodes relevant for rendering this segment. Thus, the Segmentation defines the
|
|
|
|
|
** index and access datastructure to get at any point of the render node network.
|
|
|
|
|
** Moreover, the segments are used as foundation for render node memory management
|
|
|
|
|
**
|
|
|
|
|
** @todo stalled effort towards a session implementation from 2008
|
|
|
|
|
** @todo 2016 likely to stay, but expect some extensive rework
|
2017-04-02 04:22:51 +02:00
|
|
|
**
|
|
|
|
|
** @see Fixture
|
|
|
|
|
** @see ModelPort
|
2016-11-03 18:20:10 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2023-04-25 18:27:16 +02:00
|
|
|
#ifndef STEAM_FIXTURE_SEGMENTATION_H
|
|
|
|
|
#define STEAM_FIXTURE_SEGMENTATION_H
|
2008-11-05 05:03:03 +01:00
|
|
|
|
|
|
|
|
|
2023-04-25 18:27:16 +02:00
|
|
|
#include "steam/fixture/segment.hpp"
|
2023-04-27 19:38:37 +02:00
|
|
|
#include "lib/nocopy.hpp"
|
2008-11-05 05:03:03 +01:00
|
|
|
|
|
|
|
|
#include <list>
|
|
|
|
|
|
|
|
|
|
using std::list;
|
|
|
|
|
|
|
|
|
|
|
2018-11-15 23:55:13 +01:00
|
|
|
namespace steam {
|
2023-04-25 18:27:16 +02:00
|
|
|
namespace fixture {
|
2011-12-02 16:10:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-04-25 13:40:20 +02:00
|
|
|
* For the purpose of building and rendering, the fixture (for each timeline)
|
|
|
|
|
* is partitioned such that each segment is _structurally constant._
|
|
|
|
|
* The Segmentation defines and maintains this partitioning. Furthermore,
|
2011-12-02 16:10:03 +01:00
|
|
|
* it is the general entry point for accessing the correct part of the engine
|
|
|
|
|
* responsible for a given timeline time point.
|
2023-04-25 18:27:16 +02:00
|
|
|
* @ingroup fixture
|
2011-12-02 16:10:03 +01:00
|
|
|
* @see SegmentationTool actually calculating the Segmentation
|
2012-01-28 23:12:42 +01:00
|
|
|
*
|
|
|
|
|
* @todo 1/2012 Just a Placeholder. The real thing is not yet implemented.
|
2023-04-25 13:40:20 +02:00
|
|
|
* @todo 4/2023 now about to bootstrap into the implementation structure step by step (WIP)
|
2012-01-28 23:12:42 +01:00
|
|
|
* @see http://lumiera.org/wiki/renderengine.html#Fixture
|
2011-12-02 16:10:03 +01:00
|
|
|
*/
|
|
|
|
|
class Segmentation
|
2023-04-27 19:38:37 +02:00
|
|
|
: util::NonCopyable
|
2011-12-02 16:10:03 +01:00
|
|
|
{
|
2023-04-27 19:38:37 +02:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1243 : preliminary implementation
|
2011-12-02 16:10:03 +01:00
|
|
|
|
|
|
|
|
/** segments of the engine in ordered sequence. */
|
|
|
|
|
list<Segment> segments_;
|
|
|
|
|
|
2023-04-25 13:40:20 +02:00
|
|
|
public:
|
|
|
|
|
virtual ~Segmentation(); ///< this is an interface
|
2023-04-27 19:38:37 +02:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
Segmentation() ///< there is always a single cover-all Segment initially
|
|
|
|
|
: segments_{1}
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
size_t
|
|
|
|
|
size() const
|
|
|
|
|
{
|
|
|
|
|
return segments_.size();
|
|
|
|
|
}
|
|
|
|
|
|
2011-12-02 16:10:03 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-25 18:27:16 +02:00
|
|
|
}} // namespace steam::fixture
|
|
|
|
|
#endif /*STEAM_FIXTURE_SEGMENTATION_H*/
|