Search in sources :

Example 6 with AxialMuscleMaterial

use of artisynth.core.materials.AxialMuscleMaterial in project artisynth_core by artisynth.

the class PointSpringBase method setDamping.

public static void setDamping(PointSpringBase s, double d) {
    if (s.getMaterial() instanceof LinearAxialMaterial) {
        LinearAxialMaterial mat = (LinearAxialMaterial) s.getMaterial().clone();
        mat.setDamping(d);
        s.setMaterial(mat);
    } else if (s.getMaterial() instanceof AxialMuscleMaterial) {
        AxialMuscleMaterial mat = (AxialMuscleMaterial) s.getMaterial().clone();
        mat.setDamping(d);
        s.setMaterial(mat);
    } else {
        System.out.println("Warning: setDamping(): no damping in spring material");
    }
}
Also used : AxialMuscleMaterial(artisynth.core.materials.AxialMuscleMaterial) LinearAxialMaterial(artisynth.core.materials.LinearAxialMaterial)

Aggregations

AxialMuscleMaterial (artisynth.core.materials.AxialMuscleMaterial)6 Muscle (artisynth.core.mechmodels.Muscle)2 GenericMuscle (artisynth.core.materials.GenericMuscle)1 LinearAxialMaterial (artisynth.core.materials.LinearAxialMaterial)1 Point (artisynth.core.mechmodels.Point)1