Commit 93225000 authored by Ivan Dages's avatar Ivan Dages
Browse files

bug fix : modified axis keeps its postition and direction now

parent 91def584
......@@ -43,16 +43,14 @@ public class AxisBuilder {
*/
public void start(Axis axis, Group parentGroup, CameraControls controls, boolean modified) {
this.axis = axis;
this.axis.setDirection(new Point3D(0, 1, 0));
this.axis.setPosition(controls.getCenter());
try {
this.axis.setSceneToParent(parentGroup.getLocalToSceneTransform().createInverse());
} catch (NonInvertibleTransformException e) {
e.printStackTrace();
}
this.axis.getVisualGroup().setVisible(true);
this.parentGroup = parentGroup;
if (!modified) {
try {
this.axis.setSceneToParent(parentGroup.getLocalToSceneTransform().createInverse());
} catch (NonInvertibleTransformException e) {
e.printStackTrace();
}
this.axis.getVisualGroup().setVisible(true);
parentGroup.getChildren().add(this.axis.getVisualGroup());
}
this.axis.getVisualGroup().setOnMousePressed(me -> {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment