Rumba C++ SDK
EvaluationEngine.h
Go to the documentation of this file.
1 /*
2 
3  *
4  ***
5  *****
6  ********************* Mercenaries Engineering SARL
7  ***************** Copyright (C) 2020
8  *************
9  ********* http://www.mercenaries-engineering.com
10  ***********
11  **** ****
12  ** **
13 
14 */
15 
16 #pragma once
17 
18 #include <gsl/span>
19 #include <functional>
20 
21 #include "Value.h"
22 
23 namespace maquina
24 {
25 
26 class Plug;
27 class Impl;
28 
31 {
32 public:
33  static std::shared_ptr<EvaluationEngine> create();
34 
36 
44  virtual void start(const Plug& plug, int32_t eval_first_frame, int32_t eval_last_frame, int32_t cache_first_frame, int32_t cache_last_frame) = 0;
45 
47 
48  virtual void stop_and_wait() = 0;
49 
51  virtual void wait() = 0;
52 
54  virtual bool done() const = 0;
55 
57  virtual float progression() const = 0;
58 
60 
62  virtual void set_notification(const std::function<void()>& notify) = 0;
63 
65  virtual Value evaluate_rest_value(const Plug& plug, int32_t cache_first_frame, int32_t cache_last_frame) = 0;
66 
68 
78  virtual Value evaluate(const Plug& plug, float time, int32_t cache_first_frame, int32_t cache_last_frame, bool incremental = false, bool exact = true) = 0;
79 
81 
85  virtual Value evaluate(const Plug& plug, float time, const gsl::span<const float>& subframes, int32_t cache_first_frame, int32_t cache_last_frame, bool incremental = false, bool exact = true) = 0;
86 
88 
93  virtual std::vector<Value> evaluate(const maquina::Plug& plug, const gsl::span<const float>& frames, int32_t cache_first_frame, int32_t cache_last_frame, bool incremental=false, bool exact=false) = 0;
94 
96  virtual void clear_incremental(uint32_t initial_token) = 0;
97 
99  virtual void start_profiling() = 0;
100 
102  virtual void clear_profiling() = 0;
103 
105  virtual std::vector<std::pair<std::string, Imath::V2f>> end_profiling() = 0;
106 };
107 
108 }
This version of the SDK is unstable, i-e, it may change with no warning.
Definition: AddCurveAction.h:20
An evaluation engine to compute plug values.
Definition: EvaluationEngine.h:30
MAQUINA_EXPORT void start_profiling()
Start an interactive profiling session.
MAQUINA_EXPORT std::vector< std::pair< std::string, Imath::V2f > > end_profiling()
Stop the interactive profiling session.
#define MAQUINA_EXPORT
Definition: Export.h:31
A node plug.
Definition: Plug.h:59
MAQUINA_EXPORT void clear_profiling()
Clear the profiling session data.
Base class of all Rumba values.
Definition: Value.h:34