|
virtual const desc_fields & | node_desc_fields () const |
|
virtual bool | touched () |
|
virtual void | reset_touched () |
|
void | copy_style (const plotter &a_from) |
|
void | reset_style (bool a_geom=false) |
|
void | gopaw_reset_style () |
|
bool | set_from_style (std::ostream &a_out, const style_t &a_style) |
|
bool | set_from_string (std::ostream &a_out, cmaps_t &a_cmaps, const std::string &a_field, const std::string &a_value) |
|
void | set_encoding (const std::string &a_value) |
|
void | set_encoding_none () |
|
void | print_available_customization (std::ostream &a_out) const |
|
virtual void | render (render_action &a_action) |
|
virtual void | pick (pick_action &a_action) |
|
virtual void | search (search_action &a_action) |
|
virtual void | bbox (bbox_action &a_action) |
|
virtual bool | write (write_action &a_action) |
|
| plotter (const base_freetype &a_ttf) |
|
virtual | ~plotter () |
|
| plotter (const plotter &a_from) |
|
plotter & | operator= (const plotter &a_from) |
|
size_t | number_of_plottables () const |
|
void | plotted_object_names (std::vector< std::string > &a_names) const |
|
const torche & | data_light () const |
|
torche & | data_light () |
|
matrix & | tsf () |
|
const separator & | etc_sep () const |
|
separator & | etc_sep () |
|
const std::vector< plottable * > & | plottables () const |
|
void | add_plottable (plottable *a_p) |
|
void | prep_plottable (plottable *a_p) |
|
void | transfer_plottables (std::vector< plottable * > &a_to) |
|
template<class T > |
bool | remove_plottables () |
|
void | add_primitive (plotprim *a_prim) |
|
void | transfer_primitives (std::vector< plotprim * > &a_to) |
|
template<class T > |
void | add_todel (T *a_obj) |
|
template<class T > |
void | remove_todels () |
|
void | transfer_todels (std::vector< node * > &a_to) |
|
void | add_node_todel (node *a_node) |
|
void | clear () |
|
const sg::axis & | x_axis () const |
|
sg::axis & | x_axis () |
|
const sg::axis & | y_axis () const |
|
sg::axis & | y_axis () |
|
const sg::axis & | z_axis () const |
|
sg::axis & | z_axis () |
|
const sg::axis & | colormap_axis () const |
|
sg::axis & | colormap_axis () |
|
text_style & | title_style () |
|
style & | background_style () |
|
style & | wall_style () |
|
style & | inner_frame_style () |
|
style & | grid_style () |
|
text_style & | infos_style () |
|
text_style & | title_box_style () |
|
style & | bins_style (size_t a_index) |
|
style & | errors_style (size_t a_index) |
|
style & | func_style (size_t a_index) |
|
style & | points_style (size_t a_index) |
|
style & | left_hatch_style (size_t a_index) |
|
style & | right_hatch_style (size_t a_index) |
|
style & | legend_style (size_t a_index) |
|
void | bins_modelings (size_t a_index, std::vector< std::string > &a_opts) |
|
bool | xx_2_yy (const vec3f &a_pos, vec3f &a_out) const |
|
bool | data_frame_2_vp (const vec3f &a_pos, vec3f &a_vp) const |
|
bool | vp_2_data_frame (const vec3f &a_vp, vec3f &a_pos) const |
|
bool | data_frame_2_axis (const vec3f &aDF, vec3f &a_pos) const |
|
bool | axis_2_data_frame (const vec3f &a_pos, vec3f &aDF) const |
|
bool | axis_2_vp (const vec3f &a_pos, vec3f &a_vp) const |
|
bool | vp_2_axis (const vec3f &a_vp, vec3f &a_pos) const |
|
void | set_axes_modeling (const std::string &a_v) |
|
void | set_axes_color (const colorf &a_color) |
|
void | set_axes_text_scale (float a_v) |
|
void | set_axes_line_pattern (unsigned short a_v) |
|
void | set_axes_line_width (int a_v) |
|
void | set_axes_tick_length (float a_v) |
|
void | set_axes_title_height (float a_v) |
|
void | set_axes_label_height (float a_v) |
|
void | set_axes_font_modeling (font_modeling a_v) |
|
void | set_font_modeling (font_modeling a_v) |
|
void | update_sg (std::ostream &a_out) |
|
void | get_value_axis_min_max (float a_Sw_mn, float a_Sw_mx, bool a_is_log, float &a_min, float &a_max, bool a_min_visible) |
|
void | update_axes_data (std::ostream &a_out) |
|
void | update_shape () |
|
void | update_axis (std::ostream &a_out, sg::axis &a_axis, data_axis &a_data) |
|
void | update_x_axis_2D () |
|
void | update_y_axis_2D () |
|
void | update_z_axis_2D () |
|
void | update_x_axis_3D () |
|
void | update_y_axis_3D () |
|
void | update_z_axis_3D () |
|
void | update_cmap (std::ostream &a_out, const base_colormap &a_cmap) |
|
void | update_primitives (std::ostream &a_out) |
|
virtual void * | cast (const std::string &a_class) const |
|
virtual const std::string & | s_cls () const =0 |
|
virtual node * | copy () const =0 |
|
virtual unsigned int | cls_version () const |
|
virtual void | get_matrix (get_matrix_action &a_action) |
|
virtual void | event (event_action &) |
|
virtual bool | read (read_action &a_action) |
|
virtual void | is_visible (visible_action &) |
|
virtual void | protocol_one_fields (std::vector< field * > &a_fields) const |
|
virtual bool | draw_in_frame_buffer () const |
|
| node () |
|
virtual | ~node () |
|
void | touch () |
|
field & | field_from_desc (const field_desc &a_desc) const |
|
void | dump_field_descs (std::ostream &a_out) const |
|
field * | find_field_by_name (const std::string &a_name) const |
|
|
bool | s2axis (const std::string &a_s, sg::axis *&a_axis) |
|
void | style_failed (std::ostream &a_out, const std::string &a_key, const std::string &a_value) |
|
void | init_sg () |
|
void | update_layout () |
|
void | update_bins1D_xy (std::ostream &a_out, const bins1D &a_bins, const style &a_data_style, const style &a_left_hatch_style, const style &a_right_hatch_style, const style &a_errors_style, int a_index, bool, const rep_box &a_box_x, const rep_box &a_box_y, float a_zz) |
|
void | update_bins2D_xy (std::ostream &a_out, const bins2D &a_bins, const style &a_data_style, int a_index, const rep_box &a_box_x, const rep_box &a_box_y, const rep_box &a_box_z, float a_zz) |
|
void | update_func1D_xy (std::ostream &a_out, const func1D &a_func, const style &a_style, const rep_box &a_box_x, const rep_box &a_box_y, float a_zz) |
|
void | update_func2D_xy (std::ostream &a_out, const func2D &a_func, int a_index, style &a_data_style, const rep_box &a_box_x, const rep_box &a_box_y, const rep_box &a_box_z, float a_zz) |
|
void | update_points2D_xy (std::ostream &a_out, const points2D &a_points, const style &a_style, const rep_box &a_box_x, const rep_box &a_box_y, float a_zz) |
|
void | update_points3D_xyz (std::ostream &a_out, const points3D &a_points, const style &a_style, const rep_box &a_box_x, const rep_box &a_box_y, const rep_box &a_box_z) |
|
void | get_title (std::string &a_s) |
|
void | update_bins2D_xyz (std::ostream &a_out, const bins2D &a_bins, unsigned int a_index, const style &a_style, const rep_box &a_box_x, const rep_box &a_box_y, const rep_box &a_box_z) |
|
void | update_func2D_xyz (std::ostream &a_out, const func2D &a_func, unsigned int a_index, const style &a_style, const rep_box &a_box_x, const rep_box &a_box_y, const rep_box &a_box_z) |
|
void | update_title () |
|
void | update_title_box () |
|
void | get_infos (std::string &a_s) |
|
matrix * | get_infos_matrix () |
|
sg::infos_box * | get_infos_node () |
|
void | update_infos (std::ostream &) |
|
void | update_legends (std::ostream &a_out) |
|
void | update_background () |
|
void | update_inner_frame_XY () |
|
void | update_inner_frame_XYZ () |
|
void | update_grid_XY () |
|
void | update_grid_XYZ () |
|
void | rep_bins1D_xy_top_lines (const style &a_style, const base_colormap &a_cmap, const std::vector< rep_bin1D > &a_bins, const rep_box &a_box_x, const rep_box &a_box_y, float a_zz) |
|
void | rep_bins1D_xy_points (std::ostream &a_out, const style &a_style, const base_colormap &a_cmap, const std::vector< rep_bin1D > &a_bins, const rep_box &a_box_x, const rep_box &a_box_y, float a_zz) |
|
void | rep_bins1D_xy_boxes (const style &a_style, const base_colormap &a_cmap, const std::vector< rep_bin1D > &a_bins, const rep_box &a_box_x, const rep_box &a_box_y, float a_zz) |
|
void | rep_bins1D_xy_wire_boxes (const style &a_style, const base_colormap &a_cmap, const std::vector< rep_bin1D > &a_bins, const rep_box &a_box_x, const rep_box &a_box_y, float a_zz, bool a_bar_chart) |
|
void | rep_bins1D_xy_lines_one (const style &a_style, const std::vector< rep_bin1D > &a_bins, const rep_box &a_box_x, const rep_box &a_box_y, float a_zz) |
|
void | rep_bins1D_xy_curve_one (std::ostream &a_out, const style &a_style, const std::vector< rep_bin1D > &a_bins, const rep_box &a_box_x, const rep_box &a_box_y, float a_zz) |
|
void | rep_bins2D_xy_box (const style &a_style, const std::vector< rep_bin2D > &a_bins, const rep_box &a_box_x, const rep_box &a_box_y, float a_bmin, float a_bmax, float a_zz) |
|
void | rep_bins2D_xy_wire_box (const style &a_style, const std::vector< rep_bin2D > &a_bins, const rep_box &a_box_x, const rep_box &a_box_y, float a_bmin, float a_bmax, float a_zz) |
|
void | rep_bins2D_xy_solid (const style &a_style, const base_colormap &a_cmap, const std::vector< rep_bin2D > &a_bins, const rep_box &a_box_x, const rep_box &a_box_y, float a_zz) |
|
void | rep_bins2D_xy_random_one (const style &a_style, const std::vector< rep_bin2D > &a_bins, const rep_box &a_box_x, const rep_box &a_box_y, float a_bmin, float a_bmax, float a_zz) |
|
void | rep_bins2D_xy_text (const style &, const std::vector< rep_bin2D > &, const rep_box &, const rep_box &) |
|
void | rep_contour_xy (std::ostream &a_out, const style &a_style, painting_policy a_painting, const base_colormap &a_cmap, clist_contour &a_contour, const rep_box &a_box_x, const rep_box &a_box_y, const rep_box &a_box_z, float a_zz) |
|
void | rep_contour_xy_filled (std::ostream &a_out, const style &a_style, painting_policy a_painting, const base_colormap &a_cmap, clist_contour &a_contour, const rep_box &a_box_x, const rep_box &a_box_y, const rep_box &a_box_z, float a_zz) |
|
void | rep_errors_plus_xy (std::ostream &, const style &a_style, const std::vector< rep_bin1D > &a_bins, const rep_box &a_box_x, const rep_box &a_box_y, const std::vector< float > &a_bars, float aZ) |
|
void | rep_errors_I_xy (std::ostream &, const style &a_style, const std::vector< rep_bin1D > &a_bins, const rep_box &a_box_x, const rep_box &a_box_y, const std::vector< float > &a_bars, float aZ) |
|
void | rep_hatch1D_xy (const style &a_style, const std::vector< rep_bin1D > &a_bins, const rep_box &a_box_x, const rep_box &a_box_y, float a_zz, bool a_bar_chart) |
|
void | rep_points2D_xy_lines (const style &a_style, const points2D &a_points, const rep_box &a_box_x, const rep_box &a_box_y, float a_zz) |
|
void | rep_points2D_xy_curve (std::ostream &a_out, const style &a_style, const points2D &a_points, const rep_box &a_box_x, const rep_box &a_box_y, float a_zz) |
|
void | rep_points2D_xy_points (std::ostream &a_out, const style &a_style, const points2D &a_points, const rep_box &a_box_x, const rep_box &a_box_y, float a_zz) |
|
void | rep_points3D_xyz_points (std::ostream &a_out, const style &a_style, const points3D &a_points, const rep_box &a_box_x, const rep_box &a_box_y, const rep_box &a_box_z) |
|
void | rep_bins2D_xyz_box (const style &a_style, const base_colormap &a_cmap, const std::vector< rep_bin2D > &a_bins, const rep_box &a_box_x, const rep_box &a_box_y, const rep_box &a_box_z, float a_bmin, float) |
|
void | rep_top_face2D_xyz (separator &a_sep, const style &a_style, const base_colormap &a_cmap, const std::vector< rep_top_face2D > &a_faces, const rep_box &a_box_x, const rep_box &a_box_y, const rep_box &a_box_z) |
|
void | rep_top_face2D_xyz_line (const style &, const std::vector< rep_top_face2D > &a_top_faces, const rep_box &a_box_x, const rep_box &a_box_y, const rep_box &a_box_z) |
|
void | rep_top_face2D_xyz_by_level (const style &, painting_policy, const base_colormap &a_cmap, const std::vector< rep_top_face2D > &a_top_faces, const rep_box &a_box_x, const rep_box &a_box_y, const rep_box &a_box_z, float a_bmin, float a_bmax) |
|
void | update_primitive_text (const plottable_text &a_obj) |
|
void | PAW_hatch (int aHTYP, hatching_policy &a_policy, float &a_spacing, float &a_angle_right, float &a_angle_left) |
|
void | rep_box_hatch (separator &a_parent, float a_spacing, float a_angle, float a_strip_width, float xx, float yy, float xe, float ye, float a_zz) |
|
void | update_primitive_box (std::ostream &a_out, const plottable_box &a_obj) |
|
void | update_primitive_ellipse (std::ostream &a_out, const plottable_ellipse &a_obj) |
|
void | update_primitive_img (std::ostream &, const plottable_img &a_obj) |
|
float | _zoffset () const |
|
float | _zaxis () const |
|
float | _zgrid () const |
|
float | _ztext () const |
|
float | _zscale_text () const |
|
float | _zinfos () const |
|
float | _zhatch () const |
|
float | _zerrors () const |
|
style * | merge_bins_style (unsigned int a_index, plottable &) |
|
style * | merge_left_hatch_style (unsigned int a_index, plottable &) |
|
style * | merge_right_hatch_style (unsigned int a_index, plottable &) |
|
style * | merge_errors_style (unsigned int a_index, plottable &) |
|
style * | merge_func_style (unsigned int a_index, plottable &) |
|
style * | merge_points_style (unsigned int a_index, plottable &) |
|
shape_type | get_shape () const |
|
void | clear_plottables () |
|
void | clear_primitives () |
|
void | clear_todels () |
|
bool | first_bins (bins1D *&a_1, bins2D *&a_2) const |
|
bool | first_func (func1D *&a_1, func2D *&a_2) const |
|
bool | first_points (points2D *&a_2, points3D *&a_3) const |
|
void | clear_sg () |
|
void | DUMP_UPDATE_WHAT (std::ostream &, const std::string &) |
|
bool | sto (const std::string &a_s, vec2f &a_v) |
|
bool | sto (const std::string &a_s, unit_type &a_v) |
|
void | clear_cmaps () |
|
void | bar_chart (float a_bar_offset, float a_bar_width, float &a_beg, float &a_end) |
|
| node (const node &) |
|
node & | operator= (const node &) |
|
void | add_field (field *a_field) |
|
bool | write_fields (write_action &a_action) |
|
bool | read_fields (read_action &a_action) |
|
field_desc::offset_t | field_offset (const field *a_field) const |
|
field * | find_field (const field_desc &a_rdesc) const |
|
void | check_fields (std::ostream &a_out) const |
|
|
static bool | bins2D_to_func (const bins2D &a_bins, float a_X, float a_Y, float &a_value) |
|
static double | bins2D_to_contour (double a_X, double a_Y, void *aData) |
|
static double | log_bins2D_to_contour (double a_X, double a_Y, void *aData) |
|
static double | function_to_contour (double a_X, double a_Y, void *aData) |
|
static double | log_function_to_contour (double a_X, double a_Y, void *aData) |
|
static float | take_log (float a_x) |
|
static float | verify_log (float a_val, float a_min, float a_dx, bool a_log) |
|
static float | verify_log_inv (float a_val, float a_min, float a_dx, bool a_log) |
|
static void | add_pt (std::vector< float > &a_pts, float a_x, float a_y, float a_z) |
|
static void | clip_points_2D (const std::vector< vec3f > &a_points, const rep_box &a_box_x, const rep_box &a_box_y, std::vector< float > &a_pts) |
|
static void | clip_polyline_2D (const std::vector< vec3f > &a_points, const rep_box &a_box_x, const rep_box &a_box_y, std::vector< float > &a_pts) |
|
Definition at line 45 of file plotter.
◆ style_item_t
◆ style_t
◆ colormap_axis_labeling_type
◆ shape_type
◆ unit_type
Enumerator |
---|
unit_percent | |
unit_axis | |
Definition at line 135 of file plotter.
◆ plotter() [1/2]
Definition at line 1223 of file plotter.
1314 m_cmaps[style_default_colormap::s_default()] = style_default_colormap();
◆ ~plotter()
virtual tools::sg::plotter::~plotter |
( |
| ) |
|
|
inlinevirtual |
◆ plotter() [2/2]
tools::sg::plotter::plotter |
( |
const plotter & |
a_from | ) |
|
|
inline |
◆ _zaxis()
float tools::sg::plotter::_zaxis |
( |
| ) |
const |
|
inlineprotected |
◆ _zerrors()
float tools::sg::plotter::_zerrors |
( |
| ) |
const |
|
inlineprotected |
◆ _zgrid()
float tools::sg::plotter::_zgrid |
( |
| ) |
const |
|
inlineprotected |
◆ _zhatch()
float tools::sg::plotter::_zhatch |
( |
| ) |
const |
|
inlineprotected |
◆ _zinfos()
float tools::sg::plotter::_zinfos |
( |
| ) |
const |
|
inlineprotected |
◆ _zoffset()
float tools::sg::plotter::_zoffset |
( |
| ) |
const |
|
inlineprotected |
◆ _zscale_text()
float tools::sg::plotter::_zscale_text |
( |
| ) |
const |
|
inlineprotected |
◆ _ztext()
float tools::sg::plotter::_ztext |
( |
| ) |
const |
|
inlineprotected |
◆ add_node_todel()
void tools::sg::plotter::add_node_todel |
( |
node * |
a_node | ) |
|
|
inline |
◆ add_plottable()
void tools::sg::plotter::add_plottable |
( |
plottable * |
a_p | ) |
|
|
inline |
◆ add_primitive()
void tools::sg::plotter::add_primitive |
( |
plotprim * |
a_prim | ) |
|
|
inline |
◆ add_pt()
static void tools::sg::plotter::add_pt |
( |
std::vector< float > & |
a_pts, |
|
|
float |
a_x, |
|
|
float |
a_y, |
|
|
float |
a_z |
|
) |
| |
|
inlinestaticprotected |
Definition at line 9240 of file plotter.
9241 a_pts.push_back(a_x);
9242 a_pts.push_back(a_y);
9243 a_pts.push_back(a_z);
◆ add_todel()
template<class T >
void tools::sg::plotter::add_todel |
( |
T * |
a_obj | ) |
|
|
inline |
◆ axis_2_data_frame()
bool tools::sg::plotter::axis_2_data_frame |
( |
const vec3f & |
a_pos, |
|
|
vec3f & |
aDF |
|
) |
| const |
|
inline |
◆ axis_2_vp()
bool tools::sg::plotter::axis_2_vp |
( |
const vec3f & |
a_pos, |
|
|
vec3f & |
a_vp |
|
) |
| const |
|
inline |
◆ background_style()
style& tools::sg::plotter::background_style |
( |
| ) |
|
|
inline |
◆ bar_chart()
void tools::sg::plotter::bar_chart |
( |
float |
a_bar_offset, |
|
|
float |
a_bar_width, |
|
|
float & |
a_beg, |
|
|
float & |
a_end |
|
) |
| |
|
inlineprotected |
Definition at line 9396 of file plotter.
9398 float xe = (a_end - a_beg)*a_bar_offset;
9399 float xw = (a_end - a_beg)*a_bar_width;
9400 a_end = a_beg + xe + xw;
◆ bbox()
virtual void tools::sg::plotter::bbox |
( |
bbox_action & |
a_action | ) |
|
|
inlinevirtual |
◆ bins2D_to_contour()
static double tools::sg::plotter::bins2D_to_contour |
( |
double |
a_X, |
|
|
double |
a_Y, |
|
|
void * |
aData |
|
) |
| |
|
inlinestaticprotected |
Definition at line 3866 of file plotter.
3867 SbFunc* func =(SbFunc*)aData;
3868 if( (a_X<func->m_limits_in[0])||
3869 (a_X>func->m_limits_in[1])||
3870 (a_Y<func->m_limits_in[2])||
3871 (a_Y>func->m_limits_in[3])
3874 if(!
bins2D_to_func(*(func->m_bins2D),(float)a_X,(
float)a_Y,value)) func->m_problem =
true;
◆ bins2D_to_func()
static bool tools::sg::plotter::bins2D_to_func |
( |
const bins2D & |
a_bins, |
|
|
float |
a_X, |
|
|
float |
a_Y, |
|
|
float & |
a_value |
|
) |
| |
|
inlinestaticprotected |
Definition at line 3810 of file plotter.
3811 unsigned int xn = a_bins.x_bins();
3812 float xmn = a_bins.x_axis_min();
3813 float xmx = a_bins.x_axis_max();
3814 unsigned int yn = a_bins.y_bins();
3815 float ymn = a_bins.y_axis_min();
3816 float ymx = a_bins.y_axis_max();
3818 float dx = (xmx-xmn)/xn;
3819 float dy = (ymx-ymn)/yn;
3820 int ibin = (int)((a_X-xmn)/dx);
3821 int jbin = (int)((a_Y-ymn)/dy);
3823 if((ibin<0)||(ibin>=int(xn))) {a_value=0;
return false;}
3824 if((jbin<0)||(jbin>=int(yn))) {a_value=0;
return false;}
3826 float xx_0 = a_bins.bin_lower_edge_x(ibin);
3828 float xx_1 = a_bins.bin_lower_edge_x(ibin+1);
3831 float yy_0 = a_bins.bin_lower_edge_y(jbin);
3833 float yy_1 = a_bins.bin_lower_edge_y(jbin+1);
3836 float val1 = a_bins.bin_Sw(ibin,jbin);
3837 float val2 = a_bins.bin_Sw(ibin+1,jbin);
3839 float val4 = a_bins.bin_Sw(ibin,jbin+1);
3842 vec3f p1(xx_0,yy_0,val1);
3843 vec3f p2(xx_1,yy_0,val2);
3845 vec3f p4(xx_0,yy_1,val4);
3849 plane<vec3f> _plane(p1,p2,p4);
3851 line<vec3f> _line(vec3f(a_X,a_Y,0),vec3f(a_X,a_Y,10));
3852 _plane.intersect(_line,pt);
◆ bins_modelings()
void tools::sg::plotter::bins_modelings |
( |
size_t |
a_index, |
|
|
std::vector< std::string > & |
a_opts |
|
) |
| |
|
inline |
Definition at line 1795 of file plotter.
1801 plottable*
object = *it;
1802 if(!
object)
continue;
1803 if(bins1D* b1 = safe_cast<plottable,bins1D>(*
object)) {
1805 if(a_index==ibins) {
1806 if(b1->is_profile()) {
1821 }
if(safe_cast<plottable,bins2D>(*
object)) {
1823 if(a_index==ibins) {
◆ bins_style()
style& tools::sg::plotter::bins_style |
( |
size_t |
a_index | ) |
|
|
inline |
Definition at line 1713 of file plotter.
1719 for(
size_t index=sz;index<=a_index;index++) {
◆ clear()
void tools::sg::plotter::clear |
( |
| ) |
|
|
inline |
◆ clear_cmaps()
void tools::sg::plotter::clear_cmaps |
( |
| ) |
|
|
inlineprotected |
Definition at line 9382 of file plotter.
9383 {std::vector<base_colormap*>::iterator it;
9387 {std::vector<base_colormap*>::iterator it;
9391 {std::vector<base_colormap*>::iterator it;
◆ clear_plottables()
void tools::sg::plotter::clear_plottables |
( |
| ) |
|
|
inlineprotected |
Definition at line 9131 of file plotter.
9133 {std::vector<plottable*>::iterator it;
◆ clear_primitives()
void tools::sg::plotter::clear_primitives |
( |
| ) |
|
|
inlineprotected |
Definition at line 9158 of file plotter.
9159 {std::vector<plotprim*>::iterator it;
◆ clear_sg()
void tools::sg::plotter::clear_sg |
( |
| ) |
|
|
inlineprotected |
◆ clear_todels()
void tools::sg::plotter::clear_todels |
( |
| ) |
|
|
inlineprotected |
◆ clip_points_2D()
static void tools::sg::plotter::clip_points_2D |
( |
const std::vector< vec3f > & |
a_points, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
std::vector< float > & |
a_pts |
|
) |
| |
|
inlinestaticprotected |
Definition at line 9246 of file plotter.
9248 float xmin = a_box_x.m_pos;
9249 float dx = a_box_x.m_width;
9250 bool xlog = a_box_x.m_log;
9252 float ymin = a_box_y.m_pos;
9253 float dy = a_box_y.m_width;
9254 bool ylog = a_box_y.m_log;
9260 const vec3f& _point = *it;
9266 if((xx>=0)&&(xx<=1)&&(yy>=0)&&(yy<=1))
add_pt(a_pts,xx,yy,zz);
◆ clip_polyline_2D()
static void tools::sg::plotter::clip_polyline_2D |
( |
const std::vector< vec3f > & |
a_points, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
std::vector< float > & |
a_pts |
|
) |
| |
|
inlinestaticprotected |
Definition at line 9270 of file plotter.
9279 float xmin = a_box_x.m_pos;
9280 float dx = a_box_x.m_width;
9281 bool xlog = a_box_x.m_log;
9283 float ymin = a_box_y.m_pos;
9284 float dy = a_box_y.m_width;
9285 bool ylog = a_box_y.m_log;
9292 {
unsigned int index = 0;
9293 std::vector<vec3f>::const_iterator it;
9294 for(it=a_points.begin();it!=a_points.end();++it,index++) {
9295 const vec3f& _point = *it;
9296 float xx = _point[0];
9297 float yy = _point[1];
9298 float zz = _point[2];
9302 if((xx>=0)&&(xx<=1) ) {
9309 }
else if(yprev<0) {
9310 float a = (yy - yprev)/(xx - xprev);
9311 float b = yy - a * xx;
9313 add_pt(a_pts,(1 - b)/a,1,zz);
9316 float a = (yy - yprev)/(xx - xprev);
9317 float b = yy - a * xx;
9318 add_pt(a_pts,(1 - b)/a,1,zz);
9322 }
else if (yy < 0) {
9328 }
else if(yprev>1) {
9329 float a = (yy - yprev)/(xx - xprev);
9330 float b = yy - a * xx;
9331 add_pt(a_pts,(1 - b)/a,1,zz);
9335 float a = (yy - yprev)/(xx - xprev);
9336 float b = yy - a * xx;
9344 }
else if( (yprev>1) || (yprev<0) ) {
9346 float a = (yy - yprev)/(xx - xprev);
9347 float b = yy - a * xx;
9349 add_pt(a_pts,(1 - b)/a,1,zz);
◆ colormap_axis() [1/2]
sg::axis& tools::sg::plotter::colormap_axis |
( |
| ) |
|
|
inline |
◆ colormap_axis() [2/2]
const sg::axis& tools::sg::plotter::colormap_axis |
( |
| ) |
const |
|
inline |
◆ copy_style()
void tools::sg::plotter::copy_style |
( |
const plotter & |
a_from | ) |
|
|
inline |
◆ data_frame_2_axis()
bool tools::sg::plotter::data_frame_2_axis |
( |
const vec3f & |
aDF, |
|
|
vec3f & |
a_pos |
|
) |
| const |
|
inline |
◆ data_frame_2_vp()
bool tools::sg::plotter::data_frame_2_vp |
( |
const vec3f & |
a_pos, |
|
|
vec3f & |
a_vp |
|
) |
| const |
|
inline |
Definition at line 1861 of file plotter.
1864 {
float XSIZ =
width;
1867 float wData = XSIZ-XMGL-XMGR;
1872 a_vp[0] = (wData*a_pos[0] + XMGL)/XSIZ;}
1877 float hData = YSIZ-YMGL-YMGU;
1882 a_vp[1] = (hData*a_pos[1] + YMGL)/YSIZ;}
1884 {
float ZSIZ =
depth;
1887 float dData = ZSIZ-ZMGD-ZMGU;
1892 a_vp[2] = (dData*a_pos[2] + ZMGD)/ZSIZ;}
◆ data_light() [1/2]
torche& tools::sg::plotter::data_light |
( |
| ) |
|
|
inline |
◆ data_light() [2/2]
const torche& tools::sg::plotter::data_light |
( |
| ) |
const |
|
inline |
◆ DUMP_UPDATE_WHAT()
void tools::sg::plotter::DUMP_UPDATE_WHAT |
( |
std::ostream & |
, |
|
|
const std::string & |
|
|
) |
| |
|
inlineprotected |
◆ errors_style()
style& tools::sg::plotter::errors_style |
( |
size_t |
a_index | ) |
|
|
inline |
Definition at line 1728 of file plotter.
1731 for(
size_t index=sz;index<=a_index;index++) {
◆ etc_sep() [1/2]
◆ etc_sep() [2/2]
const separator& tools::sg::plotter::etc_sep |
( |
| ) |
const |
|
inline |
◆ first_bins()
bool tools::sg::plotter::first_bins |
( |
bins1D *& |
a_1, |
|
|
bins2D *& |
a_2 |
|
) |
| const |
|
inlineprotected |
Definition at line 9167 of file plotter.
9169 plottable*
object = *it;
9170 if(!
object)
continue;
9171 if(bins1D* b1 = safe_cast<plottable,bins1D>(*
object)) {
9175 }
else if(bins2D* b2 = safe_cast<plottable,bins2D>(*
object)) {
◆ first_func()
bool tools::sg::plotter::first_func |
( |
func1D *& |
a_1, |
|
|
func2D *& |
a_2 |
|
) |
| const |
|
inlineprotected |
Definition at line 9186 of file plotter.
9188 plottable*
object = *it;
9189 if(!
object)
continue;
9190 if(func1D* f1 = safe_cast<plottable,func1D>(*
object)) {
9194 }
else if(func2D* f2 = safe_cast<plottable,func2D>(*
object)) {
◆ first_points()
bool tools::sg::plotter::first_points |
( |
points2D *& |
a_2, |
|
|
points3D *& |
a_3 |
|
) |
| const |
|
inlineprotected |
Definition at line 9205 of file plotter.
9207 plottable*
object = *it;
9208 if(!
object)
continue;
9209 if(points2D* p2 = safe_cast<plottable,points2D>(*
object)) {
9213 }
else if(points3D* p3 = safe_cast<plottable,points3D>(*
object)) {
◆ func_style()
style& tools::sg::plotter::func_style |
( |
size_t |
a_index | ) |
|
|
inline |
Definition at line 1739 of file plotter.
1742 for(
size_t index=sz;index<=a_index;index++) {
◆ function_to_contour()
static double tools::sg::plotter::function_to_contour |
( |
double |
a_X, |
|
|
double |
a_Y, |
|
|
void * |
aData |
|
) |
| |
|
inlinestaticprotected |
Definition at line 4250 of file plotter.
4251 SbFunc* func = (SbFunc*)aData;
4252 if( (a_X<func->m_limits_in[0])||
4253 (a_X>func->m_limits_in[1])||
4254 (a_Y<func->m_limits_in[2])||
4255 (a_Y>func->m_limits_in[3])
4258 if(!func->m_func2D->value((
float)a_X,(float)a_Y,value)) func->m_problem =
true;
4259 return double(value);
◆ get_infos()
void tools::sg::plotter::get_infos |
( |
std::string & |
a_s | ) |
|
|
inlineprotected |
Definition at line 5267 of file plotter.
5279 b1->infos(opts,a_s);
5281 b2->infos(opts,a_s);
5285 p2->infos(opts,a_s);
5287 p3->infos(opts,a_s);
5291 f1->infos(opts,a_s);
5293 f2->infos(opts,a_s);
5298 plottable*
object = *it;
5299 if(!
object)
continue;
5301 if(a_s.size()) a_s +=
"\n";
5303 object->infos(opts,_s);
◆ get_infos_matrix()
matrix* tools::sg::plotter::get_infos_matrix |
( |
| ) |
|
|
inlineprotected |
◆ get_infos_node()
◆ get_shape()
shape_type tools::sg::plotter::get_shape |
( |
| ) |
const |
|
inlineprotected |
◆ get_title()
void tools::sg::plotter::get_title |
( |
std::string & |
a_s | ) |
|
|
inlineprotected |
◆ get_value_axis_min_max()
void tools::sg::plotter::get_value_axis_min_max |
( |
float |
a_Sw_mn, |
|
|
float |
a_Sw_mx, |
|
|
bool |
a_is_log, |
|
|
float & |
a_min, |
|
|
float & |
a_max, |
|
|
bool |
a_min_visible |
|
) |
| |
|
inline |
Definition at line 2936 of file plotter.
2937 if(a_Sw_mn>a_Sw_mx) {
2943 if(a_is_log && (a_Sw_mn<=0) ) {
2951 float log_Sw_mn =
flog10(a_Sw_mn);
2952 float log_Sw_mx =
flog10(a_Sw_mx);
2958 float log_Sw_mn =
flog10(a_Sw_mn);
2959 mn =
fpow(10,log_Sw_mn)*(1.0f-0.4f);
2970 }
else if(a_Sw_mn==0) {
2985 float log_Sw_mn =
flog10(a_Sw_mn);
2986 float log_Sw_mx =
flog10(a_Sw_mx);
◆ gopaw_reset_style()
void tools::sg::plotter::gopaw_reset_style |
( |
| ) |
|
|
inline |
Definition at line 720 of file plotter.
724 (*it).marker_size = 5;
◆ grid_style()
style& tools::sg::plotter::grid_style |
( |
| ) |
|
|
inline |
◆ infos_style()
◆ init_sg()
void tools::sg::plotter::init_sg |
( |
| ) |
|
|
inlineprotected |
◆ inner_frame_style()
style& tools::sg::plotter::inner_frame_style |
( |
| ) |
|
|
inline |
◆ left_hatch_style()
style& tools::sg::plotter::left_hatch_style |
( |
size_t |
a_index | ) |
|
|
inline |
Definition at line 1763 of file plotter.
1766 for(
size_t index=sz;index<=a_index;index++) {
◆ legend_style()
style& tools::sg::plotter::legend_style |
( |
size_t |
a_index | ) |
|
|
inline |
Definition at line 1785 of file plotter.
1788 for(
size_t index=sz;index<=a_index;index++) {
◆ log_bins2D_to_contour()
static double tools::sg::plotter::log_bins2D_to_contour |
( |
double |
a_X, |
|
|
double |
a_Y, |
|
|
void * |
aData |
|
) |
| |
|
inlinestaticprotected |
Definition at line 3878 of file plotter.
3879 SbFunc* func =(SbFunc*)aData;
3880 if( (a_X<func->m_limits_in[0])||
3881 (a_X>func->m_limits_in[1])||
3882 (a_Y<func->m_limits_in[2])||
3883 (a_Y>func->m_limits_in[3])
3886 if(!
bins2D_to_func(*(func->m_bins2D),(float)a_X,(
float)a_Y,value)) func->m_problem =
true;
◆ log_function_to_contour()
static double tools::sg::plotter::log_function_to_contour |
( |
double |
a_X, |
|
|
double |
a_Y, |
|
|
void * |
aData |
|
) |
| |
|
inlinestaticprotected |
Definition at line 4261 of file plotter.
4262 SbFunc* func =(SbFunc*)aData;
4263 if( (a_X<func->m_limits_in[0])||
4264 (a_X>func->m_limits_in[1])||
4265 (a_Y<func->m_limits_in[2])||
4266 (a_Y>func->m_limits_in[3])
4269 if(!func->m_func2D->value((
float)a_X,(float)a_Y,value)) func->m_problem =
true;
◆ merge_bins_style()
style* tools::sg::plotter::merge_bins_style |
( |
unsigned int |
a_index, |
|
|
plottable & |
|
|
) |
| |
|
inlineprotected |
Definition at line 9056 of file plotter.
9059 return new style(_style);
◆ merge_errors_style()
style* tools::sg::plotter::merge_errors_style |
( |
unsigned int |
a_index, |
|
|
plottable & |
|
|
) |
| |
|
inlineprotected |
Definition at line 9074 of file plotter.
9077 return new style(_style);
◆ merge_func_style()
style* tools::sg::plotter::merge_func_style |
( |
unsigned int |
a_index, |
|
|
plottable & |
|
|
) |
| |
|
inlineprotected |
Definition at line 9080 of file plotter.
9083 return new style(_style);
◆ merge_left_hatch_style()
style* tools::sg::plotter::merge_left_hatch_style |
( |
unsigned int |
a_index, |
|
|
plottable & |
|
|
) |
| |
|
inlineprotected |
Definition at line 9062 of file plotter.
9065 return new style(_style);
◆ merge_points_style()
style* tools::sg::plotter::merge_points_style |
( |
unsigned int |
a_index, |
|
|
plottable & |
|
|
) |
| |
|
inlineprotected |
Definition at line 9086 of file plotter.
9089 return new style(_style);
◆ merge_right_hatch_style()
style* tools::sg::plotter::merge_right_hatch_style |
( |
unsigned int |
a_index, |
|
|
plottable & |
|
|
) |
| |
|
inlineprotected |
Definition at line 9068 of file plotter.
9071 return new style(_style);
◆ node_desc_fields()
virtual const desc_fields& tools::sg::plotter::node_desc_fields |
( |
| ) |
const |
|
inlinevirtual |
Reimplemented from tools::sg::node.
Definition at line 181 of file plotter.
183 static const desc_fields s_v(parent::node_desc_fields(),63,
◆ number_of_plottables()
size_t tools::sg::plotter::number_of_plottables |
( |
| ) |
const |
|
inline |
Definition at line 1560 of file plotter.
1563 plottable*
object = *it;
1564 if(!
object)
continue;
1565 if(!object->is_valid())
continue;
◆ operator=()
Definition at line 1446 of file plotter.
1447 parent::operator=(a_from);
1448 if(&a_from==
this)
return *
this;
1450 width = a_from.width;
1456 depth = a_from.depth;
1465 title = a_from.title;
1502 theta = a_from.theta;
1514 shape = a_from.shape;
◆ PAW_hatch()
void tools::sg::plotter::PAW_hatch |
( |
int |
aHTYP, |
|
|
hatching_policy & |
a_policy, |
|
|
float & |
a_spacing, |
|
|
float & |
a_angle_right, |
|
|
float & |
a_angle_left |
|
) |
| |
|
inlineprotected |
Definition at line 8527 of file plotter.
8543 a_angle_right = 3.0F*
fpi()/4.0F;
8544 a_angle_left =
fpi()/4.0F;
8546 }
else if(code==2) {
8549 a_angle_right = 3.0F*
fpi()/4.0F;
8550 a_angle_left =
fpi()/4.0F;
8552 }
else if(code==3) {
8554 a_spacing = 1.6f*0.07F;
8555 a_angle_right = 3.0F*
fpi()/4.0F;
8556 a_angle_left =
fpi()/4.0F;
8558 }
else if(code==4) {
8560 }
else if(code==5) {
8562 }
else if(code==6) {
8564 }
else if(code==7) {
8566 }
else if(code<=25) {
8570 }
else if(code<=99) {
8581 int j = (code - i * 100)/10;
8582 int k = code - i * 100 - j * 10;
8589 else if((j!=5)&&(k==5))
8591 else if((j==5)&&(k!=5))
8593 else if((j!=5)&&(k!=5))
8596 unsigned int NY = 1;
8598 a_spacing = float(NY) * float(i) * 0.07F;
8601 float angle = float(j==4?45:j*10);
8602 angle = 180.0F - angle;
8603 angle *=
fpi() / 180.0F;
8605 a_angle_right = angle;
8609 float angle = float(k==4?45:k*10);
8610 angle *=
fpi() / 180.0F;
8611 a_angle_left = angle;
◆ pick()
virtual void tools::sg::plotter::pick |
( |
pick_action & |
a_action | ) |
|
|
inlinevirtual |
◆ plottables()
const std::vector<plottable*>& tools::sg::plotter::plottables |
( |
| ) |
const |
|
inline |
◆ plotted_object_names()
void tools::sg::plotter::plotted_object_names |
( |
std::vector< std::string > & |
a_names | ) |
const |
|
inline |
Definition at line 1593 of file plotter.
1596 plottable*
object = *it;
1597 if(!
object)
continue;
1598 if(!object->is_valid())
continue;
1600 a_names.push_back(object->name());
◆ points_style()
style& tools::sg::plotter::points_style |
( |
size_t |
a_index | ) |
|
|
inline |
Definition at line 1749 of file plotter.
1755 for(
size_t index=sz;index<=a_index;index++) {
◆ prep_plottable()
void tools::sg::plotter::prep_plottable |
( |
plottable * |
a_p | ) |
|
|
inline |
◆ print_available_customization()
void tools::sg::plotter::print_available_customization |
( |
std::ostream & |
a_out | ) |
const |
|
inline |
Definition at line 1108 of file plotter.
1109 a_out <<
"plotter fields :" << std::endl;
1112 a_out <<
" " << (*itd).name() <<
", class " << (*itd).cls() << std::endl;
1116 a_out <<
"plotter data available styles :" << std::endl;
1117 a_out <<
" bins_style.<uint>, class style" << std::endl;
1118 a_out <<
" errors_style.<uint>, class style" << std::endl;
1119 a_out <<
" func_style.<uint>, class style" << std::endl;
1120 a_out <<
" points_style.<uint>, class style" << std::endl;
1121 a_out <<
" left_hatch_style.<uint>, class style" << std::endl;
1122 a_out <<
" right_hatch_style.<uint>, class style" << std::endl;
1123 a_out <<
" legend_style.<uint>, class style" << std::endl;
1126 a_out <<
"plotter available styles :" << std::endl;
1127 a_out <<
" title_style, class text_style" << std::endl;
1128 a_out <<
" infos_style, class text_style" << std::endl;
1129 a_out <<
" title_box_style, class text_style" << std::endl;
1130 a_out <<
" background_style, class style" << std::endl;
1131 a_out <<
" inner_frame_style, class style" << std::endl;
1132 a_out <<
" grid_style, class style" << std::endl;
1133 a_out <<
" wall_style, class style" << std::endl;
1136 a_out <<
"plotter available axes :" << std::endl;
1137 a_out <<
" x_axis" << std::endl;
1138 a_out <<
" y_axis" << std::endl;
1139 a_out <<
" z_axis" << std::endl;
1140 a_out <<
" colormap_axis" << std::endl;
1143 a_out <<
"plotter axis available styles :" << std::endl;
1144 a_out <<
" title_style, class text_style" << std::endl;
1145 a_out <<
" labels_style, class text_style" << std::endl;
1146 a_out <<
" mag_style, class text_style" << std::endl;
1147 a_out <<
" line_style, class line_style" << std::endl;
1148 a_out <<
" ticks_style, class line_style" << std::endl;
1151 a_out <<
"plotter style class fields :" << std::endl;
1153 const std::vector<field_desc>& fds = _style.node_desc_fields();
1155 a_out <<
" " << (*itd).name() <<
", class " << (*itd).cls() << std::endl;
1159 a_out <<
"plotter text_style class fields :" << std::endl;
1161 const std::vector<field_desc>& fds = _style.node_desc_fields();
1163 a_out <<
" " << (*itd).name() <<
", class " << (*itd).cls() << std::endl;
1167 a_out <<
"plotter line_style class fields :" << std::endl;
1169 const std::vector<field_desc>& fds = _style.node_desc_fields();
1171 a_out <<
" " << (*itd).name() <<
", class " << (*itd).cls() << std::endl;
◆ remove_plottables()
template<class T >
bool tools::sg::plotter::remove_plottables |
( |
| ) |
|
|
inline |
Definition at line 1634 of file plotter.
1636 std::vector<plottable*>::iterator it;
1638 plottable*
object = *it;
1639 if(
object && safe_cast<plottable,T>(*
object)) {
◆ remove_todels()
template<class T >
void tools::sg::plotter::remove_todels |
( |
| ) |
|
|
inline |
◆ render()
virtual void tools::sg::plotter::render |
( |
render_action & |
a_action | ) |
|
|
inlinevirtual |
◆ rep_bins1D_xy_boxes()
Definition at line 6173 of file plotter.
6182 float xmin = a_box_x.m_pos;
6183 float dx = a_box_x.m_width;
6184 bool xlog = a_box_x.m_log;
6186 float ymin = a_box_y.m_pos;
6187 float dy = a_box_y.m_width;
6188 bool ylog = a_box_y.m_log;
6190 separator* _sep =
new separator();
6192 _sep->add(
new normal);
6198 const rep_bin1D& rbin = *it;
6200 float xx = rbin.m_x_min;
6201 float xe = rbin.m_x_max;
6202 float yy = rbin.m_v_min;
6203 float ye = rbin.m_val;
6209 float val = rbin.m_val;
6228 separator*
sep =
new separator();
6241 a_cmap.get_color(val,clr);
6245 a_cmap.get_color(rbin.m_ratio,clr);
6247 clr = a_style.color;
6250 rgba* mat =
new rgba();
6254 vertices* vtxs =
new vertices;
6258 vtxs->add(xx,yy,a_zz);
6259 vtxs->add(xe,yy,a_zz);
6260 vtxs->add(xe,ye,a_zz);
6261 vtxs->add(xx,ye,a_zz);
◆ rep_bins1D_xy_curve_one()
void tools::sg::plotter::rep_bins1D_xy_curve_one |
( |
std::ostream & |
a_out, |
|
|
const style & |
a_style, |
|
|
const std::vector< rep_bin1D > & |
a_bins, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
float |
a_zz |
|
) |
| |
|
inlineprotected |
Definition at line 6416 of file plotter.
6420 size_t number = a_bins.size();
6423 double* xs =
new double[number];
6424 double* ys =
new double[number];
6426 for(
size_t index=0;index<number;index++) {
6427 x = (a_bins[index].m_x_min + a_bins[index].m_x_max)/2;
6428 y = a_bins[index].m_val;
6429 xs[index] = x;ys[index] = y;
6431 spline::cubic _spline(a_out,number,xs,ys);
6433 delete [] xs;
delete [] ys;
6438 float step = (xmx - xmn)/nstp;
6439 std::vector<vec3f>
points(nstp+1);
6440 for(
unsigned int ibin=0;ibin<=nstp;ibin++) {
6441 float xx = xmn + ibin * step;
6442 double val = _spline.eval(xx);
6443 points[ibin].set_value(xx,
float(val),a_zz);
6446 vertices* vtxs =
new vertices;
6447 std::vector<float>& pts = vtxs->xyzs.values();
6451 sg::separator* separator =
new sg::separator;
6454 rgba* mat =
new rgba();
6455 mat->color = a_style.color;
6456 separator->add(mat);
6458 draw_style* ds =
new draw_style;
6460 ds->line_pattern = a_style.line_pattern;
6461 ds->line_width = a_style.line_width;
6465 separator->add(vtxs);
◆ rep_bins1D_xy_lines_one()
void tools::sg::plotter::rep_bins1D_xy_lines_one |
( |
const style & |
a_style, |
|
|
const std::vector< rep_bin1D > & |
a_bins, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
float |
a_zz |
|
) |
| |
|
inlineprotected |
Definition at line 6375 of file plotter.
6381 size_t xnbin = a_bins.size();
6382 std::vector<vec3f>
points(xnbin);
6383 for(
size_t index=0;index<xnbin;index++) {
6384 float x = (a_bins[index].m_x_min + a_bins[index].m_x_max)/2;
6385 float y = a_bins[index].m_val;
6386 points[index] = vec3f(x,y,a_zz);
6389 vertices* vtxs =
new vertices;
6390 std::vector<float>& pts = vtxs->xyzs.values();
6394 sg::separator* separator =
new sg::separator;
6397 rgba* mat =
new rgba();
6398 mat->color = a_style.color;
6399 separator->add(mat);
6401 draw_style* ds =
new draw_style;
6403 ds->line_pattern = a_style.line_pattern;
6404 ds->line_width = a_style.line_width;
6408 separator->add(vtxs);
◆ rep_bins1D_xy_points()
void tools::sg::plotter::rep_bins1D_xy_points |
( |
std::ostream & |
a_out, |
|
|
const style & |
a_style, |
|
|
const base_colormap & |
a_cmap, |
|
|
const std::vector< rep_bin1D > & |
a_bins, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
float |
a_zz |
|
) |
| |
|
inlineprotected |
Definition at line 6075 of file plotter.
6084 float xmin = a_box_x.m_pos;
6085 float dx = a_box_x.m_width;
6086 bool xlog = a_box_x.m_log;
6088 float ymin = a_box_y.m_pos;
6089 float dy = a_box_y.m_width;
6090 bool ylog = a_box_y.m_log;
6094 separator* _sep =
new separator();
6097 draw_style* ds =
new draw_style;
6099 ds->point_size = a_style.point_size;
6105 size_t xnbin = a_bins.size();
6106 for(
size_t index=0;index<xnbin;index++) {
6107 float x = (a_bins[index].m_x_min + a_bins[index].m_x_max)/2;
6108 float y = a_bins[index].m_val;
6109 float val = a_bins[index].m_val;
6114 if((x<0)||(x>1)||(y<0)||(y>1))
continue;
6118 separator*
sep =
new separator();
6132 a_cmap.get_color(val,clr);
6136 a_cmap.get_color(a_bins[index].m_ratio,clr);
6138 clr = a_style.color;
6141 rgba* mat =
new rgba();
6146 vertices* vtxs =
new vertices;
6148 vtxs->add(x,y,a_zz);
6151 markers* _marks =
new markers;
6152 _marks->size = a_style.marker_size;
6153 _marks->style = a_style.marker_style;
6154 _marks->add(x,y,a_zz);
6157 a_out <<
"tools::sg::plotter::rep_bins1D_xy_points :"
6158 <<
" bad modeling style " <<
tools::sout(a_style.modeling) << std::endl;
◆ rep_bins1D_xy_top_lines()
void tools::sg::plotter::rep_bins1D_xy_top_lines |
( |
const style & |
a_style, |
|
|
const base_colormap & |
a_cmap, |
|
|
const std::vector< rep_bin1D > & |
a_bins, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
float |
a_zz |
|
) |
| |
|
inlineprotected |
Definition at line 5971 of file plotter.
5980 float xmin = a_box_x.m_pos;
5981 float dx = a_box_x.m_width;
5982 bool xlog = a_box_x.m_log;
5984 float ymin = a_box_y.m_pos;
5985 float dy = a_box_y.m_width;
5986 bool ylog = a_box_y.m_log;
5993 separator* _sep =
new separator();
5995 draw_style* ds =
new draw_style;
5997 ds->line_pattern = a_style.line_pattern;
5998 ds->line_width = a_style.line_width;
6005 size_t xnbin = a_bins.size();
6006 for(
size_t index=0;index<xnbin;index++) {
6007 float xx = a_bins[index].m_x_min;
6008 float xe = a_bins[index].m_x_max;
6009 float y = a_bins[index].m_val;
6011 float val = a_bins[index].m_val;
6025 separator*
sep =
new separator();
6040 a_cmap.get_color(val,clr);
6044 a_cmap.get_color(a_bins[index].m_ratio,clr);
6046 clr = a_style.color;
6049 rgba* mat =
new rgba();
6053 vertices* vtxs =
new vertices;
6057 vtxs->add(xx,yp,a_zz);
6058 vtxs->add(xx,y,a_zz);
6059 vtxs->add(xe,y,a_zz);
6061 vtxs->add(xe,y0,a_zz);
◆ rep_bins1D_xy_wire_boxes()
void tools::sg::plotter::rep_bins1D_xy_wire_boxes |
( |
const style & |
a_style, |
|
|
const base_colormap & |
a_cmap, |
|
|
const std::vector< rep_bin1D > & |
a_bins, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
float |
a_zz, |
|
|
bool |
a_bar_chart |
|
) |
| |
|
inlineprotected |
Definition at line 6273 of file plotter.
6283 float xmin = a_box_x.m_pos;
6284 float dx = a_box_x.m_width;
6285 bool xlog = a_box_x.m_log;
6287 float ymin = a_box_y.m_pos;
6288 float dy = a_box_y.m_width;
6289 bool ylog = a_box_y.m_log;
6291 separator* _sep =
new separator();
6297 const rep_bin1D& rbin = *it;
6299 float xx = rbin.m_x_min;
6300 float xe = rbin.m_x_max;
6301 float yy = rbin.m_v_min;
6302 float ye = rbin.m_val;
6308 float val = rbin.m_val;
6312 a_style.bar_width.value(),xx,xe);
6330 separator*
sep =
new separator();
6342 a_cmap.get_color(val,clr);
6346 a_cmap.get_color(rbin.m_ratio,clr);
6348 clr = a_style.color;
6351 rgba* mat =
new rgba();
6355 vertices* vtxs =
new vertices;
6359 vtxs->add(xx,yy,a_zz);
6360 vtxs->add(xe,yy,a_zz);
6361 vtxs->add(xe,ye,a_zz);
6362 vtxs->add(xx,ye,a_zz);
6363 vtxs->add(xx,yy,a_zz);
◆ rep_bins2D_xy_box()
void tools::sg::plotter::rep_bins2D_xy_box |
( |
const style & |
a_style, |
|
|
const std::vector< rep_bin2D > & |
a_bins, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
float |
a_bmin, |
|
|
float |
a_bmax, |
|
|
float |
a_zz |
|
) |
| |
|
inlineprotected |
Definition at line 6475 of file plotter.
6481 separator* _sep =
new separator();
6483 _sep->add(
new normal);
6485 rgba* mat =
new rgba();
6486 mat->color = a_style.color;
6489 float xmin = a_box_x.m_pos;
6490 float dx = a_box_x.m_width;
6491 bool xlog = a_box_x.m_log;
6493 float ymin = a_box_y.m_pos;
6494 float dy = a_box_y.m_width;
6495 bool ylog = a_box_y.m_log;
6498 float range = a_bmax - a_bmin;
6501 const rep_bin2D& rbin = *it;
6503 float xx = rbin.m_x_min;
6504 float xe = rbin.m_x_max;
6505 float yy = rbin.m_y_min;
6506 float ye = rbin.m_y_max;
6507 float val = rbin.m_val;
6512 xsize = (val - a_bmin) * (xe - xx) / range;
6513 ysize = (val - a_bmin) * (ye - yy) / range;
6521 xx = xx + ((xe-xx) - xsize)/2;
6523 yy = yy + ((ye-yy) - ysize)/2;
6552 vertices* vtxs =
new vertices;
6557 vtxs->add(xx,yy,a_zz);
6558 vtxs->add(xe,yy,a_zz);
6559 vtxs->add(xe,ye,a_zz);
6560 vtxs->add(xx,ye,a_zz);
◆ rep_bins2D_xy_random_one()
void tools::sg::plotter::rep_bins2D_xy_random_one |
( |
const style & |
a_style, |
|
|
const std::vector< rep_bin2D > & |
a_bins, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
float |
a_bmin, |
|
|
float |
a_bmax, |
|
|
float |
a_zz |
|
) |
| |
|
inlineprotected |
Definition at line 6766 of file plotter.
6771 sg::separator* separator =
new sg::separator;
6773 rgba* mat =
new rgba();
6774 mat->color = a_style.color;
6775 separator->add(mat);
6777 draw_style* ds =
new draw_style;
6779 ds->point_size = a_style.point_size;
6782 float xmin = a_box_x.m_pos;
6783 float dx = a_box_x.m_width;
6784 bool xlog = a_box_x.m_log;
6786 float ymin = a_box_y.m_pos;
6787 float dy = a_box_y.m_width;
6788 bool ylog = a_box_y.m_log;
6793 float range = a_bmax - a_bmin;
6797 size_t number = a_bins.size();
6798 for(
size_t index=0;index<number;index++) {
6800 float xx = a_bins[index].m_x_min;
6801 float xe = a_bins[index].m_x_max;
6802 float yy = a_bins[index].m_y_min;
6803 float ye = a_bins[index].m_y_max;
6804 float val = a_bins[index].m_val;
6811 int npt = range>0. ? (int)((val - a_bmin)*(nmax-nmin)/range + nmin):1;
6813 vertices* vtxs =
new vertices;
6815 separator->add(vtxs);
6818 float xdbin = xe - xx;
6819 float ydbin = ye - yy;
6820 for(
int count=0;count<npt;count++) {
6825 if((xxx>=0)&&(xxx<=1) &&
6826 (yyy>=0)&&(yyy<=1) ) {
6827 vtxs->add(xxx,yyy,a_zz);
◆ rep_bins2D_xy_solid()
Definition at line 6689 of file plotter.
6693 separator* _sep =
new separator();
6695 _sep->add(
new normal);
6697 float xmin = a_box_x.m_pos;
6698 float dx = a_box_x.m_width;
6699 bool xlog = a_box_x.m_log;
6701 float ymin = a_box_y.m_pos;
6702 float dy = a_box_y.m_width;
6703 bool ylog = a_box_y.m_log;
6709 const rep_bin2D& rbin = *it;
6711 float xx = rbin.m_x_min;
6712 float xe = rbin.m_x_max;
6713 float yy = rbin.m_y_min;
6714 float ye = rbin.m_y_max;
6715 float val = rbin.m_val;
6733 a_cmap.get_color(val,clr);
6737 a_cmap.get_color(rbin.m_ratio,clr);
6739 clr = a_style.color;
6742 rgba* mat =
new rgba();
6746 vertices* vtxs =
new vertices;
6751 vtxs->add(xx,yy,a_zz);
6752 vtxs->add(xe,yy,a_zz);
6753 vtxs->add(xe,ye,a_zz);
6754 vtxs->add(xx,ye,a_zz);
◆ rep_bins2D_xy_text()
Definition at line 6843 of file plotter.
6851 ::printf(
"debug : rep_bins2D_xy_text : dummy\n");
◆ rep_bins2D_xy_wire_box()
void tools::sg::plotter::rep_bins2D_xy_wire_box |
( |
const style & |
a_style, |
|
|
const std::vector< rep_bin2D > & |
a_bins, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
float |
a_bmin, |
|
|
float |
a_bmax, |
|
|
float |
a_zz |
|
) |
| |
|
inlineprotected |
Definition at line 6572 of file plotter.
6579 sg::separator* separator =
new sg::separator;
6581 rgba* mat =
new rgba();
6582 mat->color = a_style.color;
6583 separator->add(mat);
6585 draw_style* ds =
new draw_style;
6587 ds->line_pattern = a_style.line_pattern;
6588 ds->line_width = a_style.line_width;
6591 vertices* vtxs =
new vertices;
6593 separator->add(vtxs);
6597 float xmin = a_box_x.m_pos;
6598 float dx = a_box_x.m_width;
6599 bool xlog = a_box_x.m_log;
6601 float ymin = a_box_y.m_pos;
6602 float dy = a_box_y.m_width;
6603 bool ylog = a_box_y.m_log;
6605 float range = a_bmax - a_bmin;
6606 size_t number = a_bins.size();
6607 for(
size_t index=0;index<number;index++) {
6609 float xx = a_bins[index].m_x_min;
6610 float xe = a_bins[index].m_x_max;
6611 float yy = a_bins[index].m_y_min;
6612 float ye = a_bins[index].m_y_max;
6613 float val = a_bins[index].m_val;
6618 xsize = (val - a_bmin) * (xe - xx) / range;
6619 ysize = (val - a_bmin) * (ye - yy) / range;
6627 xx = xx + ((xe-xx) - xsize)/2;
6629 yy = yy + ((ye-yy) - ysize)/2;
6667 vtxs->add(xx,yy,a_zz);
6668 vtxs->add(xe,yy,a_zz);
6670 vtxs->add(xe,yy,a_zz);
6671 vtxs->add(xe,ye,a_zz);
6673 vtxs->add(xe,ye,a_zz);
6674 vtxs->add(xx,ye,a_zz);
6676 vtxs->add(xx,ye,a_zz);
6677 vtxs->add(xx,yy,a_zz);
◆ rep_bins2D_xyz_box()
Definition at line 7829 of file plotter.
7831 float xmin = a_box_x.m_pos;
7832 float dx = a_box_x.m_width;
7833 bool xlog = a_box_x.m_log;
7835 float ymin = a_box_y.m_pos;
7836 float dy = a_box_y.m_width;
7837 bool ylog = a_box_y.m_log;
7839 float zmin = a_box_z.m_pos;
7840 float dz = a_box_z.m_width;
7841 bool zlog = a_box_z.m_log;
7845 separator* _sep =
new separator();
7852 const rep_bin2D& rbin = *it;
7854 float xx = rbin.m_x_min;
7855 float xe = rbin.m_x_max;
7856 float yy = rbin.m_y_min;
7857 float ye = rbin.m_y_max;
7858 float val = rbin.m_val;
7885 if(yy>=ye)
continue;
7886 if(xx>=xe)
continue;
7887 if(zz>=ze)
continue;
7889 separator*
sep =
new separator();
7893 a_cmap.get_color(val,clr);
7897 a_cmap.get_color(rbin.m_ratio,clr);
7899 clr = a_style.color;
7902 rgba* mat =
new rgba();
7918 matrix* _tsf =
new matrix;
7919 _tsf->set_translate(xx+sx/2,yy+sy/2,sz/2);
7922 cube* _cube =
new cube;
◆ rep_box_hatch()
void tools::sg::plotter::rep_box_hatch |
( |
separator & |
a_parent, |
|
|
float |
a_spacing, |
|
|
float |
a_angle, |
|
|
float |
a_strip_width, |
|
|
float |
xx, |
|
|
float |
yy, |
|
|
float |
xe, |
|
|
float |
ye, |
|
|
float |
a_zz |
|
) |
| |
|
inlineprotected |
Definition at line 8616 of file plotter.
8620 sg::separator* separator =
new sg::separator;
8626 points[0].set_value(xx,yy,a_zz);
8627 points[1].set_value(xe,yy,a_zz);
8628 points[2].set_value(xe,ye,a_zz);
8629 points[3].set_value(xx,ye,a_zz);
8630 points[4].set_value(xx,yy,a_zz);
8634 _hatcher.set_offset_point(vec3f(0,0,a_zz));
8635 _hatcher.set_angle(a_angle);
8636 _hatcher.set_spacing(a_spacing);
8637 if(!_hatcher.set_strip_width(a_strip_width)) {}
8639 bool res = _hatcher.check_polyline(
points,4);
8640 if(res) res = _hatcher.compute_polyline(
points,4);
8642 size_t numPoints = _hatcher.points().size();
8643 size_t numVertices = _hatcher.vertices().size();
8644 if((res) && numPoints && numVertices) {
8646 const std::vector<vec3f>& _points = _hatcher.points();
8648 if(a_strip_width==0) {
8651 vertices* vtxs =
new vertices;
8653 for(
size_t index=0;index<(*itv);index++) {
8654 vtxs->add(_points[ipt]);
8657 separator->add(vtxs);
8664 vertices* vtxs =
new vertices;
8666 for(
size_t index=0;index<(*itv);index++) {
8667 vtxs->add(_points[ipt]);
8670 separator->add(vtxs);
8681 a_parent.add(separator);
◆ rep_contour_xy()
Definition at line 6971 of file plotter.
6977 float xmin = a_box_x.m_pos;
6978 float dx = a_box_x.m_width;
6979 bool xlog = a_box_x.m_log;
6981 float ymin = a_box_y.m_pos;
6982 float dy = a_box_y.m_width;
6983 bool ylog = a_box_y.m_log;
6985 float zmin = a_box_z.m_pos;
6986 float dz = a_box_z.m_width;
6989 sg::separator* separator =
new sg::separator;
6992 draw_style* ds =
new draw_style;
6994 ds->line_pattern.value(a_style.line_pattern);
6995 ds->line_width.value(a_style.line_width);
6998 atb_vertices* vtxs =
new atb_vertices;
7000 separator->add(vtxs);
7004 for (
unsigned int i=0;i<a_contour.get_number_of_planes();i++) {
7007 a_out <<
"tools::sg;:plotter::rep_contour_xy : problem with contour." << std::endl;
7013 float val = (float)a_contour.get_plane(i);
7022 a_cmap.get_color(val,_color);
7024 size_t icol = a_cmap.colorn() ? (i % a_cmap.colorn()) :0;
7025 _color = a_cmap.color(icol);
7027 _color = a_style.color;
7033 a_out <<
"tools::sg;:plotter::rep_contour_xy : problem with contour." << std::endl;
7037 if (pStrip->empty())
continue;
7056 xx = (float)a_contour.get_xi(*pos2);
7057 yy = (float)a_contour.get_yi(*pos2);
7069 vtxs->add(xprev,yprev,a_zz+zz);
7070 vtxs->add(xx,yy,a_zz+zz);
7071 vtxs->add_color(_color);
7072 vtxs->add_color(_color);
◆ rep_contour_xy_filled()
Definition at line 7090 of file plotter.
7096 float xmin = a_box_x.m_pos;
7097 float dx = a_box_x.m_width;
7098 bool xlog = a_box_x.m_log;
7100 float ymin = a_box_y.m_pos;
7101 float dy = a_box_y.m_width;
7102 bool ylog = a_box_y.m_log;
7104 float zmin = a_box_z.m_pos;
7105 float dz = a_box_z.m_width;
7108 sg::separator* separator =
new sg::separator;
7114 sg::separator*
sep =
new sg::separator;
7115 separator->add(
sep);
7117 float zz = a_zz - 0.01F;
7120 if(a_cmap.colorn()) {
7121 _color = a_cmap.color(0);
7123 _color = a_style.color;
7126 rgba* mat =
new rgba();
7127 mat->color = _color;
7140 vertices* vtxs =
new vertices;
7142 vtxs->add(xx,yy,zz);
7143 vtxs->add(xe,yy,zz);
7144 vtxs->add(xe,ye,zz);
7145 vtxs->add(xx,ye,zz);
7152 for (
unsigned int i=0;i<a_contour.get_number_of_planes();i++) {
7156 a_out <<
"tools::sg;:plotter::rep_contour_xy_filled : problem with contour." << std::endl;
7161 sg::separator*
sep =
new sg::separator;
7162 separator->add(
sep);
7165 float val = (float)a_contour.get_plane(i);
7172 std::vector< std::vector<vec3f> > contourVector;
7176 if(pStrip->size() >2) {
7177 std::vector<vec3f> v;
7178 for (cline_strip::iterator pos2=pStrip->begin();pos2 != pStrip->end();pos2++) {
7179 unsigned int index=(*pos2);
7180 float xx = (float)a_contour.get_xi(index);
7181 float yy = (float)a_contour.get_yi(index);
7184 v.push_back(vec3f(xx,yy,a_zz+zz));
7186 contourVector.push_back(v);
7190 std::vector<tess_triangle> tris;
7191 tess_contour tessContour(a_out,tris);
7192 tessContour.getFilledArea(contourVector);
7193 if(!tris.size())
continue;
7197 a_cmap.get_color(val,_color);
7199 int icol = a_cmap.colorn() ? (i % a_cmap.colorn()) :0;
7200 _color = a_cmap.color(icol);
7202 _color = a_style.color;
7205 atb_vertices* vtxs =
new atb_vertices;
7209 for(
size_t itri=0;itri<tris.size();itri++) {
7210 tess_triangle& tri = tris[itri];
7211 AB.set_value((
float)(tri.pointB[0]-tri.pointA[0]),
7212 (
float)(tri.pointB[1]-tri.pointA[1]),
7213 (
float)(tri.pointB[2]-tri.pointA[2]));
7214 BC.set_value((
float)(tri.pointC[0]-tri.pointB[0]),
7215 (
float)(tri.pointC[1]-tri.pointB[1]),
7216 (
float)(tri.pointC[2]-tri.pointB[2]));
7217 AB.cross(BC,vcross);
7219 vtxs->add((
float)tri.pointA[0],(
float)tri.pointA[1],(
float)tri.pointA[2]);
7220 vtxs->add((
float)tri.pointB[0],(
float)tri.pointB[1],(
float)tri.pointB[2]);
7221 vtxs->add((
float)tri.pointC[0],(
float)tri.pointC[1],(
float)tri.pointC[2]);
7223 vtxs->add((
float)tri.pointA[0],(
float)tri.pointA[1],(
float)tri.pointA[2]);
7224 vtxs->add((
float)tri.pointC[0],(
float)tri.pointC[1],(
float)tri.pointC[2]);
7225 vtxs->add((
float)tri.pointB[0],(
float)tri.pointB[1],(
float)tri.pointB[2]);
7227 vtxs->add_color(_color);
7228 vtxs->add_color(_color);
7229 vtxs->add_color(_color);
◆ rep_errors_I_xy()
void tools::sg::plotter::rep_errors_I_xy |
( |
std::ostream & |
, |
|
|
const style & |
a_style, |
|
|
const std::vector< rep_bin1D > & |
a_bins, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
const std::vector< float > & |
a_bars, |
|
|
float |
aZ |
|
) |
| |
|
inlineprotected |
Definition at line 7339 of file plotter.
7342 separator* _sep =
new separator();
7345 rgba* mat =
new rgba();
7346 mat->color = a_style.color;
7349 draw_style* ds =
new draw_style;
7351 ds->line_pattern.value(a_style.line_pattern);
7352 ds->line_width.value(a_style.line_width);
7355 vertices* vtxs =
new vertices;
7359 float xmin = a_box_x.m_pos;
7360 float dx = a_box_x.m_width;
7361 bool xlog = a_box_x.m_log;
7363 float ymin = a_box_y.m_pos;
7364 float dy = a_box_y.m_width;
7365 bool ylog = a_box_y.m_log;
7367 size_t xnbin = a_bins.size();
7369 for(
size_t index=0;index<xnbin;index++) {
7373 float val = a_bins[index].m_val;
7374 float bar_height = a_bars[index];
7376 float bar_min = val - bar_height/2;
7377 float bar_max = val + bar_height/2;
7379 float xx = a_bins[index].m_x_min;
7380 float xe = a_bins[index].m_x_max;
7396 float ex = (xe+xx)/2;
7399 float edx = 0.3F * (xe-xx);
7403 }
else if(bar_max <0) {
7405 }
else if(bar_min <0) {
7411 vtxs->add(ex,bar_max,aZ);
7412 vtxs->add(ex-edx,bar_max,aZ);
7413 vtxs->add(ex+edx,bar_max,aZ);
7415 }
else if(bar_max >1) {
7416 vtxs->add(ex-edx,bar_min,aZ);
7417 vtxs->add(ex+edx,bar_min,aZ);
7418 vtxs->add(ex,bar_min,aZ);
7421 vtxs->add(ex-edx,bar_min,aZ);
7422 vtxs->add(ex+edx,bar_min,aZ);
7423 vtxs->add(ex ,bar_min,aZ);
7424 vtxs->add(ex ,bar_max,aZ);
7425 vtxs->add(ex-edx,bar_max,aZ);
7426 vtxs->add(ex+edx,bar_max,aZ);
7431 if(vtxs->number()) {
◆ rep_errors_plus_xy()
void tools::sg::plotter::rep_errors_plus_xy |
( |
std::ostream & |
, |
|
|
const style & |
a_style, |
|
|
const std::vector< rep_bin1D > & |
a_bins, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
const std::vector< float > & |
a_bars, |
|
|
float |
aZ |
|
) |
| |
|
inlineprotected |
Definition at line 7243 of file plotter.
7246 separator* _sep =
new separator();
7249 rgba* mat =
new rgba();
7250 mat->color = a_style.color;
7253 draw_style* ds =
new draw_style;
7255 ds->line_pattern.value(a_style.line_pattern);
7256 ds->line_width.value(a_style.line_width);
7259 vertices* vtxs =
new vertices;
7263 float xmin = a_box_x.m_pos;
7264 float dx = a_box_x.m_width;
7265 bool xlog = a_box_x.m_log;
7267 float ymin = a_box_y.m_pos;
7268 float dy = a_box_y.m_width;
7269 bool ylog = a_box_y.m_log;
7271 size_t xnbin = a_bins.size();
7273 for(
size_t index=0;index<xnbin;index++) {
7277 float val = a_bins[index].m_val;
7278 float bar_height = a_bars[index];
7280 float bar_min = val - bar_height/2;
7281 float bar_max = val + bar_height/2;
7283 float xx = a_bins[index].m_x_min;
7284 float xe = a_bins[index].m_x_max;
7300 float ex = (xe+xx)/2;
7303 float edx = 0.3F * (xe-xx);
7305 if((val>=0)&&(val<=1)) {
7306 vtxs->add(ex-edx,val,aZ);
7307 vtxs->add(ex+edx,val,aZ);
7312 }
else if(bar_max <0) {
7314 }
else if(bar_min <0) {
7320 vtxs->add(ex,bar_max,aZ);
7322 }
else if(bar_max >1) {
7323 vtxs->add(ex,bar_min,aZ);
7326 vtxs->add(ex ,bar_min,aZ);
7327 vtxs->add(ex ,bar_max,aZ);
7332 if(vtxs->number()) {
◆ rep_hatch1D_xy()
void tools::sg::plotter::rep_hatch1D_xy |
( |
const style & |
a_style, |
|
|
const std::vector< rep_bin1D > & |
a_bins, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
float |
a_zz, |
|
|
bool |
a_bar_chart |
|
) |
| |
|
inlineprotected |
Definition at line 7438 of file plotter.
7444 separator* _sep =
new separator;
7446 rgba* mat =
new rgba();
7447 mat->color = a_style.color;
7450 draw_style* ds =
new draw_style;
7451 if(a_style.strip_width.value()==0) {
7454 ds->line_width = a_style.line_width;
7461 float xmin = a_box_x.m_pos;
7462 float dx = a_box_x.m_width;
7463 bool xlog = a_box_x.m_log;
7465 float ymin = a_box_y.m_pos;
7466 float dy = a_box_y.m_width;
7467 bool ylog = a_box_y.m_log;
7472 size_t xnbin = a_bins.size();
7473 for(
size_t index=0;index<xnbin;index++) {
7474 float xx = a_bins[index].m_x_min;
7475 float xe = a_bins[index].m_x_max;
7476 float yy = a_bins[index].m_v_min;
7477 float ye = a_bins[index].m_val;
7479 yy = a_bins[index].m_val;
7480 ye = a_bins[index].m_v_min;
7483 if(a_bar_chart)
bar_chart(a_style.bar_offset.value(),a_style.bar_width.value(),xx,xe);
7500 points[0].set_value(xx,yy,a_zz);
7501 points[1].set_value(xe,yy,a_zz);
7502 points[2].set_value(xe,ye,a_zz);
7503 points[3].set_value(xx,ye,a_zz);
7504 points[4].set_value(xx,yy,a_zz);
7509 _hatcher.set_offset_point(vec3f(0,0,a_zz));
7510 _hatcher.set_angle(a_style.angle.value());
7511 _hatcher.set_spacing(a_style.spacing.value());
7512 if(!_hatcher.set_strip_width(a_style.strip_width.value())) {}
7514 bool res = _hatcher.check_polyline(
points,4);
7515 if(res) res = _hatcher.compute_polyline(
points,4);
7517 size_t numPoints = _hatcher.points().size();
7518 size_t numVertices = _hatcher.vertices().size();
7519 if((res) && numPoints && numVertices) {
7521 const std::vector<vec3f>& _points = _hatcher.points();
7523 if(a_style.strip_width.value()==0) {
7527 vertices* vtxs =
new vertices;
7529 for(
size_t _index=0;_index<(*itv);_index++) {
7530 vtxs->add(_points[ipt]);
7540 vertices* vtxs =
new vertices;
7542 for(
size_t _index=0;_index<(*itv);_index++) {
7543 vtxs->add(_points[ipt]);
◆ rep_points2D_xy_curve()
void tools::sg::plotter::rep_points2D_xy_curve |
( |
std::ostream & |
a_out, |
|
|
const style & |
a_style, |
|
|
const points2D & |
a_points, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
float |
a_zz |
|
) |
| |
|
inlineprotected |
Definition at line 7607 of file plotter.
7610 unsigned int number = a_points.points();
7613 double* xs =
new double[number];
7614 double* ys =
new double[number];
7616 {
for(
unsigned int index=0;index<number;index++) {
7617 a_points.ith_point(index,x,y);
7618 xs[index] = x;ys[index] = y;
7620 spline::cubic _spline(a_out,number,xs,ys);
7622 delete [] xs;
delete [] ys;
7627 float step = (xmx - xmn)/nstp;
7628 std::vector<vec3f>
points(nstp+1);
7629 for(
unsigned int ibin=0;ibin<=nstp;ibin++) {
7630 float xx = xmn + ibin * step;
7631 double val = _spline.eval(xx);
7632 points[ibin].set_value(xx,
float(val),a_zz);
7635 vertices* vtxs =
new vertices;
7636 std::vector<float>& pts = vtxs->xyzs.values();
7640 sg::separator* separator =
new sg::separator;
7643 rgba* mat =
new rgba();
7644 mat->color = a_style.color;
7645 separator->add(mat);
7647 draw_style* ds =
new draw_style;
7649 ds->line_pattern = a_style.line_pattern;
7650 ds->line_width = a_style.line_width;
7654 separator->add(vtxs);
◆ rep_points2D_xy_lines()
void tools::sg::plotter::rep_points2D_xy_lines |
( |
const style & |
a_style, |
|
|
const points2D & |
a_points, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
float |
a_zz |
|
) |
| |
|
inlineprotected |
Definition at line 7560 of file plotter.
7563 float xmin = a_box_x.m_pos;
7564 float dx = a_box_x.m_width;
7565 bool xlog = a_box_x.m_log;
7567 float ymin = a_box_y.m_pos;
7568 float dy = a_box_y.m_width;
7569 bool ylog = a_box_y.m_log;
7571 separator* _sep =
new separator();
7573 rgba* mat =
new rgba();
7574 mat->color = a_style.color;
7577 draw_style* ds =
new draw_style;
7579 ds->line_pattern.value(a_style.line_pattern);
7580 ds->line_width.value(a_style.line_width);
7583 vertices* vtxs =
new vertices;
7590 unsigned int number = a_points.points();
7591 for(
unsigned int index=0;index<number;index++) {
7592 a_points.ith_point(index,x,y);
7595 if((x<0)||(x>1)||(y<0)||(y>1))
continue;
7596 vtxs->add(x,y,a_zz);
◆ rep_points2D_xy_points()
void tools::sg::plotter::rep_points2D_xy_points |
( |
std::ostream & |
a_out, |
|
|
const style & |
a_style, |
|
|
const points2D & |
a_points, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
float |
a_zz |
|
) |
| |
|
inlineprotected |
Definition at line 7663 of file plotter.
7666 float xmin = a_box_x.m_pos;
7667 float dx = a_box_x.m_width;
7668 bool xlog = a_box_x.m_log;
7670 float ymin = a_box_y.m_pos;
7671 float dy = a_box_y.m_width;
7672 bool ylog = a_box_y.m_log;
7674 separator* _sep =
new separator();
7676 rgba* mat =
new rgba();
7677 mat->color = a_style.color;
7680 mf<float>* _xyzs = 0;
7683 markers* _marks =
new markers;
7684 _marks->size = a_style.marker_size;
7685 _marks->style = a_style.marker_style;
7686 _xyzs = &(_marks->xyzs);
7690 draw_style* ds =
new draw_style;
7692 ds->point_size = a_style.point_size;
7695 vertices* vtxs =
new vertices;
7697 _xyzs = &(vtxs->xyzs);
7700 a_out <<
"tools::sg::plotter::rep_points2D_xy_points :"
7701 <<
" bad modeling style " <<
tools::sout(a_style.modeling) << std::endl;
7710 {
unsigned int number = a_points.points();
7711 for(
unsigned int index=0;index<number;index++) {
7712 a_points.ith_point(index,x,y);
7716 if((x<0)||(x>1)||(y<0)||(y>1))
continue;
7720 _xyzs->values().resize(npts);
7725 {
unsigned int number = a_points.points();
7726 for(
unsigned int index=0;index<number;index++) {
7727 a_points.ith_point(index,x,y);
7731 if((x<0)||(x>1)||(y<0)||(y>1))
continue;
7732 _xyzs->add_allocated(xyz_pos,x,y,a_zz);
◆ rep_points3D_xyz_points()
void tools::sg::plotter::rep_points3D_xyz_points |
( |
std::ostream & |
a_out, |
|
|
const style & |
a_style, |
|
|
const points3D & |
a_points, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
const rep_box & |
a_box_z |
|
) |
| |
|
inlineprotected |
Definition at line 7743 of file plotter.
7746 float xmin = a_box_x.m_pos;
7747 float dx = a_box_x.m_width;
7748 bool xlog = a_box_x.m_log;
7750 float ymin = a_box_y.m_pos;
7751 float dy = a_box_y.m_width;
7752 bool ylog = a_box_y.m_log;
7754 float zmin = a_box_z.m_pos;
7755 float dz = a_box_z.m_width;
7756 bool zlog = a_box_z.m_log;
7758 separator* _sep =
new separator();
7760 rgba* mat =
new rgba();
7761 mat->color = a_style.color;
7764 mf<float>* _xyzs = 0;
7767 markers* _marks =
new markers;
7768 _marks->size = a_style.marker_size;
7769 _marks->style = a_style.marker_style;
7770 _xyzs = &(_marks->xyzs);
7774 draw_style* ds =
new draw_style;
7776 ds->point_size = a_style.point_size;
7779 vertices* vtxs =
new vertices;
7781 _xyzs = &(vtxs->xyzs);
7784 a_out <<
"tools::sg::plotter::rep_points3D_xy_points :"
7785 <<
" bad modeling style " <<
tools::sout(a_style.modeling) << std::endl;
7794 {
unsigned int number = a_points.points();
7795 for(
unsigned int index=0;index<number;index++) {
7796 a_points.ith_point(index,x,y,z);
7801 if((x<0)||(x>1)||(y<0)||(y>1)||(z<0)||(z>1))
continue;
7805 _xyzs->values().resize(npts);
7810 {
unsigned int number = a_points.points();
7811 for(
unsigned int index=0;index<number;index++) {
7812 a_points.ith_point(index,x,y,z);
7817 if((x<0)||(x>1)||(y<0)||(y>1)||(z<0)||(z>1))
continue;
7818 _xyzs->add_allocated(xyz_pos,x,y,z);
◆ rep_top_face2D_xyz()
Definition at line 7938 of file plotter.
7941 float xmin = a_box_x.m_pos;
7942 float dx = a_box_x.m_width;
7943 bool xlog = a_box_x.m_log;
7945 float ymin = a_box_y.m_pos;
7946 float dy = a_box_y.m_width;
7947 bool ylog = a_box_y.m_log;
7949 float zmin = a_box_z.m_pos;
7950 float dz = a_box_z.m_width;
7951 bool zlog = a_box_z.m_log;
7957 separator* _sep =
new separator();
7964 atb_vertices* vtxs =
new atb_vertices;
7966 vtxs->do_back =
true;
7967 vtxs->epsilon = 1e-6f;
7973 size_t number = a_faces.size();
7974 for(
size_t index=0;index<number;index++) {
7975 float xx = a_faces[index].m_x_min;
7976 float xe = a_faces[index].m_x_max;
7977 float yy = a_faces[index].m_y_min;
7978 float ye = a_faces[index].m_y_max;
7979 float val1 = a_faces[index].m_v1;
7980 float val2 = a_faces[index].m_v2;
7981 float val3 = a_faces[index].m_v3;
7982 float val4 = a_faces[index].m_v4;
7995 if(val1<0) val1 = 0;
7996 if(val1>1) val1 = 1;
7998 if(val2<0) val2 = 0;
7999 if(val2>1) val2 = 1;
8001 if(val3<0) val3 = 0;
8002 if(val3>1) val3 = 1;
8004 if(val4<0) val4 = 0;
8005 if(val4>1) val4 = 1;
8007 if((xx>=0)&&(xx<=1) &&
8010 (ye>=0)&&(ye<=1) ) {
8013 float v = (zlog?
take_log(val):val);
8014 a_cmap.get_color(v,clr);
8018 a_cmap.get_color(a_faces[index].m_ratio,clr);
8020 clr = a_style.color;
8028 vtxs->add(xx,ye,val4);
8029 vtxs->add(xx,yy,val1);
8030 vtxs->add(xe,yy,val2);
8032 vtxs->add_color(clr);
8033 vtxs->add_color(clr);
8034 vtxs->add_color(clr);
8040 vtxs->add_normal(nm[0],nm[1],nm[2]);
8041 vtxs->add_normal(nm[0],nm[1],nm[2]);
8042 vtxs->add_normal(nm[0],nm[1],nm[2]);
8046 vtxs->add(xe,yy,val2);
8047 vtxs->add(xe,ye,val3);
8048 vtxs->add(xx,ye,val4);
8050 vtxs->add_rgba(clr[0],clr[1],clr[2],clr[3]);
8051 vtxs->add_rgba(clr[0],clr[1],clr[2],clr[3]);
8052 vtxs->add_rgba(clr[0],clr[1],clr[2],clr[3]);
8058 vtxs->add_normal(nm[0],nm[1],nm[2]);
8059 vtxs->add_normal(nm[0],nm[1],nm[2]);
8060 vtxs->add_normal(nm[0],nm[1],nm[2]);
◆ rep_top_face2D_xyz_by_level()
Definition at line 8169 of file plotter.
8175 size_t ncol = a_cmap.colorn();
8178 float xmin = a_box_x.m_pos;
8179 float dx = a_box_x.m_width;
8180 bool xlog = a_box_x.m_log;
8182 float ymin = a_box_y.m_pos;
8183 float dy = a_box_y.m_width;
8184 bool ylog = a_box_y.m_log;
8186 float zmin = a_box_z.m_pos;
8187 float dz = a_box_z.m_width;
8188 bool zlog = a_box_z.m_log;
8197 sg::separator* separator =
new sg::separator;
8200 atb_vertices* tris =
new atb_vertices;
8202 tris->do_back =
true;
8203 tris->epsilon = 1e-6f;
8204 separator->add(tris);
8209 float d_z = (zmx-zz)/ncol;
8211 size_t number = a_top_faces.size();
8213 for(
size_t icol=0;icol<ncol;icol++) {
8218 _color = a_cmap.color(icol);
8220 for(
size_t index=0;index<number;index++) {
8221 float xx = a_top_faces[index].m_x_min;
8222 float xe = a_top_faces[index].m_x_max;
8223 float yy = a_top_faces[index].m_y_min;
8224 float ye = a_top_faces[index].m_y_max;
8225 float val1 = a_top_faces[index].m_v1;
8226 float val2 = a_top_faces[index].m_v2;
8227 float val3 = a_top_faces[index].m_v3;
8228 float val4 = a_top_faces[index].m_v4;
8241 if(val1<0) val1 = 0;
8242 if(val1>1) val1 = 1;
8244 if(val2<0) val2 = 0;
8245 if(val2>1) val2 = 1;
8247 if(val3<0) val3 = 0;
8248 if(val3>1) val3 = 1;
8250 if(val4<0) val4 = 0;
8251 if(val4>1) val4 = 1;
8253 if((xx>=0)&&(xx<=1) &&
8256 (ye>=0)&&(ye<=1) ) {
8260 {clip<vec3f> clipper;
8261 clipper.add(vec3f(xx,ye,val4));
8262 clipper.add(vec3f(xx,yy,val1));
8263 clipper.add(vec3f(xe,yy,val2));
8265 float z1 = zz+d_z*icol;
8267 plane<vec3f> plane_z_bot(vec3f(0,0,1),vec3f(0,0,z1));
8268 plane<vec3f> plane_z_top(vec3f(0,0,-1),vec3f(0,0,z2));
8269 clipper.execute(plane_z_bot);
8270 clipper.execute(plane_z_top);
8272 const std::vector<vec3f>& result = clipper.result();
8274 plane<vec3f> plane1(vec3f(xx,ye,val4),vec3f(xx,yy,val1),vec3f(xe,yy,val2));
8275 if(result.size()==3) {
8278 tris->add_color(_color);
8279 tris->add_normal(plane1.normal());
8282 atb_vertices* vtxs =
new atb_vertices;
8284 vtxs->do_back =
true;
8285 vtxs->epsilon = 1e-6f;
8286 separator->add(vtxs);
8289 vtxs->add_color(_color);
8290 vtxs->add_normal(plane1.normal());
8299 {clip<vec3f> clipper;
8300 clipper.add(vec3f(xe,yy,val2));
8301 clipper.add(vec3f(xe,ye,val3));
8302 clipper.add(vec3f(xx,ye,val4));
8304 float z1 = zz+d_z*icol;
8306 plane<vec3f> plane_z_bot(vec3f(0,0,1),vec3f(0,0,z1));
8307 plane<vec3f> plane_z_top(vec3f(0,0,-1),vec3f(0,0,z2));
8308 clipper.execute(plane_z_bot);
8309 clipper.execute(plane_z_top);
8311 const std::vector<vec3f>& result = clipper.result();
8313 plane<vec3f> plane2(vec3f(xe,yy,val2),vec3f(xe,ye,val3),vec3f(xx,ye,val4));
8314 if(result.size()==3) {
8317 tris->add_color(_color);
8318 tris->add_normal(plane2.normal());
8321 atb_vertices* vtxs =
new atb_vertices;
8323 vtxs->do_back =
true;
8324 vtxs->epsilon = 1e-6f;
8325 separator->add(vtxs);
8328 vtxs->add_color(_color);
8329 vtxs->add_normal(plane2.normal());
◆ rep_top_face2D_xyz_line()
Definition at line 8072 of file plotter.
8076 float xmin = a_box_x.m_pos;
8077 float dx = a_box_x.m_width;
8078 bool xlog = a_box_x.m_log;
8080 float ymin = a_box_y.m_pos;
8081 float dy = a_box_y.m_width;
8082 bool ylog = a_box_y.m_log;
8084 float zmin = a_box_z.m_pos;
8085 float dz = a_box_z.m_width;
8086 bool zlog = a_box_z.m_log;
8088 sg::separator* separator =
new sg::separator;
8091 rgba* mat =
new rgba();
8092 mat->color = colorf_black();
8093 separator->add(mat);
8095 draw_style* ds =
new draw_style;
8101 vertices* vtxs =
new vertices;
8103 separator->add(vtxs);
8105 float zepsilon = 0.02f;
8107 size_t number = a_top_faces.size();
8108 for(
size_t index=0;index<number;index++) {
8109 float xx = a_top_faces[index].m_x_min;
8110 float xe = a_top_faces[index].m_x_max;
8111 float yy = a_top_faces[index].m_y_min;
8112 float ye = a_top_faces[index].m_y_max;
8113 float val1 = a_top_faces[index].m_v1;
8114 float val2 = a_top_faces[index].m_v2;
8115 float val3 = a_top_faces[index].m_v3;
8116 float val4 = a_top_faces[index].m_v4;
8129 if(val1<0) val1 = 0;
8130 if(val1>1) val1 = 1;
8132 if(val2<0) val2 = 0;
8133 if(val2>1) val2 = 1;
8135 if(val3<0) val3 = 0;
8136 if(val3>1) val3 = 1;
8138 if(val4<0) val4 = 0;
8139 if(val4>1) val4 = 1;
8141 if((xx>=0)&&(xx<=1) &&
8144 (ye>=0)&&(ye<=1) ) {
8146 vtxs->add(xx,ye,val4+zepsilon);
8147 vtxs->add(xx,yy,val1+zepsilon);
8149 vtxs->add(xx,yy,val1+zepsilon);
8150 vtxs->add(xe,yy,val2+zepsilon);
8152 vtxs->add(xe,yy,val2+zepsilon);
8153 vtxs->add(xe,ye,val3+zepsilon);
8155 vtxs->add(xe,ye,val3+zepsilon);
8156 vtxs->add(xx,ye,val4+zepsilon);
◆ reset_style()
void tools::sg::plotter::reset_style |
( |
bool |
a_geom = false | ) |
|
|
inline |
Definition at line 491 of file plotter.
522 float xfac = 1.0F/20.0F;
523 float yfac = 1.0F/20.0F;
526 float XSIZ = 20 * xfac;
527 float YSIZ = 20 * yfac;
528 float XMGL = 2 * xfac;
529 float XMGR = 2 * xfac;
530 float YMGL = 2 * yfac;
531 float YMGU = 2 * yfac;
533 float VSIZ = 0.28F * yfac;
534 float XVAL = 0.4F * xfac;
535 float YVAL = 0.4F * yfac;
536 float XTIC = 0.3F * yfac;
537 float YTIC = 0.3F * xfac;
538 float XLAB = 1.4F * xfac;
539 float YLAB = 0.8F * yfac;
540 float ASIZ = 0.28F * yfac;
542 float YHTI = 1.2F * yfac;
543 float TSIZ = 0.28F * yfac;
545 float zfac = 1.0F/20.0F;
546 float ZSIZ = 20 * zfac;
547 float ZMGD = 2 * zfac;
548 float ZMGU = 2 * zfac;
706 (*it).marker_size = 5;
◆ reset_touched()
virtual void tools::sg::plotter::reset_touched |
( |
| ) |
|
|
inlinevirtual |
◆ right_hatch_style()
style& tools::sg::plotter::right_hatch_style |
( |
size_t |
a_index | ) |
|
|
inline |
Definition at line 1774 of file plotter.
1777 for(
size_t index=sz;index<=a_index;index++) {
◆ s2axis()
bool tools::sg::plotter::s2axis |
( |
const std::string & |
a_s, |
|
|
sg::axis *& |
a_axis |
|
) |
| |
|
inlineprotected |
Definition at line 976 of file plotter.
977 if(a_s==
"x_axis") {a_axis = &(
x_axis());
return true;}
978 else if(a_s==
"y_axis") {a_axis = &(
y_axis());
return true;}
979 else if(a_s==
"z_axis") {a_axis = &(
z_axis());
return true;}
980 else if(a_s==
"colormap_axis") {a_axis = &(
colormap_axis());
return true;}
◆ search()
virtual void tools::sg::plotter::search |
( |
search_action & |
a_action | ) |
|
|
inlinevirtual |
◆ set_axes_color()
void tools::sg::plotter::set_axes_color |
( |
const colorf & |
a_color | ) |
|
|
inline |
◆ set_axes_font_modeling()
void tools::sg::plotter::set_axes_font_modeling |
( |
font_modeling |
a_v | ) |
|
|
inline |
◆ set_axes_label_height()
void tools::sg::plotter::set_axes_label_height |
( |
float |
a_v | ) |
|
|
inline |
◆ set_axes_line_pattern()
void tools::sg::plotter::set_axes_line_pattern |
( |
unsigned short |
a_v | ) |
|
|
inline |
◆ set_axes_line_width()
void tools::sg::plotter::set_axes_line_width |
( |
int |
a_v | ) |
|
|
inline |
◆ set_axes_modeling()
void tools::sg::plotter::set_axes_modeling |
( |
const std::string & |
a_v | ) |
|
|
inline |
◆ set_axes_text_scale()
void tools::sg::plotter::set_axes_text_scale |
( |
float |
a_v | ) |
|
|
inline |
◆ set_axes_tick_length()
void tools::sg::plotter::set_axes_tick_length |
( |
float |
a_v | ) |
|
|
inline |
◆ set_axes_title_height()
void tools::sg::plotter::set_axes_title_height |
( |
float |
a_v | ) |
|
|
inline |
◆ set_encoding()
void tools::sg::plotter::set_encoding |
( |
const std::string & |
a_value | ) |
|
|
inline |
◆ set_encoding_none()
void tools::sg::plotter::set_encoding_none |
( |
| ) |
|
|
inline |
◆ set_font_modeling()
◆ set_from_string()
bool tools::sg::plotter::set_from_string |
( |
std::ostream & |
a_out, |
|
|
cmaps_t & |
a_cmaps, |
|
|
const std::string & |
a_field, |
|
|
const std::string & |
a_value |
|
) |
| |
|
inline |
Definition at line 987 of file plotter.
989 std::string::size_type pos = a_field.find(
'.');
991 if(pos==std::string::npos) {
996 std::vector<std::string> _words;
997 words(a_field,
".",
false,_words);
998 if(_words.size()==2) {
999 const std::string& word0 = _words[0];
1000 const std::string& word1 = _words[1];
1001 std::string _s = word1+
" "+std::string(a_value);
1002 sg::axis* _axis = 0;
1003 if(word0==
"background_style") {
if(!
background_style().from_string(a_out,a_cmaps,_s)) status =
false;}
1004 else if(word0==
"title_style") {
if(!
title_style().from_string(a_out,a_cmaps,_s)) status =
false;}
1005 else if(word0==
"infos_style") {
if(!
infos_style().from_string(a_out,a_cmaps,_s)) status =
false;}
1006 else if(word0==
"title_box_style") {
if(!
title_box_style().from_string(a_out,a_cmaps,_s)) status =
false;}
1007 else if(word0==
"inner_frame_style") {
if(!
inner_frame_style().from_string(a_out,a_cmaps,_s)) status =
false;}
1008 else if(word0==
"grid_style") {
if(!
grid_style().from_string(a_out,a_cmaps,_s)) status =
false;}
1009 else if(word0==
"wall_style") {
if(!
wall_style().from_string(a_out,a_cmaps,_s)) status =
false;}
1010 else if(!
s2axis(word0,_axis)) {
1011 a_out <<
"tools::sg::plotter::set_from_string : unexpected axis field " << word0 <<
"." << std::endl;
1016 if(!_axis->set_from_style(a_out,_style)) status =
false;
1018 }
else if(_words.size()==3) {
1019 const std::string& word0 = _words[0];
1020 const std::string& word1 = _words[1];
1021 const std::string& word2 = _words[2];
1022 sg::axis* _axis = 0;
1023 std::string _s = word2+
" "+std::string(a_value);
1025 bool to_status = to<unsigned int>(word1,index);
1026 if(word0==
"bins_style") {
1028 a_out <<
"tools::sg::plotter::set_from_string : bad string " << word1 <<
" for an index." << std::endl;
1031 if(!
bins_style(index).from_string(a_out,a_cmaps,_s)) status =
false;
1033 }
else if(word0==
"errors_style") {
1035 a_out <<
"tools::sg::plotter::set_from_string : bad string " << word1 <<
" for an index." << std::endl;
1038 if(!
errors_style(index).from_string(a_out,a_cmaps,_s)) status =
false;
1040 }
else if(word0==
"func_style") {
1042 a_out <<
"tools::sg::plotter::set_from_string : bad string " << word1 <<
" for an index." << std::endl;
1045 if(!
func_style(index).from_string(a_out,a_cmaps,_s)) status =
false;
1047 }
else if(word0==
"points_style") {
1049 a_out <<
"tools::sg::plotter::set_from_string : bad string " << word1 <<
" for an index." << std::endl;
1052 if(!
points_style(index).from_string(a_out,a_cmaps,_s)) status =
false;
1054 }
else if(word0==
"left_hatch_style") {
1056 a_out <<
"tools::sg::plotter::set_from_string : bad string " << word1 <<
" for an index." << std::endl;
1061 }
else if(word0==
"right_hatch_style") {
1063 a_out <<
"tools::sg::plotter::set_from_string : bad string " << word1 <<
" for an index." << std::endl;
1068 }
else if(word0==
"legend_style") {
1070 a_out <<
"tools::sg::plotter::set_from_string : bad string " << word1 <<
" for an index." << std::endl;
1073 if(!
legend_style(index).from_string(a_out,a_cmaps,_s)) status =
false;
1075 }
else if(!
s2axis(word0,_axis)) {
1076 a_out <<
"tools::sg::plotter::set_from_string : unexpected axis field " << word0 <<
"." << std::endl;
1079 if(word1==
"line_style") {
if(!_axis->line_style().from_string(a_out,a_cmaps,_s)) status =
false;}
1080 else if(word1==
"ticks_style") {
if(!_axis->ticks_style().from_string(a_out,a_cmaps,_s)) status =
false;}
1081 else if(word1==
"labels_style") {
if(!_axis->labels_style().from_string(a_out,a_cmaps,_s)) status =
false;}
1082 else if(word1==
"mag_style") {
if(!_axis->mag_style().from_string(a_out,a_cmaps,_s)) status =
false;}
1083 else if(word1==
"title_style") {
if(!_axis->title_style().from_string(a_out,a_cmaps,_s)) status =
false;}
1085 a_out <<
"tools::sg::plotter::set_from_string : unexpected style field " << word1 <<
"." << std::endl;
1090 a_out <<
"tools::sg::plotter::set_from_string : unexpected number of fields " << _words.size() <<
"." << std::endl;
◆ set_from_style()
bool tools::sg::plotter::set_from_style |
( |
std::ostream & |
a_out, |
|
|
const style_t & |
a_style |
|
) |
| |
|
inline |
Definition at line 740 of file plotter.
742 const std::string& key = (*it).first;
743 const std::string& sv = (*it).second;
754 }
else if(key==
"width") {
756 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
758 }
else if(key==
"height") {
760 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
762 }
else if(key==
"depth") {
764 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
767 }
else if(key==
"left_margin") {
769 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
771 }
else if(key==
"right_margin") {
773 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
775 }
else if(key==
"bottom_margin") {
777 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
779 }
else if(key==
"top_margin") {
781 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
783 }
else if(key==
"down_margin") {
785 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
787 }
else if(key==
"up_margin") {
789 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
792 }
else if(key==
"title") {
794 }
else if(key==
"title_up") {
798 }
else if(key==
"title_to_axis") {
800 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
802 }
else if(key==
"title_height") {
804 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
806 }
else if(key==
"title_automated") {
810 }
else if(key==
"title_hjust") {
816 }
else if(key==
"x_axis_enforced") {
820 }
else if(key==
"x_axis_automated") {
824 }
else if(key==
"x_axis_min") {
826 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
828 }
else if(key==
"x_axis_max") {
830 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
832 }
else if(key==
"x_axis_is_log") {
837 }
else if(key==
"y_axis_enforced") {
841 }
else if(key==
"y_axis_automated") {
845 }
else if(key==
"y_axis_min") {
847 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
849 }
else if(key==
"y_axis_max") {
851 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
853 }
else if(key==
"y_axis_is_log") {
858 }
else if(key==
"z_axis_enforced") {
862 }
else if(key==
"z_axis_automated") {
866 }
else if(key==
"z_axis_min") {
868 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
870 }
else if(key==
"z_axis_max") {
872 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
874 }
else if(key==
"z_axis_is_log") {
879 }
else if(key==
"value_top_margin") {
881 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
883 }
else if(key==
"value_bottom_margin") {
885 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
887 }
else if(key==
"value_bins_with_entries") {
889 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
891 }
else if(key==
"infos_width") {
893 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
895 }
else if(key==
"infos_x_margin") {
897 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
899 }
else if(key==
"infos_y_margin") {
901 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
904 }
else if(key==
"title_box_width") {
906 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
908 }
else if(key==
"title_box_height") {
910 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
912 }
else if(key==
"title_box_x_margin") {
914 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
916 }
else if(key==
"title_box_y_margin") {
918 if(!to<float>(sv,v)) {
style_failed(a_out,key,sv);
return false;}
921 }
else if(key==
"infos_what") {
928 }
else if(key==
"legends_automated") {
936 }
else if(key==
"legends_origin") {
940 }
else if(key==
"legends_size") {
944 }
else if(key==
"legends_origin_unit") {
949 }
else if(key==
"shape_automated") {
954 }
else if(key==
"shape") {
957 }
else if(sv==
"xyz") {
969 a_out <<
"tools::sg::plotter::set_from_style : unknown key " << key <<
"." << std::endl;
◆ sto() [1/2]
bool tools::sg::plotter::sto |
( |
const std::string & |
a_s, |
|
|
unit_type & |
a_v |
|
) |
| |
|
inlineprotected |
◆ sto() [2/2]
bool tools::sg::plotter::sto |
( |
const std::string & |
a_s, |
|
|
vec2f & |
a_v |
|
) |
| |
|
inlineprotected |
Definition at line 9364 of file plotter.
9365 std::vector<std::string> ws;
9366 words(a_s,
" ",
false,ws);
9367 if(ws.size()!=2)
return false;
9369 if(!to<float>(ws[0],x))
return false;
9371 if(!to<float>(ws[1],x))
return false;
◆ style_failed()
void tools::sg::plotter::style_failed |
( |
std::ostream & |
a_out, |
|
|
const std::string & |
a_key, |
|
|
const std::string & |
a_value |
|
) |
| |
|
inlineprotected |
Definition at line 1176 of file plotter.
1177 a_out <<
"tools::sg::plotter::set_from_style :"
1178 <<
" failed for key " << sout(a_key)
1179 <<
" and value " << sout(a_value) <<
"."
◆ take_log()
static float tools::sg::plotter::take_log |
( |
float |
a_x | ) |
|
|
inlinestaticprotected |
◆ title_box_style()
text_style& tools::sg::plotter::title_box_style |
( |
| ) |
|
|
inline |
◆ title_style()
◆ touched()
virtual bool tools::sg::plotter::touched |
( |
| ) |
|
|
inlinevirtual |
◆ transfer_plottables()
void tools::sg::plotter::transfer_plottables |
( |
std::vector< plottable * > & |
a_to | ) |
|
|
inline |
◆ transfer_primitives()
void tools::sg::plotter::transfer_primitives |
( |
std::vector< plotprim * > & |
a_to | ) |
|
|
inline |
◆ transfer_todels()
void tools::sg::plotter::transfer_todels |
( |
std::vector< node * > & |
a_to | ) |
|
|
inline |
◆ tsf()
matrix& tools::sg::plotter::tsf |
( |
| ) |
|
|
inline |
◆ update_axes_data()
void tools::sg::plotter::update_axes_data |
( |
std::ostream & |
a_out | ) |
|
|
inline |
Definition at line 2999 of file plotter.
3096 float ymn = p2->y_axis_min();
3097 float ymx = p2->y_axis_max();
3127 float xmn = f1->x_min();
3128 float xmx = f1->x_max();
3140 unsigned int nstp = f1->x_steps();
3143 float df = (xmx - xmn)/nstp;
3144 bool problem =
false;
3146 if(!f1->value(xmn,vmin)) problem =
true;
3148 for(
unsigned int ibin=0;ibin<=nstp;ibin++) {
3149 float xx = xmn + ibin * df;
3151 if(!f1->value(xx,val)) problem =
true;
3152 vmax = mx<float>(vmax,val);
3153 vmin = mn<float>(vmin,val);
3156 a_out <<
"tools::sg::plotter :"
3157 <<
" problem when getting some function value."
3167 float xmn = f2->x_min();
3168 float xmx = f2->x_max();
3178 float ymn = f2->y_min();
3179 float ymx = f2->y_max();
3192 int nx = f2->x_steps();
3197 int ny = f2->y_steps();
3200 float dfx = (xmx - xmn)/nx;
3201 float dfy = (ymx - ymn)/ny;
3203 bool problem =
false;
3205 if(!f2->value(xmn,ymn,vmin)) problem =
true;
3207 for(
int jbin=ny-1;jbin>=0;jbin--) {
3208 for(
int ibin=nx-1;ibin>=0;ibin--) {
3209 float xx = xmn + ibin * dfx;
3210 float yy = ymn + jbin * dfy;
3212 if(!f2->value(xx,yy,val)) problem =
true;
3213 vmin = mn<float>(vmin,val);
3214 vmax = mx<float>(vmax,val);
3218 a_out <<
"tools::sg::plotter :"
3219 <<
" problem when getting some function value."
◆ update_axis()
void tools::sg::plotter::update_axis |
( |
std::ostream & |
a_out, |
|
|
sg::axis & |
a_axis, |
|
|
data_axis & |
a_data |
|
) |
| |
|
inline |
Definition at line 3236 of file plotter.
3237 a_axis.minimum_value = a_data.min_value();
3238 a_axis.maximum_value = a_data.max_value();
3239 a_axis.is_log = a_data.is_log();
3240 a_axis.update_sg(a_out);
3241 a_axis.reset_touched();
◆ update_background()
void tools::sg::plotter::update_background |
( |
| ) |
|
|
inlineprotected |
Definition at line 5672 of file plotter.
5676 matrix* _tsf =
new matrix;
5679 float w2 =
width*0.5F;
5685 {rgba* mat =
new rgba();
5695 vertices* vtxs =
new vertices;
5699 vtxs->add(-w2,-h2,zz);
5700 vtxs->add( w2,-h2,zz);
5701 vtxs->add( w2, h2,zz);
5702 vtxs->add(-w2, h2,zz);}
5709 rgba* mat =
new rgba();
5713 vertices* vtxs =
new vertices;
5722 vtxs->add(-w2+d,-h2+d,zz);
5723 vtxs->add( w2-d,-h2+d,zz);
5724 vtxs->add( w2-d, h2-d,zz);
5725 vtxs->add(-w2+d, h2-d,zz);
◆ update_bins1D_xy()
void tools::sg::plotter::update_bins1D_xy |
( |
std::ostream & |
a_out, |
|
|
const bins1D & |
a_bins, |
|
|
const style & |
a_data_style, |
|
|
const style & |
a_left_hatch_style, |
|
|
const style & |
a_right_hatch_style, |
|
|
const style & |
a_errors_style, |
|
|
int |
a_index, |
|
|
bool |
, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
float |
a_zz |
|
) |
| |
|
inlineprotected |
Definition at line 3616 of file plotter.
3641 size_t xnbin = a_bins.bins();
3642 std::vector<rep_bin1D> bins(xnbin);
3644 for(
size_t ibin=0;ibin<xnbin;ibin++) {
3646 float val = a_bins.bin_Sw(
int(ibin));
3647 float xx = float(a_bins.bin_lower_edge(
int(ibin)));
3648 float xe = float(a_bins.bin_upper_edge(
int(ibin)));
3649 bins[ibin] = rep_bin1D(xx,xe,0,val);
3655 bmin = mn<float>(bmin,val);
3656 bmax = mx<float>(bmax,val);
3663 bool errors_visible = a_errors_style.visible;
3665 if(a_data_style.visible) {
3673 {
float dbins = bmax-bmin;
3675 for(
size_t index=0;index<xnbin;index++) bins[index].m_ratio = (a_bins.bin_Sw(
int(index))-bmin)/dbins;
3678 m_bins_cmaps[a_index] =
new grey_scale_colormap(bmin,bmax,50);
3680 m_bins_cmaps[a_index] =
new grey_scale_inverse_colormap(bmin,bmax,50);
3682 m_bins_cmaps[a_index] =
new violet_to_red_colormap(bmin,bmax,50);
3685 m_bins_cmaps[a_index] =
new const_colormap(a_data_style.color);
3688 if(a_bins.is_profile()) {
3696 style data_style = a_data_style;
3700 std::vector<float> bars(xnbin);
3701 for(
size_t ibin=0;ibin<xnbin;ibin++) bars[ibin] = a_bins.bin_error(
int(ibin));
3704 errors_visible =
false;
3708 const std::string& modeling = a_data_style.modeling;
3717 bool _bar_chart =
false;
3729 bins,a_box_x,a_box_y,a_zz);
3738 bins,a_box_x,a_box_y,a_zz
3764 style _style;_style.color = colorf_white();
3797 if(errors_visible) {
3798 std::vector<float> bars(xnbin);
3799 for(
size_t ibin=0;ibin<xnbin;ibin++) bars[ibin] = a_bins.bin_error(
int(ibin));
3800 const std::string& modeling = a_errors_style.modeling;
◆ update_bins2D_xy()
void tools::sg::plotter::update_bins2D_xy |
( |
std::ostream & |
a_out, |
|
|
const bins2D & |
a_bins, |
|
|
const style & |
a_data_style, |
|
|
int |
a_index, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
const rep_box & |
a_box_z, |
|
|
float |
a_zz |
|
) |
| |
|
inlineprotected |
Definition at line 3890 of file plotter.
3901 if(!a_data_style.visible)
return;
3905 unsigned int xnbin = a_bins.x_bins();
3906 unsigned int ynbin = a_bins.y_bins();
3908 const std::string& modeling = a_data_style.modeling;
3912 a_out <<
"tools::sg::update_bins2D_xy : modeling_curve :" << std::endl;
3916 float zmin = a_box_z.m_pos;
3917 float dz = a_box_z.m_width;
3918 bool zlog = a_box_z.m_log;
3925 clist_contour list_contour;
3928 list_contour.set_first_grid(nFir,nFir);
3931 list_contour.set_secondary_grid(nSec,nSec);
3941 sbFunc.m_func2D = 0;
3942 sbFunc.m_problem =
false;
3943 sbFunc.m_bins2D = &a_bins;
3944 sbFunc.m_limits_in[0] = limits[0];
3945 sbFunc.m_limits_in[1] = limits[1];
3946 sbFunc.m_limits_in[2] = limits[2];
3947 sbFunc.m_limits_in[3] = limits[3];
3950 int n = nSec - 2 * 10;
3951 double dx = (limits[1]-limits[0]) /n;
3952 double dy = (limits[3]-limits[2]) /n;
3953 limits[0] = limits[0] - 10 * dx;
3954 limits[1] = limits[1] + 10 * dx;
3955 limits[2] = limits[2] - 10 * dy;
3956 limits[3] = limits[3] + 10 * dy;
3958 sbFunc.m_limits[0] = limits[0];
3959 sbFunc.m_limits[1] = limits[1];
3960 sbFunc.m_limits[2] = limits[2];
3961 sbFunc.m_limits[3] = limits[3];
3963 list_contour.set_limits(limits);
3967 std::vector<double> zs(zn);
3968 for(
size_t zi=0;zi<zn;zi++) zs[zi] =
levels[zi];
3969 list_contour.set_planes(zs);
3973 std::vector<double> zs(zn+1);
3974 float zmax = zmin + dz;
3975 double zd = (zmax-zmin)/zn;
3976 for(
unsigned int zi=0;zi<=zn;zi++) zs[zi] = zmin + zi * zd;
3977 list_contour.set_planes(zs);
3985 #ifdef INLIBS_SG_PLOTTER_TIMING
3986 atime _start = atime::now();
3988 list_contour.ccontour::generate();
3989 #ifdef INLIBS_SG_PLOTTER_TIMING
3990 a_out <<
"tools::sg::update_bins2D_xy : contour generate elapsed " << atime::elapsed(_start) <<
"." << std::endl;
3991 _start = atime::now();
3994 if(!list_contour.compact_strips ()) {
3995 a_out <<
"tools::sg::plotter::updateBins2D_XY : clist_contour::compact_strips () : failure." << std::endl;
3997 #ifdef INLIBS_SG_PLOTTER_TIMING
3998 a_out <<
"tools::sg::update_bins2D_xy : contour compact strips elapsed " << atime::elapsed(_start) <<
"." << std::endl;
4005 m_bins_cmaps[a_index] =
new const_colormap(a_data_style.color);
4011 list_contour,a_box_x,a_box_y,a_box_z,a_zz );
4015 list_contour,a_box_x,a_box_y,a_box_z,a_zz );
4020 if(sbFunc.m_problem) {
4021 a_out <<
"tools::sg::plotter::updateFunction_XY(SbPlottableFunction2D) : "
4022 <<
"problem when getting some function value." << std::endl;
4027 bool hbe = a_bins.has_entries_per_bin();
4032 std::vector<rep_bin2D> bins;
4034 for(
int jbin=ynbin-1;jbin>=0;jbin--) {
4035 for(
int ibin=xnbin-1;ibin>=0;ibin--) {
4036 if(hbe && (a_bins.bin_entries(ibin,jbin)<=0))
continue;
4038 float val = a_bins.bin_Sw(ibin,jbin);
4040 float xx = a_bins.bin_lower_edge_x(ibin);
4041 float xe = a_bins.bin_upper_edge_x(ibin);
4042 float yy = a_bins.bin_lower_edge_y(jbin);
4043 float ye = a_bins.bin_upper_edge_y(jbin);
4045 bins.push_back(rep_bin2D(xx,xe,yy,ye,val,ibin,jbin));
4052 bmin = mn<float>(bmin,val);
4053 bmax = mx<float>(bmax,val);
4057 size_t number = bins.size();
4067 {
float dbins = bmax-bmin;
4069 for(
size_t index=0;index<number;index++) {
4070 bins[index].m_ratio = (bins[index].m_val-bmin)/dbins;
4074 m_bins_cmaps[a_index] =
new grey_scale_colormap(bmin,bmax,50);
4076 m_bins_cmaps[a_index] =
new grey_scale_inverse_colormap(bmin,bmax,50);
4078 m_bins_cmaps[a_index] =
new violet_to_red_colormap(bmin,bmax,50);
4081 m_bins_cmaps[a_index] =
new const_colormap(a_data_style.color);
◆ update_bins2D_xyz()
void tools::sg::plotter::update_bins2D_xyz |
( |
std::ostream & |
a_out, |
|
|
const bins2D & |
a_bins, |
|
|
unsigned int |
a_index, |
|
|
const style & |
a_style, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
const rep_box & |
a_box_z |
|
) |
| |
|
inlineprotected |
Definition at line 4580 of file plotter.
4584 if(!a_style.visible)
return;
4588 unsigned int xnbin = a_bins.x_bins();
4589 unsigned int ynbin = a_bins.y_bins();
4590 if(!xnbin || !ynbin)
return;
4592 const std::string& modeling = a_style.modeling;
4596 bool hbe = a_bins.has_entries_per_bin();
4601 std::vector<rep_bin2D> bins;
4603 for(
int jbin=ynbin-1;jbin>=0;jbin--) {
4604 for(
int ibin=xnbin-1;ibin>=0;ibin--) {
4605 if(hbe && (a_bins.bin_entries(ibin,jbin)<=0))
continue;
4607 float val = a_bins.bin_Sw(ibin,jbin);
4609 float xx = a_bins.bin_lower_edge_x(ibin);
4610 float xe = a_bins.bin_upper_edge_x(ibin);
4611 float yy = a_bins.bin_lower_edge_y(jbin);
4612 float ye = a_bins.bin_upper_edge_y(jbin);
4614 bins.push_back(rep_bin2D(xx,xe,yy,ye,val,ibin,jbin));
4621 bmin = mn<float>(bmin,val);
4622 bmax = mx<float>(bmax,val);
4626 size_t number = bins.size();
4636 {
float dbins = bmax-bmin;
4638 for(
size_t index=0;index<number;index++) {
4639 bins[index].m_ratio = (bins[index].m_val-bmin)/dbins;
4643 m_bins_cmaps[a_index] =
new grey_scale_colormap(bmin,bmax,50);
4645 m_bins_cmaps[a_index] =
new grey_scale_inverse_colormap(bmin,bmax,50);
4647 m_bins_cmaps[a_index] =
new violet_to_red_colormap(bmin,bmax,50);
4650 m_bins_cmaps[a_index] =
new const_colormap(a_style.color);
4660 std::vector<rep_top_face2D> faces((xnbin-1)*(ynbin-1));
4663 unsigned int xnbin_1 = xnbin-1;
4664 unsigned int ynbin_1 = ynbin-1;
4665 for(
unsigned int jbin=0;jbin<ynbin_1;jbin++) {
4666 for(
unsigned int ibin=0;ibin<xnbin_1;ibin++) {
4668 float xx_0 = a_bins.bin_lower_edge_x(ibin);
4669 float xe_0 = a_bins.bin_upper_edge_x(ibin);
4670 float xx_1 = a_bins.bin_lower_edge_x(ibin+1);
4671 float xe_1 = a_bins.bin_upper_edge_x(ibin+1);
4673 float yy_0 = a_bins.bin_lower_edge_y(jbin);
4674 float ye_0 = a_bins.bin_upper_edge_y(jbin);
4675 float yy_1 = a_bins.bin_lower_edge_y(jbin+1);
4676 float ye_1 = a_bins.bin_upper_edge_y(jbin+1);
4678 float xx = (xx_0+xe_0)/2;
4679 float xe = (xx_1+xe_1)/2;
4680 float yy = (yy_0+ye_0)/2;
4681 float ye = (yy_1+ye_1)/2;
4683 float val1 = a_bins.bin_Sw(ibin,jbin);
4684 float val2 = a_bins.bin_Sw(ibin+1,jbin);
4685 float val3 = a_bins.bin_Sw(ibin+1,jbin+1);
4686 float val4 = a_bins.bin_Sw(ibin,jbin+1);
4688 faces[facei] = rep_top_face2D(xx,xe,yy,ye,val1,val2,val3,val4);
4695 bmin = mn<float>(bmin,val1);
4696 bmax = mx<float>(bmax,val1);
4709 m_bins_cmaps[a_index] =
new const_colormap(a_style.color);
4714 faces,a_box_x,a_box_y,a_box_z,
4734 bool zlog = a_box_z.m_log;
4747 base_colormap* cmap =
new by_value_colormap(a_out,
m_cmaps,a_style.color_mapping);
4748 if(cmap->colorn()<=0) {
4754 float zmin = a_box_z.m_pos;
4755 float dz = a_box_z.m_width;
4763 clist_contour list_contour;
4766 list_contour.set_first_grid(nFir,nFir);
4769 list_contour.set_secondary_grid(nSec,nSec);
4779 sbFunc.m_func2D = 0;
4780 sbFunc.m_problem =
false;
4781 sbFunc.m_bins2D = &a_bins;
4782 sbFunc.m_limits_in[0] = limits[0];
4783 sbFunc.m_limits_in[1] = limits[1];
4784 sbFunc.m_limits_in[2] = limits[2];
4785 sbFunc.m_limits_in[3] = limits[3];
4788 int n = nSec - 2 * 10;
4789 double dx = (limits[1]-limits[0]) /n;
4790 double dy = (limits[3]-limits[2]) /n;
4791 limits[0] = limits[0] - 10 * dx;
4792 limits[1] = limits[1] + 10 * dx;
4793 limits[2] = limits[2] - 10 * dy;
4794 limits[3] = limits[3] + 10 * dy;
4796 sbFunc.m_limits[0] = limits[0];
4797 sbFunc.m_limits[1] = limits[1];
4798 sbFunc.m_limits[2] = limits[2];
4799 sbFunc.m_limits[3] = limits[3];
4801 list_contour.set_limits(limits);
4804 size_t zn = cmap->colorn();
4807 std::vector<double> zs(zn+1);
4808 float zmax = zmin + dz;
4809 double zd = (zmax-zmin)/zn;
4810 for(
size_t zi=0;zi<=zn;zi++) zs[zi] = zmin + zi * zd;
4811 list_contour.set_planes(zs);
4816 list_contour.ccontour::generate();
4817 if(!list_contour.compact_strips ()) {
4818 a_out <<
"tools::sg::plotter::update_bins2D_xyz : clist_contour::compact_strips () : failure." << std::endl;
4824 matrix* transf =
new matrix;
4826 transf->set_translate(0,0,1.02F);
4827 transf->mul_scale(1,1,0.01F);
4837 a_box_x,a_box_y,a_box_z,
ZZ);
◆ update_cmap()
void tools::sg::plotter::update_cmap |
( |
std::ostream & |
a_out, |
|
|
const base_colormap & |
a_cmap |
|
) |
| |
|
inline |
Definition at line 3420 of file plotter.
3423 size_t valn = a_cmap.valn();
3425 size_t coln = a_cmap.colorn();
3431 float wData = XSIZ-XMGL-XMGR;
3436 float hData = YSIZ-YMGL-YMGU;
3438 float hcmap = hData;
3448 float dData = ZSIZ-ZMGD-ZMGU;
3454 float zz = -
depth*0.5f;
3455 mtx.set_translate(-XSIZ/2+XMGL,-YSIZ/2+YMGL,zz);
3459 float w = XMGR*0.3F;
3460 float xx = wData+XMGR*0.1F;
3464 float h = hcmap/float(coln);
3469 for(
unsigned int index=0;index<coln;index++) {
3470 rgba* mat =
new rgba();
3471 mat->color = a_cmap.color(index);
3474 vertices* vtxs =
new vertices;
3478 vtxs->add(xx ,yy ,zz);
3479 vtxs->add(xx + w ,yy ,zz);
3480 vtxs->add(xx + w ,yy + h ,zz);
3481 vtxs->add(xx ,yy + h ,zz);
3487 {rgba* mat =
new rgba();
3488 mat->color = colorf_black();
3491 draw_style* ds =
new draw_style;
3497 vertices* vtxs =
new vertices;
3501 vtxs->add(xx ,0 ,zz);
3502 vtxs->add(xx + w ,0 ,zz);
3503 vtxs->add(xx + w ,hcmap ,zz);
3504 vtxs->add(xx ,hcmap ,zz);
3505 vtxs->add(xx ,0 ,zz);}
3517 if(safe_cast<base_colormap,by_value_colormap>(a_cmap)) {
3519 if((valn+1)==coln) {
3520 mtx.set_translate(xx+w,h,zz);
3522 mtx.set_translate(xx+w,0,zz);
3525 mtx.set_translate(xx+w,0,zz);
3528 mtx.set_translate(xx+w,0,zz);
3539 if(safe_cast<base_colormap,by_value_colormap>(a_cmap)) {
3541 if((valn+1)==coln) {
3547 for(
unsigned int index=0;index<valn;index++) {
3550 snpf(tmp,
sizeof(tmp),
"%g",a_cmap.value(index));
3554 }
else if((coln+1)==valn) {
3560 for(
unsigned int index=0;index<valn;index++) {
3563 snpf(tmp,
sizeof(tmp),
"%g",a_cmap.value(index));
3568 a_out <<
"tools::sg::plotter::update_cmap :"
3569 <<
" inconsistent by value colormap."
3587 style.y_orientation = vec3f(1,0,0);
◆ update_func1D_xy()
void tools::sg::plotter::update_func1D_xy |
( |
std::ostream & |
a_out, |
|
|
const func1D & |
a_func, |
|
|
const style & |
a_style, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
float |
a_zz |
|
) |
| |
|
inlineprotected |
Definition at line 4139 of file plotter.
4144 if(!a_style.visible)
return;
4149 unsigned int nstp = a_func.x_steps();
4152 float df = (xmx - xmn)/nstp;
4154 bool problem =
false;
4155 std::vector<vec3f>
points(nstp+1);
4156 for(
unsigned int ibin=0;ibin<=nstp;ibin++) {
4157 float xx = xmn + ibin * df;
4159 if(!a_func.value(xx,val)) problem =
true;
4160 points[ibin].set_value(xx,val,a_zz);
4163 a_out <<
"tools::sg::plotter::update_func1D_xy :"
4164 <<
" problem when getting some function value."
4168 const std::string& modeling = a_style.modeling;
4171 vertices* vtxs =
new vertices;
4172 std::vector<float>& pts = vtxs->xyzs.values();
4179 separator*
sep =
new separator;
4182 rgba* mat =
new rgba();
4183 mat->color = a_style.color;
4186 draw_style* ds =
new draw_style;
4188 ds->point_size = a_style.point_size;
4198 markers* _marks =
new markers;
4199 std::vector<float>& pts = _marks->xyzs.values();
4206 separator*
sep =
new separator;
4209 rgba* mat =
new rgba();
4210 mat->color = a_style.color;
4213 _marks->size = a_style.marker_size;
4214 _marks->style = a_style.marker_style;
4222 vertices* vtxs =
new vertices;
4223 std::vector<float>& pts = vtxs->xyzs.values();
4229 separator*
sep =
new separator;
4232 rgba* mat =
new rgba();
4233 mat->color = a_style.color;
4236 draw_style* ds =
new draw_style;
4238 ds->line_pattern = a_style.line_pattern;
4239 ds->line_width = a_style.line_width;
◆ update_func2D_xy()
void tools::sg::plotter::update_func2D_xy |
( |
std::ostream & |
a_out, |
|
|
const func2D & |
a_func, |
|
|
int |
a_index, |
|
|
style & |
a_data_style, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
const rep_box & |
a_box_z, |
|
|
float |
a_zz |
|
) |
| |
|
inlineprotected |
Definition at line 4273 of file plotter.
4276 if(!a_data_style.visible.value())
return;
4283 const std::string& modeling = a_data_style.modeling.getValue();
4290 float zmin = a_box_z.m_pos;
4291 float dz = a_box_z.m_width;
4292 bool zlog = a_box_z.m_log;
4299 clist_contour list_contour;
4302 list_contour.set_first_grid(nFir,nFir);
4305 list_contour.set_secondary_grid(nSec,nSec);
4315 sbFunc.m_func2D = &a_func;
4316 sbFunc.m_problem =
false;
4317 sbFunc.m_bins2D = 0;
4318 sbFunc.m_limits_in[0] = limits[0];
4319 sbFunc.m_limits_in[1] = limits[1];
4320 sbFunc.m_limits_in[2] = limits[2];
4321 sbFunc.m_limits_in[3] = limits[3];
4324 int n = nSec - 2 * 10;
4325 double dx = (limits[1]-limits[0]) /n;
4326 double dy = (limits[3]-limits[2]) /n;
4327 limits[0] = limits[0] - 10 * dx;
4328 limits[1] = limits[1] + 10 * dx;
4329 limits[2] = limits[2] - 10 * dy;
4330 limits[3] = limits[3] + 10 * dy;
4332 sbFunc.m_limits[0] = limits[0];
4333 sbFunc.m_limits[1] = limits[1];
4334 sbFunc.m_limits[2] = limits[2];
4335 sbFunc.m_limits[3] = limits[3];
4337 list_contour.set_limits(limits);
4341 std::vector<double> zs(zn);
4342 for(
size_t zi=0;zi<zn;zi++) zs[zi] =
levels[zi];
4343 list_contour.set_planes(zs);
4347 std::vector<double> zs(zn+1);
4348 float zmax = zmin + dz;
4349 double zd = (zmax-zmin)/zn;
4350 for(
unsigned int zi=0;zi<=zn;zi++) zs[zi] = zmin + zi * zd;
4351 list_contour.set_planes(zs);
4360 #ifdef INLIBS_SG_PLOTTER_TIMING
4361 atime _start = atime::now();
4363 list_contour.ccontour::generate();
4365 #ifdef INLIBS_SG_PLOTTER_TIMING
4366 a_out <<
"tools::sg::update_func2D_xy : contour generate elapsed " << atime::elapsed(_start) <<
"." << std::endl;
4367 _start = atime::now();
4370 if(!list_contour.compact_strips ()) {
4371 a_out <<
"tools::sg::plotter::update_func2D_xy : clist_contour::compact_strips () : failure." << std::endl;
4373 #ifdef INLIBS_SG_PLOTTER_TIMING
4374 a_out <<
"tools::sg::update_func2D_xy : contour compact strips elapsed " << atime::elapsed(_start) <<
"." << std::endl;
4377 m_func_cmaps[a_index] =
new by_value_colormap(a_out,
m_cmaps,a_data_style.color_mapping.value());
4381 m_func_cmaps[a_index] =
new const_colormap(a_data_style.color.value());
4387 list_contour,a_box_x,a_box_y,a_box_z,a_zz );
4391 list_contour,a_box_x,a_box_y,a_box_z,a_zz );
4395 if(sbFunc.m_problem) {
4396 a_out <<
"tools::sg::plotter::update_func2D_xy : problem when getting some function value." << std::endl;
4509 a_out <<
"tools::sg::plotter::update_func2D_xy :"
4510 <<
" modeling " << modeling
4511 <<
" does not apply on Functi on2D in XY. Valid modelings ared curve, filled_curve and polygon."
◆ update_func2D_xyz()
void tools::sg::plotter::update_func2D_xyz |
( |
std::ostream & |
a_out, |
|
|
const func2D & |
a_func, |
|
|
unsigned int |
a_index, |
|
|
const style & |
a_style, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
const rep_box & |
a_box_z |
|
) |
| |
|
inlineprotected |
Definition at line 4849 of file plotter.
4857 if(!a_style.visible)
return;
4864 unsigned int nx = a_func.x_steps();
4870 unsigned int ny = a_func.y_steps();
4873 float dfx = (xmx - xmn)/nx;
4874 float dfy = (ymx - ymn)/ny;
4878 std::vector<rep_top_face2D> faces(nx*ny);
4879 {
bool problem =
false;
4880 unsigned int facei = 0;
4881 float* vprev =
new float[2*nx];
4882 for(
int jbin=ny-1;jbin>=0;jbin--) {
4885 for(
int ibin=nx-1;ibin>=0;ibin--) {
4887 float xx = xmn + ibin * dfx;
4888 float yy = ymn + jbin * dfy;
4889 float xe = xx + dfx;
4890 float ye = yy + dfy;
4894 if(!a_func.value(xx,yy,val1)) problem =
true;
4896 if(ibin==
int(nx-1)) {
4897 if(!a_func.value(xe,yy,val2)) problem =
true;
4902 if(jbin==
int(ny-1)) {
4903 if(ibin==
int(nx-1)) {
4904 if(!a_func.value(xe,ye,val3)) problem =
true;
4908 if(!a_func.value(xx,ye,val4)) problem =
true;
4910 val3 = vprev[2*ibin+1];
4911 val4 = vprev[2*ibin];
4916 vprev[2*ibin] = val1;
4917 vprev[2*ibin+1] = val2;
4921 faces[facei] = rep_top_face2D(xx,xe,yy,ye,val1,val2,val3,val4);
4927 a_out <<
"tools::sg::plotter::update_func2D_xyz :"
4928 <<
" problem when getting some function value."
4940 float vmin = faces[0].m_v1;
4941 float vmax = faces[0].m_v1;
4942 size_t number = faces.size();
4943 for(
size_t index=0;index<number;index++) {
4944 float vmean = faces[index].m_v1;
4945 vmean += faces[index].m_v2;
4946 vmean += faces[index].m_v3;
4947 vmean += faces[index].m_v4;
4950 vmin = mn<float>(vmin,vmean);
4951 vmax = mx<float>(vmax,vmean);
4953 faces[index].m_ratio = vmean;
4956 {
float dbins = vmax-vmin;
4958 for(
size_t index=0;index<number;index++) {
4959 faces[index].m_ratio = (faces[index].m_ratio-vmin)/dbins;
4964 m_func_cmaps[a_index] =
new grey_scale_colormap(vmin,vmax,50);
4966 m_func_cmaps[a_index] =
new grey_scale_inverse_colormap(vmin,vmax,50);
4968 m_func_cmaps[a_index] =
new violet_to_red_colormap(vmin,vmax,50);
4972 m_func_cmaps[a_index] =
new const_colormap(a_style.color);
4989 bool zlog = a_box_z.m_log;
4994 float xmin = a_box_x.m_pos;
4995 float dx = a_box_x.m_width;
4996 bool xlog = a_box_x.m_log;
4998 float ymin = a_box_y.m_pos;
4999 float dy = a_box_y.m_width;
5000 bool ylog = a_box_y.m_log;
5002 float zmin = a_box_z.m_pos;
5003 float dz = a_box_z.m_width;
5004 bool zlog = a_box_z.m_log;
5009 {separator*
sep =
new separator;
5010 {normal* nm =
new normal;
5011 nm->vec = vec3f(0,-1,0);
5013 {rgba* mat =
new rgba();
5014 mat->color = colorf(0.6f,0.2f,0.2f);
5017 vertices* vtxs =
new vertices;
5022 bool problem =
false;
5028 vtxs->add(xx,yy,0);}
5034 vtxs->add(xx,yy,0);}
5037 {
if(!a_func.value(xmx,ymn,val)) problem =
true;
5045 vtxs->add(xx,yy,val);}}
5047 for(
int ibin=nx-1;ibin>=0;ibin--) {
5049 float xx = xmn + ibin * dfx;
5054 {
if(!a_func.value(xx,yy,val)) problem =
true;
5062 if((xx>=0)&&(xx<=1) && (yy>=0)&&(yy<=1) ) {
5064 vtxs->add(xx,yy,val);
5075 a_out <<
"tools::sg::plotter::update_func2D_xyz :"
5076 <<
" problem when getting some function value."
5081 {separator*
sep =
new separator;
5082 {normal* nm =
new normal;
5083 nm->vec = vec3f(-1,0,0);
5085 {rgba* mat =
new rgba();
5086 mat->color = colorf(0.6f,0.2f,0.2f);
5089 vertices* vtxs =
new vertices;
5097 vtxs->add(xx,yy,0);}
5103 vtxs->add(xx,yy,0);}
5106 bool problem =
false;
5108 for(
unsigned int jbin=0;jbin<ny;jbin++) {
5111 float yy = ymn + jbin * dfy;
5114 {
if(!a_func.value(xx,yy,val)) problem =
true;
5122 if((xx>=0)&&(xx<=1) &&
5125 vtxs->add(xx,yy,val);
5133 {
if(!a_func.value(xmn,ymx,val)) problem =
true;
5141 vtxs->add(xx,yy,val);}}
5148 a_out <<
"tools::sg::plotter::update_func2D_xyz :"
5149 <<
" problem when getting some function value."
◆ update_grid_XY()
void tools::sg::plotter::update_grid_XY |
( |
| ) |
|
|
inlineprotected |
Definition at line 5792 of file plotter.
5796 if(number<=0)
return;
5798 bool draw_vertical =
true;
5799 bool draw_horizontal =
true;
5803 rgba* mat =
new rgba();
5807 draw_style* ds =
new draw_style;
5815 vertices* vtxs =
new vertices;
5819 std::vector<float>& pts = vtxs->xyzs.values();
5828 pts.reserve(_number*6);
5829 for(
size_t count=0;count<_number;count++) {
5831 vtxs->
add(xx, 0 ,zz);
5832 vtxs->add(xx, _width,zz);
5835 pts.reserve(_number*100*6);
5836 for(
size_t count=0;count<_number;count++) {
5838 vtxs->add_dashed_line(xx,0,zz,xx,_width,zz,100);
5844 pts.reserve(_number*6);
5845 for(
size_t count=0;count<_number;count++) {
5847 vtxs->
add(xx, 0 ,zz);
5848 vtxs->add(xx,_width,zz);
5851 pts.reserve(_number*100*6);
5852 for(
size_t count=0;count<_number;count++) {
5854 vtxs->add_dashed_line(xx,0,zz,xx,_width,zz,100);
5860 if(draw_horizontal) {
5865 pts.reserve(_number*6);
5866 for(
size_t count=0;count<_number;count++) {
5868 vtxs->
add(0,yy ,zz);
5869 vtxs->add(_width,yy,zz);
5872 pts.reserve(_number*100*6);
5873 for(
size_t count=0;count<_number;count++) {
5875 vtxs->add_dashed_line(0,yy,zz,_width,yy,zz,100);
5881 pts.reserve(_number*6);
5882 for(
size_t count=0;count<_number;count++) {
5884 vtxs->
add(0,yy, zz);
5885 vtxs->add(_width,yy,zz);
5888 pts.reserve(_number*100*6);
5889 for(
size_t count=0;count<_number;count++) {
5891 vtxs->add_dashed_line(0,yy,zz,_width,yy,zz,100);
◆ update_grid_XYZ()
void tools::sg::plotter::update_grid_XYZ |
( |
| ) |
|
|
inlineprotected |
Definition at line 5899 of file plotter.
5902 rgba* mat =
new rgba();
5906 draw_style* ds =
new draw_style;
◆ update_infos()
void tools::sg::plotter::update_infos |
( |
std::ostream & |
| ) |
|
|
inlineprotected |
Definition at line 5318 of file plotter.
5323 std::vector<std::string> ws;
5324 words(sinfos,
"\n",
false,ws);
5325 size_t linen = ws.size()/2;
5335 matrix* infos_title_tsf = 0;
5336 sg::text* infos_title_text = 0;
5338 std::string infos_title;
5340 std::vector<std::string> _ws;
5341 for(
size_t index=0;index<linen;index++) {
5342 const std::string& name = ws[2*index];
5343 const std::string& value = ws[2*index+1];
5345 infos_title = value;
5347 _ws.push_back(name);
5348 _ws.push_back(value);
5352 linen = ws.size()/2;
5355 if(infos_title.size()) {
5356 float hbox = _height*0.05f;
5358 matrix* _tsf =
new matrix;
5361 _tsf->mul_translate(xx,yy,zz);
5367 sg::text* txt =
new sg::text(
m_ttf);
5377 txt->confine =
true;
5382 txt->strings.add(infos_title);
5386 infos_title_tsf = _tsf;
5387 infos_title_text = txt;
5390 if(sinfos.empty())
return;
5393 matrix* _tsf =
new matrix;
5396 sg::infos_box*
infos =
new sg::infos_box(
m_ttf);
5397 infos->width = wbox;
5409 {
for(
size_t index=0;index<linen;index++) {
5410 const std::string& name = ws[2*index];
5411 const std::string& value = ws[2*index+1];
5412 infos->lstrings.add(name);
5413 infos->rstrings.add(value);
5423 float title_hbox = 0;
5424 if(infos_title_tsf && infos_title_text) {
5425 title_hbox =
infos->height/linen;
5427 float yy = _height*0.5f - title_hbox*0.5F - _height*
infos_y_margin;
5428 infos_title_tsf->set_identity();
5429 infos_title_tsf->mul_translate(xx,yy,zz);
5432 infos_title_text->height = title_hbox;
5435 float hbox =
infos->height;
5439 _tsf->set_translate(xx,yy,zz);
◆ update_inner_frame_XY()
void tools::sg::plotter::update_inner_frame_XY |
( |
| ) |
|
|
inlineprotected |
Definition at line 5730 of file plotter.
5733 rgba* mat =
new rgba();
5737 draw_style* ds =
new draw_style;
5743 vertices* vtxs =
new vertices;
◆ update_inner_frame_XYZ()
void tools::sg::plotter::update_inner_frame_XYZ |
( |
| ) |
|
|
inlineprotected |
Definition at line 5756 of file plotter.
5759 rgba* mat =
new rgba();
5763 draw_style* ds =
new draw_style;
5769 vertices* ls =
new vertices;
5774 ls->add(0,0,0);ls->add(1,0,0);
5775 ls->add(1,0,0);ls->add(1,1,0);
5776 ls->add(1,1,0);ls->add(0,1,0);
5777 ls->add(0,1,0);ls->add(0,0,0);
5780 ls->add(0,0,1);ls->add(1,0,1);
5781 ls->add(1,0,1);ls->add(1,1,1);
5782 ls->add(1,1,1);ls->add(0,1,1);
5783 ls->add(0,1,1);ls->add(0,0,1);
5786 ls->add(0,0,0);ls->add(0,0,1);
5787 ls->add(1,0,0);ls->add(1,0,1);
5788 ls->add(1,1,0);ls->add(1,1,1);
5789 ls->add(0,1,0);ls->add(0,1,1);
◆ update_layout()
void tools::sg::plotter::update_layout |
( |
| ) |
|
|
inlineprotected |
Definition at line 2227 of file plotter.
2231 float wData = XSIZ-XMGL-XMGR;
2236 float hData = YSIZ-YMGL-YMGU;
2241 float dData = ZSIZ-ZMGD-ZMGU;
2283 float xmn = -0.5F*wData;
2284 float ymn = -0.5F*hData;
2285 float zmn = -0.5F*dData;
2286 float xmx = 0.5F*wData;
2287 float ymx = 0.5F*hData;
2288 float zmx = 0.5F*dData;
2293 {x = xmn;y = ymn;z = zmn;
2295 _box.extend_by(x,y,z);}
2296 {x = xmx;y = ymn;z = zmn;
2298 _box.extend_by(x,y,z);}
2299 {x = xmx;y = ymx;z = zmn;
2301 _box.extend_by(x,y,z);}
2302 {x = xmn;y = ymx;z = zmn;
2304 _box.extend_by(x,y,z);}
2307 {x = xmn;y = ymn;z = zmx;
2309 _box.extend_by(x,y,z);}
2310 {x = xmx;y = ymn;z = zmx;
2312 _box.extend_by(x,y,z);}
2313 {x = xmx;y = ymx;z = zmx;
2315 _box.extend_by(x,y,z);}
2316 {x = xmn;y = ymx;z = zmx;
2318 _box.extend_by(x,y,z);}
2320 float xfac = _box.mx()[0]-_box.mn()[0];
2321 float yfac = _box.mx()[1]-_box.mn()[1];
2322 float zfac = _box.mx()[2]-_box.mn()[2];
2325 mtx.mul_scale(hData/xfac,hData/yfac,hData/zfac);
2327 mtx.mul_translate(-wData/2,-hData/2,-dData/2);
2330 {vec3f dir(1,-1,-10);
2331 float dx,dy,dz;dir.value(dx,dy,dz);
2333 if(mtx.invert(inv)) {
2334 inv.mul_dir_3f(dx,dy,dz);
2344 mtx.mul_scale(wData,hData,dData);
◆ update_legends()
void tools::sg::plotter::update_legends |
( |
std::ostream & |
a_out | ) |
|
|
inlineprotected |
Definition at line 5586 of file plotter.
5595 {matrix* _tsf =
new matrix;
5601 for(
size_t index=0;index<number;index++) {
5603 if(!_style.visible)
continue;
5606 separator*
sep =
new separator;
5609 matrix* _tsf =
new matrix;
5613 legend* text =
new legend(
m_ttf);
5614 text->font = _style.font;
5615 text->font_modeling = _style.font_modeling;
5616 text->encoding = _style.encoding;
5618 text->color = _style.color;
5619 text->marker_style = _style.marker_style;
5620 text->marker_size = _style.marker_size;
5621 text->back_visible =
false;
5630 float xxx = w * 0.5f;
5631 float yyy = h * 0.5f;
5641 a_out <<
"tools::sg::plotter::update_legends : axis_2_vp() failed for x=" << x <<
", y=" << y <<
"." << std::endl;
5644 float xx =
width * (-0.5f+pos[0]);
5645 float yy =
height * (-0.5f+pos[1]);
5646 _tsf->set_translate(xx,yy,zz);
5656 vec2f ur(1-xur,1-yur);
5658 float x =
width*ur[0] - w;
5659 float y =
height*ur[1] - h;
5661 float xx = -
width*0.5f + x;
5662 float yy = -
height*0.5f + y;
5664 _tsf->set_translate(xx,yy,zz);
5667 _tsf->mul_translate(xxx,yyy,0);
◆ update_points2D_xy()
void tools::sg::plotter::update_points2D_xy |
( |
std::ostream & |
a_out, |
|
|
const points2D & |
a_points, |
|
|
const style & |
a_style, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
float |
a_zz |
|
) |
| |
|
inlineprotected |
Definition at line 4517 of file plotter.
4522 if(!a_style.visible)
return;
4524 size_t number = a_points.points();
4527 const std::string& modeling = a_style.modeling;
◆ update_points3D_xyz()
void tools::sg::plotter::update_points3D_xyz |
( |
std::ostream & |
a_out, |
|
|
const points3D & |
a_points, |
|
|
const style & |
a_style, |
|
|
const rep_box & |
a_box_x, |
|
|
const rep_box & |
a_box_y, |
|
|
const rep_box & |
a_box_z |
|
) |
| |
|
inlineprotected |
Definition at line 4538 of file plotter.
4543 if(!a_style.visible)
return;
4545 size_t number = a_points.points();
◆ update_primitive_box()
void tools::sg::plotter::update_primitive_box |
( |
std::ostream & |
a_out, |
|
|
const plottable_box & |
a_obj |
|
) |
| |
|
inlineprotected |
Definition at line 8685 of file plotter.
8704 separator*
sep =
new separator;
8706 rgba* mat =
new rgba();
8707 mat->color = a_obj.m_PLCI;
8710 draw_style* ds =
new draw_style;
8713 ds->line_width = a_obj.m_LWID;
8716 vertices* vtxs =
new vertices;
8720 vtxs->add(pos1[0],pos1[1],z);
8721 vtxs->add(pos2[0],pos1[1],z);
8722 vtxs->add(pos2[0],pos2[1],z);
8723 vtxs->add(pos1[0],pos2[1],z);
8724 vtxs->add(pos1[0],pos1[1],z);
8729 separator*
sep =
new separator;
8731 rgba* mat =
new rgba();
8732 mat->color = a_obj.m_FACI;
8735 draw_style* ds =
new draw_style;
8739 vertices* vtxs =
new vertices;
8743 vtxs->add(pos1[0],pos1[1],z);
8744 vtxs->add(pos2[0],pos1[1],z);
8745 vtxs->add(pos2[0],pos2[1],z);
8746 vtxs->add(pos1[0],pos2[1],z);
8752 {separator*
sep =
new separator;
8754 rgba* mat =
new rgba();
8755 mat->color = a_obj.m_FACI;
8762 PAW_hatch(a_obj.m_FASI,hatching,spacing,angle_right,angle_left);
8763 float stripWidth = 0;
8766 rep_box_hatch(*
sep,spacing,angle_right,stripWidth,pos1[0],pos1[1],pos2[0],pos2[1],z);
8769 rep_box_hatch(*
sep,spacing,angle_left,stripWidth,pos1[0],pos1[1],pos2[0],pos2[1],z);
8773 draw_style* ds =
new draw_style;
8776 vertices* vtxs =
new vertices;
8779 vtxs->add(pos1[0],pos1[1],z);
8780 vtxs->add(pos2[0],pos1[1],z);
8781 vtxs->add(pos2[0],pos2[1],z);
8782 vtxs->add(pos1[0],pos2[1],z);
8788 separator*
sep =
new separator;
8789 rgba* mat =
new rgba();
8790 mat->color = a_obj.m_PLCI;
8793 draw_style* ds =
new draw_style;
8799 vertices* vtxs =
new vertices;
8804 vtxs->add(pos1[0],pos1[1],z);
8805 vtxs->add(pos2[0],pos1[1],z);
8806 vtxs->add(pos2[0],pos2[1],z);
8807 vtxs->add(pos1[0],pos2[1],z);
8808 vtxs->add(pos1[0],pos1[1],z);
8814 a_out <<
"tools::sg::plotter::update_plottable_box FAIS PATTERN not yet handled." << std::endl;
◆ update_primitive_ellipse()
void tools::sg::plotter::update_primitive_ellipse |
( |
std::ostream & |
a_out, |
|
|
const plottable_ellipse & |
a_obj |
|
) |
| |
|
inlineprotected |
Definition at line 8819 of file plotter.
8831 float rx = pos2[0]-pos[0];
8832 float ry = pos2[1]-pos[1];
8841 separator*
sep =
new separator;
8843 matrix* _tsf =
new matrix;
8844 _tsf->set_translate(pos);
8847 rgba* mat =
new rgba();
8848 mat->color = a_obj.m_PLCI;
8851 draw_style* ds =
new draw_style;
8854 ds->line_width = a_obj.m_LWID;
8857 ellipse* _ellipse =
new ellipse;
8954 a_out <<
"tools::sg::plotter::update_plottable_box FAIS " << a_obj.m_FAIS <<
" not yet handled." << std::endl;
◆ update_primitive_img()
void tools::sg::plotter::update_primitive_img |
( |
std::ostream & |
, |
|
|
const plottable_img & |
a_obj |
|
) |
| |
|
inlineprotected |
Definition at line 8959 of file plotter.
8971 float scale = 2.0f*(
top[1]-pos[1]);
8974 const img<byte>& img = a_obj.m_img;
8980 separator*
sep =
new separator;
8982 rgba* mat =
new rgba();
8983 mat->color = colorf_white();
8986 normal* nm =
new normal;
8989 matrix* _tsf =
new matrix;
8990 _tsf->set_translate(pos);
8991 _tsf->mul_rotate(0,1,0,a_obj.m_THETA*
fpi()/180.0f);
8992 _tsf->mul_rotate(0,0,1,a_obj.m_PHI*
fpi()/180.0f);
8993 _tsf->mul_scale(scale,scale,1);
8996 tex_rect* _img =
new tex_rect();
◆ update_primitive_text()
void tools::sg::plotter::update_primitive_text |
( |
const plottable_text & |
a_obj | ) |
|
|
inlineprotected |
Definition at line 8356 of file plotter.
8357 if(a_obj.m_TEXT.empty())
return;
8365 separator*
sep =
new separator;
8367 rgba* mat =
new rgba();
8368 mat->color = a_obj.m_TXCI;
8371 matrix* _tsf =
new matrix;
8372 _tsf->set_translate(pos);
8373 _tsf->mul_rotate(0,0,1,a_obj.m_ANGLE*
fpi()/180.0f);
8374 _tsf->mul_scale(a_obj.m_SCALE,a_obj.m_SCALE,1);
8391 float _width = pos2.x()-pos.x();
8393 text* _text =
new text(
m_ttf);
8394 _text->enforce_front_width =
true;
8395 _text->front_width = _width;
8396 _text->back_visible =
false;
8399 _text->strings.add(a_obj.m_TEXT);
8400 _text->line_width = a_obj.m_line_width;
8401 _text->font = a_obj.m_FONT;
8402 _text->font_modeling = a_obj.m_font_modeling;
8404 if(a_obj.m_HJUST==
'R') {
8405 _text->hjust =
right;
8406 }
else if(a_obj.m_HJUST==
'C') {
8409 _text->hjust =
left;
8411 if(a_obj.m_VJUST==
'T') {
8413 }
else if(a_obj.m_VJUST==
'M') {
8427 float _height = pos2.y()-pos.y();
8429 text* _text =
new text(
m_ttf);
8430 _text->enforce_front_height =
true;
8431 _text->front_height = _height;
8432 _text->back_visible =
false;
8435 _text->strings.add(a_obj.m_TEXT);
8436 _text->line_width = a_obj.m_line_width;
8437 _text->font = a_obj.m_FONT;
8438 _text->font_modeling = a_obj.m_font_modeling;
8440 if(a_obj.m_HJUST==
'R') {
8441 _text->hjust =
right;
8442 }
else if(a_obj.m_HJUST==
'C') {
8445 _text->hjust =
left;
8447 if(a_obj.m_VJUST==
'T') {
8449 }
else if(a_obj.m_VJUST==
'M') {
8458 _tsf->mul_scale(a_obj.m_SIZE,a_obj.m_SIZE,1);
8462 draw_style* ds =
new draw_style;
8465 ds->line_width = a_obj.m_line_width;
8470 text_hershey* text =
new text_hershey;
8472 text->strings.add(a_obj.m_TEXT);
8473 if(a_obj.m_HJUST==
'R') {
8474 text->hjust =
right;
8475 }
else if(a_obj.m_HJUST==
'C') {
8480 if(a_obj.m_VJUST==
'T') {
8482 }
else if(a_obj.m_VJUST==
'M') {
8493 text->font = a_obj.m_FONT;
8494 if(a_obj.m_HJUST==
'R') {
8495 text->hjust =
right;
8496 }
else if(a_obj.m_HJUST==
'C') {
8501 if(a_obj.m_VJUST==
'T') {
8503 }
else if(a_obj.m_VJUST==
'M') {
8509 text->modeling = a_obj.m_font_modeling;
8514 text->strings.add(a_obj.m_TEXT);
◆ update_primitives()
void tools::sg::plotter::update_primitives |
( |
std::ostream & |
a_out | ) |
|
|
inline |
Definition at line 3598 of file plotter.
3602 if(plottable_text* ptext = safe_cast<plotprim,plottable_text>(*(*it))) {
3604 }
else if(plottable_box* pbox = safe_cast<plotprim,plottable_box>(*(*it))) {
3606 }
else if(plottable_ellipse* pellipse = safe_cast<plotprim,plottable_ellipse>(*(*it))) {
3608 }
else if(plottable_img* pimg = safe_cast<plotprim,plottable_img>(*(*it))) {
◆ update_sg()
void tools::sg::plotter::update_sg |
( |
std::ostream & |
a_out | ) |
|
|
inline |
data : /////////////////////////
binss //////////////////////////
funcs //////////////////////////
pointss ////////////////////////
binss //////////////////////////
funcs //////////////////////////
pointss ////////////////////////
axes : /////////////////////////
Definition at line 2350 of file plotter.
2359 unsigned int nplottables = 0;
2360 unsigned int nbins = 0;
2361 unsigned int npoints = 0;
2362 unsigned int nfunc = 0;
2364 plottable*
object = *it;
2365 if(!
object)
continue;
2366 if(!object->is_valid()) {
2370 if(safe_cast<plottable,bins1D>(*
object)) {
2373 }
else if(safe_cast<plottable,bins2D>(*
object)) {
2377 }
else if(safe_cast<plottable,points2D>(*
object)) {
2380 }
else if(safe_cast<plottable,points3D>(*
object)) {
2384 }
else if(safe_cast<plottable,func1D>(*
object)) {
2387 }
else if(safe_cast<plottable,func2D>(*
object)) {
2405 bool superpose =
false;
2453 if((xmin<=0) || (xmax<=0) ) {
2459 if((xmin<=0) || (xmax<=0) ) {
2471 if((ymin<=0) || (ymax<=0) ) {
2477 if((ymin<=0) || (ymax<=0) ) {
2489 if((zmin<=0) || (zmax<=0) ) {
2495 if((zmin<=0) || (zmax<=0) ) {
2522 {
float XSIZ =
width;
2525 float wData = XSIZ-XMGL-XMGR;
2530 float hData = YSIZ-YMGL-YMGU;
2542 float dData = ZSIZ-ZMGD-ZMGU;
2554 float dx = xmax - xmin;
2555 float dy = ymax - ymin;
2556 float dz = zmax - zmin;
2558 rep_box boxX(xmin,dx,xlog);
2559 rep_box boxY(ymin,dy,ylog);
2560 rep_box boxZ(zmin,dz,zlog);
2584 unsigned int ibins = 0;
2588 plottable*
object = *it;
2589 if(!
object)
continue;
2590 if(bins1D* b1 = safe_cast<plottable,bins1D>(*
object)) {
2599 *data_style,*_left_hatch_style,*_right_hatch_style,*error_style,ibins,
2600 superpose,boxX,boxY,zz);
2605 _style.color = data_style->color;
2606 _style.marker_style = data_style->marker_style;
2607 _style.marker_size = data_style->marker_size;
2611 delete _left_hatch_style;
2612 delete _right_hatch_style;
2616 }
if(bins2D* b2 = safe_cast<plottable,bins2D>(*
object)) {
2626 _style.color = data_style->color;
2627 _style.marker_style = data_style->marker_style;
2628 _style.marker_size = data_style->marker_size;
2642 unsigned int ifunc = 0;
2644 plottable*
object = *it;
2645 if(!
object)
continue;
2646 if(func1D* f1 = safe_cast<plottable,func1D>(*
object)) {
2653 _style.color = data_style->color;
2654 _style.marker_style = data_style->marker_style;
2655 _style.marker_size = data_style->marker_size;
2659 }
else if(func2D* f2 = safe_cast<plottable,func2D>(*
object)) {
2666 _style.color = data_style->color;
2667 _style.marker_style = data_style->marker_style;
2668 _style.marker_size = data_style->marker_size;
2679 unsigned int ipoints = 0;
2681 plottable*
object = *it;
2682 if(!
object)
continue;
2683 if(points2D* p2 = safe_cast<plottable,points2D>(*
object)) {
2692 _style.color = data_style->color;
2693 _style.modeling = data_style->modeling;
2694 _style.marker_style = data_style->marker_style;
2695 _style.marker_size = data_style->marker_size;
2696 _style.point_size = data_style->point_size;
2712 unsigned int ibins = 0;
2714 plottable*
object = *it;
2715 if(!
object)
continue;
2716 if(safe_cast<plottable,bins1D>(*
object)) {
2718 }
else if(bins2D* b2 = safe_cast<plottable,bins2D>(*
object)) {
2731 unsigned int ifunc = 0;
2733 plottable*
object = *it;
2734 if(!
object)
continue;
2735 if(safe_cast<plottable,func1D>(*
object)) {
2737 }
else if(func2D* f2 = safe_cast<plottable,func2D>(*
object)) {
2749 unsigned int ipoints = 0;
2751 plottable*
object = *it;
2752 if(!
object)
continue;
2753 if(points3D* p3 = safe_cast<plottable,points3D>(*
object)) {
2761 _style.color = data_style->color;
2762 _style.modeling = data_style->modeling;
2763 _style.marker_style = data_style->marker_style;
2764 _style.marker_size = data_style->marker_size;
2765 _style.point_size = data_style->point_size;
◆ update_shape()
void tools::sg::plotter::update_shape |
( |
| ) |
|
|
inline |
◆ update_title()
void tools::sg::plotter::update_title |
( |
| ) |
|
|
inlineprotected |
Definition at line 5158 of file plotter.
5171 rgba* mat =
new rgba();
5180 draw_style* ds =
new draw_style;
5192 float wData = XSIZ-XMGL-XMGR;
5197 float hData = YSIZ-YMGL-YMGU;
◆ update_title_box()
void tools::sg::plotter::update_title_box |
( |
| ) |
|
|
inlineprotected |
Definition at line 5228 of file plotter.
5242 matrix* _tsf =
new matrix;
5243 {
float xx = -
width*0.5f+wbox*0.5f+xmargin;
5244 float yy =
height*0.5f-hbox*0.5F-ymargin;
5245 _tsf->set_translate(xx,yy,zz);
5249 sg::text* title_box =
new sg::text(
m_ttf);
5250 title_box->width = wbox;
5251 title_box->height = hbox;
5259 title_box->confine =
true;
◆ update_x_axis_2D()
void tools::sg::plotter::update_x_axis_2D |
( |
| ) |
|
|
inline |
Definition at line 3244 of file plotter.
3248 float wData = XSIZ-XMGL-XMGR;
3255 if(!style.enforced.value()) {
3257 style.y_orientation = vec3f(0,1,0);
3264 style.y_orientation = vec3f(0,1,0);
◆ update_x_axis_3D()
void tools::sg::plotter::update_x_axis_3D |
( |
| ) |
|
|
inline |
Definition at line 3316 of file plotter.
3320 float wData = XSIZ-XMGL-XMGR;
3327 if(!style.enforced.value()) {
3330 style.y_orientation = vec3f(0,1,0);
3337 style.y_orientation = vec3f(0,1,0);
3338 style.hjust =
right;
◆ update_y_axis_2D()
void tools::sg::plotter::update_y_axis_2D |
( |
| ) |
|
|
inline |
Definition at line 3275 of file plotter.
3279 float hData = YSIZ-YMGL-YMGU;
3286 if(!style.enforced.value()) {
3288 style.y_orientation = vec3f(1,0,0);
3289 style.hjust =
right;
3295 style.y_orientation = vec3f(0,-1,0);
3301 style.y_orientation = vec3f(1,0,0);
3302 style.hjust =
right;
3307 mtx.mul_rotate(0,1,0,
fpi());
◆ update_y_axis_3D()
void tools::sg::plotter::update_y_axis_3D |
( |
| ) |
|
|
inline |
Definition at line 3349 of file plotter.
3353 float hData = YSIZ-YMGL-YMGU;
3360 if(!style.enforced.value()) {
3363 style.y_orientation = vec3f( 0,1,0);
3370 style.y_orientation = vec3f( 0,1,0);
◆ update_z_axis_2D()
void tools::sg::plotter::update_z_axis_2D |
( |
| ) |
|
|
inline |
◆ update_z_axis_3D()
void tools::sg::plotter::update_z_axis_3D |
( |
| ) |
|
|
inline |
Definition at line 3385 of file plotter.
3389 float dData = ZSIZ-ZMGD-ZMGU;
3395 if(!style.enforced.value()) {
3398 style.y_orientation = vec3f(1,0,0);
3399 style.hjust =
right;
3405 style.y_orientation = vec3f(1,0,0);
3406 style.hjust =
right;
3416 mtx.mul_rotate(0,1,0,-
fhalf_pi());}
◆ verify_log()
static float tools::sg::plotter::verify_log |
( |
float |
a_val, |
|
|
float |
a_min, |
|
|
float |
a_dx, |
|
|
bool |
a_log |
|
) |
| |
|
inlinestaticprotected |
Definition at line 9031 of file plotter.
9034 return (
flog10(a_val) - a_min)/a_dx;
9041 if(a_val>(a_min+100.0F * a_dx))
return 100;
9042 if(a_val<(a_min-100.0F * a_dx))
return -100;
9044 return (a_val - a_min)/a_dx;
◆ verify_log_inv()
static float tools::sg::plotter::verify_log_inv |
( |
float |
a_val, |
|
|
float |
a_min, |
|
|
float |
a_dx, |
|
|
bool |
a_log |
|
) |
| |
|
inlinestaticprotected |
Definition at line 9048 of file plotter.
9050 return fpow(10,a_val*a_dx+a_min);
9052 return a_val*a_dx+a_min;
◆ vp_2_axis()
bool tools::sg::plotter::vp_2_axis |
( |
const vec3f & |
a_vp, |
|
|
vec3f & |
a_pos |
|
) |
| const |
|
inline |
◆ vp_2_data_frame()
bool tools::sg::plotter::vp_2_data_frame |
( |
const vec3f & |
a_vp, |
|
|
vec3f & |
a_pos |
|
) |
| const |
|
inline |
Definition at line 1897 of file plotter.
1901 {
float XSIZ =
width;
1904 float wData = XSIZ-XMGL-XMGR;
1909 a_pos[0] = (a_vp[0]*XSIZ - XMGL)/wData;}
1914 float hData = YSIZ-YMGL-YMGU;
1919 a_pos[1] = (a_vp[1]*YSIZ - YMGL)/hData;}
1921 {
float ZSIZ =
depth;
1924 float dData = ZSIZ-ZMGD-ZMGU;
1929 a_pos[2] = (a_vp[2]*ZSIZ - ZMGD)/dData;}
◆ wall_style()
style& tools::sg::plotter::wall_style |
( |
| ) |
|
|
inline |
◆ write()
virtual bool tools::sg::plotter::write |
( |
write_action & |
a_action | ) |
|
|
inlinevirtual |
◆ x_axis() [1/2]
sg::axis& tools::sg::plotter::x_axis |
( |
| ) |
|
|
inline |
◆ x_axis() [2/2]
const sg::axis& tools::sg::plotter::x_axis |
( |
| ) |
const |
|
inline |
◆ xx_2_yy()
bool tools::sg::plotter::xx_2_yy |
( |
const vec3f & |
a_pos, |
|
|
vec3f & |
a_out |
|
) |
| const |
|
inline |
Definition at line 1838 of file plotter.
1840 {
float XSIZ =
width;
1843 float wData = XSIZ-XMGL-XMGR;
1844 a_out[0] = wData*a_pos[0];}
1849 float hData = YSIZ-YMGL-YMGU;
1850 a_out[1] = hData*a_pos[1];}
1852 {
float ZSIZ =
depth;
1855 float dData = ZSIZ-ZMGD-ZMGU;
1856 a_out[2] = dData*a_pos[2];}
◆ y_axis() [1/2]
sg::axis& tools::sg::plotter::y_axis |
( |
| ) |
|
|
inline |
◆ y_axis() [2/2]
const sg::axis& tools::sg::plotter::y_axis |
( |
| ) |
const |
|
inline |
◆ z_axis() [1/2]
sg::axis& tools::sg::plotter::z_axis |
( |
| ) |
|
|
inline |
◆ z_axis() [2/2]
const sg::axis& tools::sg::plotter::z_axis |
( |
| ) |
const |
|
inline |
◆ bottom_margin
sf<float> tools::sg::plotter::bottom_margin |
◆ colormap_attached
sf<bool> tools::sg::plotter::colormap_attached |
◆ colormap_axis_labeling
◆ colormap_axis_visible
sf<bool> tools::sg::plotter::colormap_axis_visible |
◆ colormap_visible
sf<bool> tools::sg::plotter::colormap_visible |
◆ curve_number_of_points
sf<unsigned int> tools::sg::plotter::curve_number_of_points |
◆ data_light_on_automated
sf<bool> tools::sg::plotter::data_light_on_automated |
◆ depth
sf<float> tools::sg::plotter::depth |
◆ down_margin
sf<float> tools::sg::plotter::down_margin |
◆ func2D_borders_visible
sf<bool> tools::sg::plotter::func2D_borders_visible |
◆ height
sf<float> tools::sg::plotter::height |
◆ infos_what
◆ infos_width
sf<float> tools::sg::plotter::infos_width |
◆ infos_x_margin
sf<float> tools::sg::plotter::infos_x_margin |
◆ infos_y_margin
sf<float> tools::sg::plotter::infos_y_margin |
◆ inner_frame_enforced
sf<bool> tools::sg::plotter::inner_frame_enforced |
◆ left_margin
sf<float> tools::sg::plotter::left_margin |
◆ legends_automated
sf<bool> tools::sg::plotter::legends_automated |
legend related :////////////////////////////////////////////
Definition at line 129 of file plotter.
◆ legends_origin
◆ legends_origin_unit
◆ legends_size
◆ legends_string
◆ levels
mf<float> tools::sg::plotter::levels |
◆ m_background_sep
separator tools::sg::plotter::m_background_sep |
|
protected |
◆ m_background_style
style tools::sg::plotter::m_background_style |
|
protected |
◆ m_bins_cmaps
◆ m_bins_sep
◆ m_bins_style
std::vector<style> tools::sg::plotter::m_bins_style |
|
protected |
◆ m_cmap_axis
sg::axis tools::sg::plotter::m_cmap_axis |
|
protected |
◆ m_cmap_axis_matrix
matrix tools::sg::plotter::m_cmap_axis_matrix |
|
protected |
◆ m_cmap_cells_sep
separator tools::sg::plotter::m_cmap_cells_sep |
|
protected |
◆ m_cmap_matrix
matrix tools::sg::plotter::m_cmap_matrix |
|
protected |
◆ m_cmap_sep
◆ m_cmaps
cmaps_t tools::sg::plotter::m_cmaps |
|
protected |
◆ m_data_light
torche tools::sg::plotter::m_data_light |
|
protected |
◆ m_data_matrix
matrix tools::sg::plotter::m_data_matrix |
|
protected |
◆ m_data_sep
◆ m_errors_sep
◆ m_errors_style
std::vector<style> tools::sg::plotter::m_errors_style |
|
protected |
◆ m_etc_sep
◆ m_func_cmaps
◆ m_func_sep
◆ m_func_style
std::vector<style> tools::sg::plotter::m_func_style |
|
protected |
◆ m_grid_sep
◆ m_grid_style
style tools::sg::plotter::m_grid_style |
|
protected |
◆ m_group
group tools::sg::plotter::m_group |
|
protected |
◆ m_infos_sep
◆ m_infos_style
◆ m_infos_title_sep
separator tools::sg::plotter::m_infos_title_sep |
|
protected |
◆ m_inner_frame_sep
separator tools::sg::plotter::m_inner_frame_sep |
|
protected |
◆ m_inner_frame_style
style tools::sg::plotter::m_inner_frame_style |
|
protected |
◆ m_layout
matrix tools::sg::plotter::m_layout |
|
protected |
◆ m_left_hatch_style
std::vector<style> tools::sg::plotter::m_left_hatch_style |
|
protected |
◆ m_legend_sep
◆ m_legend_strings
std::vector<std::string> tools::sg::plotter::m_legend_strings |
|
protected |
◆ m_legend_style
std::vector<style> tools::sg::plotter::m_legend_style |
|
protected |
◆ m_plottables
std::vector<plottable*> tools::sg::plotter::m_plottables |
|
protected |
◆ m_points_cmaps
◆ m_points_sep
◆ m_points_style
std::vector<style> tools::sg::plotter::m_points_style |
|
protected |
◆ m_primitives
std::vector<plotprim*> tools::sg::plotter::m_primitives |
|
protected |
◆ m_primitives_sep
separator tools::sg::plotter::m_primitives_sep |
|
protected |
◆ m_right_hatch_style
std::vector<style> tools::sg::plotter::m_right_hatch_style |
|
protected |
◆ m_rtausmef
◆ m_shape
◆ m_title_box_sep
separator tools::sg::plotter::m_title_box_sep |
|
protected |
◆ m_title_box_style
◆ m_title_sep
◆ m_title_style
◆ m_todel_group
group tools::sg::plotter::m_todel_group |
|
protected |
◆ m_tsf
matrix tools::sg::plotter::m_tsf |
|
protected |
◆ m_ttf
◆ m_wall_style
style tools::sg::plotter::m_wall_style |
|
protected |
◆ m_x_axis
◆ m_x_axis_data
◆ m_x_axis_matrix
matrix tools::sg::plotter::m_x_axis_matrix |
|
protected |
◆ m_x_axis_sep
◆ m_y_axis
◆ m_y_axis_data
◆ m_y_axis_matrix
matrix tools::sg::plotter::m_y_axis_matrix |
|
protected |
◆ m_y_axis_sep
◆ m_z_axis
◆ m_z_axis_data
◆ m_z_axis_matrix
matrix tools::sg::plotter::m_z_axis_matrix |
|
protected |
◆ m_z_axis_sep
◆ number_of_levels
sf<unsigned int> tools::sg::plotter::number_of_levels |
◆ phi
sf<float> tools::sg::plotter::phi |
◆ primitives_enforced
sf<bool> tools::sg::plotter::primitives_enforced |
◆ right_axis_visible
sf<bool> tools::sg::plotter::right_axis_visible |
◆ right_margin
sf<float> tools::sg::plotter::right_margin |
◆ shape
◆ shape_automated
sf<bool> tools::sg::plotter::shape_automated |
◆ superpose_bins
sf<bool> tools::sg::plotter::superpose_bins |
◆ tau
sf<float> tools::sg::plotter::tau |
◆ theta
sf<float> tools::sg::plotter::theta |
◆ title
◆ title_automated
sf<bool> tools::sg::plotter::title_automated |
◆ title_box_height
sf<float> tools::sg::plotter::title_box_height |
◆ title_box_width
sf<float> tools::sg::plotter::title_box_width |
◆ title_box_x_margin
sf<float> tools::sg::plotter::title_box_x_margin |
◆ title_box_y_margin
sf<float> tools::sg::plotter::title_box_y_margin |
◆ title_height
sf<float> tools::sg::plotter::title_height |
◆ title_hjust
◆ title_to_axis
sf<float> tools::sg::plotter::title_to_axis |
◆ title_up
sf<bool> tools::sg::plotter::title_up |
◆ top_axis_visible
sf<bool> tools::sg::plotter::top_axis_visible |
◆ top_margin
sf<float> tools::sg::plotter::top_margin |
◆ up_margin
sf<float> tools::sg::plotter::up_margin |
◆ value_bins_with_entries
sf<bool> tools::sg::plotter::value_bins_with_entries |
◆ value_bottom_margin
sf<float> tools::sg::plotter::value_bottom_margin |
◆ value_top_margin
sf<float> tools::sg::plotter::value_top_margin |
◆ width
sf<float> tools::sg::plotter::width |
◆ x_axis_automated
sf<bool> tools::sg::plotter::x_axis_automated |
◆ x_axis_enforced
sf<bool> tools::sg::plotter::x_axis_enforced |
◆ x_axis_is_log
sf<bool> tools::sg::plotter::x_axis_is_log |
◆ x_axis_max
sf<float> tools::sg::plotter::x_axis_max |
◆ x_axis_min
sf<float> tools::sg::plotter::x_axis_min |
◆ xy_depth
sf<float> tools::sg::plotter::xy_depth |
◆ y_axis_automated
sf<bool> tools::sg::plotter::y_axis_automated |
◆ y_axis_enforced
sf<bool> tools::sg::plotter::y_axis_enforced |
◆ y_axis_is_log
sf<bool> tools::sg::plotter::y_axis_is_log |
◆ y_axis_max
sf<float> tools::sg::plotter::y_axis_max |
◆ y_axis_min
sf<float> tools::sg::plotter::y_axis_min |
◆ z_axis_automated
sf<bool> tools::sg::plotter::z_axis_automated |
◆ z_axis_enforced
sf<bool> tools::sg::plotter::z_axis_enforced |
◆ z_axis_is_log
sf<bool> tools::sg::plotter::z_axis_is_log |
◆ z_axis_max
sf<float> tools::sg::plotter::z_axis_max |
◆ z_axis_min
sf<float> tools::sg::plotter::z_axis_min |
The documentation for this class was generated from the following file:
- /Users/barrand/private/dev/softinex/g4tools/g4tools/tools/sg/plotter
#define TOOLS_ARG_FIELD_DESC_ENUMS_BEG(a__field, a__num)
#define tools_lforcit(a__T, a__l, a__it)
sf_enum< sg::font_modeling > font_modeling
#define tools_vforit(a__T, a__v, a__it)
sf_vec< colorf, float > color
sf_enum< sg::hjust > hjust
#define TOOLS_FIELD_DESC_NODE_CLASS(a__class)
#define TOOLS_ARG_ENUM(a__value)
#define tools_vforcit(a__T, a__v, a__it)
#define TOOLS_ARG_FIELD_DESC(a__field)
#define TOOLS_ARG_FIELD_DESC_ENUMS_END
sf_vec< colorf, float > back_color