cgv
Loading...
Searching...
No Matches
cgv::plot::axis_config Class Reference

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
 

Detailed Description

configuration information stored per domain axis

Definition at line 44 of file axis_config.h.

Constructor & Destructor Documentation

◆ axis_config()

cgv::plot::axis_config::axis_config ( )

Member Function Documentation

◆ adjust_tick_marks_to_range()

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().

◆ attribute_space_from_plot_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().

◆ attribute_space_from_tick_space()

float cgv::plot::axis_config::attribute_space_from_tick_space ( float  value) const

Definition at line 97 of file axis_config.cxx.

◆ backup_attribute_range()

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.

◆ create_gui()

◆ get_attribute_extent()

float cgv::plot::axis_config::get_attribute_extent ( ) const
inline

compute the extent in attribute space

Definition at line 76 of file axis_config.h.

◆ get_attribute_max()

float cgv::plot::axis_config::get_attribute_max ( ) const
inline

read access to attrbribute maximum value

Definition at line 72 of file axis_config.h.

Referenced by adjust_tick_marks_to_range().

◆ get_attribute_min()

float cgv::plot::axis_config::get_attribute_min ( ) const
inline

read access to attrbribute minimum value

Definition at line 70 of file axis_config.h.

Referenced by adjust_tick_marks_to_range().

◆ get_log_minimum()

float cgv::plot::axis_config::get_log_minimum ( ) const
inline

read access to minimum attribute value for robust log transformation

Definition at line 80 of file axis_config.h.

◆ get_log_scale()

bool cgv::plot::axis_config::get_log_scale ( ) const
inline

read access to log scale flag

Definition at line 78 of file axis_config.h.

◆ operator==()

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.

◆ plot_space_from_attribute_space()

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().

◆ plot_space_from_window_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().

◆ put_backup_attribute_range()

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.

◆ restore_attribute_range()

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().

◆ set_attribute_maximum()

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.

◆ set_attribute_minimum()

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.

◆ set_attribute_range()

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().

◆ set_log_config()

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.

◆ set_log_minimum()

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.

◆ set_log_scale()

void cgv::plot::axis_config::set_log_scale ( bool  enabled)

write access to log scale flag

Definition at line 68 of file axis_config.cxx.

References log_scale.

◆ tick_space_from_attribute_space()

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().

◆ tick_space_from_window_space()

float cgv::plot::axis_config::tick_space_from_window_space ( float  value) const

Definition at line 117 of file axis_config.cxx.

◆ window_space_from_plot_space()

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().

◆ window_space_from_tick_space()

float cgv::plot::axis_config::window_space_from_tick_space ( float  value) const

Definition at line 107 of file axis_config.cxx.

Member Data Documentation

◆ auto_adjust_max_snd_ticks

unsigned cgv::plot::axis_config::auto_adjust_max_snd_ticks
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().

◆ color

rgb cgv::plot::axis_config::color

color of axis

Definition at line 106 of file axis_config.h.

Referenced by create_gui().

◆ extent

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().

◆ extent_scaling

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().

◆ line_width

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().

◆ log_minimum

float cgv::plot::axis_config::log_minimum
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().

◆ log_scale

bool cgv::plot::axis_config::log_scale
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().

◆ max_attribute_value

float cgv::plot::axis_config::max_attribute_value
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().

◆ min_attribute_value

float cgv::plot::axis_config::min_attribute_value
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().

◆ multi_axis_ticks

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().

◆ name

std::string cgv::plot::axis_config::name

name of axis

Definition at line 68 of file axis_config.h.

Referenced by create_gui().

◆ primary_ticks

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==().

◆ secondary_ticks

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==().


The documentation for this class was generated from the following files: