Excellent! The functionality I was after was mainly for sanity checks/debugging, so no user was actually going to use it so it didn't have to be real real smooth, but I ended up doing this:

vgui::init(argc, argv);
vgui_easy3D_tableau_new list3D;
list3D->add_point(1,1,1);
vgui_viewer3D_tableau_new viewer(list3D);
vgui_shell_tableau_new shell(viewer);

vgui::adapt(shell,1000,1000,"Test"); //display the first point and stop
vgui::run_till_idle();
int t;
cin >> t;

list3D->add_point(0,0,0);
list3D->post_redraw();
vgui::adapt(shell,1000,1000,"Test"); //display the second point and stop again
vgui::run_till_idle();

cin >> t;
return vgui::run(shell, Width, Height, "Parameter Estimation"); //enter normal mode

Maybe a little tutorial like this could be put somewhere in the documentation/examples?

Thanks for the help!

Dave


On Mon, Mar 3, 2008 at 10:44 AM, Amitha Perera <amithaperera@users.sourceforge.net> wrote:
[posting back to the list for archival.]

David Doria wrote:
> I saw that vgui::adapt() does like you said and draws it but doesn't let
> you rotate/zoom.

I assume you mean that the GUI is frozen, and not that you don't have a
viewer2d/3d (which is what allows the zoom and rotate).

This is because the GUI events are only handled during vgui::run and
vgui::run_till_idle.  At all other times, the GUI is frozen.

> So then how do I add a Point to the screen? I was thinking
> vgui::adapt();
> list3D->add_point(0,0,0);
> REFRESH VIEWER
> REFRESH SHELL

In general, when you modify the contents of a tableau, you should
execute a post_redraw() on that tableau.  Not on every modification, but
after a block of modifications.  (Not necessary to post the redraw on
any other tableau.)  So
  list3D->add_point(0,0,0);
  list3D->post_redraw()

You may also want to consider making the input fully "GUIized", using
vgui_menu and vgui_dialog.  There are some examples in vgui/examples
about how to set up callbacks for menu items, and how to construct
dialog boxes to read various input.

Amitha.



--
Thanks,

David