]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.g3d/src/org/simantics/g3d/tools/NodeTools.java
White space clean-up
[simantics/3d.git] / org.simantics.g3d / src / org / simantics / g3d / tools / NodeTools.java
index 233fbacd60199de85c13e430c60e7c268fe2cbbb..be778dc367b4bf2d4b0f332f6c5dfc1b6eae95e0 100644 (file)
@@ -1,3 +1,14 @@
+/*******************************************************************************\r
+ * Copyright (c) 2012, 2013 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.g3d.tools;\r
 \r
 import javax.vecmath.Matrix4d;\r
@@ -49,22 +60,22 @@ public class NodeTools {
        \r
        \r
        public static Vector3d getLocalPosition(IG3DNode node, Vector3d worldCoord)  {\r
-       \r
+               \r
                IG3DNode parent = (IG3DNode)node.getParent();\r
-        if (parent == null) {// this is a root node ( has no transformation) \r
-               return worldCoord;\r
-        }\r
+               if (parent == null) {// this is a root node ( has no transformation) \r
+                       return worldCoord;\r
+               }\r
 \r
-        Vector3d local = getLocalPosition(parent,worldCoord);\r
-        local.sub(node.getPosition());\r
-        \r
-        Quat4d q = new Quat4d();\r
-        q.set(node.getOrientation());\r
-        q.inverse();\r
-        MathTools.rotate(q, local, local);\r
-        \r
-        return local;\r
-    }\r
+               Vector3d local = getLocalPosition(parent,worldCoord);\r
+               local.sub(node.getPosition());\r
+               \r
+               Quat4d q = new Quat4d();\r
+               q.set(node.getOrientation());\r
+               q.inverse();\r
+               MathTools.rotate(q, local, local);\r
+               \r
+               return local;\r
+       }\r
        \r
        public static Quat4d getLocalOrientation(IG3DNode node, Quat4d worldRot)  {\r
 \r