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");
}
}
Aggregations