public override void CopyToSpringBody (JelloBody oldBody, JelloSpringBody newBody) { base.CopyToSpringBody (oldBody, newBody); JelloPressureBody old = (JelloPressureBody)oldBody; newBody.ShapeMatching = old.ShapeMatching; newBody.DefaultEdgeSpringStiffness = old.DefaultEdgeSpringStiffness; newBody.DefaultEdgeSpringDamping = old.DefaultEdgeSpringDamping; newBody.DefaultCustomSpringDamping = old.DefaultCustomSpringDamping; newBody.DefaultCustomSpringStiffness = old.DefaultCustomSpringStiffness; newBody.DefaultInternalSpringDamping = old.DefaultInternalSpringDamping; newBody.DefaultInternalSpringStiffness = old.DefaultInternalSpringStiffness; newBody.ShapeSpringDamping = old.ShapeSpringDamping; newBody.ShapeSpringStiffness = old.ShapeSpringStiffness; newBody.setInternalSprings(old.getInternalSprings()); for(int i = 0; i < old.CustomSpringCount; i++) { newBody.addCustomSpring(old.getCustomSpring(i)); } }
public override void CopyToSpringBody(JelloBody oldBody, JelloSpringBody newBody) { base.CopyToSpringBody (oldBody, newBody); JelloPressureBody old = (JelloPressureBody)oldBody; newBody.ShapeMatching = old.ShapeMatching; newBody.DefaultEdgeSpringStiffness = old.DefaultEdgeSpringStiffness; newBody.DefaultEdgeSpringDamping = old.DefaultEdgeSpringDamping; newBody.DefaultCustomSpringDamping = old.DefaultCustomSpringDamping; newBody.DefaultCustomSpringStiffness = old.DefaultCustomSpringStiffness; newBody.DefaultInternalSpringDamping = old.DefaultInternalSpringDamping; newBody.DefaultInternalSpringStiffness = old.DefaultInternalSpringStiffness; newBody.ShapeSpringDamping = old.ShapeSpringDamping; newBody.ShapeSpringStiffness = old.ShapeSpringStiffness; newBody.setInternalSprings(old.getInternalSprings()); for(int i = 0; i < old.CustomSpringCount; i++) { newBody.addCustomSpring(old.getCustomSpring(i)); } }