]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/ControlPointFactory.java
Support for inline component rotations
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / scenegraph / controlpoint / ControlPointFactory.java
index a6d1eb26880e7faed3b609181569980d2228e89f..824f74d6741e9e07643fdc197b10b63b9d03e190 100644 (file)
@@ -45,6 +45,7 @@ public class ControlPointFactory {
                PipeControlPoint pcp = new PipeControlPoint(component);
                pcp.setType(inst.type);
                pcp.setFixed(inst.fixed);
+               pcp.setRotate(inst.isRotate);
                switch(inst.type) {
                case END:
                        
@@ -77,7 +78,7 @@ public class ControlPointFactory {
                boolean fixed;
                boolean isOffset;
                boolean isSizeChange;
-               
+               boolean isRotate;
                
        }
        
@@ -91,6 +92,7 @@ public class ControlPointFactory {
                                i.fixed = false;
                                i.isOffset = false;
                                i.isSizeChange = false;
+                               i.isRotate = false;
                                i.type = Type.INLINE;
                                if (graph.isInheritedFrom(res, p3d.Nozzle)) {
                                        i.fixed = true;
@@ -113,6 +115,9 @@ public class ControlPointFactory {
                                        if (graph.hasStatement(res,p3d.OffsetComponent)) {
                                                i.isOffset = true;
                                        }
+                                       if (graph.hasStatement(res,p3d.RotateComponent)) {
+                                               i.isRotate = true;
+                                       }
                                        
                                } else if (graph.isInheritedFrom(res, p3d.TurnComponent)) {
                                        i.type = Type.TURN;