use of artisynth.core.driver.Scheduler in project artisynth_core by artisynth.
the class Workspace method requestUpdateAction.
private void requestUpdateAction() {
if (myRequestedUpdateAction == null) {
myRequestedUpdateAction = new UpdateAction();
Scheduler scheduler = myMain.getScheduler();
if (scheduler.requestAction(myRequestedUpdateAction)) {
// System.out.println ("$sched");
} else {
SwingUtilities.invokeLater(myRequestedUpdateAction);
// System.out.println ("$swing");
}
}
}
use of artisynth.core.driver.Scheduler in project artisynth_core by artisynth.
the class MovieMakerDialog method waypointCapture.
private void waypointCapture() {
// disable play (otherwise destroys waypoints)
boolean savedBegin = beginRecordOnStart.isEnabled();
beginRecordOnStart.setEnabled(false);
beginRecordOnStart.setSelected(false);
// manual control of scheduler and rendering
Scheduler scheduler = myMain.getScheduler();
ViewerManager manager = myMain.getViewerManager();
try {
// reset to beginning
scheduler.reset();
manager.render();
manager.paint();
// starts recording
startMovie();
// we're manually doing this
myMovieMaker.setGrabbing(false);
myMovieMaker.resetFrameCounter();
myMovieMaker.forceGrab();
while (scheduler.fastForward()) {
manager.render();
manager.paint();
myMovieMaker.forceGrab();
}
stopMovie();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.err.println("Failed to create movie");
}
beginRecordOnStart.setEnabled(savedBegin);
beginRecordOnStart.setSelected(savedBegin);
}
Aggregations