cgv
|
configuration information stored per domain axis More...
#include <axis_config.h>
Public Member Functions | |
float | get_attribute_min () const |
read access to attrbribute minimum value | |
float | get_attribute_max () const |
read access to attrbribute maximum value | |
void | put_backup_attribute_range (float &min_val, float &max_val) const |
read access to backup attribute range | |
float | get_attribute_extent () const |
compute the extent in attribute space | |
bool | get_log_scale () const |
read access to log scale flag | |
float | get_log_minimum () const |
read access to minimum attribute value for robust log transformation | |
void | set_attribute_range (float _min, float _max) |
write access to attribute range | |
void | backup_attribute_range () |
store current range in backup members | |
void | restore_attribute_range () |
store current range from backup members | |
void | set_attribute_minimum (float _min) |
write access to attribute minimum value | |
void | set_attribute_maximum (float _max) |
write access to attribute maximum value | |
void | set_log_scale (bool enabled) |
write access to log scale flag | |
void | set_log_minimum (float _min) |
write access to minimum attribute value for robust log transformation | |
void | set_log_config (bool enabled, float _min) |
write access to log scale flag and minimum | |
bool | operator== (const axis_config &ac) const |
compare members relevant for drawing geometry precomputation for equality | |
float | tick_space_from_attribute_space (float value) const |
perform transformation from attribute space to tick mark space by applying log transformation if activated | |
float | window_space_from_tick_space (float value) const |
float | tick_space_from_window_space (float value) const |
float | attribute_space_from_tick_space (float value) const |
float | plot_space_from_window_space (float value) const |
convert from window to plot space | |
float | window_space_from_plot_space (float value) const |
convert from plot to window space | |
float | plot_space_from_attribute_space (float value) const |
convenience function | |
float | attribute_space_from_plot_space (float value) const |
convenience function | |
axis_config () | |
set default values | |
void | adjust_tick_marks_to_range (unsigned max_nr_secondary_ticks) |
adjust tick marks to attribute range based on given maximum number of secondary ticks | |
void | create_gui (cgv::base::base *bp, cgv::gui::provider &p) |
create gui for axis | |
Public Attributes | |
std::string | name |
name of axis | |
float | extent |
extent in world space | |
float | extent_scaling |
potential constraint for scaling of plot extent in world space | |
float | line_width |
line width | |
rgb | color |
color of axis | |
bool | multi_axis_ticks |
whether to show tick marks on both axes boundaries | |
tick_config | primary_ticks |
configuration of primary tickmarks | |
tick_config | secondary_ticks |
configuration of secondary tickmarks | |
Protected Attributes | |
float | min_attribute_value |
minimum attribute value | |
float | max_attribute_value |
maximum attribute value | |
bool | log_scale |
whether axis is drawn with logarithmic scale | |
float | log_minimum |
minimum of logarithmic value in case that 0 is included in attribute range | |
unsigned | auto_adjust_max_snd_ticks |
maximum number of secondary ticks for auto adjustment of ticks on changes to attribute range | |
configuration information stored per domain axis
Definition at line 44 of file axis_config.h.
cgv::plot::axis_config::axis_config | ( | ) |
set default values
Definition at line 172 of file axis_config.cxx.
References auto_adjust_max_snd_ticks, extent, extent_scaling, line_width, log_minimum, log_scale, max_attribute_value, min_attribute_value, and multi_axis_ticks.
void cgv::plot::axis_config::adjust_tick_marks_to_range | ( | unsigned | max_nr_secondary_ticks | ) |
adjust tick marks to attribute range based on given maximum number of secondary ticks
Definition at line 186 of file axis_config.cxx.
References get_attribute_max(), get_attribute_min(), primary_ticks, secondary_ticks, cgv::plot::tick_config::step, and tick_space_from_attribute_space().
float cgv::plot::axis_config::attribute_space_from_plot_space | ( | float | value | ) | const |
convenience function
Definition at line 139 of file axis_config.cxx.
References window_space_from_plot_space().
float cgv::plot::axis_config::attribute_space_from_tick_space | ( | float | value | ) | const |
Definition at line 97 of file axis_config.cxx.
void cgv::plot::axis_config::backup_attribute_range | ( | ) |
store current range in backup members
Definition at line 39 of file axis_config.cxx.
References max_attribute_value, and min_attribute_value.
void cgv::plot::axis_config::create_gui | ( | cgv::base::base * | bp, |
cgv::gui::provider & | p | ||
) |
create gui for axis
Definition at line 208 of file axis_config.cxx.
References cgv::gui::provider::add_member_control(), cgv::gui::provider::align(), auto_adjust_max_snd_ticks, cgv::gui::provider::begin_tree_node(), color, cgv::gui::provider::end_tree_node(), extent, extent_scaling, line_width, log_minimum, log_scale, max_attribute_value, min_attribute_value, multi_axis_ticks, name, primary_ticks, and secondary_ticks.
|
inline |
compute the extent in attribute space
Definition at line 76 of file axis_config.h.
|
inline |
read access to attrbribute maximum value
Definition at line 72 of file axis_config.h.
Referenced by adjust_tick_marks_to_range().
|
inline |
read access to attrbribute minimum value
Definition at line 70 of file axis_config.h.
Referenced by adjust_tick_marks_to_range().
|
inline |
read access to minimum attribute value for robust log transformation
Definition at line 80 of file axis_config.h.
|
inline |
read access to log scale flag
Definition at line 78 of file axis_config.h.
bool cgv::plot::axis_config::operator== | ( | const axis_config & | ac | ) | const |
compare members relevant for drawing geometry precomputation for equality
Definition at line 166 of file axis_config.cxx.
References log_minimum, log_scale, primary_ticks, and secondary_ticks.
float cgv::plot::axis_config::plot_space_from_attribute_space | ( | float | value | ) | const |
convenience function
Definition at line 135 of file axis_config.cxx.
References plot_space_from_window_space(), and tick_space_from_attribute_space().
float cgv::plot::axis_config::plot_space_from_window_space | ( | float | value | ) | const |
convert from window to plot space
Definition at line 127 of file axis_config.cxx.
References extent.
Referenced by plot_space_from_attribute_space().
void cgv::plot::axis_config::put_backup_attribute_range | ( | float & | min_val, |
float & | max_val | ||
) | const |
read access to backup attribute range
Definition at line 46 of file axis_config.cxx.
void cgv::plot::axis_config::restore_attribute_range | ( | ) |
store current range from backup members
Definition at line 53 of file axis_config.cxx.
References set_attribute_range().
void cgv::plot::axis_config::set_attribute_maximum | ( | float | _max | ) |
write access to attribute maximum value
Definition at line 63 of file axis_config.cxx.
References max_attribute_value.
void cgv::plot::axis_config::set_attribute_minimum | ( | float | _min | ) |
write access to attribute minimum value
Definition at line 58 of file axis_config.cxx.
References min_attribute_value.
void cgv::plot::axis_config::set_attribute_range | ( | float | _min, |
float | _max | ||
) |
write access to attribute range
Definition at line 31 of file axis_config.cxx.
References max_attribute_value, and min_attribute_value.
Referenced by restore_attribute_range().
void cgv::plot::axis_config::set_log_config | ( | bool | enabled, |
float | _min | ||
) |
write access to log scale flag and minimum
Definition at line 80 of file axis_config.cxx.
References log_minimum, and log_scale.
void cgv::plot::axis_config::set_log_minimum | ( | float | _min | ) |
write access to minimum attribute value for robust log transformation
Definition at line 73 of file axis_config.cxx.
References log_minimum.
void cgv::plot::axis_config::set_log_scale | ( | bool | enabled | ) |
float cgv::plot::axis_config::tick_space_from_attribute_space | ( | float | value | ) | const |
perform transformation from attribute space to tick mark space by applying log transformation if activated
Definition at line 87 of file axis_config.cxx.
References log_minimum, and log_scale.
Referenced by adjust_tick_marks_to_range(), and plot_space_from_attribute_space().
float cgv::plot::axis_config::tick_space_from_window_space | ( | float | value | ) | const |
Definition at line 117 of file axis_config.cxx.
float cgv::plot::axis_config::window_space_from_plot_space | ( | float | value | ) | const |
convert from plot to window space
Definition at line 131 of file axis_config.cxx.
References extent.
Referenced by attribute_space_from_plot_space().
float cgv::plot::axis_config::window_space_from_tick_space | ( | float | value | ) | const |
Definition at line 107 of file axis_config.cxx.
|
protected |
maximum number of secondary ticks for auto adjustment of ticks on changes to attribute range
Definition at line 65 of file axis_config.h.
Referenced by axis_config(), and create_gui().
rgb cgv::plot::axis_config::color |
float cgv::plot::axis_config::extent |
extent in world space
Definition at line 98 of file axis_config.h.
Referenced by axis_config(), create_gui(), plot_space_from_window_space(), and window_space_from_plot_space().
float cgv::plot::axis_config::extent_scaling |
potential constraint for scaling of plot extent in world space
if 0, axis scaling is not constraint (default) if > 0 ensure that world extents of all axes where constraint is > 0 are in same ratio as extent_scaling values
Definition at line 102 of file axis_config.h.
Referenced by axis_config(), and create_gui().
float cgv::plot::axis_config::line_width |
line width
Definition at line 104 of file axis_config.h.
Referenced by axis_config(), and create_gui().
|
protected |
minimum of logarithmic value in case that 0 is included in attribute range
Definition at line 63 of file axis_config.h.
Referenced by axis_config(), create_gui(), operator==(), set_log_config(), set_log_minimum(), and tick_space_from_attribute_space().
|
protected |
whether axis is drawn with logarithmic scale
Definition at line 61 of file axis_config.h.
Referenced by axis_config(), create_gui(), operator==(), set_log_config(), set_log_scale(), and tick_space_from_attribute_space().
|
protected |
maximum attribute value
Definition at line 59 of file axis_config.h.
Referenced by axis_config(), backup_attribute_range(), create_gui(), set_attribute_maximum(), and set_attribute_range().
|
protected |
minimum attribute value
Definition at line 57 of file axis_config.h.
Referenced by axis_config(), backup_attribute_range(), create_gui(), set_attribute_minimum(), and set_attribute_range().
bool cgv::plot::axis_config::multi_axis_ticks |
whether to show tick marks on both axes boundaries
Definition at line 108 of file axis_config.h.
Referenced by axis_config(), and create_gui().
std::string cgv::plot::axis_config::name |
tick_config cgv::plot::axis_config::primary_ticks |
configuration of primary tickmarks
Definition at line 110 of file axis_config.h.
Referenced by adjust_tick_marks_to_range(), create_gui(), and operator==().
tick_config cgv::plot::axis_config::secondary_ticks |
configuration of secondary tickmarks
Definition at line 112 of file axis_config.h.
Referenced by adjust_tick_marks_to_range(), create_gui(), and operator==().