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
169dc7a8
Commit
169dc7a8
authored
Mar 30, 2020
by
legoc
Browse files
Added --no-link mode and changed light settings
parent
35e4f232
Changes
2
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
169dc7a8
...
...
@@ -76,7 +76,7 @@
<descriptorRefs>
<descriptorRef>
jar-with-dependencies
</descriptorRef>
</descriptorRefs>
<finalName>
nomad-3d-editor-${project.version}
</finalName>
<finalName>
nomad-3d-editor-${project.version}
-full
</finalName>
<appendAssemblyId>
false
</appendAssemblyId>
</configuration>
<executions>
...
...
src/main/java/fr/ill/ics/n3d/Nomad3DEditor.java
View file @
169dc7a8
...
...
@@ -127,13 +127,29 @@ public class Nomad3DEditor extends Application {
* @param args Program arguments
*/
public
static
void
main
(
String
[]
args
)
{
NomadLinker
.
getInstance
().
init
(
args
);
boolean
nomad
=
true
;
// Analyse arguments.
for
(
int
i
=
0
;
i
<
args
.
length
;
++
i
)
{
if
(
args
[
i
].
equals
(
"--no-link"
))
{
nomad
=
false
;
}
}
if
(
nomad
)
{
NomadLinker
.
getInstance
().
init
(
args
);
}
try
{
launch
(
args
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
NomadLinker
.
getInstance
().
terminate
();
if
(
nomad
)
{
NomadLinker
.
getInstance
().
terminate
();
}
exit
(
0
);
}
...
...
@@ -524,16 +540,34 @@ public class Nomad3DEditor extends Application {
PointLight
light
=
null
;
double
lightHeight
=
sceneBox
.
getMinY
()
+
1.1
*
sceneBox
.
getHeight
();
double
coef
=
10.0
;
// Back.
// light = new PointLight(pointColor);
// light.setTranslateX(0.0);
// light.setTranslateY(0.0);
// light.setTranslateZ(sceneBox.getMaxZ() * coef);
// root.getChildren().add(light);
// Front.
light
=
new
PointLight
(
pointColor
);
light
.
setTranslateX
(
sceneBox
.
getMinX
()
);
light
.
setTranslateY
(
lightHeight
);
light
.
setTranslateZ
(
sceneBox
.
getM
in
Z
());
light
.
setTranslateX
(
0.0
);
light
.
setTranslateY
(
0.0
);
light
.
setTranslateZ
(
-
sceneBox
.
getM
ax
Z
()
*
coef
);
root
.
getChildren
().
add
(
light
);
// Right.
light
=
new
PointLight
(
pointColor
);
light
.
setTranslateX
(-
sceneBox
.
getMaxX
()
*
coef
);
light
.
setTranslateY
(
0.0
);
light
.
setTranslateZ
(
0.0
);
root
.
getChildren
().
add
(
light
);
// Left.
light
=
new
PointLight
(
pointColor
);
light
.
setTranslateX
(
sceneBox
.
getMaxX
());
light
.
setTranslateY
(
lightHeight
);
light
.
setTranslateZ
(
sceneBox
.
getMaxZ
()
);
light
.
setTranslateX
(
sceneBox
.
getMaxX
()
*
coef
);
light
.
setTranslateY
(
0.0
);
light
.
setTranslateZ
(
0.0
);
root
.
getChildren
().
add
(
light
);
}
...
...
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