Search in sources :

Example 91 with VectorNd

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;
}
Also used : VectorNd(maspack.matrix.VectorNd)

Example 92 with VectorNd

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;
}
Also used : Vector2d(maspack.matrix.Vector2d) Rectangle2d(maspack.geometry.Rectangle2d) VectorNd(maspack.matrix.VectorNd) DoubleInterval(maspack.util.DoubleInterval) Font(java.awt.Font) NumberFormat(maspack.util.NumberFormat)

Example 93 with VectorNd

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);
}
Also used : VectorNd(maspack.matrix.VectorNd) ArrayList(java.util.ArrayList)

Example 94 with VectorNd

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;
}
Also used : VectorNd(maspack.matrix.VectorNd)

Example 95 with VectorNd

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);
}
Also used : VectorNd(maspack.matrix.VectorNd)

Aggregations

VectorNd (maspack.matrix.VectorNd)136 Point (artisynth.core.mechmodels.Point)29 Point3d (maspack.matrix.Point3d)16 Vector3d (maspack.matrix.Vector3d)15 PointParticleAttachment (artisynth.core.mechmodels.PointParticleAttachment)11 ArrayList (java.util.ArrayList)11 ContactPoint (artisynth.core.mechmodels.ContactPoint)9 MatrixNd (maspack.matrix.MatrixNd)9 Vertex3d (maspack.geometry.Vertex3d)8 SparseMatrixNd (maspack.matrix.SparseMatrixNd)8 IntegrationPoint3d (artisynth.core.femmodels.IntegrationPoint3d)7 PointAttachment (artisynth.core.mechmodels.PointAttachment)7 PointFem3dAttachment (artisynth.core.femmodels.PointFem3dAttachment)6 FemNode (artisynth.core.femmodels.FemNode)5 PolygonalMesh (maspack.geometry.PolygonalMesh)5 ReaderTokenizer (maspack.util.ReaderTokenizer)5 FemNode3d (artisynth.core.femmodels.FemNode3d)4 IntegrationData3d (artisynth.core.femmodels.IntegrationData3d)4 StringReader (java.io.StringReader)4 HashMap (java.util.HashMap)4