Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
bgui_graph_tableau Class Reference

#include <bgui_graph_tableau.h>

Inheritance diagram for bgui_graph_tableau:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 bgui_graph_tableau (const unsigned graph_width, const unsigned graph_height)
 Constructors.
 ~bgui_graph_tableau ()
 Destructor.
void update (vcl_vector< double > const &pos, vcl_vector< double > const &vals)
 Update the graph with new data.
void update (vcl_vector< float > const &pos, vcl_vector< float > const &vals)
void update (vcl_vector< vcl_vector< double > > const &pos, vcl_vector< vcl_vector< double > >const &vals)
 multiple plots. The current implementation requires pos to contain the same horizontal axis values.
void clear ()
 Clear the data.
float xmin () const
 Accessors.
float xmax () const
float ymin () const
float ymax () const
vgui_dialogpopup_graph (vcl_string const &info, const unsigned sizex=0, const unsigned sizey=0)
 Get a conveniently wrapped popup dialog.
virtual bool handle (const vgui_event &)
 Handles all events for this tableau.
virtual vcl_string name () const
virtual vcl_string file_name () const
virtual vcl_string pretty_name () const
virtual vcl_string type_name () const
void get_parents (vcl_vector< vgui_tableau_sptr > *out) const
void get_children (vcl_vector< vgui_tableau_sptr > *out) const
vgui_tableau_sptr get_child (unsigned i) const
virtual bool add_child (vgui_tableau_sptr const &)
virtual bool remove_child (vgui_tableau_sptr const &)
virtual bool notify_replaced_child (vgui_tableau_sptr const &old_child, vgui_tableau_sptr const &new_child)
virtual void add_popup (vgui_menu &)
virtual void get_popup (vgui_popup_params const &, vgui_menu &)
virtual void post_message (char const *, void const *)
virtual void post_redraw ()
virtual void post_overlay_redraw ()
virtual void post_idle_request ()
virtual bool get_bounding_box (float low[3], float high[3]) const
virtual bool draw ()
virtual bool mouse_down (int x, int y, vgui_button, vgui_modifier)
virtual bool mouse_up (int x, int y, vgui_button, vgui_modifier)
virtual bool motion (int x, int y)
virtual bool key_press (int x, int y, vgui_key, vgui_modifier)
virtual bool help ()
virtual bool idle ()
void ref () const
void unref () const

Static Public Member Functions

static void get_all (vcl_vector< vgui_tableau_sptr > *out)
static bool exists (vgui_tableau_sptr const &)

Private Member Functions

void init ()
void rem ()
void del ()
void draw_box ()
void draw_tics ()
void draw_graph ()
void draw_multi_graph ()
void compute_scale ()
float map_x_to_display (const float x)
 map the x position of a graph point to display coordinates.
float map_y_to_display (const float y)
 map the y position of a graph point to display coordinates.

Private Attributes

float xmin_
float xmax_
float ymin_
float ymax_
float xscale_
float yscale_
unsigned left_offset_
unsigned top_offset_
unsigned graph_width_
unsigned graph_height_
float tic_length_
vgui_text_tableau_sptr tt_
vgui_easy2D_tableau_sptr easy_
vgui_soview2D_linestripplot_
 The graph.
vcl_vector
< vgui_soview2D_linestrip * > 
m_plot_
float xinc_
 the tics.
float yinc_
float yorigin_
vcl_vector
< vgui_soview2D_lineseg * > 
xtics_
vcl_vector
< vgui_soview2D_lineseg * > 
ytics_
unsigned n_
float * pos_
float * vals_
unsigned n_plots_
vcl_vector< vcl_vector< double > > mpos_
vcl_vector< vcl_vector< double > > mvals_

Detailed Description

Definition at line 20 of file bgui_graph_tableau.h.


Constructor & Destructor Documentation

bgui_graph_tableau::bgui_graph_tableau ( const unsigned  graph_width,
const unsigned  graph_height 
)

Constructors.

Definition at line 34 of file bgui_graph_tableau.cxx.

bgui_graph_tableau::~bgui_graph_tableau ( )

Destructor.

Definition at line 40 of file bgui_graph_tableau.cxx.


Member Function Documentation

void bgui_graph_tableau::clear ( )

Clear the data.

Definition at line 370 of file bgui_graph_tableau.cxx.

void bgui_graph_tableau::compute_scale ( ) [private]

Definition at line 99 of file bgui_graph_tableau.cxx.

void bgui_graph_tableau::del ( ) [private]

Definition at line 355 of file bgui_graph_tableau.cxx.

void bgui_graph_tableau::draw_box ( ) [private]
void bgui_graph_tableau::draw_graph ( ) [private]

Definition at line 262 of file bgui_graph_tableau.cxx.

void bgui_graph_tableau::draw_multi_graph ( ) [private]

Definition at line 293 of file bgui_graph_tableau.cxx.

void bgui_graph_tableau::draw_tics ( ) [private]

Definition at line 190 of file bgui_graph_tableau.cxx.

bool bgui_graph_tableau::handle ( const vgui_event event) [virtual]

Handles all events for this tableau.

Reimplemented from vgui_tableau.

Definition at line 406 of file bgui_graph_tableau.cxx.

void bgui_graph_tableau::init ( ) [private]

Definition at line 15 of file bgui_graph_tableau.cxx.

float bgui_graph_tableau::map_x_to_display ( const float  x) [private]

map the x position of a graph point to display coordinates.

Definition at line 47 of file bgui_graph_tableau.cxx.

float bgui_graph_tableau::map_y_to_display ( const float  y) [private]

map the y position of a graph point to display coordinates.

Definition at line 53 of file bgui_graph_tableau.cxx.

vgui_dialog * bgui_graph_tableau::popup_graph ( vcl_string const &  info,
const unsigned  sizex = 0,
const unsigned  sizey = 0 
)

Get a conveniently wrapped popup dialog.

Definition at line 379 of file bgui_graph_tableau.cxx.

void bgui_graph_tableau::rem ( ) [private]

Definition at line 327 of file bgui_graph_tableau.cxx.

void bgui_graph_tableau::update ( vcl_vector< double > const &  pos,
vcl_vector< double > const &  vals 
)

Update the graph with new data.

Single plot

Definition at line 116 of file bgui_graph_tableau.cxx.

void bgui_graph_tableau::update ( vcl_vector< float > const &  pos,
vcl_vector< float > const &  vals 
)

Definition at line 138 of file bgui_graph_tableau.cxx.

void bgui_graph_tableau::update ( vcl_vector< vcl_vector< double > > const &  pos,
vcl_vector< vcl_vector< double > >const &  vals 
)

multiple plots. The current implementation requires pos to contain the same horizontal axis values.

Future plans are to have this class handle multiple position ranges

Definition at line 160 of file bgui_graph_tableau.cxx.

float bgui_graph_tableau::xmax ( ) const [inline]

Definition at line 44 of file bgui_graph_tableau.h.

float bgui_graph_tableau::xmin ( ) const [inline]

Accessors.

Definition at line 43 of file bgui_graph_tableau.h.

float bgui_graph_tableau::ymax ( ) const [inline]

Definition at line 46 of file bgui_graph_tableau.h.

float bgui_graph_tableau::ymin ( ) const [inline]

Definition at line 45 of file bgui_graph_tableau.h.


Member Data Documentation

Definition at line 81 of file bgui_graph_tableau.h.

Definition at line 78 of file bgui_graph_tableau.h.

Definition at line 77 of file bgui_graph_tableau.h.

Definition at line 75 of file bgui_graph_tableau.h.

Definition at line 84 of file bgui_graph_tableau.h.

vcl_vector<vcl_vector<double> > bgui_graph_tableau::mpos_ [private]

Definition at line 94 of file bgui_graph_tableau.h.

vcl_vector<vcl_vector<double> > bgui_graph_tableau::mvals_ [private]

Definition at line 95 of file bgui_graph_tableau.h.

unsigned bgui_graph_tableau::n_ [private]

Definition at line 90 of file bgui_graph_tableau.h.

unsigned bgui_graph_tableau::n_plots_ [private]

Definition at line 93 of file bgui_graph_tableau.h.

The graph.

Definition at line 83 of file bgui_graph_tableau.h.

float* bgui_graph_tableau::pos_ [private]

Definition at line 91 of file bgui_graph_tableau.h.

Definition at line 79 of file bgui_graph_tableau.h.

unsigned bgui_graph_tableau::top_offset_ [private]

Definition at line 76 of file bgui_graph_tableau.h.

Definition at line 80 of file bgui_graph_tableau.h.

float* bgui_graph_tableau::vals_ [private]

Definition at line 92 of file bgui_graph_tableau.h.

float bgui_graph_tableau::xinc_ [private]

the tics.

Definition at line 86 of file bgui_graph_tableau.h.

float bgui_graph_tableau::xmax_ [private]

Definition at line 70 of file bgui_graph_tableau.h.

float bgui_graph_tableau::xmin_ [private]

Definition at line 69 of file bgui_graph_tableau.h.

float bgui_graph_tableau::xscale_ [private]

Definition at line 73 of file bgui_graph_tableau.h.

Definition at line 88 of file bgui_graph_tableau.h.

float bgui_graph_tableau::yinc_ [private]

Definition at line 86 of file bgui_graph_tableau.h.

float bgui_graph_tableau::ymax_ [private]

Definition at line 72 of file bgui_graph_tableau.h.

float bgui_graph_tableau::ymin_ [private]

Definition at line 71 of file bgui_graph_tableau.h.

Definition at line 87 of file bgui_graph_tableau.h.

float bgui_graph_tableau::yscale_ [private]

Definition at line 74 of file bgui_graph_tableau.h.

Definition at line 89 of file bgui_graph_tableau.h.


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