Commit a407726a authored by smarx's avatar smarx
Browse files

rel_0_7_03 upgraded to fltk-1.1.3, adds a home command and a home button, and...

rel_0_7_03 upgraded to fltk-1.1.3, adds a home command and a home button, and provides a temporary workaround to time motion widget size issues and window resize issues
parent 6189cba4
......@@ -497,15 +497,14 @@ static int verbose; /* for debugging! */
#define SLOWKEY FL_SHIFT
#define CONSTRAINKEY FL_CTRL
int Fl_Gview::handle(int ev) {
if(eventhook) {
/* Allow clients to pre-screen our events without subclassing */
// Allow clients to pre-screen our events without subclassing
switch((*eventhook)(this, ev)) {
case 1: return 1; /* pre-screener handled it */
case -1: return 0; /* pre-screener commands us to ignore it too */
default: break; /* Else just process event normally below */
case 1: return 1; // pre-screener handled it
case -1: return 0; // pre-screener commands us to ignore it too
default: break; // Else just process event normally below
}
}
......
// generated by Fast Light User Interface Designer (fluid) version 1.0102
// generated by Fast Light User Interface Designer (fluid) version 1.0103
#ifndef partipanel_H
#define partipanel_H
......@@ -12,11 +12,11 @@ extern void pp_hrdiag_on_cb(Fl_Menu_*, void*);
extern void pp_obj_cb(Fl_Menu_Button*, void*);
extern void pp_nav_cb(Fl_Menu_Button*, struct stuff **);
#include <FL/Fl_Light_Button.H>
#include <FL/Fl_Button.H>
extern void pp_sldtype_cb(Fl_Menu_Button*, void*);
#include <FL/Fl_Value_Slider.H>
extern void pp_slum_cb(Fl_Value_Slider*, struct stuff **);
extern void pp_genericslider_cb(Fl_Value_Slider*, void*);
#include <FL/Fl_Button.H>
extern void pp_linlog_cb(Fl_Button*, void*);
extern void pp_objtog_cb(Fl_Button*, void*);
extern void pp_step_cb(Fl_Button*, void*);
......
// generated by Fast Light User Interface Designer (fluid) version 1.0102
// generated by Fast Light User Interface Designer (fluid) version 1.0103
#include "partipanel.H"
#include "partiview.H"
......@@ -10,8 +10,7 @@ Fl_Menu_Item menu_ppui[] = {
};
static void cb_ppui(Fl_Light_Button* o, struct stuff **) {
specks_commandfmt( &ppui.st,
"points %d", o->value());
specks_commandfmt( &ppui.st, "points %d", o->value());
}
static void cb_ppui1(Fl_Light_Button* o, struct stuff **) {
......@@ -37,6 +36,12 @@ static void cb_Boxes(Fl_Menu_Button* o, void*) {
specks_commandfmt(&ppui.st, "%s", o->text());
}
static void cb_ppui5(Fl_Button* o, struct stuff **) {
char homestr[50];
sprintf(homestr, "home %g %g %g %g %g %g (XYZ RxRyRz)", ppui.home[0], ppui.home[1], ppui.home[2], ppui.home[3], ppui.home[4], ppui.home[5]);
specks_commandfmt( &ppui.st, homestr, o->value());
}
Fl_Menu_Button *playmenu=(Fl_Menu_Button *)0;
static void cb_playmenu(Fl_Menu_Button* o, void*) {
......@@ -47,14 +52,14 @@ Fl_Button *editbtn=(Fl_Button *)0;
Fl_Window* make_window() {
Fl_Window* w;
{ Fl_Window* o = ppui.mainwin = new Fl_Window(475, 472);
{ Fl_Window* o = ppui.mainwin = new Fl_Window(540, 466);
w = o;
o->box(FL_DOWN_BOX);
o->color(96);
{ Fl_Pack* o = new Fl_Pack(-5, -1, 482, 470);
{ Fl_Pack* o = new Fl_Pack(0, 0, 540, 466);
o->color(96);
{ Fl_Group* o = ppui.toprow = new Fl_Group(-2, -1, 479, 37);
{ Fl_Menu_Button* o = ppui.more = new Fl_Menu_Button(-2, 0, 30, 20, "More");
{ Fl_Group* o = ppui.toprow = new Fl_Group(0, 0, 540, 37);
{ Fl_Menu_Button* o = ppui.more = new Fl_Menu_Button(0, 0, 30, 20, "More");
o->color(137);
o->selection_color(8);
o->labelsize(12);
......@@ -93,7 +98,7 @@ Fl_Window* make_window() {
}
o->end();
}
{ Fl_Group* o = ppui.objgroup = new Fl_Group(98, -1, 379, 37);
{ Fl_Group* o = ppui.objgroup = new Fl_Group(98, 0, 441, 37);
{ Fl_Light_Button* o = ppui.point = new Fl_Light_Button(106, 0, 20, 20, "point ");
o->color(35);
o->selection_color(2);
......@@ -144,22 +149,31 @@ Fl_Window* make_window() {
o->callback((Fl_Callback*)cb_Boxes);
o->add("boxes off|boxes on|boxes ONLY");
}
{ Fl_Group* o = ppui.slidergroup = new Fl_Group(240, -1, 237, 35);
{ Fl_Button* o = ppui.homejump = new Fl_Button(245, 0, 20, 20, "home");
o->color(35);
o->selection_color(34);
o->labelsize(12);
o->labelcolor(3);
o->callback((Fl_Callback*)cb_ppui5, (void*)(&ppui.st));
o->align(FL_ALIGN_BOTTOM);
}
{ Fl_Group* o = ppui.slidergroup = new Fl_Group(270, 0, 268, 35);
o->box(FL_FLAT_BOX);
o->color(96);
o->when(FL_WHEN_CHANGED);
{ Fl_Menu_Button* o = ppui.sldtype = new Fl_Menu_Button(240, 0, 42, 20, "slum");
{ Fl_Menu_Button* o = ppui.sldtype = new Fl_Menu_Button(275, 0, 22, 20, "slum");
o->tooltip("menu for choosing type of slider");
o->box(FL_DOWN_BOX);
o->color(15);
o->selection_color(4);
o->selection_color(35);
o->labelsize(12);
o->labelcolor(3);
o->textsize(12);
o->textcolor(35);
o->callback((Fl_Callback*)pp_sldtype_cb);
o->align(FL_ALIGN_BOTTOM_LEFT);
}
{ Fl_Value_Slider* o = ppui.slum = new Fl_Value_Slider(312, 0, 165, 20, "log slum");
{ Fl_Value_Slider* o = ppui.slum = new Fl_Value_Slider(327, 0, 211, 20, "log slum");
o->type(5);
o->color(35);
o->selection_color(4);
......@@ -171,7 +185,7 @@ Fl_Window* make_window() {
o->textcolor(3);
o->callback((Fl_Callback*)pp_slum_cb, (void*)(&ppui.st));
}
{ Fl_Value_Slider* o = ppui.genericslider = new Fl_Value_Slider(312, 0, 165, 20, "generic slider");
{ Fl_Value_Slider* o = ppui.genericslider = new Fl_Value_Slider(327, 0, 211, 20, "generic slider");
o->type(5);
o->color(35);
o->selection_color(4);
......@@ -186,7 +200,7 @@ Fl_Window* make_window() {
o->hide();
Fl_Group::current()->resizable(o);
}
{ Fl_Button* o = ppui.linlog = new Fl_Button(282, 0, 30, 20, "log");
{ Fl_Button* o = ppui.linlog = new Fl_Button(297, 0, 30, 20, "log");
o->down_box(FL_DOWN_BOX);
o->color(136);
o->selection_color(136);
......@@ -206,7 +220,7 @@ Fl_Window* make_window() {
}
o->end();
}
{ Fl_Scroll_Thin* o = new Fl_Scroll_Thin(1, 40, 473, 29);
{ Fl_Scroll_Thin* o = new Fl_Scroll_Thin(0, 40, 540, 29);
o->type(1);
o->box(FL_NO_BOX);
o->color(96);
......@@ -235,7 +249,7 @@ Fl_Window* make_window() {
}
o->end();
}
{ Fl_Group* o = ppui.steprow = new Fl_Group(-3, 70, 380, 49);
{ Fl_Group* o = ppui.steprow = new Fl_Group(0, 70, 380, 49);
o->color(41);
{ Fl_Button* o = ppui.step[0] = new Fl_Button(304, 74, 19, 20, "@#|<");
o->color(32);
......@@ -247,7 +261,7 @@ Fl_Window* make_window() {
o->labelcolor(3);
o->callback((Fl_Callback*)pp_step_cb, (void*)(1));
}
{ Fl_Input* o = ppui.timestep = new Fl_Input(9, 74, 108, 21, "T");
{ Fl_Input* o = ppui.timestep = new Fl_Input(12, 74, 108, 21, "T");
o->type(1);
o->color(32);
o->selection_color(92);
......@@ -280,7 +294,7 @@ Fl_Window* make_window() {
o->labelcolor(3);
o->callback((Fl_Callback*)pp_backtrip_cb);
}
{ Fl_Input* o = ppui.timebase = new Fl_Input(10, 97, 137, 21, "+");
{ Fl_Input* o = ppui.timebase = new Fl_Input(12, 97, 137, 21, "+");
o->type(1);
o->color(97);
o->labelsize(13);
......@@ -330,8 +344,8 @@ Fl_Window* make_window() {
}
o->end();
}
{ Fl_Group* o = ppui.animrow = new Fl_Group(-3, 121, 476, 21);
{ Fl_Button* o = ppui.rdata = new Fl_Button(-3, 122, 55, 20, "Path...");
{ Fl_Group* o = ppui.animrow = new Fl_Group(0, 121, 540, 21);
{ Fl_Button* o = ppui.rdata = new Fl_Button(0, 122, 55, 20, "Path...");
o->color(32);
o->labelsize(12);
o->labelcolor(3);
......@@ -361,7 +375,7 @@ Fl_Window* make_window() {
o->callback((Fl_Callback*)pp_playframe_cb, (void*)(&ppui.st));
o->when(FL_WHEN_RELEASE);
}
{ Fl_Value_Slider* o = ppui.playtime = new Fl_Value_Slider(202, 122, 271, 20);
{ Fl_Value_Slider* o = ppui.playtime = new Fl_Value_Slider(202, 122, 337, 20);
o->type(5);
o->color(32);
o->selection_color(4);
......@@ -380,9 +394,9 @@ Fl_Window* make_window() {
}
o->end();
}
{ Fl_Tile* o = ppui.maintile = new Fl_Tile(-3, 142, 478, 327);
{ Fl_Tile* o = ppui.maintile = new Fl_Tile(0, 142, 540, 327);
o->color(139);
{ Hist* o = ppui.cmdhist = new Hist(-3, 142, 476, 75);
{ Hist* o = ppui.cmdhist = new Hist(0, 142, 540, 75);
o->box(FL_DOWN_BOX);
o->color(96);
o->selection_color(49);
......@@ -392,7 +406,7 @@ Fl_Window* make_window() {
o->labelcolor(56);
o->align(FL_ALIGN_TOP);
o->when(FL_WHEN_RELEASE);
{ HistBrowser* o = new HistBrowser(-3, 142, 476, 50);
{ HistBrowser* o = new HistBrowser(0, 142, 540, 50);
o->type(3);
o->box(FL_NO_BOX);
o->color(0);
......@@ -410,12 +424,12 @@ Fl_Window* make_window() {
o->scrollbar_width( 8 );
o->hist(ppui.cmdhist);
}
{ Fl_Group* o = new Fl_Group(-3, 192, 476, 25);
{ Fl_Box* o = new Fl_Box(-3, 192, 30, 25, "Cmd:");
{ Fl_Group* o = new Fl_Group(0, 192, 540, 25);
{ Fl_Box* o = new Fl_Box(0, 192, 30, 25, "Cmd:");
o->labelsize(12);
o->labelcolor(3);
}
{ HistInput* o = ppui.cmd = new HistInput(27, 192, 446, 25);
{ HistInput* o = ppui.cmd = new HistInput(30, 192, 510, 25);
o->box(FL_DOWN_BOX);
o->color(38);
o->selection_color(9);
......@@ -435,13 +449,13 @@ Fl_Window* make_window() {
}
o->end();
}
{ Fl_Box* o = new Fl_Box(-3, 202, 476, 267, "tilelimiter");
{ Fl_Box* o = new Fl_Box(0, 202, 540, 267, "tilelimiter");
o->hide();
Fl_Group::current()->resizable(o);
}
{ Fl_Group* o = new Fl_Group(-3, 217, 478, 252);
{ Fl_Group* o = new Fl_Group(0, 217, 540, 252);
o->box(FL_DOWN_BOX);
{ Fl_Gview* o = ppui.view = new Fl_Gview(-3, 217, 478, 252);
{ Fl_Gview* o = ppui.view = new Fl_Gview(0, 217, 540, 249);
o->box(FL_NO_BOX);
o->color(49);
o->selection_color(49);
......@@ -462,6 +476,7 @@ Fl_Window* make_window() {
o->end();
Fl_Group::current()->resizable(o);
}
o->size_range(101,130);
o->end();
}
{ Fl_Window* o = ppui.hrdiagwin = new Fl_Window(280, 230);
......
# data file for the Fltk User Interface Designer (fluid)
version 1.0102
version 1.0103
header_name {partipanel.H}
code_name {partipanel.cc}
decl {\#include "partiview.H"} {}
......@@ -7,14 +7,15 @@ decl {\#include "partiview.H"} {}
Function {make_window()} {open
} {
Fl_Window {ppui.mainwin} {open
xywh {95 98 473 469} box DOWN_BOX color 96 hide resizable
xywh {135 94 540 466} box DOWN_BOX color 96 resizable
code0 {o->size_range(101,130);} visible
} {
Fl_Pack {} {open
xywh {0 0 473 469} color 96 resizable
xywh {0 0 540 466} color 96 resizable
code0 {o->spacing(0);}
} {
Fl_Group {ppui.toprow} {
xywh {0 0 473 37}
xywh {0 0 540 37}
} {
Fl_Menu_Button {ppui.more} {
label More
......@@ -53,13 +54,12 @@ Function {make_window()} {open
} {}
}
Fl_Group {ppui.objgroup} {open
xywh {98 0 375 37} resizable
xywh {98 0 441 37} resizable
} {
Fl_Light_Button {ppui.point} {
label {point }
user_data {&ppui.st} user_data_type {struct stuff **}
callback {specks_commandfmt( &ppui.st,
"points %d", o->value());}
callback {specks_commandfmt( &ppui.st, "points %d", o->value());}
xywh {106 0 20 20} color 35 selection_color 2 labelsize 12 labelcolor 3 align 2 when 1
}
Fl_Light_Button {ppui.poly} {
......@@ -95,30 +95,38 @@ Function {make_window()} {open
xywh {216 0 20 20} type popup3
code0 {o->add("boxes off|boxes on|boxes ONLY");}
} {}
Fl_Button {ppui.homejump} {
label home
user_data {&ppui.st} user_data_type {struct stuff **}
callback {char homestr[50];
sprintf(homestr, "home %g %g %g %g %g %g (XYZ RxRyRz)", ppui.home[0], ppui.home[1], ppui.home[2], ppui.home[3], ppui.home[4], ppui.home[5]);
specks_commandfmt( &ppui.st, homestr, o->value());}
xywh {245 0 20 20} color 35 selection_color 34 labelsize 12 labelcolor 3 align 2
}
Fl_Group {ppui.slidergroup} {open
xywh {240 0 231 35} box FLAT_BOX color 96 when 1 resizable
xywh {270 0 268 35} box FLAT_BOX color 96 when 1 resizable
code0 {//steven marx: version 0.7.02}
} {
Fl_Menu_Button {ppui.sldtype} {
label slum
callback pp_sldtype_cb open
tooltip {menu for choosing type of slider} xywh {240 0 42 20} box DOWN_BOX color 15 selection_color 4 labelsize 12 labelcolor 3 align 6 textsize 12
tooltip {menu for choosing type of slider} xywh {275 0 22 20} box DOWN_BOX color 15 selection_color 35 labelsize 12 labelcolor 3 align 6 textsize 12 textcolor 35
} {}
Fl_Value_Slider {ppui.slum} {
label {log slum}
user_data {&ppui.st} user_data_type {struct stuff **}
callback pp_slum_cb
xywh {312 0 161 20} type {Horz Knob} color 35 selection_color 4 labelsize 12 labelcolor 3 minimum -3 maximum 4.5 step 0.025 textcolor 3
xywh {327 0 211 20} type {Horz Knob} color 35 selection_color 4 labelsize 12 labelcolor 3 minimum -3 maximum 4.5 step 0.025 textcolor 3
}
Fl_Value_Slider {ppui.genericslider} {
label {generic slider}
callback pp_genericslider_cb
xywh {312 0 165 20} type {Horz Knob} color 35 selection_color 4 labelsize 12 labelcolor 3 when 3 minimum -3 maximum 4.5 step 0.025 textcolor 3 hide resizable
xywh {327 0 211 20} type {Horz Knob} color 35 selection_color 4 labelsize 12 labelcolor 3 when 3 minimum -3 maximum 4.5 step 0.025 textcolor 3 hide resizable
}
Fl_Button {ppui.linlog} {
label log
callback pp_linlog_cb
xywh {282 0 30 20} down_box DOWN_BOX color 136 selection_color 136 labelsize 12 labelcolor 3 align 16
xywh {297 0 30 20} down_box DOWN_BOX color 136 selection_color 136 labelsize 12 labelcolor 3 align 16
code0 {o->value(0); //initially slum slider is visible}
code1 {o->type(FL_TOGGLE_BUTTON);}
}
......@@ -126,7 +134,7 @@ Function {make_window()} {open
}
}
Fl_Scroll {} {
xywh {0 40 473 29} type HORIZONTAL color 96 hide
xywh {0 40 540 29} type HORIZONTAL color 96 hide
class Fl_Scroll_Thin
} {
Fl_Pack {ppui.objtogs} {open
......@@ -200,12 +208,12 @@ Function {make_window()} {open
}
Fl_Light_Button {ppui.feed} {
label feed
callback pp_feed_cb selected
callback pp_feed_cb
xywh {352 73 20 21} color 96 labelsize 10 labelcolor 3 align 6
}
}
Fl_Group {ppui.animrow} {
xywh {0 121 473 21}
xywh {0 121 540 21}
} {
Fl_Button {ppui.rdata} {
label {Path...}
......@@ -233,30 +241,30 @@ Function {make_window()} {open
Fl_Value_Slider {ppui.playtime} {
user_data {&ppui.st} user_data_type {struct stuff **}
callback pp_playtime_cb
xywh {202 122 271 20} type {Horz Knob} color 32 selection_color 4 labelcolor 3 maximum 100 step 0 textcolor 3 resizable
xywh {202 122 337 20} type {Horz Knob} color 32 selection_color 4 labelcolor 3 maximum 100 step 0 textcolor 3 resizable
}
Fl_Button editbtn {
label att
xywh {97 121 25 20} color 33 selection_color 33 labelsize 12 labelcolor 3
}
}
Fl_Tile {ppui.maintile} {
xywh {0 142 473 327} color 139 resizable
Fl_Tile {ppui.maintile} {open
xywh {0 142 540 327} color 139 resizable
} {
Fl_Group {ppui.cmdhist} {
xywh {0 142 473 75} box DOWN_BOX color 96
Fl_Group {ppui.cmdhist} {open
xywh {0 142 540 75} box DOWN_BOX color 96
code0 {\#include "Hist.H"}
class Hist
} {
Fl_Browser {} {
xywh {0 142 473 50} type Multi color 0 selection_color 9 labelsize 12 textsize 12 textcolor 3 resizable
xywh {0 142 540 50} type Multi color 0 selection_color 9 labelsize 12 textsize 12 textcolor 3 resizable
code0 {o->scrollbar.align( FL_ALIGN_LEFT );}
code1 {o->scrollbar_width( 8 );}
code2 {o->hist(ppui.cmdhist);}
class HistBrowser
}
Fl_Group {} {open
xywh {0 192 473 25}
xywh {0 192 540 25}
} {
Fl_Box {} {
label {Cmd:}
......@@ -264,7 +272,7 @@ Function {make_window()} {open
}
Fl_Input {ppui.cmd} {
callback pp_cmd_cb
xywh {30 192 443 25} color 38 selection_color 9 labelfont 1 labelsize 10 labelcolor 3 when 10 textcolor 55 resizable
xywh {30 192 510 25} color 38 selection_color 9 labelfont 1 labelsize 10 labelcolor 3 when 10 textcolor 55 resizable
code0 {o->cursor_color( o->textcolor() );}
code1 {o->hist( ppui.cmdhist );}
class HistInput
......@@ -273,13 +281,13 @@ Function {make_window()} {open
}
Fl_Box {} {
label tilelimiter
xywh {0 202 473 267} hide resizable
xywh {0 202 540 267} hide resizable
}
Fl_Group {} {open
xywh {0 217 473 252} box DOWN_BOX
xywh {0 217 540 252} box DOWN_BOX
} {
Fl_Box {ppui.view} {
xywh {0 217 473 252}
Fl_Box {ppui.view} {selected
xywh {0 217 540 249}
code0 {o->cursor(FL_CURSOR_CROSS);}
class Fl_Gview
}
......
......@@ -40,6 +40,8 @@ struct _ppui {
float pickrange;
char *reqwinsize;
float home[6]; //marx marx version 0.7.03 home is equivalent to a jump to a named point of view
SClock *clk; /* master data clock */
SClock *camclock; /* camera animation clock */
int playing;
......@@ -72,13 +74,15 @@ struct _ppui {
Fl_Light_Button* label;
Fl_Light_Button* texture;
Fl_Light_Button* box;
Fl_Button* homejump; //steven marx: version 0.7.03
Fl_Value_Slider* slum;
Fl_Group* slidergroup; //steven marx: version 0.7.02 original slum slider overlaid by generic sliders
Fl_Menu_Button* sldtype; //steven marx: version 0.7.02 menu selectable sliders
Fl_Group* slidergroup; //steven marx: version 0.7.02 original slum slider overlaid by generic sliders
Fl_Menu_Button* sldtype; //steven marx: version 0.7.02 menu selectable sliders
Fl_Value_Slider* genericslider; //steven marx: version 0.7.02 we change genericslider into the one we want (replaced by the following line)
Fl_Button* linlog; //steven marx: version 0.7.02 makes genericslider toggle linear <-> log
Fl_Button* linlog; //steven marx: version 0.7.02 makes genericslider toggle linear <-> log
Fl_Light_Button* feed;
Fl_Menu_Button* playmenu;
......
......@@ -505,13 +505,15 @@ struct stuff *tst = stuffs[tno];
if(tst == NULL) continue;
maxobject = tno;
if(!timeshown && tst->clk->tmin != tst->clk->tmax) {
ppui.steprow->show();
ppui.steprow->parent()->hide(); // force top-level Pack to be redraw()n
ppui.steprow->parent()->hide(); // force top-level Pack to be redraw()n
ppui.steprow->parent()->show(); // for some reason just ->redraw() doesn't.
timeshown = 1;
}
if(ppui.st == stuffs[tno]) {
char oname[12];
Fl_Font lfont = ppui.view->movingtarget()
......@@ -613,7 +615,6 @@ ppui.obj->parent()->redraw();
int menunum = ppui.sldtype->value();
if(menunum >= 0 && menunum < NUMSLD && menunum != SLUM)
genericslider_setparam();
}
}
......@@ -899,28 +900,47 @@ int pp_parse_args( struct stuff **, int argc, char *argv[], char *fromfname, voi
} else if(!strncmp( argv[0], "jump", 4 )) {
Point xyz;
float aer[3];
static int stupid[3] = {1,0,2}; /* aer -> rx ry rz */
Matrix c2w;
parti_getc2w( &c2w );
tfm2xyzaer( &xyz, aer, &c2w );
if(argc>1) {
for(i=1; i<argc && i<4+3; i++) {
if(i-1<3) xyz.x[i-1] = getfloat(argv[i], xyz.x[i-1]);
else aer[stupid[i-4]] = getfloat(argv[i], aer[stupid[i-4]]);
}
xyzaer2tfm( &c2w, &xyz, aer );
parti_setc2w( &c2w );
}
msg("jump %g %g %g %g %g %g (XYZ RxRyRz)",
xyz.x[0],xyz.x[1],xyz.x[2],
aer[1],aer[0],aer[2]);
Point xyz;
float aer[3];
static int stupid[3] = {1,0,2}; /* aer -> rx ry rz */
Matrix c2w;
parti_getc2w( &c2w );
tfm2xyzaer( &xyz, aer, &c2w );
if(argc>1) {
for(i=1; i<argc && i<4+3; i++) {
if(i-1<3) xyz.x[i-1] = getfloat(argv[i], xyz.x[i-1]);
else aer[stupid[i-4]] = getfloat(argv[i], aer[stupid[i-4]]);
}
xyzaer2tfm( &c2w, &xyz, aer );
parti_setc2w( &c2w );
}
msg("jump %g %g %g %g %g %g (XYZ RxRyRz)",
xyz.x[0],xyz.x[1],xyz.x[2],
aer[1],aer[0],aer[2]);
} else if(!strncmp( argv[0], "home", 4 )) {//marx version 0.7.03
Point xyz;
float aer[3];
static int stupid[3] = {1,0,2}; /* aer -> rx ry rz */
Matrix c2w;
parti_getc2w( &c2w );
tfm2xyzaer( &xyz, aer, &c2w );
if(argc>1) {
for(i=1; i<argc && i<4+3; i++) {
if(i-1<3) xyz.x[i-1] = getfloat(argv[i], xyz.x[i-1]);
else aer[stupid[i-4]] = getfloat(argv[i], aer[stupid[i-4]]);
}
xyzaer2tfm( &c2w, &xyz, aer );
parti_setc2w( &c2w );
ppui.home[0] = xyz.x[0]; ppui.home[1] = xyz.x[1]; ppui.home[2] = xyz.x[2];
ppui.home[3] = aer[0]; ppui.home[4] = aer[1]; ppui.home[5] = aer[2];
}
msg("home %g %g %g %g %g %g (XYZ RxRyRz)", ppui.home[0], ppui.home[1], ppui.home[2], ppui.home[3], ppui.home[4], ppui.home[5]);
} else if(!strncmp(argv[0], "inertia", 5)) {
if(argc > 1)
ppui.view->inertia( getbool( argv[1], ppui.view->inertia() ) );
msg("inertia %s", ppui.view->inertia() ? "on":"off");
if(argc > 1)
ppui.view->inertia( getbool( argv[1], ppui.view->inertia() ) );
msg("inertia %s", ppui.view->inertia() ? "on":"off");
} else if((!strcmp( argv[0], "rdata" ) || !strcmp(argv[0], "readpath"))
&& argc>1) {
......@@ -1029,7 +1049,7 @@ int main(int argc, char *argv[])
ppui.censize = 1.0;
ppui.pickrange = 3.5;
ppui.view->movingtarget( 0 );
ppui.view->movingtarget( 0 );
ppui.view->msg = msg;
if(ppui.hrdiag) {
......@@ -1065,6 +1085,15 @@ int main(int argc, char *argv[])
#endif
ppui.view->show();
//marx version 0.7.03 process any pending events followed by simulation user pressing enter key
//this appears to properly initialize the steprow group
for(int i = 1; i < 5; i++)
Fl::wait(.1);
pp_cmd_cb( ppui.cmd, NULL );
//marx version 0.7.03 end simulate enter key
if(ppui.reqwinsize != NULL) {
parti_update();
......@@ -1076,6 +1105,6 @@ int main(int argc, char *argv[])
Fl_Tooltip::delay(.5); //marx: version 0.7.02
Fl_Tooltip::font(FL_HELVETICA_BOLD); //marx: version 0.7.02
Fl_Tooltip::color(68); //marx: version 0.7.02
return Fl::run();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment