]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/P3DRootNode.java
Let root node determine up direction for rotation angle calculations
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / scenegraph / P3DRootNode.java
index 27b1d471bf97733e9fe46bbadc79a85b5898470f..7a5ce551a7c317c16df776455125398213378934 100644 (file)
@@ -27,7 +27,9 @@ import vtk.vtkProp;
 @GraphType(Plant3D.URIs.Plant)
 public class P3DRootNode extends ParentNode<INode> implements IG3DNode, NodeMapProvider<Resource, vtkProp, INode> {
        
-       
+       // Vertical direction that determines the interpretation of rotation angle origin
+       protected Vector3d upVector = new Vector3d(0.0, 1.0, 0.0);
+
        @RelatedElementsAdd(Plant3D.URIs.children)
        public void addChild(INode node) {
        //public void addChild(IP3DVisualNode node) {
@@ -183,4 +185,8 @@ public class P3DRootNode extends ParentNode<INode> implements IG3DNode, NodeMapP
        public TurnComponent createTurn() {
                return new TurnComponent();
        }
+
+       public Vector3d getUpVector() {
+               return upVector;
+       }
 }