Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
Protos
Nomad 3D
nomad-3d-editor
Commits
93225000
Commit
93225000
authored
Jun 15, 2017
by
Ivan Dages
Browse files
bug fix : modified axis keeps its postition and direction now
parent
91def584
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/fr/ill/ics/n3d/gui/AxisBuilder.java
View file @
93225000
...
...
@@ -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
->
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment