improve grid panel

This commit is contained in:
2019-01-19 15:21:37 +01:00
parent 886ab1f29b
commit d8c8a4b7ed
7 changed files with 100 additions and 30 deletions

View File

@@ -38,7 +38,7 @@ public:
NodeSliderH* m_groud_opacity;
NodeSliderH* m_groud_value;
NodeSliderH* m_groud_resolution;
NodeComboBox* m_groud_resolution;
NodeSliderH* m_groud_offset;
NodeImageTexture* m_hm_preview;
NodeButton* m_hm_load;
@@ -47,8 +47,11 @@ public:
NodeComboBox* m_hm_shading;
NodeSliderH* m_hm_height;
NodeSliderH* m_hm_wireframe;
NodeSliderH* m_hm_thickness;
NodeSliderH* m_hm_lyaw;
NodeSliderH* m_hm_lpitch;
NodeComboBox* m_hm_texres;
NodeComboBox* m_hm_samples;
NodeButton* m_render;
NodeButton* m_commit;
HeightmapPlane m_hm_plane;
@@ -61,11 +64,17 @@ public:
nanort::BVHAccel<float> m_rt_accel;
bool m_rt_dirty = true;;
ShadeMode m_shade_mode{ ShadeMode::Transparent };
GLfloat m_line_range[2];
GLfloat m_line_granularity;
virtual Node* clone_instantiate() const override;
virtual void clone_finalize(Node* dest) const override;
virtual void init() override;
void init_controls();
int get_samples() const;
int get_texres() const;
float get_thickness() const;
float get_resolution() const;
float get_height() const;
float get_offset() const;
void draw_heightmap(const glm::mat4& proj, const glm::mat4& camera) const;