X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.plant3d%2Fsrc%2Forg%2Fsimantics%2Fplant3d%2Fgeometry%2FPumpGeometryProvider.java;h=a34e34689361884f3af8be0a929711410a476ca7;hb=53d55c24c779745f188bdb18d32f71d20acb61b2;hp=47b2d2d1b33620bd8fe60ef4867f114bb1db4724;hpb=f36217aeeb09c0c46f99886ee99772156ce9cfe6;p=simantics%2F3d.git diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/geometry/PumpGeometryProvider.java b/org.simantics.plant3d/src/org/simantics/plant3d/geometry/PumpGeometryProvider.java index 47b2d2d1..a34e3468 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/geometry/PumpGeometryProvider.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/geometry/PumpGeometryProvider.java @@ -69,31 +69,31 @@ public class PumpGeometryProvider extends BuiltinGeometryProvider implements Fi @Override public int numberOfNozzles() { - return 2; + return 2; } @Override public void updateNozzlePosition(int index, Nozzle nozzle) { - Double fl = nozzle.getFlowLength(); - if (fl == null) - fl = 0.1; - if (index == 0) { - nozzle.setPosition(new Vector3d(-length*0.5- fl,width*0.6,0.0)); - nozzle.setOrientation(MathTools.getQuat(new AxisAngle4d(0,1,0,Math.PI))); - } else if (index == 1) { - nozzle.setPosition(new Vector3d(-length*0.4,width*1.1+ fl,0.0)); - nozzle.setOrientation(MathTools.getQuat(new AxisAngle4d(0,0,1,Math.PI*0.5))); - } - + Double fl = nozzle.getFlowLength(); + if (fl == null) + fl = 0.1; + if (index == 0) { + nozzle.setPosition(new Vector3d(-length*0.5- fl,width*0.6,0.0)); + nozzle.setOrientation(MathTools.getQuat(new AxisAngle4d(0,1,0,Math.PI))); + } else if (index == 1) { + nozzle.setPosition(new Vector3d(-length*0.4,width*1.1+ fl,0.0)); + nozzle.setOrientation(MathTools.getQuat(new AxisAngle4d(0,0,1,Math.PI*0.5))); + } + } @Override public String getNozzleName(int index) { - switch (index) { - case 0 : return "Input"; - case 1: return "Output"; - default: return null; - } + switch (index) { + case 0 : return "Input"; + case 1: return "Output"; + default: return null; + } } }