-
-
- } else {
- if (worldCoord) {
- AxisAngle4d aa = MathTools.getAxisAngle(node.getWorldOrientation());
- AxisAngle4d rot = new AxisAngle4d(axis,s[1] - prevS);
- MathTools.multiplyOrientation(aa, rot);
- setWorldOrientation(MathTools.getQuat(rot));
- //G3DTools.multiplyOrientation(mo.getG3DNode(graph).getWorldOrientation(), new AxisAngle4d(axis,s[1] - prevS));
- } else {
- AxisAngle4d aa = MathTools.getAxisAngle(node.getOrientation());
- AxisAngle4d rot = new AxisAngle4d(axis,s[1] - prevS);
- MathTools.multiplyOrientation(aa, rot);
- setOrientation(MathTools.getQuat(rot));
- //G3DTools.multiplyOrientation(mo.getG3DNode(graph).getLocalOrientation(), new AxisAngle4d(axis,s[1] - prevS));
- }
- //text += G3DTools.getOrientation(mo.getG3DNode(graph).getLocalOrientation()) + " " + MathTools.getEuler(G3DTools.getOrientation(mo.getG3DNode(graph).getLocalOrientation())) + " ";
- prevS = s[1];
-
- }
-
- } else {
- if (worldCoord) {
- AxisAngle4d aa = MathTools.getAxisAngle(node.getWorldOrientation());
- AxisAngle4d rot = new AxisAngle4d(axis,Math.PI * 0.5);
- MathTools.multiplyOrientation(aa, rot);
- setWorldOrientation(MathTools.getQuat(rot));
- //G3DTools.multiplyOrientation(mo.getG3DNode(graph).getWorldOrientation(), new AxisAngle4d(axis,Math.PI * 0.5));
- } else {
- AxisAngle4d aa = MathTools.getAxisAngle(node.getOrientation());
- AxisAngle4d rot = new AxisAngle4d(axis,Math.PI * 0.5);
- MathTools.multiplyOrientation(aa, rot);
- setOrientation(MathTools.getQuat(rot));
- //G3DTools.multiplyOrientation(mo.getG3DNode(graph).getLocalOrientation(), new AxisAngle4d(axis,Math.PI * 0.5));
- }
- // text += G3DTools.getOrientation(mo.getG3DNode(graph).getLocalOrientation()) + " " + MathTools.getEuler(G3DTools.getOrientation(mo.getG3DNode(graph).getLocalOrientation())) + " ";
-
- }
- //setInfoText(text);
-
- }
-
- protected void setOrientation(Quat4d q) {
- node.setOrientation(q);
- }
-
- protected void setWorldOrientation(Quat4d q) {
- node.setWorldOrientation(q);
- }
+
+
+ } else {
+ if (worldCoord) {
+ AxisAngle4d aa = MathTools.getAxisAngle(node.getWorldOrientation());
+ AxisAngle4d rot = new AxisAngle4d(axis,s[1] - prevS);
+ MathTools.multiplyOrientation(aa, rot);
+ setWorldOrientation(MathTools.getQuat(rot));
+ //G3DTools.multiplyOrientation(mo.getG3DNode(graph).getWorldOrientation(), new AxisAngle4d(axis,s[1] - prevS));
+ } else {
+ AxisAngle4d aa = MathTools.getAxisAngle(node.getOrientation());
+ AxisAngle4d rot = new AxisAngle4d(axis,s[1] - prevS);
+ MathTools.multiplyOrientation(aa, rot);
+ setOrientation(MathTools.getQuat(rot));
+ //G3DTools.multiplyOrientation(mo.getG3DNode(graph).getLocalOrientation(), new AxisAngle4d(axis,s[1] - prevS));
+ }
+ //text += G3DTools.getOrientation(mo.getG3DNode(graph).getLocalOrientation()) + " " + MathTools.getEuler(G3DTools.getOrientation(mo.getG3DNode(graph).getLocalOrientation())) + " ";
+ prevS = s[1];
+
+ }
+
+ } else {
+ if (worldCoord) {
+ AxisAngle4d aa = MathTools.getAxisAngle(node.getWorldOrientation());
+ AxisAngle4d rot = new AxisAngle4d(axis,Math.PI * 0.5);
+ MathTools.multiplyOrientation(aa, rot);
+ setWorldOrientation(MathTools.getQuat(rot));
+ //G3DTools.multiplyOrientation(mo.getG3DNode(graph).getWorldOrientation(), new AxisAngle4d(axis,Math.PI * 0.5));
+ } else {
+ AxisAngle4d aa = MathTools.getAxisAngle(node.getOrientation());
+ AxisAngle4d rot = new AxisAngle4d(axis,Math.PI * 0.5);
+ MathTools.multiplyOrientation(aa, rot);
+ setOrientation(MathTools.getQuat(rot));
+ //G3DTools.multiplyOrientation(mo.getG3DNode(graph).getLocalOrientation(), new AxisAngle4d(axis,Math.PI * 0.5));
+ }
+ // text += G3DTools.getOrientation(mo.getG3DNode(graph).getLocalOrientation()) + " " + MathTools.getEuler(G3DTools.getOrientation(mo.getG3DNode(graph).getLocalOrientation())) + " ";
+
+ }
+ //setInfoText(text);
+
+ }
+
+ protected void setOrientation(Quat4d q) {
+ node.setOrientation(q);
+ }
+
+ protected void setWorldOrientation(Quat4d q) {
+ node.setWorldOrientation(q);
+ }