Class Scene#
Defined in File Scene.h
Class Documentation#
-
class Scene#
MooViE scene.
Scene class represents a MooViE scene. It is initially drawn and every alteration will require an update to be persistent.
- Author
beyss
- Date
28.08.2017
Public Functions
-
Scene()#
Creates a new MooViE Scene and draws it immediately. It is required to first initialize a Configuration.
-
void update(void)#
Reinitializes all components and redraws the MooViE scene.
-
std::vector<DefVariable> get_input_variables() const#
Returns the current input variables of this MooViE scene. Needs to be called again if Scene was altered.
- Returns:
the input variables
-
std::vector<DefVariable> get_output_variables() const#
Returns the current output variables of this MooViE scene. Needs to be called again if Scene was altered.
- Returns:
the output variables
-
void toggle_input(std::size_t index, bool mode)#
Enables/disables the input with the given index. The scene needs to be updated afterwards.
- Parameters:
index – the input index
mode – set enabled or disabled
- Throws:
out_of_bounds – if index is incorrect
-
void toggle_output(std::size_t index, bool mode)#
Enables/disables the output with the given index. The scene needs to be updated afterwards.
- Parameters:
index – the output index
mode – set enabled or disabled
- Throws:
out_of_bounds – if index is incorrect
-
void swap_inputs(std::size_t from_index, std::size_t to_index)#
Rearranges the order of inputs in this MooViE scene by swapping the inputs with the given indices. The scene needs to be updated afterwards.
- Parameters:
from_index – the first inputs index
to_index – the second inputs index
- Throws:
out_of_bounds – if indices are incorrect
-
void swap_outputs(std::size_t from_index, std::size_t to_index)#
Rearranges the order of outputs in this MooViE scene by swapping the outputs with the given indices. The scene needs to be updated afterwards.
- Parameters:
from_index – the first outputs index
to_index – the second outputs index
- Throws:
out_of_bounds – if indices are incorrect
-
void restrict_input(std::size_t index, double lower_restr, double upper_restr)#
Restricts the input with given index to a given interval. Every row whose associated input value is not in the interval will be disabled. The scene needs to be updated afterwards.
- Parameters:
index – the input index
lower_restr – the lower bound
upper_restr – the upper bound
-
void restrict_output(std::size_t index, double lower_restr, double upper_restr)#
Restricts the output with given index to a given interval. Every row whose associated output value is not in the interval will be disabled. The scene needs to be updated afterwards.
- Parameters:
index – the output index
lower_restr – the lower bound
upper_restr – the upper bound
-
void save_data(std::string file_path)#
Save possibly altered data at given location in the file system.
- Parameters:
file_path – valid file system location