Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nomad-3d-commons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Instrument Control
Protos
Nomad 3D
nomad-3d-commons
Commits
062cad37
Commit
062cad37
authored
7 years ago
by
Ivan Dages
Browse files
Options
Downloads
Patches
Plain Diff
nomad 3d exporter : doc
parent
8850d263
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/fr/ill/ics/n3d/io/Nomad3DExporter.java
+35
-2
35 additions, 2 deletions
src/main/java/fr/ill/ics/n3d/io/Nomad3DExporter.java
with
35 additions
and
2 deletions
src/main/java/fr/ill/ics/n3d/io/Nomad3DExporter.java
+
35
−
2
View file @
062cad37
...
...
@@ -22,17 +22,22 @@ import javafx.stage.FileChooser;
import
javafx.stage.FileChooser.ExtensionFilter
;
/**
* Class for exporting Nomad 3D models.
* @author dages
*
*/
public
class
Nomad3DExporter
{
/**
*
*
Default constructor.
*/
public
Nomad3DExporter
()
{
}
/**
* Exports the XML file of the model.
* @param model Model to export
* @param xmlPath Path of the XML file target
*/
public
void
write
(
Model
model
,
String
xmlPath
)
{
try
{
File
outputFile
=
new
File
(
xmlPath
);
...
...
@@ -61,6 +66,10 @@ public class Nomad3DExporter {
}
}
/**
* Exports the XML file of the model. The location of this file is provided by the user.
* @param model Model to export
*/
public
void
write
(
Model
model
)
{
FileChooser
chooser
=
new
FileChooser
();
chooser
.
setTitle
(
"Save model"
);
...
...
@@ -72,6 +81,12 @@ public class Nomad3DExporter {
}
}
/**
* Writes the XML element of a component. The element is not added to the document.
* @param comp Component to write
* @param doc XML document
* @return XML element of the component
*/
private
Element
writeComponent
(
Component
comp
,
Document
doc
)
{
String
tagName
=
"Component"
;
if
(
comp
.
isRoot
())
{
...
...
@@ -101,6 +116,12 @@ public class Nomad3DExporter {
return
eComponent
;
}
/**
* Writes the XML element of a configuration. The element is not added to the document.
* @param config Configuration to write
* @param doc XML document
* @return XML element for the configuration
*/
private
Element
writeConfigParams
(
ConfigParams
config
,
Document
doc
)
{
Element
eConfig
=
doc
.
createElement
(
"ConfigParams"
);
...
...
@@ -137,6 +158,12 @@ public class Nomad3DExporter {
return
eConfig
;
}
/**
* Writes the XML element of a material. The element is not added to the document.
* @param material Material to write
* @param doc XML document
* @return XML element of the material
*/
private
Element
writeMaterial
(
PhongMaterial
material
,
Document
doc
)
{
Element
eMaterial
=
doc
.
createElement
(
"Material"
);
...
...
@@ -161,6 +188,12 @@ public class Nomad3DExporter {
return
eMaterial
;
}
/**
* Writes the XML element of an axis. The element is not added to the document.
* @param axis Axis to write
* @param doc XML document
* @return XML element of the axis
*/
private
Element
writeAxis
(
Axis
axis
,
Document
doc
)
{
Element
eAxis
=
doc
.
createElement
(
"Axis"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment