Tatooine
autonomous_particles_flowmap_evaluator.h
Go to the documentation of this file.
1#ifndef TATOOINE_FLOWEXPLORER_NODES_AUTONOMOUS_PARTICLES_FLOWMAP_EVALUATOR_H
2#define TATOOINE_FLOWEXPLORER_NODES_AUTONOMOUS_PARTICLES_FLOWMAP_EVALUATOR_H
3//==============================================================================
6#include <tatooine/flowexplorer/point_shader.h>
9//==============================================================================
11//==============================================================================
13 : renderable<autonomous_particles_flowmap_evaluator> {
14 static std::vector<std::string> const items;
16
18 position<2>* m_x0 = nullptr;
19 bool m_is_evaluatable = false;
20 unsigned int m_current_item = 0;
21
24 int m_pointsize = 1;
25 std::array<GLfloat, 4> m_color{0.0f, 0.0f, 0.0f, 1.0f};
26 //----------------------------------------------------------------------------
28 //----------------------------------------------------------------------------
30 //============================================================================
31 auto draw_properties() -> bool override;
32 //----------------------------------------------------------------------------
33 auto render(mat<GLfloat, 4, 4> const& projection_matrix,
34 mat<GLfloat, 4, 4> const& view_matrix) -> void override;
35 //----------------------------------------------------------------------------
36 auto on_pin_connected(ui::input_pin& this_pin, ui::output_pin& other_pin)
37 -> void override;
38 //----------------------------------------------------------------------------
39 auto on_property_changed() -> void override;
40 //----------------------------------------------------------------------------
41 auto evaluate() -> void;
42 //----------------------------------------------------------------------------
43 auto on_mouse_drag(int /*offset_x*/, int /*offset_y*/) -> bool override {
44 return false;
45 }
46 //----------------------------------------------------------------------------
47 auto set_vbo_data() -> void;
48 auto create_indexed_data() -> void;
49 //----------------------------------------------------------------------------
50 auto is_transparent() const -> bool override { return m_color[3] < 1; }
51 };
52//==============================================================================
53} // namespace tatooine::flowexplorer::nodes
54//==============================================================================
57 TATOOINE_REFLECTION_INSERT_METHOD(point_size, m_pointsize),
58 TATOOINE_REFLECTION_INSERT_METHOD(color, m_color),
59 TATOOINE_REFLECTION_INSERT_METHOD(current_item, m_current_item))
60#endif
Definition: indexeddata.h:13
TATOOINE_FLOWEXPLORER_REGISTER_RENDERABLE(tatooine::flowexplorer::nodes::aabb2d, TATOOINE_REFLECTION_INSERT_GETTER(min), TATOOINE_REFLECTION_INSERT_GETTER(max), TATOOINE_REFLECTION_INSERT_GETTER(line_width), TATOOINE_REFLECTION_INSERT_GETTER(line_color))
Definition: abcflow.h:7
Definition: autonomous_particles_flowmap_evaluator.h:13
position< 2 > * m_x0
Definition: autonomous_particles_flowmap_evaluator.h:18
int m_pointsize
Definition: autonomous_particles_flowmap_evaluator.h:24
auto is_transparent() const -> bool override
Definition: autonomous_particles_flowmap_evaluator.h:50
vec2 m_x1
Definition: autonomous_particles_flowmap_evaluator.h:22
unsigned int m_current_item
Definition: autonomous_particles_flowmap_evaluator.h:20
auto render(mat< GLfloat, 4, 4 > const &projection_matrix, mat< GLfloat, 4, 4 > const &view_matrix) -> void override
autonomous_particles_flowmap * m_flowmap
Definition: autonomous_particles_flowmap_evaluator.h:17
gl::indexeddata< gpu_vec > m_gpu_data
Definition: autonomous_particles_flowmap_evaluator.h:23
bool m_is_evaluatable
Definition: autonomous_particles_flowmap_evaluator.h:19
std::array< GLfloat, 4 > m_color
Definition: autonomous_particles_flowmap_evaluator.h:25
auto on_mouse_drag(int, int) -> bool override
Definition: autonomous_particles_flowmap_evaluator.h:43
auto on_pin_connected(ui::input_pin &this_pin, ui::output_pin &other_pin) -> void override
static std::vector< std::string > const items
Definition: autonomous_particles_flowmap_evaluator.h:14
Definition: autonomous_particles_flowmap.h:11
Definition: renderable.h:42
Definition: scene.h:17
Definition: mat.h:14
Definition: vec.h:12