40 #ifndef H_OGF_VOXEL_SHADERS_VOXEL_GROB_SHADER_H
41 #define H_OGF_VOXEL_SHADERS_VOXEL_GROB_SHADER_H
43 #include <OGF/voxel_gfx/common/common.h>
61 class RenderingContext;
68 gom_attribute(
abstract,
"true")
99 std::string get_displayable_attributes()
const {
101 if(voxel_grob() !=
nullptr) {
102 result = voxel_grob()->get_displayable_attributes();
167 void set_attribute_min(
double value) {
168 attribute_min_ = value;
178 return attribute_min_;
187 attribute_max_ = value;
197 return attribute_max_;
204 gom_attribute(handler,
"combo_box")
205 gom_attribute(values, "$displayable_attributes")
206 void set_attribute(const std::
string& value);
212 const std::
string& get_attribute()
const {
213 return attribute_name_;
221 colormap_style_ = value;
222 colormap_texture_.reset();
227 return colormap_style_;
310 double attribute_min,
311 double attribute_max,
322 std::string attribute_name_;
323 double attribute_min_;
324 double attribute_max_;
The default implementation of VoxelGrobShader.
const EdgeStyle & get_box_style() const
Gets the style used to draw the mesh in the facets and in the cells.
void draw_volume(Texture *colormap_texture, double attribute_min, double attribute_max, index_t repeat)
Draws the volume as a textured hexahedron.
void set_clipping(bool value)
Sets whether clipping should be active.
double get_attribute_max() const
Gets the maximum of the displayed range for attribute values.
~PlainVoxelGrobShader() override
PlainVoxelGrobShader destructor.
bool get_lighting() const
Gets whether lighting is used.
PlainVoxelGrobShader(VoxelGrob *grob)
PlainVoxelGrobShader constructor.
bool get_clipping() const
Gets whether clipping should be used.
double get_attribute_min() const
Gets the minimum of the displayed range for attribute values.
void draw() override
Draws the Grob.
public::public::void autorange()
Sets the displayed attribute range automatically.
void set_colormap(const ColormapStyle &value)
Sets the colormap used to display attributes.
void set_box_style(const EdgeStyle &value)
Sets the style used to draw the mesh in the facets and in the cells.
void draw_wireframe_box()
Draws the bounding box in wireframe.
void pick_object(index_t object_id) override
Draws the Grob in picking mode.
update()
Redraws the scene.
void set_attribute_max(double value)
Sets the maximum of the displayed range for attribute values.
void blink() override
Draws the current object several times, while chaning the value of one graphic attribute (e....
void create_textures_if_needed()
Creates the colormap texture and the attribute texture if they do not exist.
void set_lighting(bool value)
Sets whether lighting should be used.
Base class for Grob shader.
Base class for drawing and picking VoxelGrob.
void draw() override
Draws the Grob.
void pick_object(index_t object_id) override
Draws the Grob in picking mode.
void blink() override
Draws the current object several times, while chaning the value of one graphic attribute (e....
~VoxelGrobShader() override
VoxelGrobShader destructor.
VoxelGrob * voxel_grob() const
Gets the VoxelGrob.
VoxelGrobShader(VoxelGrob *grob)
VoxelGrobShader constructor.
A Grob class for voxel grids.
Global Vorpaline namespace.
geo_index_t index_t
The type for storing and manipulating indices.
Global Graphite namespace.
The base class for all object shaders.
The style used to display colormapped colors.
Drawing style for mesh edges.