/** * Notifies the {@code VariableChangedListener}s attached to {@code this}. */ public void notifyVariableChangedListeners() { x.notifyVariableChangedListeners(); // No need to do it for all }
/** * Notifies the {@code VariableChangedListener}s attached to {@code this}. */ public void notifyVariableChangedListeners() { x.notifyVariableChangedListeners(); // No need to do it for all }
/** * Sets this YoDouble to the given value. * * @param value double to set this YoDouble's internal long state to * @param notifyListeners boolean determining whether or not to call {@link #notifyVariableChangedListeners()} * @return boolean if the given value differed from the current value of this YoDouble */ public boolean set(double value, boolean notifyListeners) { if (val != value) { val = value; if (notifyListeners) { notifyVariableChangedListeners(); } return true; } return false; }
public Matrix3D createAngularAccelerationWeightMatrix() { Matrix3D weightMatrix = new Matrix3D(); yawAccelerationWeight.addVariableChangedListener(new MatrixUpdater(0, 0, weightMatrix)); pitchAccelerationWeight.addVariableChangedListener(new MatrixUpdater(1, 1, weightMatrix)); rollAccelerationWeight.addVariableChangedListener(new MatrixUpdater(2, 2, weightMatrix)); yawAccelerationWeight.notifyVariableChangedListeners(); pitchAccelerationWeight.notifyVariableChangedListeners(); rollAccelerationWeight.notifyVariableChangedListeners(); return weightMatrix; }
public Matrix3D createLinearAccelerationWeightMatrix() { Matrix3D weightMatrix = new Matrix3D(); xAccelerationWeights.addVariableChangedListener(new MatrixUpdater(0, 0, weightMatrix)); yAccelerationWeights.addVariableChangedListener(new MatrixUpdater(1, 1, weightMatrix)); zAccelerationWeight.addVariableChangedListener(new MatrixUpdater(2, 2, weightMatrix)); xAccelerationWeights.notifyVariableChangedListeners(); yAccelerationWeights.notifyVariableChangedListeners(); zAccelerationWeight.notifyVariableChangedListeners(); return weightMatrix; }