1#ifndef TATOOINE_FLOWEXPLORER_NODES_VTK_LINE_READER_H
2#define TATOOINE_FLOWEXPLORER_NODES_VTK_LINE_READER_H
6#include <tatooine/flowexplorer/line_shader.h>
38 auto& shader = line_shader::get();
42 shader.set_projection_matrix(P);
43 shader.set_modelview_matrix(V);
53 auto update(std::chrono::duration<double>
const& ) ->
void override {}
57 if (ImGui::Button(
"open")) {
58 scene().window().open_file_explorer(
59 "open vtk line", std::vector{
".vtk"}, *
this);
62 if (ImGui::Button(
"reload")) {
65 changed |= ImGui::SliderInt(
"line width", &
m_line_width, 1, 50);
66 changed |= ImGui::ColorEdit4(
"line color",
m_line_color.data());
79 bool insert_seg =
false;
84 static_cast<GLfloat
>(y(1)),
85 static_cast<GLfloat
>(y(2))});
102 TATOOINE_REFLECTION_INSERT_METHOD(path, path()))
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))
DLL_API auto line_width(GLfloat width) -> void
Definition: vtk_line_reader.h:15
auto path() const -> auto const &
Definition: vtk_line_reader.h:51
auto read() -> void
Definition: vtk_line_reader.h:75
gl::indexeddata< vec3f > m_gpu_data
Definition: vtk_line_reader.h:19
auto path() -> auto &
Definition: vtk_line_reader.h:50
auto is_transparent() const -> bool override
Definition: vtk_line_reader.h:95
auto draw_properties() -> bool override
Definition: vtk_line_reader.h:55
line< real_type, 3 > m_line3
Definition: vtk_line_reader.h:20
std::string m_path
Definition: vtk_line_reader.h:24
int m_line_width
Definition: vtk_line_reader.h:26
vtk_line_reader(flowexplorer::scene &s)
Definition: vtk_line_reader.h:32
auto render(mat4f const &P, mat4f const &V) -> void override
Definition: vtk_line_reader.h:37
std::array< GLfloat, 4 > m_line_color
Definition: vtk_line_reader.h:25
auto update(std::chrono::duration< double > const &) -> void override
Definition: vtk_line_reader.h:53
auto on_path_selected(std::string const &path) -> void override
Definition: vtk_line_reader.h:70
Definition: renderable.h:42
auto scene() const -> auto const &
Definition: node.h:72
auto vertices() const
Definition: line.h:250
static auto read_vtk(std::string const &filepath)
Definition: line.h:626