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
435e2e14
Commit
435e2e14
authored
Jun 14, 2017
by
Ivan Dages
Browse files
editor : refactor
parent
dfd1c2f8
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
src/main/java/fr/ill/ics/n3d/Nomad3DEditor.java
View file @
435e2e14
...
...
@@ -45,35 +45,38 @@ import fr.ill.ics.cameo.*;
* @author dages
*/
public
class
Nomad3DEditor
extends
Application
{
private
static
Nomad3DEditor
instance
=
null
;
/** Stage of the application. */
p
ublic
Stage
stage
=
null
;
p
rivate
Stage
stage
=
null
;
/** Scene of the stage, managing the gui. The 3D scene is a descendant of this scene, inserted as a SubScene. */
p
ublic
Scene
scene
=
null
;
p
rivate
Scene
scene
=
null
;
/** Root of the scene (gui). */
p
ublic
BorderPane
pane
=
null
;
p
rivate
BorderPane
pane
=
null
;
/** Current Nomad 3D model. */
p
ublic
Model
model
=
null
;
p
rivate
Model
model
=
null
;
/** Camera used for 3D rendering. */
p
ublic
Camera
camera
=
null
;
p
rivate
Camera
camera
=
null
;
/** Controls managing the camera. */
p
ublic
CameraControls
controls
=
null
;
p
rivate
CameraControls
controls
=
null
;
/** Path to an eventual initial model to load, null otherwise. */
p
ublic
String
initialModelPath
=
null
;
p
rivate
String
initialModelPath
=
null
;
/** Axis builder. */
p
ublic
AxisBuilder
axisBuilder
=
new
AxisBuilder
();
p
rivate
AxisBuilder
axisBuilder
=
new
AxisBuilder
();
/** Root of the 3D scene. */
p
ublic
Group
root
=
null
;
p
rivate
Group
root
=
null
;
/** 3D scene. */
p
ublic
SubScene
subScene
=
null
;
p
rivate
SubScene
subScene
=
null
;
/**
* Reference to the logger, used to prevent the garbage collector to destroy it.
...
...
@@ -114,6 +117,8 @@ public class Nomad3DEditor extends Application {
@Override
public
void
start
(
Stage
stage
)
throws
Exception
{
instance
=
this
;
try
{
Logger
logger
=
Logger
.
getLogger
(
"nomad-3d"
);
String
logPath
=
System
.
getProperty
(
"user.dir"
)
+
File
.
separator
+
"nomad-3d-editor.log"
;
...
...
@@ -168,6 +173,102 @@ public class Nomad3DEditor extends Application {
stage
.
show
();
}
/**
* Gets the Nomad 3D editor instance.
* @return The instance
*/
public
static
Nomad3DEditor
getInstance
()
{
return
instance
;
}
/**
* Gets the initialModelPath.
* @return The initialModelPath
*/
public
String
getInitialModelPath
()
{
return
initialModelPath
;
}
/**
* Sets the initialModelPath.
* @param initialModelPath The initialModelPath to set
*/
public
void
setInitialModelPath
(
String
initialModelPath
)
{
this
.
initialModelPath
=
initialModelPath
;
}
/**
* Gets the stage.
* @return The stage
*/
public
Stage
getStage
()
{
return
stage
;
}
/**
* Gets the scene.
* @return The scene
*/
public
Scene
getScene
()
{
return
scene
;
}
/**
* Gets the pane.
* @return The pane
*/
public
BorderPane
getPane
()
{
return
pane
;
}
/**
* Gets the model.
* @return The model
*/
public
Model
getModel
()
{
return
model
;
}
/**
* Gets the camera.
* @return The camera
*/
public
Camera
getCamera
()
{
return
camera
;
}
/**
* Gets the controls.
* @return The controls
*/
public
CameraControls
getControls
()
{
return
controls
;
}
/**
* Gets the axisBuilder.
* @return The axisBuilder
*/
public
AxisBuilder
getAxisBuilder
()
{
return
axisBuilder
;
}
/**
* Gets the root.
* @return The root
*/
public
Group
getRoot
()
{
return
root
;
}
/**
* Gets the subScene.
* @return The subScene
*/
public
SubScene
getSubScene
()
{
return
subScene
;
}
/**
* Loads a scene. The model is chosen by the user.
* @return The created scene
...
...
@@ -230,7 +331,7 @@ public class Nomad3DEditor extends Application {
* @return The menu bar
*/
private
MenuBar
buildMenuBar
()
{
MenuBar
menuBar
=
new
EditorMenuBar
(
this
);
MenuBar
menuBar
=
new
EditorMenuBar
();
return
menuBar
;
}
...
...
src/main/java/fr/ill/ics/n3d/gui/EditorMenuBar.java
View file @
435e2e14
This diff is collapsed.
Click to expand it.
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