]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/ControlPointFactory.java
Support for reversible in-line components
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / scenegraph / controlpoint / ControlPointFactory.java
index 0967f38b77981bc12b618ad9309b8827f1715ddb..71602dcc0ff163220a36b741a78ec9c4d082111d 100644 (file)
@@ -46,6 +46,7 @@ public class ControlPointFactory {
                pcp.setType(inst.type);
                pcp.setFixed(inst.fixed);
                pcp.setRotate(inst.isRotate);
+               pcp.setReverse(inst.isReverse);
                switch(inst.type) {
                case END:
                        
@@ -78,6 +79,7 @@ public class ControlPointFactory {
                boolean isOffset;
                boolean isSizeChange;
                boolean isRotate;
+               boolean isReverse;
                
        }
        
@@ -92,6 +94,7 @@ public class ControlPointFactory {
                                i.isOffset = false;
                                i.isSizeChange = false;
                                i.isRotate = false;
+                               i.isReverse = false;
                                i.type = Type.INLINE;
                                if (graph.isInheritedFrom(res, p3d.Nozzle)) {
                                        i.fixed = true;
@@ -118,6 +121,10 @@ public class ControlPointFactory {
                                                i.isRotate = true;
                                        }
                                        
+                                       if (graph.hasStatement(res,p3d.ReverseComponent)) {
+                                               i.isReverse = true;
+                                       }
+                                       
                                } else if (graph.isInheritedFrom(res, p3d.TurnComponent)) {
                                        i.type = Type.TURN;
                                        if (graph.hasStatement(res,p3d.VariableAngleTurnComponent)) {