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-commons
Commits
9005d4a9
Commit
9005d4a9
authored
Jun 29, 2017
by
Ivan Dages
Browse files
setting the median value applies an offset to the other values
parent
2ecae961
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/fr/ill/ics/n3d/model/Axis.java
View file @
9005d4a9
...
...
@@ -175,7 +175,10 @@ public class Axis {
/** Maximum value of the axis. */
private
double
maxValue
;
/** Median value of the axis. */
/**
* Median value of the axis.
* @deprecated The median value is always 0 now, setting this value applies an offset to the current, min and max values
*/
private
double
medianValue
;
/** Transform applied by the user when moving the component along its axis. */
...
...
@@ -184,7 +187,8 @@ public class Axis {
/** Visual group of the axis. */
private
Group
visualGroup
;
/** Transform used convert scene coordinates into parent's coordinates.
/**
* Transform used convert scene coordinates into parent's coordinates.
* This parent is either the parent of the axis' component or the component itself if it is the root.
*/
private
Transform
sceneToParent
;
...
...
@@ -219,6 +223,7 @@ public class Axis {
this
.
value
=
a
.
value
;
this
.
minValue
=
a
.
minValue
;
this
.
maxValue
=
a
.
maxValue
;
this
.
medianValue
=
a
.
medianValue
;
this
.
movementTransform
=
a
.
movementTransform
.
clone
();
this
.
visualGroup
=
new
Group
();
this
.
visualGroup
.
setVisible
(
false
);
...
...
@@ -285,6 +290,7 @@ public class Axis {
/**
* Gets the median value of the axis
* @return The median value
* @deprecated The median value is always 0 now, setting this value applies an offset to the current, min and max values
*/
public
double
getMedianValue
()
{
return
medianValue
;
...
...
@@ -379,7 +385,10 @@ public class Axis {
* @param medianValue New median value
*/
public
void
setMedianValue
(
double
medianValue
)
{
this
.
medianValue
=
medianValue
;
this
.
value
-=
medianValue
;
this
.
minValue
-=
medianValue
;
this
.
maxValue
-=
medianValue
;
this
.
medianValue
=
0
;
}
/**
...
...
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