use of maspack.matrix.VectorNd in project artisynth_core by artisynth.
the class ColorBar method setLabelPositions.
public synchronized void setLabelPositions(VectorNd pos) {
VectorNd newLabelPos = new VectorNd(pos);
myLabelPos = newLabelPos;
myRenderObjectRebuildRequest = true;
}
use of maspack.matrix.VectorNd in project artisynth_core by artisynth.
the class ColorBar method setDefaults.
@Override
protected void setDefaults() {
setFont(new Font(defaultFontName, 0, defaultFontSize));
myRenderProps = createDefaultRenderProps();
hAlignment = defaultHAlignment;
vAlignment = defaultVAlignment;
myTextSize = defaultTextSize;
myFontSize = defaultFontSize;
myLoc = new Rectangle2d(defaultLoc);
myColorMap = defaultColorMap;
myValueRange = new DoubleInterval(defaultInterval);
nBarDivisions = defaultBarDivisions;
myTickFractions = new Vector2d(defaultTickFraction);
myLabelPos = new VectorNd(0);
myLabelText = new ArrayList<String>();
myTextOffset = new Vector2d(defaultTextOffset);
myNumberFormat = new NumberFormat(defaultNumberFormat);
myRenderObject = null;
myRenderObjectRebuildRequest = true;
}
use of maspack.matrix.VectorNd in project artisynth_core by artisynth.
the class ColorBar method populateLabels.
public void populateLabels(double minVal, double maxVal, int nSections, NumberFormat fmt) {
setValueRange(minVal, maxVal);
double dx = 1.0 / nSections;
VectorNd ticks = new VectorNd(nSections + 1);
ArrayList<String> labels = new ArrayList<String>(nSections + 1);
for (int i = 0; i <= nSections; i++) {
double a = i * dx;
ticks.set(i, a);
labels.add(fmt.format((1 - a) * minVal + a * maxVal));
}
setLabels(ticks, labels);
}
use of maspack.matrix.VectorNd in project artisynth_core by artisynth.
the class NumericControlProbe method clone.
public Object clone() throws CloneNotSupportedException {
NumericControlProbe probe = (NumericControlProbe) super.clone();
probe.myTmpVec = new VectorNd(myTmpVec.size());
probe.myDataFunctions = copyDataFunctions(myDataFunctions);
return probe;
}
use of maspack.matrix.VectorNd in project artisynth_core by artisynth.
the class NumericControlProbe method createNumericList.
public void createNumericList(int vsize) {
super.createNumericList(vsize);
myTmpVec = new VectorNd(vsize);
}
Aggregations