Search in sources :

Example 1 with WayPointProbe

use of artisynth.core.probes.WayPointProbe in project artisynth_core by artisynth.

the class ProbeInfo method invalidateWayPoints.

private void invalidateWayPoints() {
    // determine which waypoints have to be invalidated
    WayPointProbe wayProbe = getMain().getRootModel().getWayPoints();
    double newStartTime = getStartTime();
    wayProbe.invalidateAfterTime((oldStartTime < newStartTime) ? oldStartTime : newStartTime);
}
Also used : WayPointProbe(artisynth.core.probes.WayPointProbe)

Example 2 with WayPointProbe

use of artisynth.core.probes.WayPointProbe in project artisynth_core by artisynth.

the class TimelineController method loadWayPoints.

public void loadWayPoints() {
    RootModel root = myMain.getRootModel();
    WayPointProbe wayPoints = root.getWayPoints();
    wayPoints.load();
    refreshWayPoints(root);
}
Also used : RootModel(artisynth.core.workspace.RootModel) WayPointProbe(artisynth.core.probes.WayPointProbe)

Example 3 with WayPointProbe

use of artisynth.core.probes.WayPointProbe in project artisynth_core by artisynth.

the class TimelineController method saveWayPoints.

public void saveWayPoints() {
    WayPointProbe wayPoints = myMain.getRootModel().getWayPoints();
    wayPoints.save();
}
Also used : WayPointProbe(artisynth.core.probes.WayPointProbe)

Example 4 with WayPointProbe

use of artisynth.core.probes.WayPointProbe in project artisynth_core by artisynth.

the class ProbeInfo method toggleProbeActivation.

/**
 * edited by johnty to prevent null exceptions.
 */
private void toggleProbeActivation() {
    WayPointProbe wayProbe = getMain().getRootModel().getWayPoints();
    double earliestTime = getStartTime();
    wayProbe.invalidateAfterTime(getStartTime());
    if (myController.getCurrentTime() > earliestTime) {
        if (getMain().getWorkspace().rootModelHasState()) {
            WayPoint way = wayProbe.getNearestValidBefore(earliestTime);
            if (way != null) {
                getScheduler().setTime(way);
            } else {
                getScheduler().setTime(0);
            }
        } else {
            getScheduler().setTime(earliestTime);
        }
    }
    setActive(!isActive());
    setAppropriateColor();
    myController.requestUpdateWidgets();
}
Also used : WayPointProbe(artisynth.core.probes.WayPointProbe) WayPoint(artisynth.core.probes.WayPoint)

Example 5 with WayPointProbe

use of artisynth.core.probes.WayPointProbe in project artisynth_core by artisynth.

the class TimelineController method loadWayPointsFrom.

public void loadWayPointsFrom() {
    RootModel root = myMain.getRootModel();
    WayPointProbe wayPoints = root.getWayPoints();
    setAttachedFileFromUser(wayPoints, "Load From");
    wayPoints.load();
    refreshWayPoints(root);
}
Also used : RootModel(artisynth.core.workspace.RootModel) WayPointProbe(artisynth.core.probes.WayPointProbe)

Aggregations

WayPointProbe (artisynth.core.probes.WayPointProbe)10 WayPoint (artisynth.core.probes.WayPoint)3 RootModel (artisynth.core.workspace.RootModel)3 Probe (artisynth.core.probes.Probe)2 NumericProbeEditor (artisynth.core.gui.probeEditor.NumericProbeEditor)1