changeset 6448:77d9f9491a0e

Automated merge with ssh://jfxsrc.us.oracle.com//javafx/8u/master/jfx/rt
author kcr
date Fri, 07 Mar 2014 16:10:42 -0800
parents 39856b5ce3f7 12161db2a30a
children 49a29c9d82a9
files apps/experiments/3DViewer/.idea/.name apps/experiments/3DViewer/.idea/compiler.xml apps/experiments/3DViewer/.idea/copyright/profiles_settings.xml apps/experiments/3DViewer/.idea/encodings.xml apps/experiments/3DViewer/.idea/misc.xml apps/experiments/3DViewer/.idea/modules.xml apps/experiments/3DViewer/.idea/runConfigurations/3DViewer.xml apps/experiments/3DViewer/.idea/scopes/scope_settings.xml apps/experiments/3DViewer/.idea/vcs.xml apps/experiments/3DViewer/3DViewer.iml apps/experiments/3DViewer/build.gradle apps/experiments/3DViewer/build.xml apps/experiments/3DViewer/manifest.mf apps/experiments/3DViewer/nbproject/build-impl.xml apps/experiments/3DViewer/nbproject/genfiles.properties apps/experiments/3DViewer/nbproject/project.properties apps/experiments/3DViewer/nbproject/project.xml apps/experiments/3DViewer/src/main/java/com/javafx/experiments/exporters/fxml/FXMLExporter.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/exporters/javasource/JavaSourceExporter.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/height2normal/Height2NormalApp.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/height2normal/Height2NormalConverter.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/Importer.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/Importer3D.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/ImporterFinder.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/Optimizer.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/SmoothingGroups.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/Validator.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/dae/DaeImporter.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/max/MaxAseParser.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/max/MaxAseTokenizer.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/max/MaxData.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/max/MaxLoader.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/Frame.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/Joint.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/Loader.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/MAttribute.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/MConnection.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/MEnv.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/MNode.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/MNodeType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/MObject.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/MPath.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/MayaAnimationCurveInterpolator.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/MayaGroup.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/MayaImporter.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/Xform.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/parser/MParser.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MArrayType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MAttributeAliasType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MBoolType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MCharacterMappingType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MComponentListType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MCompoundType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MDataType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MFloat2ArrayType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MFloat2Type.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MFloat3ArrayType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MFloat3Type.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MFloatArrayType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MFloatType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MInt3ArrayType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MIntArrayType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MIntType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MMatrixType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MNurbsCurveType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MPointerType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MPolyFaceType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/types/MStringType.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MArray.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MAttributeAlias.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MBool.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MCharacterMapping.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MComponentList.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MCompound.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MData.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MFloat.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MFloat2.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MFloat2Array.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MFloat3.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MFloat3Array.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MFloatArray.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MInt.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MInt3Array.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MIntArray.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MNurbsCurve.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MPointer.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MPolyFace.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/MString.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MArrayImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MAttributeAliasImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MBoolImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MCharacterMappingImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MComponentListImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MCompoundImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MDataImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MFloat2ArrayImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MFloat2Impl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MFloat3ArrayImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MFloat3Impl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MFloatArrayImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MFloatImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MInt3ArrayImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MIntArrayImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MIntImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MNurbsCurveImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MPointerImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MPolyFaceImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/values/impl/MStringImpl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/obj/FloatArrayList.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/obj/IntegerArrayList.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/obj/MtlReader.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/obj/ObjImporter.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/obj/ObjOrPolyObjImporter.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/obj/PolyObjImporter.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/AutoScalingGroup.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/ContentModel.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/FourWayNavControl.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/Frame.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/Jfx3dViewerApp.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/MainController.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/NavigationController.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/OldTestViewer.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/SessionManager.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/SettingsController.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/SimpleViewerApp.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/SubSceneResizer.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/TimelineController.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/TimelineDisplay.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/Xform.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/PolygonMesh.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/PolygonMeshView.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/SkinningMesh.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/SubdivisionMesh.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/symbolic/OriginalPointArray.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/symbolic/SubdividedPointArray.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/symbolic/SymbolicPointArray.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/symbolic/SymbolicPolygonMesh.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/shape3d/symbolic/SymbolicSubdivisionBuilder.java apps/experiments/3DViewer/src/main/java/com/javafx/experiments/utils3d/DragSupport.java apps/experiments/3DViewer/src/main/resources/com/javafx/experiments/jfx3dviewer/blue.jpg apps/experiments/3DViewer/src/main/resources/com/javafx/experiments/jfx3dviewer/carbon.jpg apps/experiments/3DViewer/src/main/resources/com/javafx/experiments/jfx3dviewer/carbon2.jpg apps/experiments/3DViewer/src/main/resources/com/javafx/experiments/jfx3dviewer/drop-here-large-yUp.mtl apps/experiments/3DViewer/src/main/resources/com/javafx/experiments/jfx3dviewer/drop-here-large-yUp.obj apps/experiments/3DViewer/src/main/resources/com/javafx/experiments/jfx3dviewer/drop-here-large.mtl apps/experiments/3DViewer/src/main/resources/com/javafx/experiments/jfx3dviewer/drop-here-large.obj apps/experiments/3DViewer/src/main/resources/com/javafx/experiments/jfx3dviewer/drop-here.mtl apps/experiments/3DViewer/src/main/resources/com/javafx/experiments/jfx3dviewer/drop-here.obj apps/experiments/3DViewer/src/main/resources/com/javafx/experiments/jfx3dviewer/main.fxml apps/experiments/3DViewer/src/main/resources/com/javafx/experiments/jfx3dviewer/navigation.fxml apps/experiments/3DViewer/src/main/resources/com/javafx/experiments/jfx3dviewer/settings.fxml apps/experiments/3DViewer/src/main/resources/com/javafx/experiments/jfx3dviewer/viewer.css apps/experiments/3DViewer/src/test/java/com/javafx/experiments/exporters/javasource/JavaSourceExporterTestApp.java apps/experiments/3DViewer/src/test/java/com/javafx/experiments/importers/max/Test.java apps/experiments/3DViewer/src/test/resources/com/javafx/importers/dae/test-data-cheetah3d/blob.dae apps/experiments/3DViewer/src/test/resources/com/javafx/importers/dae/test-data-cheetah3d/cube.dae apps/experiments/3DViewer/src/test/resources/com/javafx/importers/dae/test-data-cheetah3d/plane-grouped.dae apps/experiments/3DViewer/src/test/resources/com/javafx/importers/dae/test-data-cheetah3d/plane.dae apps/experiments/3DViewer/src/test/resources/com/javafx/importers/dae/test-data-maya/cube.dae apps/experiments/3DViewer/src/test/resources/com/javafx/importers/dae/test-data-maya/duke.dae apps/experiments/3DViewer/src/test/resources/com/javafx/importers/dae/test-data-maya/duke.png apps/experiments/3DViewer/src/test/resources/com/javafx/importers/dae/test-data-maya/plane-camera.dae apps/experiments/3DViewer/src/test/resources/com/javafx/importers/dae/test-data-maya/plane.dae apps/experiments/3DViewer/src/test/resources/com/javafx/importers/obj/cube.obj apps/experiments/3DViewer/src/test/resources/com/javafx/importers/obj/plane.obj apps/experiments/3DViewer/src/test/resources/com/javafx/importers/obj/sub-box-raw.obj apps/experiments/3DViewer/src/test/resources/com/javafx/importers/obj/sub-box.obj apps/experiments/3DViewer/src/test/resources/com/javafx/importers/obj/sub-cube.obj apps/experiments/Modena/build.gradle apps/experiments/Modena/build.xml apps/experiments/Modena/manifest.mf apps/experiments/Modena/nbproject/build-impl.xml apps/experiments/Modena/nbproject/genfiles.properties apps/experiments/Modena/nbproject/project.properties apps/experiments/Modena/nbproject/project.xml apps/experiments/Modena/src/main/java/modena/Modena.java apps/experiments/Modena/src/main/java/modena/SameHeightTestController.java apps/experiments/Modena/src/main/java/modena/SamplePage.java apps/experiments/Modena/src/main/java/modena/SamplePageChartHelper.java apps/experiments/Modena/src/main/java/modena/SamplePageHelpers.java apps/experiments/Modena/src/main/java/modena/SamplePageNavigation.java apps/experiments/Modena/src/main/java/modena/SamplePageTableHelper.java apps/experiments/Modena/src/main/java/modena/SamplePageTreeHelper.java apps/experiments/Modena/src/main/java/modena/SamplePageTreeTableHelper.java apps/experiments/Modena/src/main/java/modena/SimpleWindowPage.java apps/experiments/Modena/src/main/resources/modena/CombinationTest.fxml apps/experiments/Modena/src/main/resources/modena/SameHeightTest.fxml apps/experiments/Modena/src/main/resources/modena/ScottSelvia.fxml apps/experiments/Modena/src/main/resources/modena/TestApp.css apps/experiments/Modena/src/main/resources/modena/mac-window-frame.png apps/experiments/Modena/src/main/resources/modena/recorder-icon-48.png apps/experiments/Modena/src/main/resources/modena/reload_12x14.png apps/experiments/Modena/src/main/resources/modena/simple-window.fxml apps/experiments/Modena/src/main/resources/modena/ubuntu-window-frame.png apps/experiments/Modena/src/main/resources/modena/ui-mosaic.fxml apps/experiments/Modena/src/main/resources/modena/windows7-window-frame.png apps/experiments/Modena/src/main/resources/modena/windows8-window-frame.png
diffstat 484 files changed, 116119 insertions(+), 114740 deletions(-) [+]
line wrap: on
line diff
--- a/.idea/3DViewer.iml	Fri Mar 07 13:16:52 2014 -0800
+++ b/.idea/3DViewer.iml	Fri Mar 07 16:10:42 2014 -0800
@@ -1,23 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <module type="JAVA_MODULE" version="4">
   <component name="EclipseModuleManager">
-    <libelement value="jar://$MODULE_DIR$/apps/experiments/3DViewer/build/libs/3DViewer.jar!/" />
+    <libelement value="jar://$MODULE_DIR$/apps/samples/3DViewer/build/libs/3DViewer.jar!/" />
     <src_description expected_position="0">
-      <src_folder value="file://$MODULE_DIR$/apps/experiments/3DViewer/src/main/java" expected_position="0" />
-      <src_folder value="file://$MODULE_DIR$/apps/experiments/3DViewer/src/test/java" expected_position="1" />
-      <src_folder value="file://$MODULE_DIR$/apps/experiments/3DViewer/src/main/resources" expected_position="2" />
-      <src_folder value="file://$MODULE_DIR$/apps/experiments/3DViewer/src/test/resources" expected_position="3" />
+      <src_folder value="file://$MODULE_DIR$/apps/samples/3DViewer/src/main/java" expected_position="0" />
+      <src_folder value="file://$MODULE_DIR$/apps/samples/3DViewer/src/test/java" expected_position="1" />
+      <src_folder value="file://$MODULE_DIR$/apps/samples/3DViewer/src/main/resources" expected_position="2" />
+      <src_folder value="file://$MODULE_DIR$/apps/samples/3DViewer/src/test/resources" expected_position="3" />
     </src_description>
   </component>
   <component name="NewModuleRootManager" inherit-compiler-output="true">
     <exclude-output />
-    <content url="file://$MODULE_DIR$/apps/experiments/3DViewer">
-      <sourceFolder url="file://$MODULE_DIR$/apps/experiments/3DViewer/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/apps/experiments/3DViewer/src/main/resources" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/apps/experiments/3DViewer/src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/apps/experiments/3DViewer/src/test/resources" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/apps/experiments/3DViewer/build" />
-      <excludeFolder url="file://$MODULE_DIR$/apps/experiments/3DViewer/nbproject" />
+    <content url="file://$MODULE_DIR$/apps/samples/3DViewer">
+      <sourceFolder url="file://$MODULE_DIR$/apps/samples/3DViewer/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/apps/samples/3DViewer/src/main/resources" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/apps/samples/3DViewer/src/test/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/apps/samples/3DViewer/src/test/resources" isTestSource="true" />
+      <excludeFolder url="file://$MODULE_DIR$/apps/samples/3DViewer/build" />
+      <excludeFolder url="file://$MODULE_DIR$/apps/samples/3DViewer/nbproject" />
     </content>
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="rt" />
--- a/.idea/Modena.iml	Fri Mar 07 13:16:52 2014 -0800
+++ b/.idea/Modena.iml	Fri Mar 07 16:10:42 2014 -0800
@@ -2,10 +2,10 @@
 <module type="JAVA_MODULE" version="4">
   <component name="NewModuleRootManager" inherit-compiler-output="true">
     <exclude-output />
-    <content url="file://$MODULE_DIR$/apps/experiments/Modena">
-      <sourceFolder url="file://$MODULE_DIR$/apps/experiments/Modena/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/apps/experiments/Modena/src/main/resources" isTestSource="false" />
-      <excludeFolder url="file://$MODULE_DIR$/apps/experiments/Modena/build" />
+    <content url="file://$MODULE_DIR$/apps/samples/Modena">
+      <sourceFolder url="file://$MODULE_DIR$/apps/samples/Modena/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/apps/samples/Modena/src/main/resources" isTestSource="false" />
+      <excludeFolder url="file://$MODULE_DIR$/apps/samples/Modena/build" />
     </content>
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="rt" />
--- a/apps/experiments/.classpath	Fri Mar 07 13:16:52 2014 -0800
+++ b/apps/experiments/.classpath	Fri Mar 07 16:10:42 2014 -0800
@@ -1,16 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-    <classpathentry kind="src" path="3DViewer/src/main/java"/>
-    <classpathentry kind="src" path="3DViewer/src/test/java"/>
-    <classpathentry kind="src" path="3DViewer/src/main/resources"/>
-    <classpathentry kind="src" path="3DViewer/src/test/resources"/>
-    <classpathentry kind="src" path="Modena/src/main/java"/>
-    <classpathentry kind="src" path="Modena/src/main/resources"/>
+    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+    <!--
+    <classpathentry kind="src" path="Chess/ChessLibrary/src/main/java"/>
+    -->
     <classpathentry combineaccessrules="false" kind="src" path="/rt">
-    <attributes>
+      <attributes>
         <attribute name="optional" value="true"/>
-        </attributes>
+      </attributes>
     </classpathentry>
-    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
     <classpathentry kind="output" path="bin"/>
 </classpath>
\ No newline at end of file
--- a/apps/experiments/3DViewer/.idea/.name	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-3DViewer
\ No newline at end of file
--- a/apps/experiments/3DViewer/.idea/compiler.xml	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="CompilerConfiguration">
-    <option name="DEFAULT_COMPILER" value="Javac" />
-    <resourceExtensions />
-    <wildcardResourcePatterns>
-      <entry name="!?*.java" />
-      <entry name="!?*.form" />
-      <entry name="!?*.class" />
-      <entry name="!?*.groovy" />
-      <entry name="!?*.scala" />
-      <entry name="!?*.flex" />
-      <entry name="!?*.kt" />
-      <entry name="!?*.clj" />
-    </wildcardResourcePatterns>
-    <annotationProcessing>
-      <profile default="true" name="Default" enabled="false">
-        <processorPath useClasspath="true" />
-      </profile>
-    </annotationProcessing>
-  </component>
-</project>
-
--- a/apps/experiments/3DViewer/.idea/copyright/profiles_settings.xml	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<component name="CopyrightManager">
-  <settings default="">
-    <module2copyright />
-  </settings>
-</component>
\ No newline at end of file
--- a/apps/experiments/3DViewer/.idea/encodings.xml	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
-</project>
-
--- a/apps/experiments/3DViewer/.idea/misc.xml	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
-    <output url="file://$PROJECT_DIR$/out" />
-  </component>
-</project>
-
--- a/apps/experiments/3DViewer/.idea/modules.xml	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectModuleManager">
-    <modules>
-      <module fileurl="file://$PROJECT_DIR$/3DViewer.iml" filepath="$PROJECT_DIR$/3DViewer.iml" />
-    </modules>
-  </component>
-</project>
-
--- a/apps/experiments/3DViewer/.idea/runConfigurations/3DViewer.xml	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-<component name="ProjectRunConfigurationManager">
-  <configuration default="false" name="3DViewer" type="Application" factoryName="Application">
-    <option name="MAIN_CLASS_NAME" value="com.javafx.experiments.jfx3dviewer.Jfx3dViewerApp" />
-    <option name="VM_PARAMETERS" value="-Dprism.verbose=true" />
-    <option name="PROGRAM_PARAMETERS" value="" />
-    <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
-    <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-    <option name="ALTERNATIVE_JRE_PATH" value="" />
-    <option name="ENABLE_SWING_INSPECTOR" value="false" />
-    <option name="ENV_VARIABLES" />
-    <option name="PASS_PARENT_ENVS" value="true" />
-    <module name="3DViewer" />
-    <envs />
-    <RunnerSettings RunnerId="Run" />
-    <ConfigurationWrapper RunnerId="Run" />
-    <method />
-  </configuration>
-</component>
\ No newline at end of file
--- a/apps/experiments/3DViewer/.idea/scopes/scope_settings.xml	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<component name="DependencyValidationManager">
-  <state>
-    <option name="SKIP_IMPORT_STATEMENTS" value="false" />
-  </state>
-</component>
\ No newline at end of file
--- a/apps/experiments/3DViewer/.idea/vcs.xml	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="VcsDirectoryMappings">
-    <mapping directory="" vcs="hg4idea" />
-  </component>
-</project>
-
--- a/apps/experiments/3DViewer/3DViewer.iml	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" inherit-compiler-output="false">
-    <output url="file://$MODULE_DIR$/build/classes" />
-    <output-test url="file://$MODULE_DIR$/build/classes" />
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/.idea" />
-      <excludeFolder url="file://$MODULE_DIR$/nbproject" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>
-
--- a/apps/experiments/3DViewer/build.gradle	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-
-
-apply plugin:'application'
-
-mainClassName = "com.javafx.experiments.jfx3dviewer.Jfx3dViewerApp"
-
-jar {
-    manifest.attributes("Main-Class": mainClassName)
-}
--- a/apps/experiments/3DViewer/build.xml	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- You may freely edit this file. See commented blocks below for -->
-<!-- some examples of how to customize the build. -->
-<!-- (If you delete it and reopen the project it will be recreated.) -->
-<!-- By default, only the Clean and Build commands use this build script. -->
-<!-- Commands such as Run, Debug, and Test only use this build script if -->
-<!-- the Compile on Save feature is turned off for the project. -->
-<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
-<!-- in the project's Project Properties dialog box.-->
-<project name="3DViewer" default="default" basedir=".">
-    <description>Builds, tests, and runs the project 3DViewer.</description>
-    <import file="nbproject/build-impl.xml"/>
-    <!--
-
-    There exist several targets which are by default empty and which can be 
-    used for execution of your tasks. These targets are usually executed 
-    before and after some main targets. They are: 
-
-      -pre-init:                 called before initialization of project properties
-      -post-init:                called after initialization of project properties
-      -pre-compile:              called before javac compilation
-      -post-compile:             called after javac compilation
-      -pre-compile-single:       called before javac compilation of single file
-      -post-compile-single:      called after javac compilation of single file
-      -pre-compile-test:         called before javac compilation of JUnit tests
-      -post-compile-test:        called after javac compilation of JUnit tests
-      -pre-compile-test-single:  called before javac compilation of single JUnit test
-      -post-compile-test-single: called after javac compilation of single JUunit test
-      -pre-jar:                  called before JAR building
-      -post-jar:                 called after JAR building
-      -post-clean:               called after cleaning build products
-
-    (Targets beginning with '-' are not intended to be called on their own.)
-
-    Example of inserting an obfuscator after compilation could look like this:
-
-        <target name="-post-compile">
-            <obfuscate>
-                <fileset dir="${build.classes.dir}"/>
-            </obfuscate>
-        </target>
-
-    For list of available properties check the imported 
-    nbproject/build-impl.xml file. 
-
-
-    Another way to customize the build is by overriding existing main targets.
-    The targets of interest are: 
-
-      -init-macrodef-javac:     defines macro for javac compilation
-      -init-macrodef-junit:     defines macro for junit execution
-      -init-macrodef-debug:     defines macro for class debugging
-      -init-macrodef-java:      defines macro for class execution
-      -do-jar-with-manifest:    JAR building (if you are using a manifest)
-      -do-jar-without-manifest: JAR building (if you are not using a manifest)
-      run:                      execution of project 
-      -javadoc-build:           Javadoc generation
-      test-report:              JUnit report generation
-
-    An example of overriding the target for project execution could look like this:
-
-        <target name="run" depends="3DViewer-impl.jar">
-            <exec dir="bin" executable="launcher.exe">
-                <arg file="${dist.jar}"/>
-            </exec>
-        </target>
-
-    Notice that the overridden target depends on the jar target and not only on 
-    the compile target as the regular run target does. Again, for a list of available 
-    properties which you can use, check the target you are overriding in the
-    nbproject/build-impl.xml file. 
-
-    -->
-
-    <target name="-pre-init">
-        <!-- exclude samples that are not part of the base JavaFX -->
-        <condition property="excludes" value="com/javafx/experiments/height2normal/Height2NormalApp.java">
-            <isset property="JFX_CORE_ONLY"/>
-        </condition>
-    </target>
-
-    <target name="install-to-maven-repo" depends="jar">
-        <property name="maven.home" location="${ant.home}\..\maven"/>
-        <macrodef name="maven">
-            <attribute name="options" default="" />
-            <attribute name="goal" />
-            <attribute name="basedir" />
-            <attribute name="resultproperty" default="maven.result" />
-            <element name="args" implicit="true" optional="true" />
-            <sequential>
-                <java classname="org.codehaus.classworlds.Launcher" fork="true"
-                      dir="@{basedir}" resultproperty="@{resultproperty}">
-                    <jvmarg value="-Xmx512m"/>
-                    <classpath>
-                        <fileset dir="${maven.home}/boot">
-                            <include name="*.jar" />
-                        </fileset>
-                        <fileset dir="${maven.home}/lib">
-                            <include name="*.jar" />
-                        </fileset>
-                    </classpath>
-                    <sysproperty key="classworlds.conf" value="${maven.home}/bin/m2.conf" />
-                    <sysproperty key="maven.home" value="${maven.home}" />
-                    <arg line="--batch-mode @{options} @{goal}" />
-                </java>
-            </sequential>
-        </macrodef>
-        <maven basedir="${basedir}"
-             options="-Dfile=${dist.jar} -DgroupId=com.oracle.javafx.experiments -DartifactId=3DViewer -Dversion=1.0-SNAPSHOT -Dpackaging=jar"
-             goal="install:install-file"
-             resultproperty="maven.build.result"/>
-    </target>
-    <!-- The following is to support dependency injection with ServiceLoader for importers --> 
-    <target name="-post-jar" >            
-        <jar destfile="${dist.dir}/lib/MayaImporter.jar" basedir="./build/classes">
-            <service type="com.javafx.experiments.importers.Importer">
-                <provider classname="com.javafx.experiments.importers.maya.MayaImporter" />
-            </service>
-        </jar>
-        <jar destfile="${dist.dir}/lib/DaeImporter.jar" basedir="./build/classes">
-            <service type="com.javafx.experiments.importers.Importer">
-                <provider classname="com.javafx.experiments.importers.dae.DaeImporter" />
-            </service>
-        </jar>
-        <jar destfile="${dist.dir}/lib/ObjOrPolyObjImporter.jar" basedir="./build/classes">
-            <service type="com.javafx.experiments.importers.Importer">
-                <provider classname="com.javafx.experiments.importers.obj.ObjOrPolyObjImporter" />
-            </service>
-        </jar>
-        <jar destfile="${dist.dir}/lib/MaxLoader.jar" basedir="./build/classes">
-            <service type="com.javafx.experiments.importers.Importer">
-                <provider classname="com.javafx.experiments.importers.max.MaxLoader" />
-            </service>
-        </jar>
-        <!--<jar destfile="${dist.dir}/3Dlib/FxmlLoader.jar" basedir="./build/classes">
-            <service type="com.javafx.experiments.importers.Importer">
-                <provider classname="com.javafx.experiments.importers.fxml.FxmlLoader" />
-            </service>
-        </jar> -->                    
-    </target> 
-</project>
--- a/apps/experiments/3DViewer/manifest.mf	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-X-COMMENT: Main-Class will be added automatically by build
-
--- a/apps/experiments/3DViewer/nbproject/build-impl.xml	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1416 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-*** GENERATED FROM project.xml - DO NOT EDIT  ***
-***         EDIT ../build.xml INSTEAD         ***
-
-For the purpose of easier reading the script
-is divided into following sections:
-
-  - initialization
-  - compilation
-  - jar
-  - execution
-  - debugging
-  - javadoc
-  - test compilation
-  - test execution
-  - test debugging
-  - applet
-  - cleanup
-
-        -->
-<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="3DViewer-impl">
-    <fail message="Please build using Ant 1.8.0 or higher.">
-        <condition>
-            <not>
-                <antversion atleast="1.8.0"/>
-            </not>
-        </condition>
-    </fail>
-    <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
-    <!-- 
-                ======================
-                INITIALIZATION SECTION 
-                ======================
-            -->
-    <target name="-pre-init">
-        <!-- Empty placeholder for easier customization. -->
-        <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="-pre-init" name="-init-private">
-        <property file="nbproject/private/config.properties"/>
-        <property file="nbproject/private/configs/${config}.properties"/>
-        <property file="nbproject/private/private.properties"/>
-    </target>
-    <target depends="-pre-init,-init-private" name="-init-user">
-        <property file="${user.properties.file}"/>
-        <!-- The two properties below are usually overridden -->
-        <!-- by the active platform. Just a fallback. -->
-        <property name="default.javac.source" value="1.4"/>
-        <property name="default.javac.target" value="1.4"/>
-    </target>
-    <target depends="-pre-init,-init-private,-init-user" name="-init-project">
-        <property file="nbproject/configs/${config}.properties"/>
-        <property file="nbproject/project.properties"/>
-    </target>
-    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
-        <property name="platform.java" value="${java.home}/bin/java"/>
-        <available file="${manifest.file}" property="manifest.available"/>
-        <condition property="splashscreen.available">
-            <and>
-                <not>
-                    <equals arg1="${application.splash}" arg2="" trim="true"/>
-                </not>
-                <available file="${application.splash}"/>
-            </and>
-        </condition>
-        <condition property="main.class.available">
-            <and>
-                <isset property="main.class"/>
-                <not>
-                    <equals arg1="${main.class}" arg2="" trim="true"/>
-                </not>
-            </and>
-        </condition>
-        <condition property="profile.available">
-            <and>
-                <isset property="javac.profile"/>
-                <length length="0" string="${javac.profile}" when="greater"/>
-                <matches pattern="1\.[89](\..*)?" string="${javac.source}"/>
-            </and>
-        </condition>
-        <condition property="do.archive">
-            <not>
-                <istrue value="${jar.archive.disabled}"/>
-            </not>
-        </condition>
-        <condition property="do.mkdist">
-            <and>
-                <isset property="do.archive"/>
-                <isset property="libs.CopyLibs.classpath"/>
-                <not>
-                    <istrue value="${mkdist.disabled}"/>
-                </not>
-            </and>
-        </condition>
-        <condition property="do.archive+manifest.available">
-            <and>
-                <isset property="manifest.available"/>
-                <istrue value="${do.archive}"/>
-            </and>
-        </condition>
-        <condition property="do.archive+main.class.available">
-            <and>
-                <isset property="main.class.available"/>
-                <istrue value="${do.archive}"/>
-            </and>
-        </condition>
-        <condition property="do.archive+splashscreen.available">
-            <and>
-                <isset property="splashscreen.available"/>
-                <istrue value="${do.archive}"/>
-            </and>
-        </condition>
-        <condition property="do.archive+profile.available">
-            <and>
-                <isset property="profile.available"/>
-                <istrue value="${do.archive}"/>
-            </and>
-        </condition>
-        <condition property="have.tests">
-            <or>
-                <available file="${test.java.dir}"/>
-            </or>
-        </condition>
-        <condition property="have.sources">
-            <or>
-                <available file="${src.java.dir}"/>
-                <available file="${src.resources.dir}"/>
-            </or>
-        </condition>
-        <condition property="netbeans.home+have.tests">
-            <and>
-                <isset property="netbeans.home"/>
-                <isset property="have.tests"/>
-            </and>
-        </condition>
-        <condition property="no.javadoc.preview">
-            <and>
-                <isset property="javadoc.preview"/>
-                <isfalse value="${javadoc.preview}"/>
-            </and>
-        </condition>
-        <property name="run.jvmargs" value=""/>
-        <property name="run.jvmargs.ide" value=""/>
-        <property name="javac.compilerargs" value=""/>
-        <property name="work.dir" value="${basedir}"/>
-        <condition property="no.deps">
-            <and>
-                <istrue value="${no.dependencies}"/>
-            </and>
-        </condition>
-        <property name="javac.debug" value="true"/>
-        <property name="javadoc.preview" value="true"/>
-        <property name="application.args" value=""/>
-        <property name="source.encoding" value="${file.encoding}"/>
-        <property name="runtime.encoding" value="${source.encoding}"/>
-        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
-            <and>
-                <isset property="javadoc.encoding"/>
-                <not>
-                    <equals arg1="${javadoc.encoding}" arg2=""/>
-                </not>
-            </and>
-        </condition>
-        <property name="javadoc.encoding.used" value="${source.encoding}"/>
-        <property name="includes" value="**"/>
-        <property name="excludes" value=""/>
-        <property name="do.depend" value="false"/>
-        <condition property="do.depend.true">
-            <istrue value="${do.depend}"/>
-        </condition>
-        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
-        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
-            <and>
-                <isset property="endorsed.classpath"/>
-                <not>
-                    <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
-                </not>
-            </and>
-        </condition>
-        <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
-            <isset property="profile.available"/>
-        </condition>
-        <condition else="false" property="jdkBug6558476">
-            <and>
-                <matches pattern="1\.[56]" string="${java.specification.version}"/>
-                <not>
-                    <os family="unix"/>
-                </not>
-            </and>
-        </condition>
-        <property name="javac.fork" value="${jdkBug6558476}"/>
-        <property name="jar.index" value="false"/>
-        <property name="jar.index.metainf" value="${jar.index}"/>
-        <property name="copylibs.rebase" value="true"/>
-        <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
-        <condition property="junit.available">
-            <or>
-                <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
-                <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
-            </or>
-        </condition>
-        <condition property="testng.available">
-            <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
-        </condition>
-        <condition property="junit+testng.available">
-            <and>
-                <istrue value="${junit.available}"/>
-                <istrue value="${testng.available}"/>
-            </and>
-        </condition>
-        <condition else="testng" property="testng.mode" value="mixed">
-            <istrue value="${junit+testng.available}"/>
-        </condition>
-        <condition else="" property="testng.debug.mode" value="-mixed">
-            <istrue value="${junit+testng.available}"/>
-        </condition>
-    </target>
-    <target name="-post-init">
-        <!-- Empty placeholder for easier customization. -->
-        <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
-        <fail unless="src.java.dir">Must set src.java.dir</fail>
-        <fail unless="src.resources.dir">Must set src.resources.dir</fail>
-        <fail unless="test.java.dir">Must set test.java.dir</fail>
-        <fail unless="build.dir">Must set build.dir</fail>
-        <fail unless="dist.dir">Must set dist.dir</fail>
-        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
-        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
-        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
-        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
-        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
-        <fail unless="dist.jar">Must set dist.jar</fail>
-    </target>
-    <target name="-init-macrodef-property">
-        <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
-            <attribute name="name"/>
-            <attribute name="value"/>
-            <sequential>
-                <property name="@{name}" value="${@{value}}"/>
-            </sequential>
-        </macrodef>
-    </target>
-    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
-        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.java.dir}:${src.resources.dir}" name="srcdir"/>
-            <attribute default="${build.classes.dir}" name="destdir"/>
-            <attribute default="${javac.classpath}" name="classpath"/>
-            <attribute default="${javac.processorpath}" name="processorpath"/>
-            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
-            <attribute default="${includes}" name="includes"/>
-            <attribute default="${excludes}" name="excludes"/>
-            <attribute default="${javac.debug}" name="debug"/>
-            <attribute default="${empty.dir}" name="sourcepath"/>
-            <attribute default="${empty.dir}" name="gensrcdir"/>
-            <element name="customize" optional="true"/>
-            <sequential>
-                <property location="${build.dir}/empty" name="empty.dir"/>
-                <mkdir dir="${empty.dir}"/>
-                <mkdir dir="@{apgeneratedsrcdir}"/>
-                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
-                    <src>
-                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
-                            <include name="*"/>
-                        </dirset>
-                    </src>
-                    <classpath>
-                        <path path="@{classpath}"/>
-                    </classpath>
-                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
-                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
-                    <compilerarg line="${javac.compilerargs}"/>
-                    <compilerarg value="-processorpath"/>
-                    <compilerarg path="@{processorpath}:${empty.dir}"/>
-                    <compilerarg line="${ap.processors.internal}"/>
-                    <compilerarg line="${annotation.processing.processor.options}"/>
-                    <compilerarg value="-s"/>
-                    <compilerarg path="@{apgeneratedsrcdir}"/>
-                    <compilerarg line="${ap.proc.none.internal}"/>
-                    <customize/>
-                </javac>
-            </sequential>
-        </macrodef>
-    </target>
-    <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
-        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.java.dir}:${src.resources.dir}" name="srcdir"/>
-            <attribute default="${build.classes.dir}" name="destdir"/>
-            <attribute default="${javac.classpath}" name="classpath"/>
-            <attribute default="${javac.processorpath}" name="processorpath"/>
-            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
-            <attribute default="${includes}" name="includes"/>
-            <attribute default="${excludes}" name="excludes"/>
-            <attribute default="${javac.debug}" name="debug"/>
-            <attribute default="${empty.dir}" name="sourcepath"/>
-            <attribute default="${empty.dir}" name="gensrcdir"/>
-            <element name="customize" optional="true"/>
-            <sequential>
-                <property location="${build.dir}/empty" name="empty.dir"/>
-                <mkdir dir="${empty.dir}"/>
-                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
-                    <src>
-                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
-                            <include name="*"/>
-                        </dirset>
-                    </src>
-                    <classpath>
-                        <path path="@{classpath}"/>
-                    </classpath>
-                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
-                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
-                    <compilerarg line="${javac.compilerargs}"/>
-                    <customize/>
-                </javac>
-            </sequential>
-        </macrodef>
-    </target>
-    <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
-        <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.java.dir}:${src.resources.dir}" name="srcdir"/>
-            <attribute default="${build.classes.dir}" name="destdir"/>
-            <attribute default="${javac.classpath}" name="classpath"/>
-            <sequential>
-                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
-                    <classpath>
-                        <path path="@{classpath}"/>
-                    </classpath>
-                </depend>
-            </sequential>
-        </macrodef>
-        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${build.classes.dir}" name="destdir"/>
-            <sequential>
-                <fail unless="javac.includes">Must set javac.includes</fail>
-                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
-                    <path>
-                        <filelist dir="@{destdir}" files="${javac.includes}"/>
-                    </path>
-                    <globmapper from="*.java" to="*.class"/>
-                </pathconvert>
-                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
-                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
-                <delete>
-                    <files includesfile="${javac.includesfile.binary}"/>
-                </delete>
-                <delete>
-                    <fileset file="${javac.includesfile.binary}"/>
-                </delete>
-            </sequential>
-        </macrodef>
-    </target>
-    <target if="${junit.available}" name="-init-macrodef-junit-init">
-        <condition else="false" property="nb.junit.batch" value="true">
-            <and>
-                <istrue value="${junit.available}"/>
-                <not>
-                    <isset property="test.method"/>
-                </not>
-            </and>
-        </condition>
-        <condition else="false" property="nb.junit.single" value="true">
-            <and>
-                <istrue value="${junit.available}"/>
-                <isset property="test.method"/>
-            </and>
-        </condition>
-    </target>
-    <target name="-init-test-properties">
-        <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
-        <property name="test.binarytestincludes" value=""/>
-        <property name="test.binaryexcludes" value=""/>
-    </target>
-    <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
-        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${includes}" name="includes"/>
-            <attribute default="${excludes}" name="excludes"/>
-            <attribute default="**" name="testincludes"/>
-            <attribute default="" name="testmethods"/>
-            <element name="customize" optional="true"/>
-            <sequential>
-                <property name="junit.forkmode" value="perTest"/>
-                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
-                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
-                    <syspropertyset>
-                        <propertyref prefix="test-sys-prop."/>
-                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
-                    </syspropertyset>
-                    <formatter type="brief" usefile="false"/>
-                    <formatter type="xml"/>
-                    <jvmarg value="-ea"/>
-                    <customize/>
-                </junit>
-            </sequential>
-        </macrodef>
-    </target>
-    <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
-        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${includes}" name="includes"/>
-            <attribute default="${excludes}" name="excludes"/>
-            <attribute default="**" name="testincludes"/>
-            <attribute default="" name="testmethods"/>
-            <element name="customize" optional="true"/>
-            <sequential>
-                <property name="junit.forkmode" value="perTest"/>
-                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
-                    <batchtest todir="${build.test.results.dir}">
-                        <fileset dir="${test.java.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
-                            <filename name="@{testincludes}"/>
-                        </fileset>
-                        <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
-                            <filename name="${test.binarytestincludes}"/>
-                        </fileset>
-                    </batchtest>
-                    <syspropertyset>
-                        <propertyref prefix="test-sys-prop."/>
-                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
-                    </syspropertyset>
-                    <formatter type="brief" usefile="false"/>
-                    <formatter type="xml"/>
-                    <jvmarg value="-ea"/>
-                    <customize/>
-                </junit>
-            </sequential>
-        </macrodef>
-    </target>
-    <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
-    <target if="${testng.available}" name="-init-macrodef-testng">
-        <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${includes}" name="includes"/>
-            <attribute default="${excludes}" name="excludes"/>
-            <attribute default="**" name="testincludes"/>
-            <attribute default="" name="testmethods"/>
-            <element name="customize" optional="true"/>
-            <sequential>
-                <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
-                    <isset property="test.method"/>
-                </condition>
-                <union id="test.set">
-                    <fileset dir="${test.java.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
-                        <filename name="@{testincludes}"/>
-                    </fileset>
-                </union>
-                <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
-                <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="3DViewer" testname="TestNG tests" workingDir="${work.dir}">
-                    <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
-                    <propertyset>
-                        <propertyref prefix="test-sys-prop."/>
-                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
-                    </propertyset>
-                    <customize/>
-                </testng>
-            </sequential>
-        </macrodef>
-    </target>
-    <target name="-init-macrodef-test-impl">
-        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${includes}" name="includes"/>
-            <attribute default="${excludes}" name="excludes"/>
-            <attribute default="**" name="testincludes"/>
-            <attribute default="" name="testmethods"/>
-            <element implicit="true" name="customize" optional="true"/>
-            <sequential>
-                <echo>No tests executed.</echo>
-            </sequential>
-        </macrodef>
-    </target>
-    <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
-        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${includes}" name="includes"/>
-            <attribute default="${excludes}" name="excludes"/>
-            <attribute default="**" name="testincludes"/>
-            <attribute default="" name="testmethods"/>
-            <element implicit="true" name="customize" optional="true"/>
-            <sequential>
-                <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
-                    <customize/>
-                </j2seproject3:junit>
-            </sequential>
-        </macrodef>
-    </target>
-    <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
-        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${includes}" name="includes"/>
-            <attribute default="${excludes}" name="excludes"/>
-            <attribute default="**" name="testincludes"/>
-            <attribute default="" name="testmethods"/>
-            <element implicit="true" name="customize" optional="true"/>
-            <sequential>
-                <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
-                    <customize/>
-                </j2seproject3:testng>
-            </sequential>
-        </macrodef>
-    </target>
-    <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
-        <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${includes}" name="includes"/>
-            <attribute default="${excludes}" name="excludes"/>
-            <attribute default="**" name="testincludes"/>
-            <attribute default="" name="testmethods"/>
-            <sequential>
-                <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
-                    <customize>
-                        <classpath>
-                            <path path="${run.test.classpath}"/>
-                        </classpath>
-                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
-                        <jvmarg line="${run.jvmargs}"/>
-                        <jvmarg line="${run.jvmargs.ide}"/>
-                    </customize>
-                </j2seproject3:test-impl>
-            </sequential>
-        </macrodef>
-    </target>
-    <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
-        <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${includes}" name="includes"/>
-            <attribute default="${excludes}" name="excludes"/>
-            <attribute default="**" name="testincludes"/>
-            <attribute default="" name="testmethods"/>
-            <element name="customize" optional="true"/>
-            <sequential>
-                <property name="junit.forkmode" value="perTest"/>
-                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
-                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
-                    <syspropertyset>
-                        <propertyref prefix="test-sys-prop."/>
-                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
-                    </syspropertyset>
-                    <formatter type="brief" usefile="false"/>
-                    <formatter type="xml"/>
-                    <jvmarg value="-ea"/>
-                    <jvmarg line="${debug-args-line}"/>
-                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
-                    <customize/>
-                </junit>
-            </sequential>
-        </macrodef>
-    </target>
-    <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
-        <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${includes}" name="includes"/>
-            <attribute default="${excludes}" name="excludes"/>
-            <attribute default="**" name="testincludes"/>
-            <attribute default="" name="testmethods"/>
-            <element name="customize" optional="true"/>
-            <sequential>
-                <property name="junit.forkmode" value="perTest"/>
-                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
-                    <batchtest todir="${build.test.results.dir}">
-                        <fileset dir="${test.java.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
-                            <filename name="@{testincludes}"/>
-                        </fileset>
-                        <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
-                            <filename name="${test.binarytestincludes}"/>
-                        </fileset>
-                    </batchtest>
-                    <syspropertyset>
-                        <propertyref prefix="test-sys-prop."/>
-                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
-                    </syspropertyset>
-                    <formatter type="brief" usefile="false"/>
-                    <formatter type="xml"/>
-                    <jvmarg value="-ea"/>
-                    <jvmarg line="${debug-args-line}"/>
-                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
-                    <customize/>
-                </junit>
-            </sequential>
-        </macrodef>
-    </target>
-    <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
-        <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${includes}" name="includes"/>
-            <attribute default="${excludes}" name="excludes"/>
-            <attribute default="**" name="testincludes"/>
-            <attribute default="" name="testmethods"/>
-            <element implicit="true" name="customize" optional="true"/>
-            <sequential>
-                <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
-                    <customize/>
-                </j2seproject3:junit-debug>
-            </sequential>
-        </macrodef>
-    </target>
-    <target if="${testng.available}" name="-init-macrodef-testng-debug">
-        <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${main.class}" name="testClass"/>
-            <attribute default="" name="testMethod"/>
-            <element name="customize2" optional="true"/>
-            <sequential>
-                <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
-                    <isset property="test.method"/>
-                </condition>
-                <condition else="-suitename 3DViewer -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
-                    <matches pattern=".*\.xml" string="@{testClass}"/>
-                </condition>
-                <delete dir="${build.test.results.dir}" quiet="true"/>
-                <mkdir dir="${build.test.results.dir}"/>
-                <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
-                    <customize>
-                        <customize2/>
-                        <jvmarg value="-ea"/>
-                        <arg line="${testng.debug.mode}"/>
-                        <arg line="-d ${build.test.results.dir}"/>
-                        <arg line="-listener org.testng.reporters.VerboseReporter"/>
-                        <arg line="${testng.cmd.args}"/>
-                    </customize>
-                </j2seproject3:debug>
-            </sequential>
-        </macrodef>
-    </target>
-    <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
-        <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${main.class}" name="testClass"/>
-            <attribute default="" name="testMethod"/>
-            <element implicit="true" name="customize2" optional="true"/>
-            <sequential>
-                <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
-                    <customize2/>
-                </j2seproject3:testng-debug>
-            </sequential>
-        </macrodef>
-    </target>
-    <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
-        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${includes}" name="includes"/>
-            <attribute default="${excludes}" name="excludes"/>
-            <attribute default="**" name="testincludes"/>
-            <attribute default="" name="testmethods"/>
-            <attribute default="${main.class}" name="testClass"/>
-            <attribute default="" name="testMethod"/>
-            <sequential>
-                <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
-                    <customize>
-                        <classpath>
-                            <path path="${run.test.classpath}"/>
-                        </classpath>
-                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
-                        <jvmarg line="${run.jvmargs}"/>
-                        <jvmarg line="${run.jvmargs.ide}"/>
-                    </customize>
-                </j2seproject3:test-debug-impl>
-            </sequential>
-        </macrodef>
-    </target>
-    <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
-        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${includes}" name="includes"/>
-            <attribute default="${excludes}" name="excludes"/>
-            <attribute default="**" name="testincludes"/>
-            <attribute default="" name="testmethods"/>
-            <attribute default="${main.class}" name="testClass"/>
-            <attribute default="" name="testMethod"/>
-            <sequential>
-                <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
-                    <customize2>
-                        <syspropertyset>
-                            <propertyref prefix="test-sys-prop."/>
-                            <mapper from="test-sys-prop.*" to="*" type="glob"/>
-                        </syspropertyset>
-                    </customize2>
-                </j2seproject3:testng-debug-impl>
-            </sequential>
-        </macrodef>
-    </target>
-    <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
-    <!--
-                pre NB7.2 profiling section; consider it deprecated
-            -->
-    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
-    <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
-        <!-- Empty placeholder for easier customization. -->
-        <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
-        <!-- Empty placeholder for easier customization. -->
-        <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
-        <macrodef name="resolve">
-            <attribute name="name"/>
-            <attribute name="value"/>
-            <sequential>
-                <property name="@{name}" value="${env.@{value}}"/>
-            </sequential>
-        </macrodef>
-        <macrodef name="profile">
-            <attribute default="${main.class}" name="classname"/>
-            <element name="customize" optional="true"/>
-            <sequential>
-                <property environment="env"/>
-                <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
-                <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
-                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
-                    <jvmarg value="${profiler.info.jvmargs.agent}"/>
-                    <jvmarg line="${profiler.info.jvmargs}"/>
-                    <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
-                    <arg line="${application.args}"/>
-                    <classpath>
-                        <path path="${run.classpath}"/>
-                    </classpath>
-                    <syspropertyset>
-                        <propertyref prefix="run-sys-prop."/>
-                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
-                    </syspropertyset>
-                    <customize/>
-                </java>
-            </sequential>
-        </macrodef>
-    </target>
-    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
-        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
-        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
-    </target>
-    <!--
-                end of pre NB7.2 profiling section
-            -->
-    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
-        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
-            <attribute default="${main.class}" name="name"/>
-            <attribute default="${debug.classpath}" name="classpath"/>
-            <attribute default="" name="stopclassname"/>
-            <sequential>
-                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
-                    <classpath>
-                        <path path="@{classpath}"/>
-                    </classpath>
-                </nbjpdastart>
-            </sequential>
-        </macrodef>
-        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
-            <attribute default="${build.classes.dir}" name="dir"/>
-            <sequential>
-                <nbjpdareload>
-                    <fileset dir="@{dir}" includes="${fix.classes}">
-                        <include name="${fix.includes}*.class"/>
-                    </fileset>
-                </nbjpdareload>
-            </sequential>
-        </macrodef>
-    </target>
-    <target name="-init-debug-args">
-        <property name="version-output" value="java version &quot;${ant.java.version}"/>
-        <condition property="have-jdk-older-than-1.4">
-            <or>
-                <contains string="${version-output}" substring="java version &quot;1.0"/>
-                <contains string="${version-output}" substring="java version &quot;1.1"/>
-                <contains string="${version-output}" substring="java version &quot;1.2"/>
-                <contains string="${version-output}" substring="java version &quot;1.3"/>
-            </or>
-        </condition>
-        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
-            <istrue value="${have-jdk-older-than-1.4}"/>
-        </condition>
-        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
-            <os family="windows"/>
-        </condition>
-        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
-            <isset property="debug.transport"/>
-        </condition>
-    </target>
-    <target depends="-init-debug-args" name="-init-macrodef-debug">
-        <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${main.class}" name="classname"/>
-            <attribute default="${debug.classpath}" name="classpath"/>
-            <element name="customize" optional="true"/>
-            <sequential>
-                <java classname="@{classname}" dir="${work.dir}" fork="true">
-                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
-                    <jvmarg line="${debug-args-line}"/>
-                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
-                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
-                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
-                    <jvmarg line="${run.jvmargs}"/>
-                    <jvmarg line="${run.jvmargs.ide}"/>
-                    <classpath>
-                        <path path="@{classpath}"/>
-                    </classpath>
-                    <syspropertyset>
-                        <propertyref prefix="run-sys-prop."/>
-                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
-                    </syspropertyset>
-                    <customize/>
-                </java>
-            </sequential>
-        </macrodef>
-    </target>
-    <target name="-init-macrodef-java">
-        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
-            <attribute default="${main.class}" name="classname"/>
-            <attribute default="${run.classpath}" name="classpath"/>
-            <attribute default="jvm" name="jvm"/>
-            <element name="customize" optional="true"/>
-            <sequential>
-                <java classname="@{classname}" dir="${work.dir}" fork="true">
-                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
-                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
-                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
-                    <jvmarg line="${run.jvmargs}"/>
-                    <jvmarg line="${run.jvmargs.ide}"/>
-                    <classpath>
-                        <path path="@{classpath}"/>
-                    </classpath>
-                    <syspropertyset>
-                        <propertyref prefix="run-sys-prop."/>
-                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
-                    </syspropertyset>
-                    <customize/>
-                </java>
-            </sequential>
-        </macrodef>
-    </target>
-    <target name="-init-macrodef-copylibs">
-        <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${manifest.file}" name="manifest"/>
-            <element name="customize" optional="true"/>
-            <sequential>
-                <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
-                <pathconvert property="run.classpath.without.build.classes.dir">
-                    <path path="${run.classpath}"/>
-                    <map from="${build.classes.dir.resolved}" to=""/>
-                </pathconvert>
-                <pathconvert pathsep=" " property="jar.classpath">
-                    <path path="${run.classpath.without.build.classes.dir}"/>
-                    <chainedmapper>
-                        <flattenmapper/>
-                        <filtermapper>
-                            <replacestring from=" " to="%20"/>
-                        </filtermapper>
-                        <globmapper from="*" to="lib/*"/>
-                    </chainedmapper>
-                </pathconvert>
-                <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
-                <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
-                    <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
-                    <manifest>
-                        <attribute name="Class-Path" value="${jar.classpath}"/>
-                        <customize/>
-                    </manifest>
-                </copylibs>
-            </sequential>
-        </macrodef>
-    </target>
-    <target name="-init-presetdef-jar">
-        <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
-            <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
-                <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
-            </jar>
-        </presetdef>
-    </target>
-    <target name="-init-ap-cmdline-properties">
-        <property name="annotation.processing.enabled" value="true"/>
-        <property name="annotation.processing.processors.list" value=""/>
-        <property name="annotation.processing.processor.options" value=""/>
-        <property name="annotation.processing.run.all.processors" value="true"/>
-        <property name="javac.processorpath" value="${javac.classpath}"/>
-        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
-        <condition property="ap.supported.internal" value="true">
-            <not>
-                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
-            </not>
-        </condition>
-    </target>
-    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
-        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
-            <isfalse value="${annotation.processing.run.all.processors}"/>
-        </condition>
-        <condition else="" property="ap.proc.none.internal" value="-proc:none">
-            <isfalse value="${annotation.processing.enabled}"/>
-        </condition>
-    </target>
-    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
-        <property name="ap.cmd.line.internal" value=""/>
-    </target>
-    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
-    <!--
-                ===================
-                COMPILATION SECTION
-                ===================
-            -->
-    <target name="-deps-jar-init" unless="built-jar.properties">
-        <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
-        <delete file="${built-jar.properties}" quiet="true"/>
-    </target>
-    <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
-        <echo level="warn" message="Cycle detected: 3DViewer was already built"/>
-    </target>
-    <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
-        <mkdir dir="${build.dir}"/>
-        <touch file="${built-jar.properties}" verbose="false"/>
-        <property file="${built-jar.properties}" prefix="already.built.jar."/>
-        <antcall target="-warn-already-built-jar"/>
-        <propertyfile file="${built-jar.properties}">
-            <entry key="${basedir}" value=""/>
-        </propertyfile>
-    </target>
-    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
-    <target depends="init" name="-check-automatic-build">
-        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
-    </target>
-    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
-        <antcall target="clean"/>
-    </target>
-    <target depends="init,deps-jar" name="-pre-pre-compile">
-        <mkdir dir="${build.classes.dir}"/>
-    </target>
-    <target name="-pre-compile">
-        <!-- Empty placeholder for easier customization. -->
-        <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target if="do.depend.true" name="-compile-depend">
-        <pathconvert property="build.generated.subdirs">
-            <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
-                <include name="*"/>
-            </dirset>
-        </pathconvert>
-        <j2seproject3:depend srcdir="${src.java.dir}:${src.resources.dir}:${build.generated.subdirs}"/>
-    </target>
-    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
-        <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
-        <copy todir="${build.classes.dir}">
-            <fileset dir="${src.java.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
-            <fileset dir="${src.resources.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
-        </copy>
-    </target>
-    <target if="has.persistence.xml" name="-copy-persistence-xml">
-        <mkdir dir="${build.classes.dir}/META-INF"/>
-        <copy todir="${build.classes.dir}/META-INF">
-            <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
-        </copy>
-    </target>
-    <target name="-post-compile">
-        <!-- Empty placeholder for easier customization. -->
-        <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
-    <target name="-pre-compile-single">
-        <!-- Empty placeholder for easier customization. -->
-        <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
-        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
-        <j2seproject3:force-recompile/>
-        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.java.dir}:${src.resources.dir}"/>
-    </target>
-    <target name="-post-compile-single">
-        <!-- Empty placeholder for easier customization. -->
-        <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
-    <!--
-                ====================
-                JAR BUILDING SECTION
-                ====================
-            -->
-    <target depends="init" name="-pre-pre-jar">
-        <dirname file="${dist.jar}" property="dist.jar.dir"/>
-        <mkdir dir="${dist.jar.dir}"/>
-    </target>
-    <target name="-pre-jar">
-        <!-- Empty placeholder for easier customization. -->
-        <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
-        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
-        <touch file="${tmp.manifest.file}" verbose="false"/>
-    </target>
-    <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
-        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
-        <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
-    </target>
-    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
-        <manifest file="${tmp.manifest.file}" mode="update">
-            <attribute name="Main-Class" value="${main.class}"/>
-        </manifest>
-    </target>
-    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
-        <manifest file="${tmp.manifest.file}" mode="update">
-            <attribute name="Profile" value="${javac.profile}"/>
-        </manifest>
-    </target>
-    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
-        <basename file="${application.splash}" property="splashscreen.basename"/>
-        <mkdir dir="${build.classes.dir}/META-INF"/>
-        <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
-        <manifest file="${tmp.manifest.file}" mode="update">
-            <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
-        </manifest>
-    </target>
-    <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs">
-        <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
-        <echo level="info">To run this application from the command line without Ant, try:</echo>
-        <property location="${dist.jar}" name="dist.jar.resolved"/>
-        <echo level="info">java -jar "${dist.jar.resolved}"</echo>
-    </target>
-    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
-        <j2seproject1:jar manifest="${tmp.manifest.file}"/>
-        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
-        <property location="${dist.jar}" name="dist.jar.resolved"/>
-        <pathconvert property="run.classpath.with.dist.jar">
-            <path path="${run.classpath}"/>
-            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
-        </pathconvert>
-        <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}">
-            <isset property="main.class.available"/>
-        </condition>
-        <condition else="debug" property="jar.usage.level" value="info">
-            <isset property="main.class.available"/>
-        </condition>
-        <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
-    </target>
-    <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
-        <delete>
-            <fileset file="${tmp.manifest.file}"/>
-        </delete>
-    </target>
-    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/>
-    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/>
-    <target name="-post-jar">
-        <!-- Empty placeholder for easier customization. -->
-        <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
-    <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/>
-    <!--
-                =================
-                EXECUTION SECTION
-                =================
-            -->
-    <target depends="init,compile" description="Run a main class." name="run">
-        <j2seproject1:java>
-            <customize>
-                <arg line="${application.args}"/>
-            </customize>
-        </j2seproject1:java>
-    </target>
-    <target name="-do-not-recompile">
-        <property name="javac.includes.binary" value=""/>
-    </target>
-    <target depends="init,compile-single" name="run-single">
-        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
-        <j2seproject1:java classname="${run.class}"/>
-    </target>
-    <target depends="init,compile-test-single" name="run-test-with-main">
-        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
-        <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
-    </target>
-    <!--
-                =================
-                DEBUGGING SECTION
-                =================
-            -->
-    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
-        <j2seproject1:nbjpdastart name="${debug.class}"/>
-    </target>
-    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
-        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
-    </target>
-    <target depends="init,compile" name="-debug-start-debuggee">
-        <j2seproject3:debug>
-            <customize>
-                <arg line="${application.args}"/>
-            </customize>
-        </j2seproject3:debug>
-    </target>
-    <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
-    <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
-        <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
-    </target>
-    <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
-    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
-        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
-        <j2seproject3:debug classname="${debug.class}"/>
-    </target>
-    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
-    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
-        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
-        <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
-    </target>
-    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
-    <target depends="init" name="-pre-debug-fix">
-        <fail unless="fix.includes">Must set fix.includes</fail>
-        <property name="javac.includes" value="${fix.includes}.java"/>
-    </target>
-    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
-        <j2seproject1:nbjpdareload/>
-    </target>
-    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
-    <!--
-                =================
-                PROFILING SECTION
-                =================
-            -->
-    <!--
-                pre NB7.2 profiler integration
-            -->
-    <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
-        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
-        <nbprofiledirect>
-            <classpath>
-                <path path="${run.classpath}"/>
-            </classpath>
-        </nbprofiledirect>
-        <profile/>
-    </target>
-    <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
-        <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
-        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
-        <nbprofiledirect>
-            <classpath>
-                <path path="${run.classpath}"/>
-            </classpath>
-        </nbprofiledirect>
-        <profile classname="${profile.class}"/>
-    </target>
-    <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
-        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
-        <nbprofiledirect>
-            <classpath>
-                <path path="${run.classpath}"/>
-            </classpath>
-        </nbprofiledirect>
-        <profile classname="sun.applet.AppletViewer">
-            <customize>
-                <arg value="${applet.url}"/>
-            </customize>
-        </profile>
-    </target>
-    <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
-        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
-        <nbprofiledirect>
-            <classpath>
-                <path path="${run.test.classpath}"/>
-            </classpath>
-        </nbprofiledirect>
-        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
-            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
-            <jvmarg value="${profiler.info.jvmargs.agent}"/>
-            <jvmarg line="${profiler.info.jvmargs}"/>
-            <test name="${profile.class}"/>
-            <classpath>
-                <path path="${run.test.classpath}"/>
-            </classpath>
-            <syspropertyset>
-                <propertyref prefix="test-sys-prop."/>
-                <mapper from="test-sys-prop.*" to="*" type="glob"/>
-            </syspropertyset>
-            <formatter type="brief" usefile="false"/>
-            <formatter type="xml"/>
-        </junit>
-    </target>
-    <!--
-                end of pre NB72 profiling section
-            -->
-    <target if="netbeans.home" name="-profile-check">
-        <condition property="profiler.configured">
-            <or>
-                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
-                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
-            </or>
-        </condition>
-    </target>
-    <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
-        <startprofiler/>
-        <antcall target="run"/>
-    </target>
-    <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
-        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
-        <startprofiler/>
-        <antcall target="run-single"/>
-    </target>
-    <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
-    <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
-        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
-        <startprofiler/>
-        <antcall target="test-single"/>
-    </target>
-    <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
-        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
-        <startprofiler/>
-        <antcal target="run-test-with-main"/>
-    </target>
-    <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
-        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
-        <startprofiler/>
-        <antcall target="run-applet"/>
-    </target>
-    <!--
-                ===============
-                JAVADOC SECTION
-                ===============
-            -->
-    <target depends="init" if="have.sources" name="-javadoc-build">
-        <mkdir dir="${dist.javadoc.dir}"/>
-        <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
-            <and>
-                <isset property="endorsed.classpath.cmd.line.arg"/>
-                <not>
-                    <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
-                </not>
-            </and>
-        </condition>
-        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
-            <classpath>
-                <path path="${javac.classpath}"/>
-            </classpath>
-            <fileset dir="${src.java.dir}" excludes="*.java,${excludes}" includes="${includes}">
-                <filename name="**/*.java"/>
-            </fileset>
-            <fileset dir="${src.resources.dir}" excludes="*.java,${excludes}" includes="${includes}">
-                <filename name="**/*.java"/>
-            </fileset>
-            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
-                <include name="**/*.java"/>
-                <exclude name="*.java"/>
-            </fileset>
-            <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
-        </javadoc>
-        <copy todir="${dist.javadoc.dir}">
-            <fileset dir="${src.java.dir}" excludes="${excludes}" includes="${includes}">
-                <filename name="**/doc-files/**"/>
-            </fileset>
-            <fileset dir="${src.resources.dir}" excludes="${excludes}" includes="${includes}">
-                <filename name="**/doc-files/**"/>
-            </fileset>
-            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
-                <include name="**/doc-files/**"/>
-            </fileset>
-        </copy>
-    </target>
-    <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
-        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
-    </target>
-    <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
-    <!--
-                =========================
-                TEST COMPILATION SECTION
-                =========================
-            -->
-    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
-        <mkdir dir="${build.test.classes.dir}"/>
-    </target>
-    <target name="-pre-compile-test">
-        <!-- Empty placeholder for easier customization. -->
-        <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target if="do.depend.true" name="-compile-test-depend">
-        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.java.dir}"/>
-    </target>
-    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
-        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.java.dir}"/>
-        <copy todir="${build.test.classes.dir}">
-            <fileset dir="${test.java.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
-        </copy>
-    </target>
-    <target name="-post-compile-test">
-        <!-- Empty placeholder for easier customization. -->
-        <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
-    <target name="-pre-compile-test-single">
-        <!-- Empty placeholder for easier customization. -->
-        <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
-        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
-        <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
-        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.java.dir}" srcdir="${test.java.dir}"/>
-        <copy todir="${build.test.classes.dir}">
-            <fileset dir="${test.java.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
-        </copy>
-    </target>
-    <target name="-post-compile-test-single">
-        <!-- Empty placeholder for easier customization. -->
-        <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
-    <!--
-                =======================
-                TEST EXECUTION SECTION
-                =======================
-            -->
-    <target depends="init" if="have.tests" name="-pre-test-run">
-        <mkdir dir="${build.test.results.dir}"/>
-    </target>
-    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
-        <j2seproject3:test testincludes="**/*Test.java"/>
-    </target>
-    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
-        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
-    </target>
-    <target depends="init" if="have.tests" name="test-report"/>
-    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
-    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
-    <target depends="init" if="have.tests" name="-pre-test-run-single">
-        <mkdir dir="${build.test.results.dir}"/>
-    </target>
-    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
-        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
-        <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
-    </target>
-    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
-        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
-    </target>
-    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
-    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
-        <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
-        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
-        <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
-    </target>
-    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
-        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
-    </target>
-    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
-    <!--
-                =======================
-                TEST DEBUGGING SECTION
-                =======================
-            -->
-    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
-        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
-        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
-    </target>
-    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
-        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
-        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
-        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
-    </target>
-    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
-        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
-    </target>
-    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
-    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
-    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
-        <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
-    </target>
-    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
-    <!--
-                =========================
-                APPLET EXECUTION SECTION
-                =========================
-            -->
-    <target depends="init,compile-single" name="run-applet">
-        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
-        <j2seproject1:java classname="sun.applet.AppletViewer">
-            <customize>
-                <arg value="${applet.url}"/>
-            </customize>
-        </j2seproject1:java>
-    </target>
-    <!--
-                =========================
-                APPLET DEBUGGING  SECTION
-                =========================
-            -->
-    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
-        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
-        <j2seproject3:debug classname="sun.applet.AppletViewer">
-            <customize>
-                <arg value="${applet.url}"/>
-            </customize>
-        </j2seproject3:debug>
-    </target>
-    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
-    <!--
-                ===============
-                CLEANUP SECTION
-                ===============
-            -->
-    <target name="-deps-clean-init" unless="built-clean.properties">
-        <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
-        <delete file="${built-clean.properties}" quiet="true"/>
-    </target>
-    <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
-        <echo level="warn" message="Cycle detected: 3DViewer was already built"/>
-    </target>
-    <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
-        <mkdir dir="${build.dir}"/>
-        <touch file="${built-clean.properties}" verbose="false"/>
-        <property file="${built-clean.properties}" prefix="already.built.clean."/>
-        <antcall target="-warn-already-built-clean"/>
-        <propertyfile file="${built-clean.properties}">
-            <entry key="${basedir}" value=""/>
-        </propertyfile>
-    </target>
-    <target depends="init" name="-do-clean">
-        <delete dir="${build.dir}"/>
-        <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
-    </target>
-    <target name="-post-clean">
-        <!-- Empty placeholder for easier customization. -->
-        <!-- You can override this target in the ../build.xml file. -->
-    </target>
-    <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
-    <target name="-check-call-dep">
-        <property file="${call.built.properties}" prefix="already.built."/>
-        <condition property="should.call.dep">
-            <and>
-                <not>
-                    <isset property="already.built.${call.subproject}"/>
-                </not>
-                <available file="${call.script}"/>
-            </and>
-        </condition>
-    </target>
-    <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
-        <ant antfile="${call.script}" inheritall="false" target="${call.target}">
-            <propertyset>
-                <propertyref prefix="transfer."/>
-                <mapper from="transfer.*" to="*" type="glob"/>
-            </propertyset>
-        </ant>
-    </target>
-</project>
--- a/apps/experiments/3DViewer/nbproject/genfiles.properties	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-build.xml.data.CRC32=053bf8d6
-build.xml.script.CRC32=0419b6b5
-build.xml.stylesheet.CRC32=28e38971@1.56.1.46
-# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
-# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=053bf8d6
-nbproject/build-impl.xml.script.CRC32=07a39b29
-nbproject/build-impl.xml.stylesheet.CRC32=c6d2a60f@1.56.1.46
--- a/apps/experiments/3DViewer/nbproject/project.properties	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-annotation.processing.enabled=true
-annotation.processing.enabled.in.editor=false
-annotation.processing.processors.list=
-annotation.processing.run.all.processors=true
-annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
-application.title=3DViewer
-application.vendor=Oracle
-build.classes.dir=${build.dir}/classes
-build.classes.excludes=**/*.java,**/*.form
-# This directory is removed when the project is cleaned:
-build.dir=build
-build.generated.dir=${build.dir}/generated
-build.generated.sources.dir=${build.dir}/generated-sources
-# Only compile against the classpath explicitly listed here:
-build.sysclasspath=ignore
-build.test.classes.dir=${build.dir}/test/classes
-build.test.results.dir=${build.dir}/test/results
-# Uncomment to specify the preferred debugger connection transport:
-#debug.transport=dt_socket
-debug.classpath=\
-    ${run.classpath}
-debug.test.classpath=\
-    ${run.test.classpath}
-# This directory is removed when the project is cleaned:
-dist.dir=dist
-dist.jar=${dist.dir}/3DViewer.jar
-dist.javadoc.dir=${dist.dir}/javadoc
-endorsed.classpath=
-excludes=
-jfxbuild.jfxrt.jar=../../../build/sdk/rt/lib/ext/jfxrt.jar
-includes=**
-jar.compress=false
-javac.classpath=\
-    ${jfxbuild.jfxrt.jar}
-# Space-separated list of extra javac options
-javac.compilerargs=
-javac.deprecation=false
-javac.processorpath=\
-    ${javac.classpath}
-javac.source=1.8
-javac.target=1.8
-javac.test.classpath=\
-    ${javac.classpath}:\
-    ${build.classes.dir}
-javac.test.processorpath=\
-    ${javac.test.classpath}
-javadoc.additionalparam=
-javadoc.author=false
-javadoc.encoding=${source.encoding}
-javadoc.noindex=false
-javadoc.nonavbar=false
-javadoc.notree=false
-javadoc.private=false
-javadoc.splitindex=true
-javadoc.use=true
-javadoc.version=false
-javadoc.windowtitle=
-main.class=com.javafx.experiments.jfx3dviewer.Jfx3dViewerApp
-manifest.file=manifest.mf
-meta.inf.dir=${src.dir}/META-INF
-mkdist.disabled=false
-platform.active=default_platform
-run.classpath=\
-    ${javac.classpath}:\
-    ${build.classes.dir}
-# Space-separated list of JVM arguments used when running the project.
-# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
-# To set system properties for unit tests define test-sys-prop.name=value:
-run.jvmargs=-Djava.ext.dirs= 
-run.test.classpath=\
-    ${javac.test.classpath}:\
-    ${build.test.classes.dir}
-source.encoding=UTF-8
-src.java.dir=src/main/java
-src.resources.dir=src/main/resources
-test.java.dir=src/test/java
--- a/apps/experiments/3DViewer/nbproject/project.xml	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://www.netbeans.org/ns/project/1">
-    <type>org.netbeans.modules.java.j2seproject</type>
-    <configuration>
-        <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
-            <name>3DViewer</name>
-            <explicit-platform explicit-source-supported="true"/>
-            <source-roots>
-                <root id="src.java.dir"/>
-                <root id="src.resources.dir"/>
-            </source-roots>
-            <test-roots>
-                <root id="test.java.dir"/>
-            </test-roots>
-        </data>
-    </configuration>
-</project>
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/exporters/fxml/FXMLExporter.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,334 +0,0 @@
-/*
- * Copyright (c) 2010, 2013 Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.javafx.experiments.exporters.fxml;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javafx.collections.ObservableArray;
-import javafx.geometry.Point3D;
-import javafx.scene.Node;
-import javafx.scene.Parent;
-import javafx.scene.paint.Color;
-import javafx.scene.paint.PhongMaterial;
-import javafx.scene.shape.Box;
-import javafx.scene.shape.MeshView;
-import javafx.scene.shape.Shape3D;
-import javafx.scene.shape.TriangleMesh;
-import javafx.scene.transform.Affine;
-import javafx.scene.transform.Rotate;
-import javafx.scene.transform.Transform;
-import javafx.scene.transform.Translate;
-
-/** Export a 3D MeshView to FXML file. */
-public class FXMLExporter {
-
-    private PrintWriter printWriter;
-    private Set<String> imports = new TreeSet<>();
-    private Map<String, String> simpleNames = new HashMap<>();
-
-    public FXMLExporter(String filename) {
-        File file = new File(filename);
-        try {
-            printWriter = new PrintWriter(file);
-            System.out.println("Saving FMXL to " + file.getAbsolutePath());
-        } catch (FileNotFoundException ex) {
-            throw new RuntimeException("Failed to export FXML to " + file.getAbsolutePath(), ex);
-        }
-    }
-
-    public FXMLExporter(OutputStream outputStream) {
-        printWriter = new PrintWriter(outputStream);
-    }
-
-    public void export(Node node) {
-        printWriter.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
-        FXML fxmlTree = exportToFXML(node);
-        for (String importString : imports) {
-            printWriter.println("<?import " + importString + ".*?>");
-        }
-        printWriter.println();
-        fxmlTree.export("");
-        printWriter.close();
-    }
-
-    private List<Property> getProperties(Class aClass) {
-        List<Property> res = new ArrayList<>();
-        try {
-            if (Point3D.class.isAssignableFrom(aClass)) {
-                res.add(new Property(aClass.getMethod("getX"), "x"));
-                res.add(new Property(aClass.getMethod("getY"), "y"));
-                res.add(new Property(aClass.getMethod("getZ"), "z"));
-            }
-            if (Translate.class.isAssignableFrom(aClass)) {
-                res.add(new Property(aClass.getMethod("getX"), "x"));
-                res.add(new Property(aClass.getMethod("getY"), "y"));
-                res.add(new Property(aClass.getMethod("getZ"), "z"));
-            }
-            if (Rotate.class.isAssignableFrom(aClass)) {
-                res.add(new Property(aClass.getMethod("getAngle"), "angle"));
-                res.add(new Property(aClass.getMethod("getAxis"), "axis"));
-            }
-            if (Affine.class.isAssignableFrom(aClass)) {
-                res.add(new Property(aClass.getMethod("getMxx"), "mxx"));
-                res.add(new Property(aClass.getMethod("getMxy"), "mxy"));
-                res.add(new Property(aClass.getMethod("getMxz"), "mxz"));
-                res.add(new Property(aClass.getMethod("getMyx"), "myx"));
-                res.add(new Property(aClass.getMethod("getMyy"), "myy"));
-                res.add(new Property(aClass.getMethod("getMyz"), "myz"));
-                res.add(new Property(aClass.getMethod("getMzx"), "mzx"));
-                res.add(new Property(aClass.getMethod("getMzy"), "mzy"));
-                res.add(new Property(aClass.getMethod("getMzz"), "mzz"));
-                res.add(new Property(aClass.getMethod("getTx"), "tx"));
-                res.add(new Property(aClass.getMethod("getTy"), "ty"));
-                res.add(new Property(aClass.getMethod("getTz"), "tz"));
-            }
-            if (PhongMaterial.class.isAssignableFrom(aClass)) {
-                res.add(new Property(aClass.getMethod("getDiffuseColor"), "diffuseColor"));
-            }
-            if (Node.class.isAssignableFrom(aClass)) {
-                res.add(new Property(aClass.getMethod("getId"), "id"));
-                res.add(new Property(aClass.getMethod("getTransforms"), "transforms"));
-            }
-            if (Parent.class.isAssignableFrom(aClass)) {
-                res.add(new Property(aClass.getMethod("getChildrenUnmodifiable"), "children"));
-            }
-            if (Shape3D.class.isAssignableFrom(aClass)) {
-                res.add(new Property(aClass.getMethod("getMaterial"), "material"));
-            }
-            if (Box.class.isAssignableFrom(aClass)) {
-                res.add(new Property(aClass.getMethod("getWidth"), "width"));
-                res.add(new Property(aClass.getMethod("getHeight"), "height"));
-                res.add(new Property(aClass.getMethod("getDepth"), "depth"));
-            }
-            if (MeshView.class.equals(aClass)) {
-                res.add(new Property(aClass.getMethod("getMesh"), "mesh"));
-            }
-            if (TriangleMesh.class.isAssignableFrom(aClass)) {
-                res.add(new Property(aClass.getMethod("getPoints"), "points"));
-                res.add(new Property(aClass.getMethod("getTexCoords"), "texCoords"));
-                res.add(new Property(aClass.getMethod("getFaces"), "faces"));
-                res.add(new Property(aClass.getMethod("getFaceSmoothingGroups"), "faceSmoothingGroups"));
-            }
-        } catch (NoSuchMethodException | SecurityException ex) {
-            Logger.getLogger(FXMLExporter.class.getName()).log(Level.SEVERE, null, ex);
-        }
-        return res;
-    }
-
-    private Map<Class, List<Property>> propertiesCache = new HashMap<>();
-
-    private class Property {
-        Method getter;
-        String name;
-
-        public Property(String name) {
-            this.name = name;
-        }
-
-        public Property(Method getter, String name) {
-            this.getter = getter;
-            this.name = name;
-        }
-    }
-
-    private FXML exportToFXML(Object object) {
-        if (object instanceof Transform && ((Transform) object).isIdentity()) {
-            return null;
-        }
-
-        FXML fxml = new FXML(object.getClass());
-
-        List<Property> properties = propertiesCache.get(object.getClass());
-        if (properties == null) {
-            properties = getProperties(object.getClass());
-            propertiesCache.put(object.getClass(), properties);
-        }
-
-        for (Property property : properties) {
-            try {
-                Object[] parameters = new Object[property.getter.getParameterTypes().length];
-                Object value = property.getter.invoke(object, parameters);
-                if (value != null) {
-                    if (value instanceof Collection) {
-                        Collection collection = (Collection) value;
-                        if (!collection.isEmpty()) {
-                            FXML container = fxml.addContainer(property.name);
-                            for (Object item : collection) {
-                                container.addChild(exportToFXML(item));
-                            }
-                        }
-                    } else if (value instanceof ObservableArray) {
-                        int length = ((ObservableArray) value).size();
-                        if (length > 0) {
-                            FXML container = fxml.addContainer(property.name);
-                            container.setValue(value);
-                        }
-                    } else if (property.getter.getReturnType().isPrimitive()
-                            || String.class.equals(value.getClass())
-                            || Color.class.equals(value.getClass())) {
-                        fxml.addProperty(property.name, String.valueOf(value));
-                    } else {
-                        FXML container = fxml.addContainer(property.name);
-                        container.addChild(exportToFXML(value));
-                    }
-                }
-            } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
-                Logger.getLogger(FXMLExporter.class.getName()).
-                        log(Level.SEVERE, null, ex);
-            }
-        }
-
-        return fxml;
-    }
-
-    private class FXML {
-        private String tagName;
-        List<Entry> properties;
-        List<FXML> nested;
-        Object value;
-
-        private FXML addContainer(String containerTag) {
-            if (nested != null) {
-                for (FXML n : nested) {
-                    if (n.tagName.equals(containerTag)) {
-                        return n;
-                    }
-                }
-            }
-            FXML fxml = new FXML(containerTag);
-            addChild(fxml);
-            return fxml;
-        }
-
-        public FXML(String tagName) {
-            this.tagName = tagName;
-        }
-
-        public FXML(Class cls) {
-            String fullName = simpleNames.get(cls.getSimpleName());
-            if (fullName == null) {
-
-                // this short name is not used, so adding it to imports and
-                // to shortNames map
-                fullName = cls.getName();
-                imports.add(cls.getPackage().getName());
-                simpleNames.put(cls.getSimpleName(), fullName);
-                tagName = cls.getSimpleName();
-            } else if (!fullName.equals(cls.getName())) {
-
-                // short name is already used for some other class so we have
-                // to use full name
-                tagName = cls.getName();
-            } else {
-
-                // short name matches this class
-                tagName = cls.getSimpleName();
-            }
-        }
-
-        private class Entry {
-            String key;
-            String value;
-
-            public Entry(String key, String value) {
-                this.key = key;
-                this.value = value;
-            }
-        }
-
-        void setValue(Object value) {
-            this.value = value;
-        }
-
-        void addProperty(String key, String value) {
-            if (properties == null) {
-                properties = new ArrayList<>();
-            }
-            properties.add(new Entry(key, value));
-        }
-
-        void export(String indent) {
-            printWriter.append(indent).append('<').append(tagName);
-            if (properties != null) {
-                for (Entry entry : properties) {
-                    printWriter.append(' ').append(entry.key).append("=\"")
-                               .append(entry.value).append("\"");
-                }
-            }
-            if (nested != null || value != null) {
-                printWriter.append(">\n");
-                String indent1 = indent + "  ";
-                if (nested != null) {
-                    for (FXML fxml : nested) {
-                        fxml.export(indent1);
-                    }
-                }
-                if (value != null) {
-                    String toString;
-                    if (value instanceof ObservableArray) {
-                        toString = value.toString();
-                    } else {
-                        throw new UnsupportedOperationException("Only ObservableArrays are currently supported");
-                    }
-                    printWriter.append(indent1).append(toString.substring(1, toString.length() - 1)).append("\n");
-                }
-                printWriter.append(indent).append("</").append(tagName).append(">\n");
-            } else {
-                printWriter.append("/>\n");
-            }
-        }
-
-        private void addChild(FXML fxml) {
-            if (fxml == null) {
-                return;
-            }
-            if (nested == null) {
-                nested = new ArrayList<>();
-            }
-            nested.add(fxml);
-        }
-    }
-
-}
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/exporters/javasource/JavaSourceExporter.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,489 +0,0 @@
-/*
- * Copyright (c) 2010, 2013 Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.javafx.experiments.exporters.javasource;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javafx.animation.Interpolator;
-import javafx.animation.KeyFrame;
-import javafx.animation.KeyValue;
-import javafx.animation.Timeline;
-import javafx.beans.value.WritableValue;
-import javafx.scene.Group;
-import javafx.scene.Node;
-import javafx.scene.image.Image;
-import javafx.scene.paint.Color;
-import javafx.scene.paint.PhongMaterial;
-import javafx.scene.shape.MeshView;
-import javafx.scene.shape.TriangleMesh;
-import javafx.scene.transform.Rotate;
-import javafx.scene.transform.Scale;
-import javafx.scene.transform.Transform;
-import javafx.scene.transform.Translate;
-import javafx.util.Duration;
-import com.javafx.experiments.importers.Optimizer;
-import com.javafx.experiments.importers.maya.MayaImporter;
-import com.sun.javafx.animation.TickCalculation;
-import com.sun.scenario.animation.NumberTangentInterpolator;
-import com.sun.scenario.animation.SplineInterpolator;
-
-/**
- * A exporter for 3D Models and animations that creates a Java Source file.
- */
-public class JavaSourceExporter {
-    private int nodeCount = 0;
-    private int materialCount = 0;
-    private int meshCount = 0;
-    private int meshViewCount = 0;
-    private int methodCount = 1;
-    private int translateCount = 0;
-    private int rotateCount = 0;
-    private int scaleCount = 0;
-    private Map<WritableValue,String> writableVarMap = new HashMap<>();
-    private StringBuilder nodeCode = new StringBuilder();
-    private StringBuilder timelineCode = new StringBuilder();
-    private final boolean hasTimeline;
-    private final String baseUrl;
-    private final String className;
-    private final String packageName;
-    private final File outputFile;
-
-    public JavaSourceExporter(String baseUrl, Node rootNode, Timeline timeline, File outputFile) {
-        this(baseUrl, rootNode, timeline,computePackageName(baseUrl), outputFile);
-    }
-
-    public JavaSourceExporter(String baseUrl, Node rootNode, Timeline timeline, String packageName, File outputFile) {
-        this.baseUrl =
-                (baseUrl.charAt(baseUrl.length()-1) == '/') ?
-                        baseUrl.replaceAll("/+","/") :
-                        baseUrl.replaceAll("/+","/") + '/';
-        this.hasTimeline = timeline != null;
-        this.className = outputFile.getName().substring(0,outputFile.getName().lastIndexOf('.'));
-        this.packageName = packageName;
-        this.outputFile = outputFile;
-        process("        ",rootNode);
-        if (hasTimeline) process("        ",timeline);
-    }
-
-    private static String computePackageName(String baseUrl) {
-        // remove protocol from baseUrl
-        System.out.println("JavaSourceExporter.computePackageName   baseUrl = " + baseUrl);
-        baseUrl = baseUrl.replaceAll("^[a-z]+:/+","/");
-        System.out.println("baseUrl = " + baseUrl);
-        // try and work out package name from file
-        StringBuilder packageName = new StringBuilder();
-        String[] pathSegments = baseUrl.split(File.separatorChar == '\\'?"\\\\":"/");
-        System.out.println("pathSegments = " + Arrays.toString(pathSegments));
-        loop: for (int i = pathSegments.length-1; i >= 0; i -- ) {
-            switch (pathSegments[i]){
-                case "com":
-                case "org":
-                case "net":
-                    packageName.insert(0,pathSegments[i]);
-                    break loop;
-                case "src":
-                    packageName.deleteCharAt(0);
-                    break loop;
-                case "main":
-                    if ("src".equals(pathSegments[i-1])) {
-                        packageName.deleteCharAt(0);
-                        break loop;
-                    }
-                default:
-                    packageName.insert(0,'.'+pathSegments[i]);
-                    break;
-            }
-            // if we get all way to root of file system then we have failed
-            if (i==0) packageName = null;
-        }
-        System.out.println(" packageName = " + packageName);
-        return packageName==null?null:packageName.toString();
-    }
-
-    public void export() {
-        try {
-            BufferedWriter out = new BufferedWriter(new FileWriter(outputFile));
-//            BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
-            StringBuilder nodeVars = new StringBuilder();
-            nodeVars.append("    private static Node ");
-            for (int i=0; i<nodeCount; i++) {
-                if (i!=0) nodeVars.append(',');
-                nodeVars.append("NODE_"+i);
-            }
-            nodeVars.append(";\n");
-            nodeVars.append("    private static TriangleMesh ");
-            for (int i=0; i<meshCount; i++) {
-                if (i!=0) nodeVars.append(',');
-                nodeVars.append("MESH_"+i);
-            }
-            nodeVars.append(";\n");
-            if (translateCount > 0) {
-                nodeVars.append("    private static Translate ");
-                for (int i=0; i<translateCount; i++) {
-                    if (i!=0) nodeVars.append(',');
-                    nodeVars.append("TRANS_"+i);
-                }
-                nodeVars.append(";\n");
-            }
-            if (rotateCount > 0) {
-                nodeVars.append("    private static Rotate ");
-                for (int i=0; i<rotateCount; i++) {
-                    if (i!=0) nodeVars.append(',');
-                    nodeVars.append("ROT_"+i);
-                }
-                nodeVars.append(";\n");
-            }
-            if (scaleCount > 0) {
-                nodeVars.append("    private static Scale ");
-                for (int i=0; i<scaleCount; i++) {
-                    if (i!=0) nodeVars.append(',');
-                    nodeVars.append("SCALE_"+i);
-                }
-                nodeVars.append(";\n");
-            }
-            nodeVars.append("    public static final MeshView[] MESHVIEWS = new MeshView[]{ ");
-            for (int i=0; i<meshViewCount; i++) {
-                if (i!=0) nodeVars.append(',');
-                nodeVars.append("new MeshView()");
-            }
-            nodeVars.append("};\n");
-//            nodeVars.append("    public static final MeshView ");
-//            for (int i=0; i<meshViewCount; i++) {
-//                if (i!=0) nodeVars.append(',');
-//                nodeVars.append("MESHVIEW_"+i+" = new MeshView()");
-//            }
-//            nodeVars.append(";\n");
-
-            nodeVars.append("    public static final Node ROOT;\n");
-            nodeVars.append("    public static final Map<String,MeshView> MESHVIEW_MAP;\n");
-            if (hasTimeline) {
-                nodeVars.append("    public static final Timeline TIMELINE = new Timeline();\n");
-            }
-            StringBuilder methodCode = new StringBuilder();
-            for (int m=0; m< methodCount;m++) {
-                methodCode.append("        method"+m+"();\n");
-            }
-
-            if (packageName != null) out.write(
-                    "package "+packageName+";\n\n");
-            out.write(
-                    "import java.util.*;\n" +
-                    "import javafx.util.Duration;\n" +
-                    "import javafx.animation.*;\n" +
-                    "import javafx.scene.*;\n" +
-                    "import javafx.scene.paint.*;\n" +
-                    "import javafx.scene.image.*;\n" +
-                    "import javafx.scene.shape.*;\n" +
-                    "import javafx.scene.transform.*;\n\n" +
-                    "public class "+className+" {\n" +
-                    nodeVars +
-                    "    // ======== NODE CODE ===============\n" +
-                    "    private static void method0(){\n" +
-                    nodeCode +
-                    "    }\n" +
-                    "    static {\n" +
-                    methodCode +
-                    "        // ======== TIMELINE CODE ===============\n" +
-                    timelineCode +
-                    "        // ======== SET PUBLIC VARS ===============\n" +
-                    "        Map<String,MeshView> meshViewMap = new HashMap<String,MeshView>();\n" +
-                    "        for (MeshView meshView: MESHVIEWS) meshViewMap.put(meshView.getId(),meshView);\n" +
-                    "        MESHVIEW_MAP = Collections.unmodifiableMap(meshViewMap);\n" +
-                    "        ROOT = NODE_0;\n" +
-                    "    }\n" +
-                    "}\n");
-
-            out.flush();
-            out.close();
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-    private int process(String indent, Node node) {
-        if (node instanceof MeshView) {
-            return process(indent,(MeshView)node);
-        } else if (node instanceof Group) {
-            return process(indent,(Group)node);
-        } else {
-            throw new UnsupportedOperationException("Found unknown node type: "+node.getClass().getName());
-        }
-    }
-
-    private int process(String indent, MeshView node) {
-        final int index = nodeCount ++;
-        final String varName = "NODE_"+index;
-        final int meshViewIndex = meshViewCount ++;
-        final String meshViewVarName = "MESHVIEWS["+meshViewIndex+"]";
-//        nodeCode.append(indent+meshViewVarName+" = new MeshView();\n");
-        nodeCode.append(indent+varName+" = "+meshViewVarName+";\n");
-        if (node.getId() != null) nodeCode.append(indent+meshViewVarName+".setId(\""+node.getId()+"\");\n");
-        nodeCode.append(indent+meshViewVarName+".setCullFace(CullFace."+node.getCullFace().name()+");\n");
-        processNodeTransforms(indent,meshViewVarName,node);
-        process(indent,meshViewVarName,(PhongMaterial)node.getMaterial());
-        process(indent,meshViewVarName,(TriangleMesh)node.getMesh());
-        return index;
-    }
-
-    private void processNodeTransforms(String indent, String varName, Node node) {
-        if (node.getTranslateX() != 0) nodeCode.append(indent+varName+".setTranslateX("+node.getTranslateX()+");\n");
-        if (node.getTranslateY() != 0) nodeCode.append(indent+varName+".setTranslateY("+node.getTranslateY()+");\n");
-        if (node.getTranslateZ() != 0) nodeCode.append(indent+varName+".setTranslateZ("+node.getTranslateZ()+");\n");
-        if (node.getRotate() != 0) nodeCode.append(indent+varName+".setRotate("+node.getRotate()+");\n");
-        if (!node.getTransforms().isEmpty()) {
-            nodeCode.append(indent+varName+".getTransforms().addAll(\n");
-            for (int i=0; i< node.getTransforms().size(); i++) {
-                if (i!=0) nodeCode.append(",\n");
-                Transform transform = node.getTransforms().get(i);
-                if (transform instanceof Translate) {
-                    Translate t = (Translate)transform;
-                    nodeCode.append(indent+"    "+storeTransform(t)+" = new Translate("+t.getX()+","+t.getY()+","+t.getZ()+")");
-                } else if (transform instanceof Scale) {
-                    Scale s = (Scale)transform;
-                    nodeCode.append(indent+"    "+storeTransform(s)+" = new Scale("+s.getX()+","+s.getY()+","+s.getZ()+","+s.getPivotX()+","+s.getPivotY()+","+s.getPivotZ()+")");
-                } else if (transform instanceof Rotate) {
-                    Rotate r = (Rotate)transform;
-                    nodeCode.append(indent+"    "+storeTransform(r)+" = new Rotate("+r.getAngle()+","+r.getPivotX()+","+r.getPivotY()+","+r.getPivotZ()+",");
-                    if (r.getAxis() == Rotate.X_AXIS) {
-                        nodeCode.append("Rotate.X_AXIS");
-                    } else if (r.getAxis() == Rotate.Y_AXIS) {
-                        nodeCode.append("Rotate.Y_AXIS");
-                    } else if (r.getAxis() == Rotate.Z_AXIS) {
-                        nodeCode.append("Rotate.Z_AXIS");
-                    }
-                    nodeCode.append(")");
-                } else {
-                    throw new UnsupportedOperationException("Unknown Transform Type: "+transform.getClass());
-                }
-
-            }
-            nodeCode.append("\n"+indent+");\n");
-        }
-    }
-
-    private String storeTransform(Transform transform) {
-        String varName;
-        if (transform instanceof Translate) {
-            final int index = translateCount ++;
-            varName = "TRANS_"+index;
-            Translate t = (Translate)transform;
-            writableVarMap.put(t.xProperty(),varName+".xProperty()");
-            writableVarMap.put(t.yProperty(),varName+".yProperty()");
-            writableVarMap.put(t.zProperty(),varName+".zProperty()");
-        } else if (transform instanceof Scale) {
-            final int index = scaleCount ++;
-            varName = "SCALE_"+index;
-            Scale s = (Scale)transform;
-            writableVarMap.put(s.xProperty(),varName+".xProperty()");
-            writableVarMap.put(s.yProperty(),varName+".yProperty()");
-            writableVarMap.put(s.zProperty(),varName+".zProperty()");
-            writableVarMap.put(s.pivotXProperty(),varName+".pivotXProperty()");
-            writableVarMap.put(s.pivotYProperty(),varName+".pivotYProperty()");
-            writableVarMap.put(s.pivotZProperty(),varName+".pivotZProperty()");
-        } else if (transform instanceof Rotate) {
-            final int index = rotateCount ++;
-            varName = "ROT_"+index;
-            Rotate r = (Rotate)transform;
-            writableVarMap.put(r.angleProperty(),varName+".angleProperty()");
-        } else {
-            throw new UnsupportedOperationException("Unknown Transform Type: "+transform.getClass());
-        }
-        return varName;
-    }
-
-    private int process(String indent, Group node) {
-        final int index = nodeCount ++;
-        final String varName = "NODE_"+index;
-        List<Integer> childIndex = new ArrayList<>();
-        for (int i = 0; i < node.getChildren().size(); i++) {
-            Node child = node.getChildren().get(i);
-            childIndex.add(
-                    process(indent,child));
-        }
-        nodeCode.append(indent+varName+" = new Group(");
-        for (int i = 0; i < childIndex.size(); i++) {
-            if (i!=0) nodeCode.append(',');
-            nodeCode.append("NODE_"+childIndex.get(i));
-        }
-        nodeCode.append(");\n");
-        processNodeTransforms(indent, varName, node);
-        nodeCode.append("    }\n    private static void method" + (methodCount++) + "(){\n");
-        return index;
-    }
-
-    private void process(String indent, String varName, TriangleMesh mesh) {
-        final int index = meshCount ++;
-        final String meshName = "MESH_"+index;
-
-        nodeCode.append(indent+meshName+" = new TriangleMesh();\n");
-        nodeCode.append(indent+varName+".setMesh("+meshName+");\n");
-
-        nodeCode.append(indent+meshName+".getPoints().ensureCapacity("+mesh.getPoints().size()+");\n");
-        nodeCode.append(indent + meshName + ".getPoints().addAll(");
-        for (int i = 0; i < mesh.getPoints().size(); i++) {
-            if (i!=0) nodeCode.append(',');
-            nodeCode.append(mesh.getPoints().get(i)+"f");
-        }
-        nodeCode.append(");\n");
-        nodeCode.append("    }\n    private static void method" + (methodCount++) + "(){\n");
-        nodeCode.append(indent+meshName+".getTexCoords().ensureCapacity("+mesh.getTexCoords().size()+");\n");
-        nodeCode.append(indent + meshName + ".getTexCoords().addAll(");
-        for (int i = 0; i < mesh.getTexCoords().size(); i++) {
-            if (i!=0) nodeCode.append(',');
-            nodeCode.append(mesh.getTexCoords().get(i)+"f");
-        }
-        nodeCode.append(");\n");
-        nodeCode.append("    }\n    private static void method" + (methodCount++) + "(){\n");
-        nodeCode.append(indent+meshName+".getFaces().ensureCapacity("+mesh.getFaces().size()+");\n");
-        nodeCode.append(indent + meshName + ".getFaces().addAll(");
-        for (int i = 0; i < mesh.getFaces().size(); i++) {
-            if ((i%5000) == 0 && i > 0) {
-                nodeCode.append(");\n");
-                nodeCode.append("    }\n    private static void method" + (methodCount++) + "(){\n");
-                nodeCode.append(indent+meshName+".getFaces().addAll(");
-            } else if (i!=0) {
-                nodeCode.append(',');
-            }
-            nodeCode.append(mesh.getFaces().get(i));
-        }
-        nodeCode.append(");\n");
-        nodeCode.append("    }\n    private static void method" + (methodCount++) + "(){\n");
-        nodeCode.append(indent+meshName+".getFaceSmoothingGroups().ensureCapacity("+mesh.getFaceSmoothingGroups().size()+");\n");
-        nodeCode.append(indent+meshName+".getFaceSmoothingGroups().addAll(");
-        for (int i = 0; i < mesh.getFaceSmoothingGroups().size(); i++) {
-            if (i!=0) nodeCode.append(',');
-            nodeCode.append(mesh.getFaceSmoothingGroups().get(i));
-        }
-        nodeCode.append(");\n");
-
-//        nodeCode.append(indent+varName+".setMesh("+process((TriangleMesh)node.getMesh())+");\n");
-    }
-
-    private void process(String indent, String varName, PhongMaterial material) {
-        final int index = materialCount ++;
-        final String materialName = "MATERIAL_"+index;
-
-        nodeCode.append(indent + "PhongMaterial " + materialName + " = new PhongMaterial();\n");
-        nodeCode.append(indent + materialName + ".setDiffuseColor(" + toCode(material.getDiffuseColor()) + ");\n");
-        String specColor = toCode(material.getSpecularColor());
-        if (specColor!=null) nodeCode.append(indent + materialName + ".setSpecularColor(" + specColor + ");\n");
-        nodeCode.append(indent + materialName + ".setSpecularPower("+material.getSpecularPower()+");\n");
-        if (material.getDiffuseMap() != null) {
-            nodeCode.append(indent + "try {\n");
-            nodeCode.append(indent + "    " + materialName + ".setDiffuseMap("+toString(material.getDiffuseMap())+");\n");
-            nodeCode.append(indent + "} catch (NullPointerException npe) {\n");
-            nodeCode.append(indent + "    System.err.println(\"Could not load texture resource ["+material.getDiffuseMap().impl_getUrl()+"]\");\n");
-            nodeCode.append(indent + "}\n");
-        }
-        if (material.getBumpMap() != null) {
-            nodeCode.append(indent + materialName + ".setBumpMap("+toString(material.getBumpMap())+");\n");
-        }
-        if (material.getSpecularMap() != null) {
-            nodeCode.append(indent + materialName + ".setSpecularMap()("+toString(material.getSpecularMap())+");\n");
-        }
-        if (material.getSelfIlluminationMap() != null) {
-            nodeCode.append(indent + materialName + ".setSelfIlluminationMap()("+toString(material.getSelfIlluminationMap())+");\n");
-        }
-        nodeCode.append(indent+varName+".setMaterial("+materialName+");\n");
-    }
-
-    private String toString(Image image) {
-        String url = image.impl_getUrl();
-        if (url.startsWith(baseUrl)) {
-            return  "new Image("+className+".class.getResource(\""+url.substring(baseUrl.length())+"\").toExternalForm())";
-        } else {
-            return "new Image(\""+url+"\")";
-        }
-    }
-
-    private void process(String indent, Timeline timeline) {
-        int count = 0;
-        for (KeyFrame keyFrame: timeline.getKeyFrames()) {
-            if (keyFrame.getValues().isEmpty()) continue;
-            nodeCode.append(indent+"TIMELINE.getKeyFrames().add(new KeyFrame(Duration.millis("+keyFrame.getTime().toMillis()+"d),\n");
-            boolean firstKeyValue = true;
-            for (KeyValue keyValue: keyFrame.getValues()) {
-                if (firstKeyValue) {
-                    firstKeyValue = false;
-                } else {
-                    nodeCode.append(",\n");
-                }
-                String var = writableVarMap.get(keyValue.getTarget());
-                if (var == null) System.err.println("Failed to find writable value in map for : "+keyValue.getTarget());
-                nodeCode.append(indent+"    new KeyValue("+var+","+keyValue.getEndValue()+","+toString(keyValue.getInterpolator())+")");
-            }
-            nodeCode.append("\n"+indent+"));\n");
-
-            if (count > 0 && ((count % 10) == 0)) {
-                nodeCode.append("    }\n    private static void method" + (methodCount++) + "(){\n");
-            }
-            count ++;
-        }
-    }
-
-    private String toString(Interpolator interpolator) {
-//        if (interpolator == Interpolator.DISCRETE || true) {
-        if (interpolator == Interpolator.DISCRETE) {
-            return "Interpolator.DISCRETE";
-        } else if (interpolator == Interpolator.EASE_BOTH) {
-            return "Interpolator.EASE_BOTH";
-        } else if (interpolator == Interpolator.EASE_IN) {
-            return "Interpolator.EASE_IN";
-        } else if (interpolator == Interpolator.EASE_OUT) {
-            return "Interpolator.EASE_OUT";
-        } else if (interpolator == Interpolator.LINEAR) {
-            return "Interpolator.LINEAR";
-        } else if (interpolator instanceof SplineInterpolator) {
-            SplineInterpolator si = (SplineInterpolator)interpolator;
-            return "Interpolator.SPLINE("+si.getX1()+"d,"+si.getY1()+"d,"+si.getX2()+"d,"+si.getY2()+"d)";
-        } else if (interpolator instanceof NumberTangentInterpolator) {
-            NumberTangentInterpolator ti = (NumberTangentInterpolator)interpolator;
-            return "Interpolator.TANGENT(Duration.millis("+ TickCalculation.toMillis((long)ti.getInTicks())+"d),"+ti.getInValue()
-                    +"d,Duration.millis("+TickCalculation.toMillis((long)ti.getInTicks())+"d),"+ti.getOutValue()+"d)";
-        } else {
-            throw new UnsupportedOperationException("Unknown Interpolator type: "+interpolator.getClass());
-        }
-    }
-
-    private String toCode(Color color) {
-        return color == null ? null : "new Color("+color.getRed()+","+color.getGreen()+","+color.getBlue()+","+color.getOpacity()+")";
-    }
-}
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/height2normal/Height2NormalApp.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,216 +0,0 @@
-/*
- * Copyright (c) 2010, 2013 Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.javafx.experiments.height2normal;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-
-import javax.imageio.ImageIO;
-
-import javafx.animation.KeyFrame;
-import javafx.animation.KeyValue;
-import javafx.animation.Timeline;
-import javafx.application.Application;
-import javafx.beans.binding.ObjectBinding;
-import javafx.beans.property.SimpleObjectProperty;
-import javafx.embed.swing.SwingFXUtils;
-import javafx.scene.Group;
-import javafx.scene.PerspectiveCamera;
-import javafx.scene.Scene;
-import javafx.scene.SubScene;
-import javafx.scene.control.Button;
-import javafx.scene.control.CheckBox;
-import javafx.scene.control.Label;
-import javafx.scene.control.Separator;
-import javafx.scene.control.Slider;
-import javafx.scene.control.ToolBar;
-import javafx.scene.image.Image;
-import javafx.scene.image.ImageView;
-import javafx.scene.layout.HBox;
-import javafx.scene.layout.Priority;
-import javafx.scene.layout.VBox;
-import javafx.scene.paint.Color;
-import javafx.scene.paint.PhongMaterial;
-import javafx.scene.shape.Box;
-import javafx.scene.transform.Rotate;
-import javafx.scene.transform.Translate;
-import javafx.stage.FileChooser;
-import javafx.stage.Stage;
-import javafx.util.Duration;
-
-import com.javafx.experiments.jfx3dviewer.AutoScalingGroup;
-
-/**
- * Gui Util App for converting Heights 2 Normals
- */
-public class Height2NormalApp  extends Application {
-    private Image testImage;
-    private SimpleObjectProperty<Image> heightImage = new SimpleObjectProperty<>();
-    private SimpleObjectProperty<Image> normalImage = new SimpleObjectProperty<>();
-    private File heightFile;
-    private Stage stage;
-
-    @Override public void start(Stage stage) throws Exception {
-        this.stage = stage;
-
-        // load test image
-        // testImage = new Image(Height2NormalApp.class.getResource("javafx-heightmap.jpg").toExternalForm());
-        testImage = new Image(Height2NormalApp.class.getResource("/com/javafx/experiments/jfx3dviewer/blue.jpg").toExternalForm());
-        heightImage.set(testImage);
-
-        // create toolbar
-        ToolBar toolBar = new ToolBar();
-        Button openButton = new Button("Open...");
-        openButton.setOnAction(event -> open());
-        Button saveButton = new Button("Save...");
-        saveButton.setOnAction(event -> save());
-        final CheckBox invertCheckBox = new CheckBox("invert");
-        final Slider scaleSlider = new Slider(1,50,2);
-        toolBar.getItems().addAll(openButton,saveButton,
-                                  new Separator(),
-                                  invertCheckBox,
-                                  new Separator(),
-                                  new Label("Scale:"),scaleSlider);
-
-        // bind creation of normal image
-        normalImage.bind(
-                new ObjectBinding<Image>() {
-                    { bind(heightImage, invertCheckBox.selectedProperty(), scaleSlider.valueProperty()); }
-                    @Override protected Image computeValue() {
-                        return Height2NormalConverter.convertToNormals(heightImage.get(), invertCheckBox.isSelected(), scaleSlider.getValue());
-                    }
-                });
-
-        // build stage
-        VBox root = new VBox();
-        HBox views = new HBox();
-        VBox.setVgrow(views, Priority.ALWAYS);
-        root.getChildren().addAll(toolBar, views);
-
-        ImageView srcImageView = new ImageView();
-        srcImageView.setFitWidth(512);
-        srcImageView.setFitHeight(512);
-        srcImageView.imageProperty().bind(heightImage);
-        ImageView dstImageView = new ImageView();
-        dstImageView.setFitWidth(512);
-        dstImageView.setFitHeight(512);
-        dstImageView.imageProperty().bind(normalImage);
-        views.getChildren().addAll(srcImageView,dstImageView,new View3D().create());
-
-        Scene scene = new Scene(root);
-        stage.setScene(scene);
-        stage.show();
-    }
-
-    public void open() {
-        FileChooser fileChooser = new FileChooser();
-        heightFile = fileChooser.showOpenDialog(stage);
-        if (heightFile != null) {
-            try {
-                heightImage.set(new Image(heightFile.toURI().toURL().toExternalForm()));
-            } catch (MalformedURLException e) {
-                e.printStackTrace();
-            }
-        } else {
-            heightImage.set(testImage);
-        }
-    }
-
-    public void save() {
-        FileChooser fileChooser = new FileChooser();
-        if (heightFile != null) {
-            String filePath = heightFile.getName();
-            fileChooser.setInitialFileName(filePath.substring(0,filePath.lastIndexOf('.'))+"-normal-map.png");
-        } else {
-            fileChooser.setInitialFileName("normal-map.png");
-        }
-        File normalFile = fileChooser.showSaveDialog(stage);
-        if (normalFile != null) {
-            try {
-                ImageIO.write(SwingFXUtils.fromFXImage(normalImage.get(),null),"png",normalFile);
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    public static void main(String[] args) {
-        launch(args);
-    }
-
-    private class View3D {
-        private final Group root3D = new Group();
-        private final PerspectiveCamera camera = new PerspectiveCamera(true);
-        private final Rotate cameraXRotate = new Rotate(-40,0,0,0,Rotate.X_AXIS);
-        private final Rotate cameraYRotate = new Rotate(-20,0,0,0,Rotate.Y_AXIS);
-        private final Rotate cameraLookXRotate = new Rotate(0,0,0,0,Rotate.X_AXIS);
-        private final Rotate cameraLookZRotate = new Rotate(0,0,0,0,Rotate.Z_AXIS);
-        private final Translate cameraPosition = new Translate(0,0,-7);
-        private AutoScalingGroup autoScalingGroup = new AutoScalingGroup(2);
-
-        public SubScene create() {
-            SubScene scene = new SubScene(root3D,512,512,true,null);
-            scene.setFill(Color.ALICEBLUE);
-
-            // CAMERA
-            camera.getTransforms().addAll(
-                    cameraXRotate,
-                    cameraYRotate,
-                    cameraPosition,
-                    cameraLookXRotate,
-                    cameraLookZRotate);
-            camera.setNearClip(0.1);
-            camera.setFarClip(100);
-            scene.setCamera(camera);
-            root3D.getChildren().addAll(camera, autoScalingGroup);
-
-            Box box = new Box(10,0.11,10);
-
-            PhongMaterial material = new PhongMaterial(Color.DODGERBLUE);
-            material.bumpMapProperty().bind(normalImage);
-            box.setMaterial(material);
-
-            autoScalingGroup.getChildren().add(box);
-
-            Timeline timeline = new Timeline(
-                    new KeyFrame(Duration.ZERO, new KeyValue(cameraYRotate.angleProperty(),0)),
-                    new KeyFrame(Duration.seconds(10), new KeyValue(cameraYRotate.angleProperty(),360))
-            );
-            timeline.setCycleCount(Timeline.INDEFINITE);
-            timeline.play();
-
-            return scene;
-        }
-    }
-}
-
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/height2normal/Height2NormalConverter.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2010, 2013 Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.javafx.experiments.height2normal;
-
-import javafx.geometry.Point3D;
-import javafx.scene.image.Image;
-import javafx.scene.image.PixelFormat;
-import javafx.scene.image.PixelReader;
-import javafx.scene.image.WritableImage;
-
-/**
- * Util class to convert height maps into normal maps
- */
-public class Height2NormalConverter {
-    public static Image convertToNormals(Image heightMap, boolean invert, double scale) {
-        final int w = (int)heightMap.getWidth();
-        final int h = (int)heightMap.getHeight();
-        final byte[] heightPixels = new byte[w*h*4];
-        final byte[] normalPixels = new byte[w*h*4];
-        // get pixels
-        final PixelReader reader = heightMap.getPixelReader();
-        reader.getPixels(0, 0, w, h, PixelFormat.getByteBgraInstance(),heightPixels,0,w*4);
-        if (invert) {
-            for (int y=0; y<h; y++) {
-                for (int x=0; x<w; x++) {
-                    final int pixelIndex = (y*w*4) + (x*4);
-                    heightPixels[pixelIndex] = (byte)(255-Byte.toUnsignedInt(heightPixels[pixelIndex]));
-                    heightPixels[pixelIndex+1] = (byte)(255-Byte.toUnsignedInt(heightPixels[pixelIndex+1]));
-                    heightPixels[pixelIndex+2] = (byte)(255-Byte.toUnsignedInt(heightPixels[pixelIndex+2]));
-                    heightPixels[pixelIndex+3] = heightPixels[pixelIndex+3];
-                }
-            }
-        }
-        // generate normal map
-        for (int y=0; y<h; y++) {
-            for (int x=0; x<w; x++) {
-                final int yAbove = Math.max(0,y-1);
-                final int yBelow = Math.min(h - 1, y + 1);
-                final int xLeft = Math.max(0, x - 1);
-                final int xRight = Math.min(w - 1, x + 1);
-                final int pixelIndex = (y*w*4) + (x*4);
-                final int pixelAboveIndex = (yAbove*w*4) + (x*4);
-                final int pixelBelowIndex = (yBelow*w*4) + (x*4);
-                final int pixelLeftIndex = (y*w*4) + (xLeft*4);
-                final int pixelRightIndex = (y*w*4) + (xRight*4);
-                final int pixelAboveHeight = Byte.toUnsignedInt(heightPixels[pixelAboveIndex]);
-                final int pixelBelowHeight = Byte.toUnsignedInt(heightPixels[pixelBelowIndex]);
-                final int pixelLeftHeight = Byte.toUnsignedInt(heightPixels[pixelLeftIndex]);
-                final int pixelRightHeight = Byte.toUnsignedInt(heightPixels[pixelRightIndex]);
-
-                Point3D pixelAbove = new Point3D(x,yAbove,pixelAboveHeight);
-                Point3D pixelBelow = new Point3D(x,yBelow,pixelBelowHeight);
-                Point3D pixelLeft = new Point3D(xLeft,y,pixelLeftHeight);
-                Point3D pixelRight = new Point3D(xRight,y,pixelRightHeight);
-                Point3D H = pixelLeft.subtract(pixelRight);
-                Point3D V = pixelAbove.subtract(pixelBelow);
-                Point3D normal = H.crossProduct(V);
-                // normalize normal
-                normal = new Point3D(
-                        normal.getX()/w,
-                        normal.getY()/h,
-                        normal.getZ()
-                );
-                // it seems there is lots of ways to calculate the Z element of normal map, 3 options here
-//                normalPixels[pixelIndex] = (byte)((normal.getZ()*128)+128); // Option 1
-                normalPixels[pixelIndex] = (byte)(255-(normal.getZ() * scale)); // Option 2
-//                normalPixels[pixelIndex] = (byte)255; // Option 3
-                normalPixels[pixelIndex+1] = (byte)((normal.getY()*128)+128);
-                normalPixels[pixelIndex+2] = (byte)((normal.getX()*128)+128);
-                normalPixels[pixelIndex+3] = (byte)255;
-            }
-        }
-        // create output image
-        final WritableImage outImage = new WritableImage(w,h);
-        outImage.getPixelWriter().setPixels(0,0,w,h,PixelFormat.getByteBgraInstance(),normalPixels,0,w*4);
-        return outImage;
-    }
-}
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/Importer.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.javafx.experiments.importers;
-
-import java.io.IOException;
-import javafx.animation.Timeline;
-import javafx.scene.Group;
-
-public abstract class Importer {
-    /**
-     * Loads the 3D file
-     * 
-     * @param url The url of the 3D file to load
-     * @param asPolygonMesh When true load as a PolygonMesh if the loader 
-     * supports. 
-     * @throws IOException If issue loading file
-     */
-    public abstract void load(String url, boolean asPolygonMesh) throws IOException; 
-    /**
-     * Gets the 3D node that was loaded earlier through the load() call
-     * @return The loaded node
-     */
-    public abstract Group getRoot();
-    /**
-     * Tests if the given 3D file extension is supported (e.g. "ma", "ase", 
-     * "obj", "fxml", "dae"). 
-     * 
-     * @param supportType The file extension (e.g. "ma", "ase", "obj", "fxml", 
-     * "dae")
-     * @return True if the extension is of a supported type. False otherwise.
-     */
-    public abstract boolean isSupported(String supportType);
-    /**
-     * Can be overridden to return a timeline animation for the 3D file
-     * @return A timeline animation. Null if there is no timeline animation.
-     */
-    public Timeline getTimeline() {
-        return null;
-    }
-}
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/Importer3D.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,154 +0,0 @@
-/*
- * Copyright (c) 2010, 2014 Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.javafx.experiments.importers;
-
-import java.io.IOException;
-import java.net.URL;
-import java.net.URLClassLoader;
-
-import javafx.animation.Timeline;
-import javafx.fxml.FXMLLoader;
-import javafx.scene.Node;
-import javafx.scene.shape.MeshView;
-import javafx.scene.shape.TriangleMesh;
-import javafx.util.Pair;
-
-import java.util.ServiceLoader;
-
-/**
- * Base Importer for all supported 3D file formats
- */
-public final class Importer3D {
-
-    /**
-     * Get array of extension filters for supported file formats.
-     *
-     * @return array of extension filters for supported file formats.
-     */
-    public static String[] getSupportedFormatExtensionFilters() {
-        return new String[]{"*.ma", "*.ase", "*.obj", "*.fxml", "*.dae"};
-    }
-
-    /**
-     * Load a 3D file, always loaded as TriangleMesh.
-     *
-     * @param fileUrl The url of the 3D file to load
-     * @return The loaded Node which could be a MeshView or a Group
-     * @throws IOException if issue loading file
-     */
-    public static Node load(String fileUrl) throws IOException {
-        return load(fileUrl,false);
-    }
-
-    /**
-     * Load a 3D file.
-     *
-     * @param fileUrl The url of the 3D file to load
-     * @param asPolygonMesh When true load as a PolygonMesh if the loader supports
-     * @return The loaded Node which could be a MeshView or a Group
-     * @throws IOException if issue loading file
-     */
-    public static Node load(String fileUrl, boolean asPolygonMesh) throws IOException {
-        return loadIncludingAnimation(fileUrl,asPolygonMesh).getKey();
-    }
-
-    /**
-     * Load a 3D file.
-     *
-     * @param fileUrl The url of the 3D file to load
-     * @param asPolygonMesh When true load as a PolygonMesh if the loader supports
-     * @return The loaded Node which could be a MeshView or a Group and the Timeline animation
-     * @throws IOException if issue loading file
-     */
-    public static Pair<Node,Timeline> loadIncludingAnimation(String fileUrl, boolean asPolygonMesh) throws IOException {
-        // get extension
-        final int dot = fileUrl.lastIndexOf('.');
-        if (dot <= 0) {
-            throw new IOException("Unknown 3D file format, url missing extension [" + fileUrl + "]");
-        }
-        final String extension = fileUrl.substring(dot + 1, fileUrl.length()).toLowerCase();
-        // Reference all the importer jars
-        ImporterFinder finder = new ImporterFinder();
-        URLClassLoader classLoader = finder.addUrlToClassPath();
-        
-        ServiceLoader<Importer> servantLoader = ServiceLoader.load(Importer.class, classLoader);
-        // Check if we have an implementation for this file type
-        Importer importer = null;
-        for (Importer plugin : servantLoader) {
-            if (plugin.isSupported(extension)) {
-                importer = plugin;
-                break;
-            }
-        }
-
-        // Check well known loaders that might not be in a jar (ie. running from an IDE)
-        if ((importer == null) && (!extension.equals("fxml"))){
-            String [] names = {
-                 "com.javafx.experiments.importers.dae.DaeImporter",
-                 "com.javafx.experiments.importers.max.MaxLoader",
-                 "com.javafx.experiments.importers.maya.MayaImporter",
-                 "com.javafx.experiments.importers.obj.ObjOrPolyObjImporter",
-            };
-            boolean fail = true;
-            for (String name : names) {
-                try {
-                    Class<?> clazz = Class.forName(name);
-                    Object obj = clazz.newInstance();
-                    if (obj instanceof Importer) {
-                        Importer plugin = (Importer) obj;
-                        if (plugin.isSupported(extension)) {
-                            importer = plugin;
-                            fail = false;
-                            break;
-                        }
-                    }
-                } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
-                    // FAIL SILENTLY
-                }
-            }
-            if (fail) throw new IOException("Unknown 3D file format [" + extension + "]");
-        }
-        
-        if (extension.equals("fxml")) {
-            final Object fxmlRoot = FXMLLoader.load(new URL(fileUrl));
-            if (fxmlRoot instanceof Node) {
-                return new Pair<>((Node) fxmlRoot, null);
-            } else if (fxmlRoot instanceof TriangleMesh) {
-                return new Pair<>(new MeshView((TriangleMesh) fxmlRoot), null);
-            }
-            throw new IOException("Unknown object in FXML file [" + fxmlRoot.getClass().getName() + "]");
-        } else {
-            importer.load(fileUrl, asPolygonMesh);
-            return new Pair<>(importer.getRoot(), importer.getTimeline());
-        }
-    }
-}
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/ImporterFinder.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.javafx.experiments.importers;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.List;
-
-public class ImporterFinder {
-
-    public URLClassLoader addUrlToClassPath() {
-        final Class<?> referenceClass = ImporterFinder.class;
-        final URL url = referenceClass.getProtectionDomain().getCodeSource().getLocation();
-
-        File libDir = null;
-        try {
-            File currentDir = new File(url.toURI()).getParentFile();
-            libDir = new File(currentDir, "lib");
-        } catch (URISyntaxException ue) {
-            ue.printStackTrace();
-            throw new RuntimeException("Could not import library. Failed to determine library location. URL = " + url.getPath());
-        }
-        if (libDir != null) {
-            File[] files = libDir.listFiles();
-            final List<URL> urlList = new ArrayList<>();
-            if (files != null) {
-                for (File file : files) {
-                    try {
-                        urlList.add(file.toURI().toURL());
-                    } catch (MalformedURLException me) {
-                        me.printStackTrace();
-                    }
-                }
-            }
-            URLClassLoader cl = new URLClassLoader((URL[]) urlList.toArray(new URL[0]), this.getClass().getClassLoader());
-            return cl;
-        } else {
-            throw new RuntimeException("Could not import library. Failed to determine importer library location ");
-        }
-    }
-}
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/Optimizer.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,566 +0,0 @@
-/*
- * Copyright (c) 2013, Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.javafx.experiments.importers;
-
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javafx.animation.Interpolator;
-import javafx.animation.KeyFrame;
-import javafx.animation.KeyValue;
-import javafx.animation.Timeline;
-import javafx.beans.property.Property;
-import javafx.beans.value.WritableValue;
-import javafx.collections.FXCollections;
-import javafx.collections.ObservableFloatArray;
-import javafx.collections.ObservableIntegerArray;
-import javafx.collections.ObservableList;
-import javafx.collections.transformation.SortedList;
-import javafx.geometry.Point2D;
-import javafx.geometry.Point3D;
-import javafx.scene.Group;
-import javafx.scene.Node;
-import javafx.scene.Parent;
-import javafx.scene.shape.MeshView;
-import javafx.scene.shape.TriangleMesh;
-import javafx.scene.transform.Transform;
-import javafx.util.Duration;
-
-/**
- * Optimizer to take 3D model and timeline loaded by one of the importers and do as much optimization on
- * the scene graph that was create as we can while still being able to play the given animation.
- */
-public class Optimizer {
-
-    private Timeline timeline;
-    private Node root;
-    private Set<Transform> bound = new HashSet<>();
-    private List<Parent> emptyParents = new ArrayList<>();
-    private List<MeshView> meshViews = new ArrayList<>();
-    private boolean convertToDiscrete = true;
-
-    public Optimizer(Timeline timeline, Node root) {
-        this(timeline, root, false);
-    }
-
-    public Optimizer(Timeline timeline, Node root, boolean convertToDiscrete) {
-        this.timeline = timeline;
-        this.root = root;
-        this.convertToDiscrete = convertToDiscrete;
-    }
-
-    private int trRemoved, trTotal, groupsTotal, trCandidate, trEmpty;
-
-    public void optimize() {
-        trRemoved = 0;
-        trTotal = 0;
-        trCandidate = 0;
-        trEmpty = 0;
-        groupsTotal = 0;
-        emptyParents.clear();
-
-        parseTimeline();
-        optimize(root);
-        removeEmptyGroups();
-        optimizeMeshes();
-
-        System.out.printf("removed %d (%.2f%%) out of total %d transforms\n", trRemoved, 100d * trRemoved / trTotal, trTotal);
-        System.out.printf("there are %d more multiplications that can be done of matrices that never change\n", trCandidate);
-        System.out.printf("there are %d (%.2f%%) out of total %d groups with no transforms in them\n", trEmpty, 100d * trEmpty / groupsTotal, groupsTotal);
-    }
-
-    private void optimize(Node node) {
-        ObservableList<Transform> transforms = node.getTransforms();
-        Iterator<Transform> iterator = transforms.iterator();
-        boolean prevIsStatic = false;
-        while (iterator.hasNext()) {
-            Transform transform = iterator.next();
-            trTotal++;
-            if (transform.isIdentity()) {
-                if (timeline == null || !bound.contains(transform)) {
-                    iterator.remove();
-                    trRemoved++;
-                }
-            } else {
-                if (timeline == null || !bound.contains(transform)) {
-                    if (prevIsStatic) {
-                        trCandidate++;
-                    }
-                    prevIsStatic = true;
-                } else {
-                    prevIsStatic = false;
-                }
-            }
-        }
-        if (node instanceof Parent) {
-            groupsTotal++;
-            Parent p = (Parent) node;
-            for (Node n : p.getChildrenUnmodifiable()) {
-                optimize(n);
-            }
-            if (transforms.isEmpty()) {
-                Parent parent = p.getParent();
-                if (parent instanceof Group) {
-                    trEmpty++;
-//                    System.out.println("Empty group = " + node.getId());
-                    emptyParents.add(p);
-                } else {
-//                    System.err.println("parent is not group = " + parent);
-                }
-            }
-        }
-        if (node instanceof MeshView) {
-            meshViews.add((MeshView) node);
-        }
-    }
-
-    private void optimizeMeshes() {
-        optimizePoints();
-        optimizeTexCoords();
-        optimizeFaces();
-    }
-
-    private void optimizeFaces() {
-        int total = 0, sameIndexes = 0, samePoints = 0, smallArea = 0;
-        ObservableIntegerArray newFaces = FXCollections.observableIntegerArray();
-        ObservableIntegerArray newFaceSmoothingGroups = FXCollections.observableIntegerArray();
-        for (MeshView meshView : meshViews) {
-            TriangleMesh mesh = (TriangleMesh) meshView.getMesh();
-            ObservableIntegerArray faces = mesh.getFaces();
-            ObservableIntegerArray faceSmoothingGroups = mesh.getFaceSmoothingGroups();
-            ObservableFloatArray points = mesh.getPoints();
-            newFaces.clear();
-            newFaces.ensureCapacity(faces.size());
-            newFaceSmoothingGroups.clear();
-            newFaceSmoothingGroups.ensureCapacity(faceSmoothingGroups.size());
-            int pointElementSize = mesh.getPointElementSize();
-            int faceElementSize = mesh.getFaceElementSize();
-            for (int i = 0; i < faces.size(); i += faceElementSize) {
-                total++;
-                int i1 = faces.get(i) * pointElementSize;
-                int i2 = faces.get(i + 2) * pointElementSize;
-                int i3 = faces.get(i + 4) * pointElementSize;
-                if (i1 == i2 || i1 == i3 || i2 == i3) {
-                    sameIndexes++;
-                    continue;
-                }
-                Point3D p1 = new Point3D(points.get(i1), points.get(i1 + 1), points.get(i1 + 2));
-                Point3D p2 = new Point3D(points.get(i2), points.get(i2 + 1), points.get(i2 + 2));
-                Point3D p3 = new Point3D(points.get(i3), points.get(i3 + 1), points.get(i3 + 2));
-                if (p1.equals(p2) || p1.equals(p3) || p2.equals(p3)) {
-                    samePoints++;
-                    continue;
-                }
-                double a = p1.distance(p2);
-                double b = p2.distance(p3);
-                double c = p3.distance(p1);
-                double p = (a + b + c) / 2;
-                double sqarea = p * (p - a) * (p - b) * (p - c);
-
-                final float DEAD_FACE = 1.f/1024/1024/1024/1024; // taken from MeshNormal code
-
-                if (sqarea < DEAD_FACE) {
-                    smallArea++;
-//                    System.out.printf("a = %e, b = %e, c = %e, sqarea = %e\n"
-//                            + "p1 = %s\np2 = %s\np3 = %s\n", a, b, c, sqarea, p1.toString(), p2.toString(), p3.toString());
-                    continue;
-                }
-                newFaces.addAll(faces, i, faceElementSize);
-                int fIndex = i / faceElementSize;
-                if (fIndex < faceSmoothingGroups.size()) {
-                    newFaceSmoothingGroups.addAll(faceSmoothingGroups.get(fIndex));
-                }
-            }
-            faces.setAll(newFaces);
-            faceSmoothingGroups.setAll(newFaceSmoothingGroups);
-            faces.trimToSize();
-            faceSmoothingGroups.trimToSize();
-        }
-        int badTotal = sameIndexes + samePoints + smallArea;
-        System.out.printf("Removed %d (%.2f%%) faces with same point indexes, "
-                + "%d (%.2f%%) faces with same points, "
-                + "%d (%.2f%%) faces with small area. "
-                + "Total %d (%.2f%%) bad faces out of %d total.\n",
-                sameIndexes, 100d * sameIndexes / total,
-                samePoints, 100d * samePoints / total,
-                smallArea, 100d * smallArea / total,
-                badTotal, 100d * badTotal / total, total);
-    }
-
-    private void optimizePoints() {
-        int total = 0, duplicates = 0, check = 0;
-
-        Map<Point3D, Integer> pp = new HashMap<>();
-        ObservableIntegerArray reindex = FXCollections.observableIntegerArray();
-        ObservableFloatArray newPoints = FXCollections.observableFloatArray();
-
-        for (MeshView meshView : meshViews) {
-            TriangleMesh mesh = (TriangleMesh) meshView.getMesh();
-            ObservableFloatArray points = mesh.getPoints();
-            int pointElementSize = mesh.getPointElementSize();
-            int os = points.size() / pointElementSize;
-
-            pp.clear();
-            newPoints.clear();
-            newPoints.ensureCapacity(points.size());
-            reindex.clear();
-            reindex.resize(os);
-
-            for (int i = 0, oi = 0, ni = 0; i < points.size(); i += pointElementSize, oi++) {
-                float x = points.get(i);
-                float y = points.get(i + 1);
-                float z = points.get(i + 2);
-                Point3D p = new Point3D(x, y, z);
-                Integer index = pp.get(p);
-                if (index == null) {
-                    pp.put(p, ni);
-                    reindex.set(oi, ni);
-                    newPoints.addAll(x, y, z);
-                    ni++;
-                } else {
-                    reindex.set(oi, index);
-                }
-            }
-
-            int ns = newPoints.size() / pointElementSize;
-
-            int d = os - ns;
-            duplicates += d;
-            total += os;
-
-            points.setAll(newPoints);
-            points.trimToSize();
-
-            ObservableIntegerArray faces = mesh.getFaces();
-            for (int i = 0; i < faces.size(); i += 2) {
-                faces.set(i, reindex.get(faces.get(i)));
-            }
-
-//            System.out.printf("There are %d (%.2f%%) duplicate points out of %d total for mesh '%s'.\n",
-//                    d, 100d * d / os, os, meshView.getId());
-
-            check += mesh.getPoints().size() / pointElementSize;
-        }
-        System.out.printf("There are %d (%.2f%%) duplicate points out of %d total.\n",
-                duplicates, 100d * duplicates / total, total);
-        System.out.printf("Now we have %d points.\n", check);
-    }
-
-    private void optimizeTexCoords() {
-        int total = 0, duplicates = 0, check = 0;
-
-        Map<Point2D, Integer> pp = new HashMap<>();
-        ObservableIntegerArray reindex = FXCollections.observableIntegerArray();
-        ObservableFloatArray newTexCoords = FXCollections.observableFloatArray();
-
-        for (MeshView meshView : meshViews) {
-            TriangleMesh mesh = (TriangleMesh) meshView.getMesh();
-            ObservableFloatArray texcoords = mesh.getTexCoords();
-            int texcoordElementSize = mesh.getTexCoordElementSize();
-            int os = texcoords.size() / texcoordElementSize;
-
-            pp.clear();
-            newTexCoords.clear();
-            newTexCoords.ensureCapacity(texcoords.size());
-            reindex.clear();
-            reindex.resize(os);
-
-            for (int i = 0, oi = 0, ni = 0; i < texcoords.size(); i += texcoordElementSize, oi++) {
-                float x = texcoords.get(i);
-                float y = texcoords.get(i + 1);
-                Point2D p = new Point2D(x, y);
-                Integer index = pp.get(p);
-                if (index == null) {
-                    pp.put(p, ni);
-                    reindex.set(oi, ni);
-                    newTexCoords.addAll(x, y);
-                    ni++;
-                } else {
-                    reindex.set(oi, index);
-                }
-            }
-
-            int ns = newTexCoords.size() / texcoordElementSize;
-
-            int d = os - ns;
-            duplicates += d;
-            total += os;
-
-            texcoords.setAll(newTexCoords);
-            texcoords.trimToSize();
-
-            ObservableIntegerArray faces = mesh.getFaces();
-            for (int i = 1; i < faces.size(); i += 2) {
-                faces.set(i, reindex.get(faces.get(i)));
-            }
-
-//            System.out.printf("There are %d (%.2f%%) duplicate texcoords out of %d total for mesh '%s'.\n",
-//                    d, 100d * d / os, os, meshView.getId());
-
-            check += mesh.getTexCoords().size() / texcoordElementSize;
-        }
-        System.out.printf("There are %d (%.2f%%) duplicate texcoords out of %d total.\n",
-                duplicates, 100d * duplicates / total, total);
-        System.out.printf("Now we have %d texcoords.\n", check);
-    }
-
-    private void cleanUpRepeatingFramesAndValues() {
-        ObservableList<KeyFrame> timelineKeyFrames = timeline.getKeyFrames().sorted(new KeyFrameComparator());
-//        Timeline timeline;
-        int kfTotal = timelineKeyFrames.size(), kfRemoved = 0;
-        int kvTotal = 0, kvRemoved = 0;
-        Map<Duration, KeyFrame> kfUnique = new HashMap<>();
-        Map<WritableValue, KeyValue> kvUnique = new HashMap<>();
-        MapOfLists<KeyFrame, KeyFrame> duplicates = new MapOfLists<>();
-        Iterator<KeyFrame> iterator = timelineKeyFrames.iterator();
-        while (iterator.hasNext()) {
-            KeyFrame duplicate = iterator.next();
-            KeyFrame original = kfUnique.put(duplicate.getTime(), duplicate);
-            if (original != null) {
-                kfRemoved++;
-                iterator.remove(); // removing duplicate keyFrame
-                duplicates.add(original, duplicate);
-
-                kfUnique.put(duplicate.getTime(), original);
-            }
-            kvUnique.clear();
-            for (KeyValue kvDup : duplicate.getValues()) {
-                kvTotal++;
-                KeyValue kvOrig = kvUnique.put(kvDup.getTarget(), kvDup);
-                if (kvOrig != null) {
-                    kvRemoved++;
-                    if (!kvOrig.getEndValue().equals(kvDup.getEndValue()) && kvOrig.getTarget() == kvDup.getTarget()) {
-                        System.err.println("KeyValues set different values for KeyFrame " + duplicate.getTime() + ":"
-                                + "\n kvOrig = " + kvOrig + ", \nkvDup = " + kvDup);
-                    }
-                }
-            }
-        }
-        for (KeyFrame orig : duplicates.keySet()) {
-            List<KeyValue> keyValues = new ArrayList<>();
-            for (KeyFrame dup : duplicates.get(orig)) {
-                keyValues.addAll(dup.getValues());
-            }
-            timelineKeyFrames.set(timelineKeyFrames.indexOf(orig),
-                    new KeyFrame(orig.getTime(), keyValues.toArray(new KeyValue[keyValues.size()])));
-        }
-        System.out.printf("Removed %d (%.2f%%) duplicate KeyFrames out of total %d.\n",
-                kfRemoved, 100d * kfRemoved / kfTotal, kfTotal);
-        System.out.printf("Identified %d (%.2f%%) duplicate KeyValues out of total %d.\n",
-                kvRemoved, 100d * kvRemoved / kvTotal, kvTotal);
-    }
-
-    private static class KeyInfo {
-        KeyFrame keyFrame;
-        KeyValue keyValue;
-        boolean first;
-
-        public KeyInfo(KeyFrame keyFrame, KeyValue keyValue) {
-            this.keyFrame = keyFrame;
-            this.keyValue = keyValue;
-            first = false;
-        }
-
-        public KeyInfo(KeyFrame keyFrame, KeyValue keyValue, boolean first) {
-            this.keyFrame = keyFrame;
-            this.keyValue = keyValue;
-            this.first = first;
-        }
-    }
-
-    private static class MapOfLists<K, V> extends HashMap<K, List<V>> {
-
-        public void add(K key, V value) {
-            List<V> p = get(key);
-            if (p == null) {
-                p = new ArrayList<>();
-                put(key, p);
-            }
-            p.add(value);
-        }
-    }
-    
-    private void parseTimeline() {
-        bound.clear();
-        if (timeline == null) {
-            return;
-        }
-//        cleanUpRepeatingFramesAndValues(); // we don't need it usually as timeline is initially correct
-        SortedList<KeyFrame> sortedKeyFrames = timeline.getKeyFrames().sorted(new KeyFrameComparator());
-        MapOfLists<KeyFrame, KeyValue> toRemove = new MapOfLists<>();
-        Map<WritableValue, KeyInfo> prevValues = new HashMap<>();
-        Map<WritableValue, KeyInfo> prevPrevValues = new HashMap<>();
-        int kvTotal = 0;
-        for (KeyFrame keyFrame : sortedKeyFrames) {
-            for (KeyValue keyValue : keyFrame.getValues()) {
-                WritableValue<?> target = keyValue.getTarget();
-                KeyInfo prev = prevValues.get(target);
-                kvTotal++;
-                if (prev != null && prev.keyValue.getEndValue().equals(keyValue.getEndValue())) {
-//                if (prev != null && (prev.keyValue.equals(keyValue) || (prev.first && prev.keyValue.getEndValue().equals(keyValue.getEndValue())))) {
-                    KeyInfo prevPrev = prevPrevValues.get(target);
-                    if ((prevPrev != null && prevPrev.keyValue.getEndValue().equals(keyValue.getEndValue()))
-                            || (prev.first && target.getValue().equals(prev.keyValue.getEndValue()))) {
-                        // All prevPrev, prev and current match, so prev can be removed
-                        // or prev is first and its value equals to the property existing value, so prev can be removed
-                        toRemove.add(prev.keyFrame, prev.keyValue);
-                    } else {
-                        prevPrevValues.put(target, prev);
-//                        KeyInfo oldKeyInfo = prevPrevValues.put(target, prev);
-//                        if (oldKeyInfo != null && oldKeyInfo.keyFrame.getTime().equals(prev.keyFrame.getTime())) {
-//                            System.err.println("prevPrev replaced more than once per keyFrame on " + target + "\n"
-//                                    + "old = " + oldKeyInfo.keyFrame.getTime() + ", " + oldKeyInfo.keyValue + "\n"
-//                                    + "new = " + prev.keyFrame.getTime() + ", " + prev.keyValue
-//                                    );
-//                        }
-                    }
-                }
-                KeyInfo oldPrev = prevValues.put(target, new KeyInfo(keyFrame, keyValue, prev == null));
-                if (oldPrev != null) prevPrevValues.put(target, oldPrev);
-            }
-        }
-        // Deal with ending keyValues
-        for (WritableValue target : prevValues.keySet()) {
-            KeyInfo prev = prevValues.get(target);
-            KeyInfo prevPrev = prevPrevValues.get(target);
-            if (prevPrev != null && prevPrev.keyValue.getEndValue().equals(prev.keyValue.getEndValue())) {
-                // prevPrev and prev match, so prev can be removed
-                toRemove.add(prev.keyFrame, prev.keyValue);
-            }
-        }
-        int kvRemoved = 0;
-        int kfRemoved = 0, kfTotal = timeline.getKeyFrames().size(), kfSimplified = 0, kfNotRemoved = 0;
-        // Removing unnecessary KeyValues and KeyFrames
-        List<KeyValue> newKeyValues = new ArrayList<>();
-        for (int i = 0; i < timeline.getKeyFrames().size(); i++) {
-            KeyFrame keyFrame = timeline.getKeyFrames().get(i);
-            List<KeyValue> keyValuesToRemove = toRemove.get(keyFrame);
-            if (keyValuesToRemove != null) {
-                newKeyValues.clear();
-                for (KeyValue keyValue : keyFrame.getValues()) {
-                    if (keyValuesToRemove.remove(keyValue)) {
-                        kvRemoved++;
-                    } else {
-                        if (convertToDiscrete) {
-                            newKeyValues.add(new KeyValue((WritableValue)keyValue.getTarget(), keyValue.getEndValue(), Interpolator.DISCRETE));
-                        } else {
-                            newKeyValues.add(keyValue);
-                        }
-                    }
-                }
-            } else if (convertToDiscrete) {
-                newKeyValues.clear();
-                for (KeyValue keyValue : keyFrame.getValues()) {
-                    newKeyValues.add(new KeyValue((WritableValue)keyValue.getTarget(), keyValue.getEndValue(), Interpolator.DISCRETE));
-                }
-            }
-            if (keyValuesToRemove != null || convertToDiscrete) {
-                if (newKeyValues.isEmpty()) {
-                    if (keyFrame.getOnFinished() == null) {
-                        if (keyFrame.getName() != null) {
-                            System.err.println("Removed KeyFrame with name = " + keyFrame.getName());
-                        }
-                        timeline.getKeyFrames().remove(i);
-                        i--;
-                        kfRemoved++;
-                        continue; // for i
-                    } else {
-                        kfNotRemoved++;
-                    }
-                } else {
-                    keyFrame = new KeyFrame(keyFrame.getTime(), keyFrame.getName(), keyFrame.getOnFinished(), newKeyValues);
-                    timeline.getKeyFrames().set(i, keyFrame);
-                    kfSimplified++;
-                }
-            }
-            // collecting bound targets
-            for (KeyValue keyValue : keyFrame.getValues()) {
-                WritableValue<?> target = keyValue.getTarget();
-                if (target instanceof Property) {
-                    Property p = (Property) target;
-                    Object bean = p.getBean();
-                    if (bean instanceof Transform) {
-                        bound.add((Transform) bean);
-                    } else {
-                        throw new UnsupportedOperationException("Bean is not transform, bean = " + bean);
-                    }
-                } else {
-                    throw new UnsupportedOperationException("WritableValue is not property, can't identify what it changes, target = " + target);
-                }
-            }
-        }
-//        System.out.println("bound.size() = " + bound.size());
-        System.out.printf("Removed %d (%.2f%%) repeating KeyValues out of total %d.\n", kvRemoved, 100d * kvRemoved / kvTotal, kvTotal);
-        System.out.printf("Removed %d (%.2f%%) and simplified %d (%.2f%%) KeyFrames out of total %d. %d (%.2f%%) were not removed due to event handler attached.\n",
-                kfRemoved, 100d * kfRemoved / kfTotal,
-                kfSimplified, 100d * kfSimplified / kfTotal, kfTotal, kfNotRemoved, 100d * kfNotRemoved / kfTotal);
-        int check = 0;
-        for (KeyFrame keyFrame : timeline.getKeyFrames()) {
-            check += keyFrame.getValues().size();
-//            for (KeyValue keyValue : keyFrame.getValues()) {
-//                if (keyValue.getInterpolator() != Interpolator.DISCRETE) {
-//                    throw new IllegalStateException();
-//                }
-//            }
-        }
-        System.out.printf("Now there are %d KeyValues and %d KeyFrames.\n", check, timeline.getKeyFrames().size());
-    }
-
-    private void removeEmptyGroups() {
-        for (Parent p : emptyParents) {
-            Parent parent = p.getParent();
-            Group g = (Group) parent;
-            g.getChildren().addAll(p.getChildrenUnmodifiable());
-            g.getChildren().remove(p);
-        }
-    }
-
-    private static class KeyFrameComparator implements Comparator<KeyFrame> {
-
-        public KeyFrameComparator() {
-        }
-
-        @Override public int compare(KeyFrame o1, KeyFrame o2) {
-//            int compareTo = o1.getTime().compareTo(o2.getTime());
-//            if (compareTo == 0 && o1 != o2) {
-//                System.err.println("those two KeyFrames are equal: o1 = " + o1.getTime() + " and o2 = " + o2.getTime());
-//            }
-            return o1.getTime().compareTo(o2.getTime());
-        }
-    }
-
-}
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/SmoothingGroups.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,312 +0,0 @@
-/*
- * Copyright (c) 2010, 2013 Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.javafx.experiments.importers;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.BitSet;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Queue;
-import com.sun.javafx.geom.Vec3f;
-import javafx.scene.shape.TriangleMesh;
-
-/** Util for converting Normals to Smoothing Groups */
-public class SmoothingGroups {
-    private BitSet visited, notVisited;
-    private Queue<Integer> q;
-
-    private int[][] faces;
-    private int[][] faceNormals;
-    private float[] normals;
-    
-    private Edge[][] faceEdges;
-
-    public SmoothingGroups(int faces[][], int[][] faceNormals, float[] normals) {
-        this.faces = faces;
-        this.faceNormals = faceNormals;
-        this.normals = normals;
-        visited = new BitSet(faces.length);
-        notVisited = new BitSet(faces.length);
-        notVisited.set(0, faces.length, true);
-        q = new LinkedList<Integer>();
-    }
-
-    // edge -> [faces]
-    private List<Integer> getNextConnectedComponent(Map<Edge, List<Integer>> adjacentFaces) {
-        int index = notVisited.previousSetBit(faces.length - 1);
-        q.add(index);
-        visited.set(index);
-        notVisited.set(index, false);
-        List<Integer> res = new ArrayList<Integer>();
-        while (!q.isEmpty()) {
-            Integer faceIndex = q.remove();
-            res.add(faceIndex);
-            for (Edge edge : faceEdges[faceIndex]) {
-                List<Integer> adjFaces = adjacentFaces.get(edge);
-                if (adjFaces == null) {
-                    continue;
-                }
-                Integer adjFaceIndex = adjFaces.get(adjFaces.get(0).equals(faceIndex) ? 1 : 0);
-                if (!visited.get(adjFaceIndex)) {
-                    q.add(adjFaceIndex);
-                    visited.set(adjFaceIndex);
-                    notVisited.set(adjFaceIndex, false);
-                }
-            }
-        }
-        return res;
-    }
-
-    private boolean hasNextConnectedComponent() {
-        return !notVisited.isEmpty();
-    }
-
-    private void computeFaceEdges() {
-        faceEdges = new Edge[faces.length][];
-        for (int f = 0; f < faces.length; f++) {
-            int[] face = faces[f];
-            int[] faceNormal = faceNormals[f];
-            int n = face.length/2;
-            faceEdges[f] = new Edge[n];
-            int from = face[(n-1) * 2];
-            int fromNormal = faceNormal[n-1];
-            for (int i = 0; i < n; i++) {
-                int to = face[i * 2];
-                int toNormal = faceNormal[i];
-                Edge edge = new Edge(from, to, fromNormal, toNormal);
-                faceEdges[f][i] = edge;
-                from = to;
-                fromNormal = toNormal;
-            }
-        }
-    }
-    
-    private Map<Edge, List<Integer>> getAdjacentFaces() {
-        Map<Edge, List<Integer>> adjacentFaces = new HashMap<Edge, List<Integer>>();
-        for (int f = 0; f < faceEdges.length; f++) {
-            for (Edge edge : faceEdges[f]) {
-                if (!adjacentFaces.containsKey(edge)) {
-                    adjacentFaces.put(edge, new ArrayList<Integer>());
-                }
-                adjacentFaces.get(edge).add(f);
-            }
-        }
-        for (Iterator<Map.Entry<Edge, List<Integer>>> it = adjacentFaces.entrySet().iterator(); it.hasNext(); ) {
-            Map.Entry<Edge, List<Integer>> e = it.next();
-            if (e.getValue().size() != 2) {
-                // just skip them
-                it.remove();
-            }
-        }
-        return adjacentFaces;
-    }
-
-    Vec3f getNormal(int index) {
-        return new Vec3f(normals[index * 3], normals[index * 3 + 1], normals[index * 3 + 2]);
-    }
-    
-    private static final float normalAngle = 0.9994f; // cos(2)
-
-    private static boolean isNormalsEqual(Vec3f n1, Vec3f n2) {
-        if (n1.x == 1.0e20f || n1.y == 1.0e20f || n1.z == 1.0e20f
-                || n2.x == 1.0e20f || n2.y == 1.0e20f || n2.z == 1.0e20f) {
-            //System.out.println("unlocked normal found, skipping");
-            return false;
-        }
-        Vec3f myN1 = new Vec3f(n1);
-        myN1.normalize();
-        Vec3f myN2 = new Vec3f(n2);
-        myN2.normalize();
-        return myN1.dot(myN2) >= normalAngle;
-    }
-
-    private Map<Edge, List<Integer>> getSmoothEdges(Map<Edge, List<Integer>> adjacentFaces) {
-        Map<Edge, List<Integer>> smoothEdges = new HashMap<Edge, List<Integer>>();
-
-        for (int face = 0; face < faceEdges.length; face++) {
-            for (Edge edge : faceEdges[face]) {
-                List<Integer> adjFaces = adjacentFaces.get(edge);
-                if (adjFaces == null || adjFaces.size() != 2) {
-                    // could happen when we skip edges!
-                    continue;
-                }
-                int adjFace = adjFaces.get(adjFaces.get(0) == face ? 1 : 0);
-                Edge[] adjFaceEdges = faceEdges[adjFace];
-                int adjEdgeInd = Arrays.asList(adjFaceEdges).indexOf(edge);
-                if (adjEdgeInd == -1) {
-                    System.out.println("Can't find edge " + edge + " in face " + adjFace);
-                    System.out.println(Arrays.asList(adjFaceEdges));
-                    continue;
-                }
-                Edge adjEdge = adjFaceEdges[adjEdgeInd];
-
-                if (edge.isSmooth(adjEdge)) {
-                    if (!smoothEdges.containsKey(edge)) {
-                        smoothEdges.put(edge, adjFaces);
-                    }
-                }
-            }
-        }
-        return smoothEdges;
-    }
-
-    private List<List<Integer>> calcConnComponents(Map<Edge, List<Integer>> smoothEdges) {
-        //System.out.println("smoothEdges = " + smoothEdges);
-        List<List<Integer>> groups = new ArrayList<List<Integer>>();
-        while (hasNextConnectedComponent()) {
-            List<Integer> smoothGroup = getNextConnectedComponent(smoothEdges);
-            groups.add(smoothGroup);
-        }
-        return groups;
-    }
-
-    private int[] generateSmGroups(List<List<Integer>> groups) {
-        int[] smGroups = new int[faceNormals.length];
-        int curGroup = 0;
-        for (int i = 0; i < groups.size(); i++) {
-            List<Integer> list = groups.get(i);
-            if (list.size() == 1) {
-                smGroups[list.get(0)] = 0;
-            } else {
-                for (int j = 0; j < list.size(); j++) {
-                    Integer faceIndex = list.get(j);
-                    smGroups[faceIndex] = 1 << curGroup;
-                }
-                if (curGroup++ == 31) {
-                    curGroup = 0;
-                }
-            }
-        }
-        return smGroups;
-    }
-
-    private int[] calcSmoothGroups() {
-        computeFaceEdges();
-        
-        // edge -> [faces]
-        Map<Edge, List<Integer>> adjacentFaces = getAdjacentFaces();
-
-        // smooth edge -> [faces]
-        Map<Edge, List<Integer>> smoothEdges = getSmoothEdges(adjacentFaces);
-
-        //System.out.println("smoothEdges = " + smoothEdges);
-        List<List<Integer>> groups = calcConnComponents(smoothEdges);
-
-        return generateSmGroups(groups);
-    }
-    
-    private class Edge {
-        int from, to;
-        int fromNormal, toNormal;
-
-        public Edge(int from, int to, int fromNormal, int toNormal) {
-            this.from = Math.min(from, to);
-            this.to = Math.max(from, to);
-            this.fromNormal = Math.min(fromNormal, toNormal);
-            this.toNormal = Math.max(fromNormal, toNormal);
-        }
-        
-        public boolean isSmooth(Edge edge) {
-            boolean smooth = (isNormalsEqual(getNormal(fromNormal), getNormal(edge.fromNormal)) && isNormalsEqual(getNormal(toNormal), getNormal(edge.toNormal))) ||
-                    (isNormalsEqual(getNormal(fromNormal), getNormal(edge.toNormal)) && isNormalsEqual(getNormal(toNormal), getNormal(edge.fromNormal)));
-            return smooth;
-        }
-
-        @Override
-        public int hashCode() {
-            int hash = 7;
-            hash = 41 * hash + this.from;
-            hash = 41 * hash + this.to;
-            return hash;
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            if (obj == null) {
-                return false;
-            }
-            if (getClass() != obj.getClass()) {
-                return false;
-            }
-            final Edge other = (Edge) obj;
-            if (this.from != other.from) {
-                return false;
-            }
-            if (this.to != other.to) {
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Calculates smoothing groups for data formatted in PolygonMesh style
-     * @param faces An array of faces, where each face consists of an array of vertex and uv indices
-     * @param faceNormals An array of face normals, where each face normal consists of an array of normal indices
-     * @param normals The array of normals
-     * @return An array of smooth groups, where the length of the array is the number of faces
-     */
-    public static int[] calcSmoothGroups(int[][] faces, int[][] faceNormals, float[] normals) {
-        SmoothingGroups smoothGroups = new SmoothingGroups(faces, faceNormals, normals);
-        return smoothGroups.calcSmoothGroups();
-    }
-    
-    /**
-     * Calculates smoothing groups for data formatted in TriangleMesh style
-     * @param flatFaces An array of faces, where each triangle face is represented by 6 (vertex and uv) indices
-     * @param flatFaceNormals An array of face normals, where each triangle face is represented by 3 normal indices
-     * @param normals The array of normals
-     * @return An array of smooth groups, where the length of the array is the number of faces
-     */
-    public static int[] calcSmoothGroups(TriangleMesh mesh, int[] flatFaces, int[] flatFaceNormals, float[] normals) {
-        int faceElementSize = mesh.getFaceElementSize();
-        int[][] faces = new int[flatFaces.length/faceElementSize][faceElementSize];
-        for (int f = 0; f < faces.length; f++) {
-            for (int e = 0; e < faceElementSize; e++) {
-                faces[f][e] = flatFaces[f * faceElementSize + e];
-            }
-        }
-        int pointElementSize = mesh.getPointElementSize();
-        int[][] faceNormals = new int[flatFaceNormals.length/pointElementSize][pointElementSize];
-        for (int f = 0; f < faceNormals.length; f++) {
-            for (int e = 0; e < pointElementSize; e++) {
-                faceNormals[f][e] = flatFaceNormals[f * pointElementSize + e];
-            }
-        }
-        SmoothingGroups smoothGroups = new SmoothingGroups(faces, faceNormals, normals);
-        return smoothGroups.calcSmoothGroups();
-    }
-}
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/Validator.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2013, Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.javafx.experiments.importers;
-
-import javafx.collections.ObservableIntegerArray;
-import javafx.scene.Node;
-import javafx.scene.Parent;
-import javafx.scene.shape.Mesh;
-import javafx.scene.shape.MeshView;
-import javafx.scene.shape.TriangleMesh;
-
-/**
- * Mesh data validator
- */
-public class Validator {
-
-    public void validate(Node node) {
-        if (node instanceof MeshView) {
-            MeshView meshView = (MeshView) node;
-            validate(meshView.getMesh());
-        } else if (node instanceof Parent) {
-            for (Node child : ((Parent) node).getChildrenUnmodifiable()) {
-                validate(child);
-            }
-        }
-    }
-
-    public void validate(Mesh mesh) {
-        if (!(mesh instanceof TriangleMesh)) {
-            throw new AssertionError("Mesh is not TriangleMesh: " + mesh.getClass() + ", mesh = " + mesh);
-        }
-        TriangleMesh tMesh = (TriangleMesh) mesh;
-        int numPoints = tMesh.getPoints().size() / tMesh.getPointElementSize();
-        int numTexCoords = tMesh.getTexCoords().size() / tMesh.getTexCoordElementSize();
-        int numFaces = tMesh.getFaces().size() / tMesh.getFaceElementSize();
-        if (numPoints == 0 || numPoints * tMesh.getPointElementSize() != tMesh.getPoints().size()) {
-            throw new AssertionError("Points array size is not correct: " + tMesh.getPoints().size());
-        }
-        if (numTexCoords == 0 || numTexCoords * tMesh.getTexCoordElementSize() != tMesh.getTexCoords().size()) {
-            throw new AssertionError("TexCoords array size is not correct: " + tMesh.getPoints().size());
-        }
-        if (numFaces == 0 || numFaces * tMesh.getFaceElementSize() != tMesh.getFaces().size()) {
-            throw new AssertionError("Faces array size is not correct: " + tMesh.getPoints().size());
-        }
-        if (numFaces != tMesh.getFaceSmoothingGroups().size() && tMesh.getFaceSmoothingGroups().size() > 0) {
-            throw new AssertionError("FaceSmoothingGroups array size is not correct: " + tMesh.getPoints().size() + ", numFaces = " + numFaces);
-        }
-        ObservableIntegerArray faces = tMesh.getFaces();
-        for (int i = 0; i < faces.size(); i += 2) {
-            int pIndex = faces.get(i);
-            if (pIndex < 0 || pIndex > numPoints) {
-                throw new AssertionError("Incorrect point index: " + pIndex + ", numPoints = " + numPoints);
-            }
-            int tcIndex = faces.get(i + 1);
-            if (tcIndex < 0 || tcIndex > numTexCoords) {
-                throw new AssertionError("Incorrect texCoord index: " + tcIndex + ", numTexCoords = " + numTexCoords);
-            }
-        }
-//        System.out.println("Validation successfull of " + mesh);
-    }
-
-}
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/dae/DaeImporter.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,468 +0,0 @@
-/*
- * Copyright (c) 2010, 2014 Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.javafx.experiments.importers.dae;
-
-import com.javafx.experiments.importers.Importer;
-import javafx.geometry.Point3D;
-import javafx.scene.*;
-import javafx.scene.paint.Color;
-import javafx.scene.shape.MeshView;
-import javafx.scene.shape.TriangleMesh;
-import javafx.scene.transform.*;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-import com.javafx.experiments.shape3d.PolygonMesh;
-import com.javafx.experiments.shape3d.PolygonMeshView;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import java.io.*;
-import java.util.*;
-
-/**
- * Loader for ".dae" 3D files
- *
- * Notes:
- *
- *  - Assume Y is up for now
- *  - Assume 1 Unit = 1 FX Unit
- */
-@SuppressWarnings("UnusedDeclaration")
-public class DaeImporter extends Importer {
-    private Group rootNode = new Group();
-    private Camera firstCamera = null;
-    private double firstCameraAspectRatio = 4/3;
-    private Map<String,Camera> cameras = new HashMap<>();
-    private Map<String,Object> meshes = new HashMap<>();
-    private  boolean createPolyMesh;
-
-    {
-        // CHANGE FOR Y_UP
-        rootNode.getTransforms().add(new Rotate(180,0,0,0,Rotate.X_AXIS));
-    }
-
-    public DaeImporter() {        
-    }
-    public DaeImporter(String url, boolean createPolyMesh) {
-        load(url, createPolyMesh);
-    }
-
-    public DaeImporter(File file, boolean createPolyMesh) {
-        this.createPolyMesh = createPolyMesh;
-        try {
-            SAXParserFactory factory = SAXParserFactory.newInstance();
-            SAXParser saxParser = factory.newSAXParser();
-            saxParser.parse(file, new DaeSaxParser());
-        } catch (ParserConfigurationException | SAXException | IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-    public DaeImporter(InputStream in, boolean createPolyMesh) {
-        this.createPolyMesh = createPolyMesh;
-        try {
-            SAXParserFactory factory = SAXParserFactory.newInstance();
-            SAXParser saxParser = factory.newSAXParser();
-            saxParser.parse(in, new DaeSaxParser());
-        } catch (ParserConfigurationException | SAXException | IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-    public Scene createScene(int width) {
-        Scene scene = new Scene(rootNode,width,(int)(width/firstCameraAspectRatio),true);
-        if (firstCamera!=null) scene.setCamera(firstCamera);
-        scene.setFill(Color.BEIGE);
-        return scene;
-    }
-
-    public Camera getFirstCamera() {
-        return firstCamera;
-    }
-
-    @Override
-    public Group getRoot() {
-        return rootNode;
-    }
-
-    @Override
-    public void load(String url, boolean createPolygonMesh) {
-    this.createPolyMesh = createPolygonMesh;
-        long START = System.currentTimeMillis();
-        try {
-            SAXParserFactory factory = SAXParserFactory.newInstance();
-            SAXParser saxParser = factory.newSAXParser();
-            saxParser.parse(url, new DaeSaxParser());
-        } catch (ParserConfigurationException | SAXException | IOException e) {
-            e.printStackTrace();
-        }
-        long END = System.currentTimeMillis();
-        System.out.println("IMPORTED ["+url+"] in  "+((END-START))+"ms");     
-    }
-    
-    @Override
-    public boolean isSupported(String extension) {
-        return extension != null && extension.equals("dae");
-    }
-    private static enum State {
-        UNKNOWN,camera,visual_scene,node,aspect_ratio,xfov,yfov,znear,zfar,instance_camera,instance_geometry,
-        translate,rotate,scale,matrix,float_array,polygons,input,p,vertices,authoring_tool,polylist,vcount}
-
-    private static State state(String name) {
-        try {
-            return State.valueOf(name);
-        } catch (Exception e) {
-            return State.UNKNOWN;
-        }
-    }
-
-    private class DaeSaxParser extends DefaultHandler {
-        private State state = State.UNKNOWN;
-        private String authoringTool;
-        private LinkedList<DaeNode> nodes = new LinkedList<>();
-        private StringBuilder charBuf;
-        private Map<String,String> currentId = new HashMap<>();
-        private Map<String,float[]> floatArrays = new HashMap<>();
-        private Map<String,Input> inputs = new HashMap<>();
-        private int[] vCounts;
-        private List<int[]> pLists = new ArrayList<>();
-        private List<Transform> currentTransforms;
-        private Double xfov,yfov,znear,zfar,aspect_ratio;
-
-        @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
-            state = state(qName);
-            currentId.put(qName,attributes.getValue("id"));
-            charBuf = new StringBuilder();
-            switch(state) {
-                case camera:
-                    aspect_ratio = xfov = yfov = znear = zfar = null;
-                    break;
-                case visual_scene:
-                    rootNode.setId(attributes.getValue("name"));
-                    DaeNode rootDaeNode = new DaeNode(attributes.getValue("id"),attributes.getValue("name"));
-                    rootDaeNode.group = rootNode;
-                    nodes.push(rootDaeNode);
-                    break;
-                case node:
-                    currentTransforms = new ArrayList<>();
-                    nodes.push(new DaeNode(attributes.getValue("id"),attributes.getValue("name")));
-                    break;
-                case instance_camera:
-                    nodes.peek().instance_camera = cameras.get(attributes.getValue("url").substring(1));
-                    break;
-                case instance_geometry:
-                    nodes.peek().instance_geometry = meshes.get(attributes.getValue("url").substring(1));
-                    break;
-                case polygons:
-                case polylist:
-                    inputs.clear();
-                    pLists.clear();
-                    break;
-                case input:
-                    Input input = new Input(
-                            attributes.getValue("offset")!=null? Integer.parseInt(attributes.getValue("offset")): 0,
-                            attributes.getValue("semantic"),
-                            attributes.getValue("source"));
-                    inputs.put(input.semantic,input);
-                    break;
-            }
-        }
-
-        @Override public void endElement(String uri, String localName, String qName) throws SAXException {
-            switch(state(qName)) {
-                case node:
-                    DaeNode thisNode = nodes.pop();
-                    if (thisNode.isCamera()) { // IS CAMERA
-                        thisNode.instance_camera.setId(thisNode.name);
-                        thisNode.instance_camera.getTransforms().addAll(currentTransforms);
-                        nodes.peek().getGroup().getChildren().add(thisNode.instance_camera);
-                    } else if (thisNode.isMesh()) { // IS MESH VIEW
-                        Node meshView;
-                        if (thisNode.instance_geometry instanceof PolygonMesh) {
-                            meshView = new PolygonMeshView((PolygonMesh)thisNode.instance_geometry);
-                        } else {
-                            meshView = new MeshView((TriangleMesh)thisNode.instance_geometry);
-                        }
-                        meshView.setId(thisNode.name);
-                        meshView.getTransforms().addAll(currentTransforms);
-                        nodes.peek().getGroup().getChildren().add(meshView);
-                    } else { // IS GROUP
-                        Group group = thisNode.getGroup();
-                        group.setId(thisNode.name);
-                        group.getTransforms().addAll(currentTransforms);
-                        nodes.peek().getGroup().getChildren().add(group);
-                    }
-                    break;
-                case aspect_ratio:
-                    aspect_ratio = Double.parseDouble(charBuf.toString().trim());
-                    // workaround for Cheetah3D which seems to have it backwards
-                    if ("Cheetah3D".equals(authoringTool)) aspect_ratio = 1/aspect_ratio;
-                    break;
-                case xfov:
-                    yfov = Double.parseDouble(charBuf.toString().trim());
-                    break;
-                case yfov:
-                    yfov = Double.parseDouble(charBuf.toString().trim());
-                    break;
-                case znear:
-                    znear = Double.parseDouble(charBuf.toString().trim());
-                    break;
-                case zfar:
-                    zfar = Double.parseDouble(charBuf.toString().trim());
-                    break;
-                case camera:
-                    PerspectiveCamera camera = new PerspectiveCamera(true);
-                    if (yfov != null) {
-                        camera.setVerticalFieldOfView(true);
-                        camera.setFieldOfView(yfov);
-                    } else if (xfov != null) {
-                        camera.setVerticalFieldOfView(false);
-                        camera.setFieldOfView(xfov);
-                    }
-                    if (znear != null) camera.setNearClip(znear);
-                    if (zfar != null) camera.setFarClip(zfar);
-                    cameras.put(currentId.get("camera"), camera);
-                    if (firstCamera==null) {
-                        firstCamera = camera;
-                        if (aspect_ratio != null) firstCameraAspectRatio = aspect_ratio;
-                    }
-                    break;
-                case translate:
-                    String[] tv = charBuf.toString().trim().split("\\s+");
-                    currentTransforms.add(new Translate(
-                        Double.parseDouble(tv[0].trim()),
-                        Double.parseDouble(tv[1].trim()),
-                        Double.parseDouble(tv[2].trim())
-                    ));
-                    break;
-                case rotate:
-                    String[] rv = charBuf.toString().trim().split("\\s+");
-                    currentTransforms.add(new Rotate(
-                        Double.parseDouble(rv[3].trim()),
-                        0,0,0,
-                        new Point3D(
-                            Double.parseDouble(rv[0].trim()),
-                            Double.parseDouble(rv[1].trim()),
-                            Double.parseDouble(rv[2].trim())
-                        )
-                    ));
-                    break;
-                case scale:
-                    String[] sv = charBuf.toString().trim().split("\\s+");
-                    currentTransforms.add(new Scale(
-                        Double.parseDouble(sv[0].trim()),
-                        Double.parseDouble(sv[1].trim()),
-                        Double.parseDouble(sv[2].trim()),
-                        0,0,0
-                    ));
-                    break;
-                case matrix:
-                    String[] mv = charBuf.toString().trim().split("\\s+");
-                    currentTransforms.add(new Affine(
-                        Double.parseDouble(mv[0].trim()), // mxx
-                        Double.parseDouble(mv[1].trim()), // mxy
-                        Double.parseDouble(mv[2].trim()), // mxz
-                        Double.parseDouble(mv[3].trim()), // tx
-                        Double.parseDouble(mv[4].trim()), // myx
-                        Double.parseDouble(mv[5].trim()), // myy
-                        Double.parseDouble(mv[6].trim()), // myz
-                        Double.parseDouble(mv[7].trim()), // ty
-                        Double.parseDouble(mv[8].trim()), // mzx
-                        Double.parseDouble(mv[9].trim()), // mzy
-                        Double.parseDouble(mv[10].trim()), // mzz
-                        Double.parseDouble(mv[11].trim()) // tz
-                    ));
-                    break;
-                case float_array:
-                    String[] numbers = charBuf.toString().trim().split("\\s+");
-                    float[] array = new float[numbers.length];
-                    for(int i=0;i<numbers.length;i++) {
-                        array[i] = Float.parseFloat(numbers[i].trim());
-                    }
-                    floatArrays.put(currentId.get("source"), array);
-                    break;
-                case p:
-                    numbers = charBuf.toString().trim().split("\\s+");
-                    int[] iArray = new int[numbers.length];
-                    for(int i=0;i<numbers.length;i++) {
-                        iArray[i] = Integer.parseInt(numbers[i].trim());
-                    }
-                    pLists.add(iArray);
-                    break;
-                case polygons:
-                    // create mesh put in map
-                    if(createPolyMesh) {
-                        Input vertexInput = inputs.get("VERTEX");
-                        Input texInput = inputs.get("TEXCOORD");
-                        float[] points = floatArrays.get(vertexInput.source.substring(1));
-                        float[] texCoords = floatArrays.get(texInput.source.substring(1));
-                        int[][] faces = new int[pLists.size()][];
-                        for(int f=0;f<faces.length;f++) {
-                            faces[f] = pLists.get(f);
-                        }
-                        PolygonMesh mesh = new PolygonMesh(points,texCoords,faces);
-                        meshes.put(currentId.get("geometry"),mesh);
-                    } else {
-                        TriangleMesh mesh = new TriangleMesh();
-                        meshes.put(currentId.get("geometry"),mesh);
-                        throw new UnsupportedOperationException("Need to implement TriangleMesh creation");
-                    }
-                    break;
-                case vertices:
-                    // put vertex float into map again with new ID
-                    String sourceId = inputs.get("POSITION").source.substring(1);
-                    float[] points = floatArrays.get(sourceId);
-                    floatArrays.put(
-                            currentId.get("vertices"),
-                            points);
-                    break;
-                case authoring_tool:
-                    authoringTool = charBuf.toString().trim();
-                    break;
-                case vcount:
-                    numbers = charBuf.toString().trim().split("\\s+");
-                    vCounts = new int[numbers.length];
-                    for(int i=0;i<numbers.length;i++) {
-                        vCounts[i] = Integer.parseInt(numbers[i].trim());
-                    }
-                    break;
-                case polylist:
-                    // create mesh put in map
-                    if(createPolyMesh) {
-                        int faceStep = 1;
-                        Input vertexInput = inputs.get("VERTEX");
-                        if (vertexInput!=null && (vertexInput.offset+1) > faceStep) faceStep = vertexInput.offset+1;
-                        Input texInput = inputs.get("TEXCOORD");
-                        if (texInput!=null && (texInput.offset+1) > faceStep) faceStep = texInput.offset+1;
-                        Input normalInput = inputs.get("NORMAL");
-                        if (normalInput!=null && (normalInput.offset+1) > faceStep) faceStep = normalInput.offset+1;
-                        points = floatArrays.get(vertexInput.source.substring(1));
-                        float[] texCoords;
-                        if (texInput==null) {
-                            texCoords = new float[]{0,0};
-                        } else {
-                            texCoords = floatArrays.get(texInput.source.substring(1));
-                        }
-                        int[][] faces = new int[vCounts.length][];
-                        int[] p = pLists.get(0);
-                        int faceIndex = 0;
-                        for(int f=0;f<faces.length;f++) {
-                            final int numOfVertex = vCounts[f];
-                            final int[] face = new int[numOfVertex*2];
-                            for(int v=0;v<numOfVertex;v++) {
-                                final int vertexIndex =faceIndex+(v*faceStep);
-                                face[v*2] = p[vertexIndex+vertexInput.offset];
-                                face[(v*2)+1] = (texInput==null) ? 0 : p[vertexIndex+texInput.offset];
-                            }
-                            faces[f] = face;
-                            faceIndex += numOfVertex*faceStep;
-                        }
-                        PolygonMesh mesh = new PolygonMesh(points,texCoords,faces);
-                        meshes.put(currentId.get("geometry"),mesh);
-                    } else {
-                        TriangleMesh mesh = new TriangleMesh();
-                        meshes.put(currentId.get("geometry"),mesh);
-                        throw new UnsupportedOperationException("Need to implement TriangleMesh creation");
-                    }
-                    break;
-            }
-        }
-
-        @Override public void characters(char[] ch, int start, int length) throws SAXException {
-            charBuf.append(ch,start,length);
-        }
-    }
-
-    private static final class Input {
-        public final int offset;
-        public final String semantic;
-        public final String source;
-
-        private Input(int offset, String semantic, String source) {
-            this.offset = offset;
-            this.semantic = semantic;
-            this.source = source;
-        }
-
-        @Override public String toString() {
-            return "Input{" +
-                    "offset=" + offset +
-                    ", semantic='" + semantic + '\'' +
-                    ", source='" + source + '\'' +
-                    '}';
-        }
-    }
-
-    /** So far a node can be one of camera, geometry or group */
-    private static final class DaeNode {
-        private final String id;
-        private final String name;
-        private Camera instance_camera;
-        private Object instance_geometry;
-        private Group group;
-
-        private DaeNode(String id, String name) {
-            this.id = id;
-            this.name = name;
-        }
-
-        public boolean isCamera() {
-            return instance_camera !=null;
-        }
-
-        public boolean isMesh() {
-            return instance_geometry !=null;
-        }
-
-        public boolean isGroup() {
-            return instance_camera == null && instance_geometry == null;
-        }
-
-        public Group getGroup() {
-            if(group ==null) group = new Group();
-            return group;
-        }
-
-        @Override public String toString() {
-            return "DaeNode{" +
-                    "id='" + id + '\'' +
-                    ", name='" + name + '\'' +
-                    ", instance_camera=" + instance_camera +
-                    ", instance_geometry=" + instance_geometry +
-                    ", group=" + group +
-                    '}';
-        }
-    }
-
-}
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/max/MaxAseParser.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,429 +0,0 @@
-/*
- * Copyright (c) 2010, 2013 Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.javafx.experiments.importers.max;
-
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import com.javafx.experiments.importers.max.MaxAseTokenizer.Callback;
-import com.javafx.experiments.importers.max.MaxData.CameraNode;
-import com.javafx.experiments.importers.max.MaxData.GeomNode;
-import com.javafx.experiments.importers.max.MaxData.LightNode;
-import com.javafx.experiments.importers.max.MaxData.MappingChannel;
-import com.javafx.experiments.importers.max.MaxData.Material;
-import com.javafx.experiments.importers.max.MaxData.Mesh;
-import com.javafx.experiments.importers.max.MaxData.Node;
-import com.javafx.experiments.importers.max.MaxData.NodeTM;
-
-/** Max .ase file parser */
-public class MaxAseParser {
-
-    public MaxData data = new MaxData();
-
-    private Node addNode(Node n, String name) {
-        n.name = name;
-        data.roots.put(name, n);
-        data.nodes.put(name, n);
-        return n;
-    }
-
-    private static void attachChild(Node parent, Node n) {
-        if (parent.children == null)
-            parent.children = new ArrayList<>();
-        n.parent = parent;
-        parent.children.add(n);
-    }
-
-    private void attachNode(Node n, String parentName) {
-        Node parent = data.nodes.get(parentName);
-        if (parent != null) {
-            attachChild(parent, n);
-            data.roots.remove(n.name);
-        }
-    }
-
-    public MaxAseParser(InputStream stream) throws IOException {
-        process(stream);
-    }
-
-    public MaxAseParser(String file) throws IOException {
-        try (FileInputStream fileInputStream = new FileInputStream(file)) {
-            process(fileInputStream);
-        }
-    }
-
-    private void process(InputStream stream) throws IOException {
-        MaxAseTokenizer.parse(stream, new FileParserCallback());
-    }
-
-    private class FileParserCallback extends MaxAseTokenizer.Callback {
-        void onValue(String name, Callback.ParamList list) {}
-
-        Callback onObject(String name, Callback.ParamList list) {
-            switch (name) {
-                case "*SCENE":
-                    return this;
-                case "*MATERIAL_LIST":
-                    return new MaterialListParser();
-                case "*LIGHTOBJECT":
-                    return new LightNodeParser();
-                case "*CAMERAOBJECT":
-                    return new CameraNodeParser();
-                case "*HELPEROBJECT":
-                    return new NodeParser();
-                case "*GEOMOBJECT":
-                    return new GeomNodeParser();
-
-            }
-            return MaxAseTokenizer.CallbackNOP.instance;
-        }
-    }
-
-    private class MaterialListParser extends Callback {
-        final int MAP_ID_DIFFUSE = 0;
-        Material current;
-        int currentMapId;
-
-        void onValue(String name, Callback.ParamList list) {
-            switch (name) {
-                case "*MATERIAL_COUNT":
-                    data.materials = new Material[list.nextInt()];
-                    break;
-
-                case "*MATERIAL_NAME":
-                    current.name = list.nextString();
-                    break;
-                case "*BITMAP":
-                    switch (currentMapId) {
-                        case MAP_ID_DIFFUSE:
-                            current.diffuseMap = list.nextString();
-                    }
-                    break;
-                case "*MATERIAL_AMBIENT":
-                    current.ambientColor = list.nextVector();
-                    break;
-                case "*MATERIAL_DIFFUSE":
-                    current.diffuseColor = list.nextVector();
-                    break;
-                case "*MATERIAL_SPECULAR":
-                    current.specularColor = list.nextVector();
-                    break;
-
-            }
-        }
-
-        Callback onObject(String name, Callback.ParamList list) {
-            switch (name) {
-                case "*MATERIAL":
-                    current = new Material();
-                    data.materials[list.nextInt()] = current;
-                    break;
-
-                case "*MAP_DIFFUSE":
-                    currentMapId = MAP_ID_DIFFUSE;
-                    break;
-            }
-            return this;
-        }
-    }
-
-    private static class NodeTMParser extends Callback {
-        NodeTM nodeTm;
-
-        public NodeTMParser(NodeTM newNodeTm) {
-            nodeTm = newNodeTm;
-        }
-
-        void onValue(String name, Callback.ParamList list) {
-            switch (name) {
-                case "*NODE_NAME":
-                    nodeTm.name = list.nextString(); break;
-                case "*TM_ROW0":
-                    nodeTm.tm[0] = list.nextVector(); break;
-                case "*TM_ROW1":
-                    nodeTm.tm[1] = list.nextVector(); break;
-                case "*TM_ROW2":
-                    nodeTm.tm[2] = list.nextVector(); break;
-                case "*TM_ROW3":
-                    nodeTm.pos = list.nextVector(); break;
-            }
-        }
-    }
-
-    private abstract class NodeParserBase extends MaxAseTokenizer.Callback {
-        void onValue(String name, Callback.ParamList list) {
-            switch (name) {
-                case "*NODE_NAME":
-                    addNode(createNode(), list.nextString()); break;
-                case "*NODE_PARENT":
-                    attachNode(getNode(), list.nextString()); break;
-            }
-        }
-
-        Callback onObject(String name, Callback.ParamList list) {
-            switch (name) {
-                case "*NODE_TM": return new NodeTMParser(addNodeTm());
-            }
-            return MaxAseTokenizer.CallbackNOP.instance;
-        }
-
-        abstract Node createNode();
-
-        abstract Node getNode();
-
-        NodeTM addNodeTm() { return getNode().nodeTM = new NodeTM(); }
-    }
-
-    private class LightNodeParser extends NodeParserBase {
-        LightNode n;
-
-        Node createNode() { return n = new LightNode(); }
-
-        Node getNode() { return n; }
-
-        void onValue(String name, Callback.ParamList list) {
-            switch (name) {
-                case "*LIGHT_INTENS":
-                    n.intensity = list.nextFloat(); break;
-                case "*LIGHT_COLOR":
-                    n.r = list.nextFloat();
-                    n.g = list.nextFloat();
-                    n.b = list.nextFloat();
-                    break;
-                default: super.onValue(name, list);
-            }
-        }
-
-        Callback onObject(String name, Callback.ParamList list) {
-            switch (name) {
-                case "*LIGHT_SETTINGS": return this;
-                default: return super.onObject(name, list);
-            }
-        }
-
-    }
-
-    private class CameraNodeParser extends NodeParserBase {
-        CameraNode node;
-
-        Node createNode() { return node = new CameraNode(); }
-
-        Node getNode() { return node; }
-
-        NodeTM addNodeTm() {
-            NodeTM ntm = new NodeTM();
-            if (node.nodeTM == null) return node.nodeTM = ntm;
-            if (node.target == null) return node.target = ntm;
-            return ntm;
-        }
-
-        void onValue(String name, Callback.ParamList list) {
-            switch (name) {
-                case "*CAMERA_NEAR":
-                    node.near = list.nextFloat(); break;
-                case "*CAMERA_FAR":
-                    node.far = list.nextFloat(); break;
-                case "*CAMERA_FOV":
-                    node.fov = list.nextFloat(); break;
-                default:
-                    super.onValue(name, list);
-            }
-        }
-
-        Callback onObject(String name, Callback.ParamList list) {
-            switch (name) {
-                case "*CAMERA_SETTINGS": return this;
-                default: return super.onObject(name, list);
-            }
-        }
-    }
-
-    private class NodeParser extends NodeParserBase {
-        Node n;
-
-        Node createNode() { return n = new Node(); }
-
-        Node getNode() { return n; }
-    }
-
-    private static class MeshParser extends Callback {
-        Mesh mesh;
-        MappingChannel mapping;
-
-        private MeshParser(Mesh mesh) { this.mesh = mesh; }
-
-        void onValue(String name, Callback.ParamList list) {
-            switch (name) {
-                case "*MESH_NUMVERTEX":
-                    mesh.nPoints = list.nextInt();
-                    mesh.points = new float[mesh.nPoints * 3];
-                    break;
-                case "*MESH_NUMFACES":
-                    mesh.nFaces = list.nextInt();
-                    mesh.faces = new int[mesh.nFaces * 4];
-                    break;
-
-                case "*MESH_NUMTVERTEX":
-                    if (mapping == null)
-                        mapping = getMapping(0);
-                    mapping.ntPoints = list.nextInt();
-                    mapping.tPoints = new float[mapping.ntPoints * 2];
-                    break;
-
-                case "*MESH_NUMTVFACES":
-                    if (mapping == null)
-                        mapping = getMapping(0);
-                    mapping.faces = new int[list.nextInt() * 3];
-                    break;
-            }
-        }
-
-        Callback onObject(String name, Callback.ParamList list) {
-            switch (name) {
-                case "*MESH_VERTEX_LIST": return new MeshVertexList(mesh.points);
-                case "*MESH_FACE_LIST": return new MeshFaceList(mesh.faces);
-                case "*MESH_TVERTLIST": return new MeshTVertexList(mapping.tPoints);
-                case "*MESH_TFACELIST": return new MeshTFaceList(mapping.faces);
-                case "*MESH_MAPPINGCHANNEL": // ignore mapping channel
-                default: return MaxAseTokenizer.CallbackNOP.instance;
-            }
-        }
-
-        MappingChannel getMapping(int ch) {
-            if (mesh.mapping == null) {
-                mesh.mapping = new MappingChannel[ch + 1];
-            } else if (mesh.mapping.length <= ch) {
-                MappingChannel m[] = new MappingChannel[ch + 1];
-                System.arraycopy(mesh.mapping, 0, m, 0, mesh.mapping.length);
-                mesh.mapping = m;
-            }
-
-            if (mesh.mapping[ch] == null) {
-                mesh.mapping[ch] = new MappingChannel();
-            }
-            return mesh.mapping[ch];
-        }
-
-        private static class MeshVertexList extends Callback {
-            final float data[];
-
-            MeshVertexList(float data[]) { this.data = data; }
-
-            void value(byte args[][], int len[], int argc) {
-                int idx = parseInt(args[1], len[1]) * 3;
-                data[idx + 0] = parseFloat(args[2], len[2]);
-                data[idx + 1] = parseFloat(args[3], len[3]);
-                data[idx + 2] = parseFloat(args[4], len[4]);
-            }
-        }
-
-        private static class MeshTVertexList extends Callback {
-            final float data[];
-
-            MeshTVertexList(float data[]) { this.data = data; }
-
-            void value(byte args[][], int len[], int argc) {
-                int idx = parseInt(args[1], len[1]) * 2;
-                data[idx + 0] = parseFloat(args[2], len[2]);
-                data[idx + 1] = parseFloat(args[3], len[3]);
-            }
-        }
-
-        private static class MeshTFaceList extends Callback {
-            final int data[];
-
-            MeshTFaceList(int data[]) { this.data = data; }
-
-            void value(byte args[][], int len[], int argc) {
-                int idx = parseInt(args[1], len[1]) * 3;
-                data[idx + 0] = parseInt(args[2], len[2]);
-                data[idx + 1] = parseInt(args[3], len[3]);
-                data[idx + 2] = parseInt(args[4], len[4]);
-            }
-        }
-
-        // *MESH_FACE 3045:    A: 2186 B: 2029 C: 1512 AB:    1 BC:    1 CA:    0  *MESH_SMOOTHING 1,25  *MESH_MTLID 1
-        private static class MeshFaceList extends Callback {
-            final int data[]; // a,b,c, smoothing
-
-            MeshFaceList(int data[]) { this.data = data; }
-
-            void value(byte args[][], int len[], int argc) {
-                int idx = parseInt(args[1], len[1]) * 4;
-                data[idx + 0] = parseInt(args[3], len[3]);
-                data[idx + 1] = parseInt(args[5], len[5]);
-                data[idx + 2] = parseInt(args[7], len[7]);
-                // String smGr = new String(args[15], 0, len[15]);
-                data[idx + 3] = parseSmGr(args[15], len[15]);
-            }
-        }
-
-        static private int parseSmGr(byte data[], int l) {
-            int result = 0, p = 0;
-            while (true) {
-                int bit = 0;
-                for (; p != l && data[p] >= 0x30 && data[p] <= 0x39; ++p)
-                    bit = bit * 10 + (int) data[p] - 0x30;
-                if (bit > 0) result |= 1 << (bit - 1);
-                if (p == l || data[p] != ',') break;
-                else p++;
-            }
-            return result;
-        }
-    }
-
-    private class GeomNodeParser extends NodeParserBase {
-        GeomNode n;
-
-        Node createNode() { return n = new GeomNode(); }
-
-        Node getNode() { return n; }
-
-        void onValue(String name, Callback.ParamList list) {
-            switch (name) {
-                case "*MATERIAL_REF":
-                    n.materialRef = list.nextInt(); break;
-                default: super.onValue(name, list);
-            }
-        }
-
-        Callback onObject(String name, Callback.ParamList list) {
-            switch (name) {
-                case "*MESH":
-                    return new MeshParser(n.mesh = new Mesh());
-                default: return super.onObject(name, list);
-            }
-        }
-    }
-
-}
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/max/MaxAseTokenizer.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 2010, 2013 Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package com.javafx.experiments.importers.max;
-
-import java.io.*;
-import javafx.geometry.Point3D;
-
-/**
- * @author Kirill
- */
-public class MaxAseTokenizer {
-
-    static public class Callback {
-        
-        static public class ParamList {
-            byte[][] args;
-            int len[], argc, current = 1;
-            
-            public ParamList(byte[][] args, int[] len, int argc) {
-                this.args = args;
-                this.len = len;
-                this.argc = argc;
-            }
-            
-            public float nextFloat() {
-                if (argc == current) return 0;
-                current++;
-                return MaxAseTokenizer.parseFloat(args[current-1], len[current-1]);
-            }
-            
-            public int nextInt() {
-                if (argc == current) return 0;
-                current++;
-                return MaxAseTokenizer.parseInt(args[current-1], len[current-1]);
-            }
-            
-            public String nextString() {
-                if (argc == current) return null;
-                current++;
-                return MaxAseTokenizer.parseString(args[current-1], len[current-1]);
-            }
-
-            Point3D nextVector() {
-                return new Point3D(nextFloat(), nextFloat(), nextFloat());
-            }
-        }
-        
-        static boolean equals(byte data[], int len, byte cData[]) {
-            if (len != cData.length) return false;
-            for (int i=0; i!=len; ++i)
-                if (data[i] != cData[i])
-                    return false;
-            return true;
-        }
-        
-        public static int parseInt(byte data[], int l) {
-            return MaxAseTokenizer.parseInt(data, l);
-        }
-
-        public static float parseFloat(byte data[], int l) {
-            return MaxAseTokenizer.parseFloat(data, l);
-        }
-        
-        public static String parseString(byte data[], int l) {
-            return MaxAseTokenizer.parseString(data, l);
-        }
-        
-        void value(byte args[][], int len[], int argc) {
-            onValue(parseString(args[0], len[0]), new ParamList(args, len, argc));
-        }
-        
-        Callback object(byte args[][], int len[], int argc) { 
-            return onObject(parseString(args[0], len[0]), new ParamList(args, len, argc));
-        }
-        
-        void onValue(String name, ParamList list) {}
-        
-        Callback onObject(String name, ParamList list) { return this; }
-    }
-    
-    static public class CallbackNOP extends Callback {
-        static public final CallbackNOP instance = new CallbackNOP();
-        void value(byte args[][], int len[], int argc) {}
-        Callback object(byte args[][], int len[], int argc) { return this; }
-    }
-
-    public static void parse(InputStream stream, Callback callback) throws IOException {
-        new ParserImpl(stream).parse(callback);
-    }
-    
-    static private class ParserImpl {
-        final InputStream stream;
-        final byte buffer1K[] = new byte[1024];
-        private byte line[][] = new byte[32][];
-        private int lineLen[] = new int[32];
-        private int bufferBytes = 0, bufferPos = 0;
-        private boolean hasData = true;
-        
-        ParserImpl(InputStream inStream) {
-            stream = inStream;
-            for (int i=0; i!=line.length; ++i)
-                line[i] = new byte[64];
-        }
-        
-        final byte CLOSE = 0x7D;
-        final byte OPEN = 0x7B;
-        
-        private void parse(Callback callback) throws IOException {
-            while (hasData) {
-                int argc = parseLine();
-                if (argc < 0) return;
-
-                if (lineLen[0] == 1 && line[0][0] == CLOSE) 
-                    return;
-
-                if (lineLen[argc-1] == 1 && line[argc-1][0] == OPEN) {
-                    parse(callback.object(line, lineLen, argc));
-                } else {
-                    callback.value(line, lineLen, argc);
-                }
-            }
-        }
-        
-        private int parseLine() throws IOException {
-            byte lLine[][] = line;
-            byte cLine[] = lLine[0];
-            boolean inString = false;
-            for (int args = 0, len = 0;;) {
-                if (bufferPos == bufferBytes) {
-                    bufferBytes = stream.read(buffer1K);
-                    if (bufferBytes < 0) {
-                        hasData = false;
-                        return 0;
-                    }
-                    bufferPos = 0;
-                }
-                for (int i = bufferPos; i != bufferBytes; ++i) {
-                    byte b = buffer1K[i];
-                    switch (b) {
-                        case 0x0D: break;
-                        
-                        case 0x0A: 
-                            bufferPos = i + 1;
-                            lineLen[args] = len;
-                            return len>0 ? args+1 : args;
-                            
-                        case 0x22:
-                            inString = !inString;
-                            break;
-
-                        case 0x20: case 0x9: 
-                            if (!inString) {
-                                if (len != 0) {
-                                    if (++args >= lLine.length)
-                                        lLine = growTokens();
-                                    lineLen[args - 1] = len;
-                                    cLine = lLine[args];
-                                    len = 0;
-                                }
-                                break;
-                            }
-                        default:
-                            if (cLine.length == len)
-                                cLine = growToken(args);
-                            cLine[len++] = b;
-                    }
-                }
-                bufferPos = bufferBytes;
-            }
-        }
-
-        private byte[][] growTokens() {
-            int lineLen2[] = new int[line.length*2];
-            System.arraycopy(lineLen, 0, lineLen2, 0, line.length);
-            lineLen = lineLen2;
-            
-            byte line2[][] = new byte[line.length*2][];
-            System.arraycopy(line, 0, line2, 0, line.length);
-            return line = line2;
-        }
-
-        private byte[] growToken(int i) {
-            byte line2[] = new byte[line[i].length*2];
-            System.arraycopy(line[i], 0, line2, 0, line[i].length);
-            return line[i] = line2;
-        }
-    }
-    
-    public static int parseInt(byte data[], int l) {
-        int result = 0, sign = 1, i = 0;
-        if (l>0 && data[0]=='-') {
-            sign = -1;
-            i = 1;
-        }
-        for (; i!=l; ++i) {
-            byte ch = data[i];
-            if (ch >= 0x30 && ch <= 0x39) {
-                result = result*10 + (int)ch - 0x30;
-            } else break;
-        }
-        return result * sign;
-    }
-    
-    public static float parseFloat(byte data[], int l) {
-        float result = 0, sign = 1;
-        int i = 0; byte ch = 0;
-        if (l>0 && data[0]=='-') {
-            sign = -1;
-            i = 1;
-        }
-        for (;i!=l; ++i) {
-            ch = data[i];
-            if (ch >= 0x30 && ch <= 0x39) {
-                result = result*10 + (int)ch - 0x30;
-            } else break;
-        }
-        if (i!=l && ch == '.') {
-            float m = 1.f;
-            for (++i; i!=l; ++i) {
-                ch = data[i];
-                if (ch >= 0x30 && ch <= 0x39) {
-                    m *= 1.f/10;
-                    result += m*((int)ch - 0x30);
-                } else break;
-            }
-        }
-            
-        return result * sign;
-    }
-    
-    public static String parseString(byte data[], int l) {
-        return new String(data, 0, l);
-    }
-    
-}
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/max/MaxData.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2010, 2013 Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.javafx.experiments.importers.max;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javafx.geometry.Point3D;
-
-/** Max file format data objects */
-public class MaxData {
-    public static class MappingChannel {
-        public int ntPoints;
-        public float tPoints[];
-        public int faces[]; // t0 t1 t2
-    }
-
-    public static class Mesh {
-        public String name;
-        public int nPoints;
-        public float points[]; // x,y,z, x,y,z, ....
-        public int nFaces;
-        public int faces[];    // [[p0,p1,p2, smoothing]...]
-        public MappingChannel mapping[];
-    }
-
-    public static class NodeTM {
-        public String name;
-        public Point3D pos;
-        public Point3D tm[] = new Point3D[3];
-    }
-
-    public static class Material {
-        public String name;
-        public String diffuseMap;
-        public Point3D ambientColor;
-        public Point3D diffuseColor;
-        public Point3D specularColor;
-    }
-
-    public static class Node {
-        public String name;
-        public NodeTM nodeTM;
-        public Node parent;
-        public List<Node> children;
-    }
-
-    public static class LightNode extends Node {
-        public float intensity;
-        public float r, g, b;
-    }
-
-    public static class CameraNode extends Node {
-        public NodeTM target;
-        public float near, far, fov;
-    }
-
-    public static class GeomNode extends Node {
-        public Mesh mesh;
-        public int materialRef;
-    }
-
-    public Material materials[];
-    public Map<String, Node> nodes = new HashMap<>();
-    public Map<String, Node> roots = new HashMap<>();
-}
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/max/MaxLoader.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,350 +0,0 @@
-/*
- * Copyright (c) 2010, 2014 Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.javafx.experiments.importers.max;
-
-import com.javafx.experiments.importers.Importer;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.URL;
-import java.util.Map;
-import javafx.geometry.Point3D;
-import javafx.scene.Group;
-import javafx.scene.Node;
-import javafx.scene.PointLight;
-import javafx.scene.image.Image;
-import javafx.scene.paint.Color;
-import javafx.scene.paint.Material;
-import javafx.scene.paint.PhongMaterial;
-import javafx.scene.shape.Mesh;
-import javafx.scene.shape.MeshView;
-import javafx.scene.shape.TriangleMesh;
-import javafx.scene.transform.NonInvertibleTransformException;
-import javafx.scene.transform.Transform;
-import com.sun.javafx.scene.transform.TransformUtils;
-
-/** Max ASCII file loader */
-public class MaxLoader extends Importer {
-    private static Mesh createMaxMesh(MaxData.GeomNode maxNode, Transform tm) {
-        Transform tmr = null;
-        try {
-            tmr = tm != null ? tm.createInverse() : null;
-        } catch (NonInvertibleTransformException ex) {
-            throw new RuntimeException(ex);
-        }
-        float vts[] = new float[maxNode.mesh.nPoints * 3];
-        if (tmr != null) {
-            for (int i = 0; i < maxNode.mesh.nPoints; i++) {
-                Point3D pt = tmr.transform(
-                        maxNode.mesh.points[i * 3],
-                        maxNode.mesh.points[i * 3 + 1],
-                        maxNode.mesh.points[i * 3 + 2]);
-                vts[i * 3] = (float) pt.getX();
-                vts[i * 3 + 1] = (float) pt.getY();
-                vts[i * 3 + 2] = (float) pt.getZ();
-            }
-        } else {
-            for (int i = 0; i < maxNode.mesh.nPoints; i++) {
-                vts[i * 3] = maxNode.mesh.points[i * 3];
-                vts[i * 3 + 1] = maxNode.mesh.points[i * 3 + 1];
-                vts[i * 3 + 2] = maxNode.mesh.points[i * 3 + 2];
-            }
-        }
-
-        if ((maxNode.mesh.mapping != null) &&
-                (maxNode.mesh.mapping[0].faces.length != maxNode.mesh.nFaces)) {
-            //throw RuntimeException;
-        }
-
-        MaxData.MappingChannel mapping = maxNode.mesh.mapping[0];
-
-        float uvs[] = new float[mapping.ntPoints * 2];
-        for (int i = 0; i < mapping.ntPoints; i++) {
-            uvs[i * 2] = mapping.tPoints[i * 2];
-            uvs[i * 2 + 1] = 1.0f - mapping.tPoints[i * 2 + 1];
-        }
-
-        int faces[] = new int[maxNode.mesh.nFaces * 6];
-        int sg[] = new int[maxNode.mesh.nFaces];
-        for (int i = 0; i < maxNode.mesh.nFaces; i++) {
-            int[] f = maxNode.mesh.faces;
-            int[] mf = mapping.faces;
-            faces[i * 6] = f[i * 4];
-            faces[i * 6 + 1] = mf[i * 3];
-            faces[i * 6 + 2] = f[i * 4 + 1];
-            faces[i * 6 + 3] = mf[i * 3 + 1];
-            faces[i * 6 + 4] = f[i * 4 + 2];
-            faces[i * 6 + 5] = mf[i * 3 + 2];
-            sg[i] = f[i * 4 + 3];
-        }
-
-        TriangleMesh mesh = new TriangleMesh();
-        mesh.getPoints().setAll(vts);
-        mesh.getTexCoords().setAll(uvs);
-        mesh.getFaces().setAll(faces);
-        mesh.getFaceSmoothingGroups().setAll(sg);
-        return mesh;
-    }
-
-    private static Color color(Point3D v) {
-        return Color.color(v.getX(), v.getY(), v.getZ());
-    }
-
-    private static Transform loadNodeTM(MaxData.NodeTM tm) {
-        return TransformUtils.immutableTransform(
-                tm.tm[0].getX(), tm.tm[1].getX(), tm.tm[2].getX(), tm.pos.getX(),
-                tm.tm[0].getY(), tm.tm[1].getY(), tm.tm[2].getY(), tm.pos.getY(),
-                tm.tm[0].getZ(), tm.tm[1].getZ(), tm.tm[2].getZ(), tm.pos.getZ());
-    }
-
-    private Material[] materials;
-
-    private MeshView loadMaxMeshView(MaxData.GeomNode maxNode, MaxData maxData, Transform tm) {
-        Mesh mesh = createMaxMesh(maxNode, tm);
-        MeshView meshView = new MeshView();
-        meshView.setMesh(mesh);
-        meshView.setMaterial(materials[maxNode.materialRef]);
-        // Color amb = color(maxData.materials[maxNode.materialRef].ambientColor);
-        //meshView.setAmbient(amb);
-
-        meshView.setUserData(maxNode.name);
-        // meshView.setWireframe(true);
-        return meshView;
-    }
-
-    public static String appendSuffix(String fileName, String suffix) {
-        int dot = fileName.lastIndexOf('.');
-        String ext = fileName.substring(dot, fileName.length());
-        String name = fileName.substring(0, dot);
-        String res = name + suffix + ext;
-        return res;
-    }
-
-    public static String getSpecularTextureName(String diffName) {
-        return appendSuffix(diffName, "_sp");
-    }
-
-    public static String getBumpTextureName(String diffName) {
-        return appendSuffix(diffName, "_bp");
-    }
-
-    static Image loadImage(String fullName) {
-        Image img = null;
-        try {
-            File f = new File(fullName);
-            if (f.exists()) {
-                String url = f.toURL().toString();
-                img = new Image(url);
-            } else {
-                System.out.println("Texture file does not exist: " + fullName);
-            }
-        } catch (Exception ex) {
-            System.out.println("Failed to load:" + fullName);
-            ex.printStackTrace(System.out);
-        }
-        return img;
-    }
-
-    private void loadMaxMaterials(MaxData.Material mtls[], String dir) {
-        materials = new Material[mtls.length];
-        for (int i = 0; i < mtls.length; i++) {
-            MaxData.Material m = mtls[i];
-            PhongMaterial mtl = new PhongMaterial(
-                    Color.color(
-                            m.diffuseColor.getX(), m.diffuseColor.getY(), m.diffuseColor.getZ()));
-
-            String fullName = dir + File.separatorChar + m.diffuseMap;
-            Image diffuseMap = loadImage(fullName);
-            Image specularMap = loadImage(getSpecularTextureName(fullName));
-            Image bumpMap = loadImage(getBumpTextureName(fullName)); ;
-
-            mtl.setDiffuseMap(diffuseMap);
-            mtl.setSpecularMap(specularMap);
-            mtl.setBumpMap(bumpMap);
-            mtl.setDiffuseColor(Color.WHITE);
-            materials[i] = mtl;
-        }
-    }
-
-    private void loadMaxMaterialsUrl(MaxData.Material mtls[], String baseURl) {
-        materials = new Material[mtls.length];
-        for (int i = 0; i < mtls.length; i++) {
-            MaxData.Material m = mtls[i];
-            PhongMaterial mtl = new PhongMaterial(
-                    Color.color(
-                            m.diffuseColor.getX(), m.diffuseColor.getY(), m.diffuseColor.getZ()));
-
-            String fullName = baseURl + m.diffuseMap;
-            Image diffuseMap = new Image(fullName);
-            Image specularMap = new Image(getSpecularTextureName(fullName));
-            Image bumpMap = new Image(getBumpTextureName(fullName)); ;
-
-            mtl.setDiffuseMap(diffuseMap);
-            mtl.setSpecularMap(specularMap);
-            mtl.setBumpMap(bumpMap);
-            mtl.setDiffuseColor(Color.WHITE);
-            materials[i] = mtl;
-        }
-    }
-
-    PointLight loadLight(MaxData.LightNode ln, Transform ntm) {
-        PointLight l = new PointLight();
-        if (ntm != null) {
-            l.setTranslateX(ntm.getTx());
-            l.setTranslateY(ntm.getTy());
-            l.setTranslateZ(ntm.getTz());
-        }
-        l.setColor(Color.color(ln.r, ln.g, ln.b));
-        //        l.setStrength(ln.intensity);     // TODO
-        return l;
-    }
-
-    private Node loadMaxNode(MaxData.Node maxNode, MaxData maxData) {
-        Transform ntm = loadNodeTM(maxNode.nodeTM);
-
-        //        Translate tm = new Translate(ntm.getTx(), ntm.getTy(), ntm.getTz());
-        Group group = null;
-        if (maxNode.children != null) {
-            group = new Group();
-
-            //            group.getTransforms().add(tm);
-            for (MaxData.Node maxChild : maxNode.children) {
-                Node child = loadMaxNode(maxChild, maxData);
-                if (child != null) {
-                    group.getChildren().add(child);
-                }
-            }
-        }
-
-        Node node = null;
-
-        if (maxNode instanceof MaxData.GeomNode) {
-            MaxData.GeomNode geomNode = (MaxData.GeomNode) maxNode;
-            node = loadMaxMeshView(geomNode, maxData, null /* tm */);
-        }
-
-        if ((maxNode instanceof MaxData.LightNode)) {
-            node = loadLight((MaxData.LightNode) maxNode, ntm);
-        }
-
-        if (group != null && node != null) {
-            //          meshView.getTransforms().add(tm);
-            group.getChildren().add(node);
-        }
-
-        return group != null ? group : node;
-    }
-
-    public static class MaxScene extends Group {
-        public final Group geometry;
-        public final Group lights;
-
-        public MaxScene(Group geometry, Group lights) {
-            this.geometry = geometry;
-            this.lights = lights;
-            getChildren().addAll(geometry, lights);
-        }
-    }
-
-    public MaxScene loadMaxFile(File file) {
-        MaxData maxData = null;
-        try {
-            maxData = new MaxAseParser(file.getPath()).data;
-        } catch (FileNotFoundException ex) {
-        } catch (IOException ex) {
-        }
-
-        String dir = file.getParent();
-        System.out.println(dir);
-
-        loadMaxMaterials(maxData.materials, dir);
-
-        Group root = new Group();
-        Group lroot = new Group();
-        for (Map.Entry<String, MaxData.Node> n : maxData.roots.entrySet()) {
-            Node node = loadMaxNode(n.getValue(), maxData);
-
-            if (node instanceof PointLight) { // or LightBase ? 
-                lroot.getChildren().add(node);
-            } else if (node != null) {
-                root.getChildren().add(node);
-            }
-        }
-
-        return new MaxScene(root, lroot);
-    }
-
-    public MaxScene loadMaxUrl(String fileUrl) throws IOException{
-        MaxData maxData = new MaxAseParser(new URL(fileUrl).openStream()).data;
-
-        String baseUrl = fileUrl.substring(0,fileUrl.lastIndexOf('/')+1);
-
-        loadMaxMaterialsUrl(maxData.materials, baseUrl);
-
-        Group root = new Group();
-        Group lroot = new Group();
-        for (Map.Entry<String, MaxData.Node> n : maxData.roots.entrySet()) {
-            Node node = loadMaxNode(n.getValue(), maxData);
-
-            if (node instanceof PointLight) { // or LightBase ?
-                lroot.getChildren().add(node);
-            } else if (node != null) {
-                root.getChildren().add(node);
-            }
-        }
-
-        return new MaxScene(root, lroot);
-    }
-    
-    private MaxScene root;
-    
-    @Override
-    public void load(String fileUrl, boolean asPolygonMesh) throws IOException {
-        loadMaxUrl(fileUrl);
-        if (asPolygonMesh) {
-            throw new RuntimeException("Polygon Mesh is not supported");          
-        } else {
-            root = loadMaxUrl(fileUrl);          
-        }
-    }
-
-    @Override
-    public Group getRoot() {
-        return root;
-    }
-
-    @Override
-    public boolean isSupported(String extension) {
-        return extension != null && extension.equals("ase");
-    }
-    
-}
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/Frame.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2010, 2013 Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package com.javafx.experiments.importers.maya;
-
-import javafx.util.Duration;
-
-public class Frame extends Duration {
-
-    static final double FPS = 24.0;
-
-    Frame(double frames) {
-        super(frames / FPS * 1000.0);
-    }
-
-    Frame(int frames) {
-        super((double) frames / FPS * 1000.0);
-    }
-
-    Frame(int frames, int fps) {
-        super(((double) frames) / ((double) fps) * 1000.0);
-    }
-
-    public static Duration valueOf(double frames) {
-        return Duration.seconds(frames / FPS * 1000.0);
-    }
-
-}
-
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/Joint.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2010, 2013 Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package com.javafx.experiments.importers.maya;
-
-import javafx.scene.Group;
-import javafx.scene.transform.Rotate;
-import javafx.scene.transform.Scale;
-import javafx.scene.transform.Translate;
-
-/**
- * Joint -  A Joint is equivalent to a Maya Joint Node
- * <p/>
- * If you are post-multiplying matrices, To transform a point p from object-space to world-space you would need to
- * post-multiply by the worldMatrix. (p' = p * wm) matrix = [S][SO][R][JO][IS][T] where R = [RX][RY][RZ]  (Note: order
- * is determined by rotateOrder)
- * <p/>
- * If you are pre-multiplying matrices, to transform a point p from object-space to world-space you would need to
- * pre-multiply by the worldMatrix. (p' = wm * p) matrix = [T][IS][JO][R][SO][S] where R = [RZ][RY][RX]  (Note: order is
- * determined by rotateOrder) Of these sub-matrices we can set [SO] to identity, so matrix = [T][IS][JO][R][S]
- */
-public class Joint extends Group {
-    public final Translate t = new Translate();
-
-    public final Rotate jox = new Rotate();
-
-    { jox.setAxis(Rotate.X_AXIS); }
-
-    public final Rotate joy = new Rotate();
-
-    { joy.setAxis(Rotate.Y_AXIS); }
-
-    public final Rotate joz = new Rotate();
-
-    { joz.setAxis(Rotate.Z_AXIS); }
-
-    public final Rotate rx = new Rotate();
-
-    { rx.setAxis(Rotate.X_AXIS); }
-
-    public final Rotate ry = new Rotate();
-
-    { ry.setAxis(Rotate.Y_AXIS); }
-
-    public final Rotate rz = new Rotate();
-
-    { rz.setAxis(Rotate.Z_AXIS); }
-
-    public final Scale s = new Scale();
-    public final Scale is = new Scale();
-    // should bind "is" to be in the inverse of the parent's "s"
-
-    public Joint() {
-        super();
-        getTransforms().addAll(t, is, joz, joy, jox, rz, ry, rx, s);
-    }
-}
-
-
--- a/apps/experiments/3DViewer/src/main/java/com/javafx/experiments/importers/maya/Loader.java	Fri Mar 07 13:16:52 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1879 +0,0 @@
-/*
- * Copyright (c) 2010, 2013 Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.javafx.experiments.importers.maya;
-
-import com.javafx.experiments.importers.SmoothingGroups;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javafx.animation.Interpolator;
-import javafx.animation.KeyFrame;
-import javafx.animation.KeyValue;
-import javafx.beans.property.DoubleProperty;
-import javafx.scene.DepthTest;
-import javafx.scene.Group;
-import javafx.scene.Node;
-import javafx.scene.image.Image;
-import javafx.scene.paint.Color;
-import javafx.scene.paint.PhongMaterial;
-import javafx.scene.shape.CullFace;
-import javafx.scene.shape.Mesh;
-import javafx.scene.shape.MeshView;
-import javafx.scene.shape.TriangleMesh;
-import javafx.scene.transform.Affine;
-import javafx.util.Duration;
-
-import com.javafx.experiments.importers.maya.parser.MParser;
-import com.javafx.experiments.importers.maya.values.MArray;
-import com.javafx.experiments.importers.maya.values.MBool;
-import com.javafx.experiments.importers.maya.values.MCompound;
-import com.javafx.experiments.importers.maya.values.MData;
-import com.javafx.experiments.importers.maya.values.MFloat;
-import com.javafx.experiments.importers.maya.values.MFloat2Array;
-import com.javafx.experiments.importers.maya.values.MFloat3;
-import com.javafx.experiments.importers.maya.values.MFloat3Array;
-import com.javafx.experiments.importers.maya.values.MFloatArray;
-import com.javafx.experiments.importers.maya.values.MInt;
-import com.javafx.experiments.importers.maya.values.MInt3Array;
-import com.javafx.experiments.importers.maya.values.MIntArray;
-import com.javafx.experiments.importers.maya.values.MPolyFace;
-import com.javafx.experiments.importers.maya.values.MString;
-import com.javafx.experiments.shape3d.PolygonMesh;
-import com.javafx.experiments.shape3d.PolygonMeshView;
-import com.javafx.experiments.shape3d.SkinningMesh;
-import com.sun.javafx.geom.Vec3f;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.Arrays;
-
-import javafx.animation.AnimationTimer;
-import javafx.scene.Parent;
-
-/** Loader */
-class Loader {
-    public static final boolean DEBUG = false;
-    public static final boolean WARN = false;
-
-    MEnv env;
-
-    int startFrame;
-    int endFrame;
-
-    MNodeType transformType;
-    MNodeType jointType;
-    MNodeType meshType;
-    MNodeType cameraType;
-    MNodeType animCurve;
-    MNodeType animCurveTA;
-    MNodeType animCurveUA;
-    MNodeType animCurveUL;
-    MNodeType animCurveUT;
-    MNodeType animCurveUU;
-
-    MNodeType lambertType;
-    MNodeType reflectType;
-    MNodeType blinnType;
-    MNodeType phongType;
-    MNodeType fileType;
-    MNodeType skinClusterType;
-    MNodeType blendShapeType;
-    MNodeType groupPartsType;
-    MNodeType shadingEngineType;
-
-    // [Note to Alex]: I've re-enabled joints, but lets not use rootJoint [John]
-    // Joint rootJoint; //NO_JOINTS
-    Map<MNode, Node> loaded = new HashMap<MNode, Node>();
-
-    Map<Float, List<KeyValue>> keyFrameMap = new TreeMap();
-
-    Map<Node, MNode> meshParents = new HashMap();
-
-    private MFloat3Array mVerts;
-    // Optionally force per-face per-vertex normal generation
-    private int[] edgeData;
-
-    private List<MData> uvSet;
-    private int uvChannel;
-    private MFloat3Array mPointTweaks;
-    private URL url;
-    private boolean asPolygonMesh;
-
-    //=========================================================================
-    // Loader.load
-    //-------------------------------------------------------------------------
-    // Called from MayaImporter.load
-    //=========================================================================
-    public void load(URL url, boolean asPolygonMesh) {
-        this.url = url;
-        this.asPolygonMesh = asPolygonMesh;
-        env = new MEnv();
-        MParser parser = new MParser(env);
-        try {
-            parser.parse(url);
-            loadModel();
-            for (MNode n : env.getNodes()) {
-                // System.out.println("____________________________________________________________");
-                // System.out.println("==> .......Node: " + n);
-                resolveNode(n);
-            }
-        } catch (Exception e) {
-            if (WARN) System.err.println("Error loading url: [" + url + "]");
-            throw new RuntimeException(e);
-        }
-    }
-
-    //=========================================================================
-    // Loader.loadModel
-    //=========================================================================
-    void loadModel() {
-        startFrame = (int) Math.round(env.getPlaybackStart() - 1);
-        endFrame = (int) Math.round(env.getPlaybackEnd() - 1);
-        transformType = env.findNodeType("transform");
-        jointType = env.findNodeType("joint");
-        meshType = env.findNodeType("mesh");
-        cameraType = env.findNodeType("camera");
-        animCurve = env.findNodeType("animCurve");
-        animCurveTA = env.findNodeType("animCurveTA");
-        animCurveUA = env.findNodeType("animCurveUA");
-        animCurveUL = env.findNodeType("animCurveUL");
-        animCurveUT = env.findNodeType("animCurveUT");
-        animCurveUU = env.findNodeType("animCurveUU");
-
-        lambertType = env.findNodeType("lambert");
-        reflectType = env.findNodeType("reflect");
-        blinnType = env.findNodeType("blinn");
-        phongType = env.findNodeType("phong");
-        fileType = env.findNodeType("file");
-        skinClusterType = env.findNodeType("skinCluster");
-        groupPartsType = env.findNodeType("groupParts");
-        shadingEngineType = env.findNodeType("shadingEngine");
-        blendShapeType = env.findNodeType("blendShape");
-    }
-
-    //=========================================================================
-    // Loader.resolveNode
-    //-------------------------------------------------------------------------
-    // Loader.resolveNode looks up MNode in the HashMap Map<MNode, Node> loaded
-    // and returns the Node to which this map maps the MNode.
-    // Also, if the node that its looking up hasn't been processed yet,
-    // it processes the node.
-    //=========================================================================
-    Node resolveNode(MNode n) {
-        // System.out.println("--> resolveNode: " + n);
-        // if the node hasn't already been processed, then process the node
-        if (!loaded.containsKey(n)) {
-            // System.out.println("--> containsKey: " + n);
-            processNode(n);
-            // System.out.println("    loaded.get(n) " + loaded.get(n));
-        }
-        return loaded.get(n);
-    }
-
-    //=========================================================================
-    // Loader.processNode
-    //=========================================================================
-    void processNode(MNode n) {
-        Group parentNode = null;
-        for (MNode p : n.getParentNodes()) {
-            parentNode = (Group) resolveNode(p);
-        }
-        Node result = loaded.get(n);
-        // if the result is null, then it hasn't been added to the map yet
-        // so go ahead and process it
-        if (result == null) {
-            if (n.isInstanceOf(shadingEngineType)) {
-                //                System.out.println("==> Found a node of shadingEngineType: " + n);
-            } else if (n.isInstanceOf(lambertType)) {
-                //                System.out.println("==> Found a node of lambertType: " + n);
-            } else if (n.isInstanceOf(reflectType)) {
-                //                System.out.println("==> Found a node of reflectType: " + n);
-            } else if (n.isInstanceOf(blinnType)) {
-                //                System.out.println("==> Found a node of blinnType: " + n);
-            } else if (n.isInstanceOf(phongType)) {
-                //                System.out.println("==> Found a node of phongType: " + n);
-            } else if (n.isInstanceOf(fileType)) {
-                //                System.out.println("==> Found a node of fileType: " + n);
-            } else if (n.isInstanceOf(skinClusterType)) {
-                processClusterType(n);
-            } else if (n.isInstanceOf(meshType)) {
-                processMeshType(n, parentNode);
-            } else if (n.isInstanceOf(jointType)) {
-                processJointType(n, parentNode);
-            } else if (n.isInstanceOf(transformType)) {
-                processTransformType(n, parentNode);
-            } else if (n.isInstanceOf(animCurve)) {
-                processAnimCurve(n);
-            }
-        }
-    }
-
-    protected void processClusterType(MNode n) {
-        loaded.put(n, null);
-        MArray ma = (MArray) n.getAttr("ma");
-
-        List<Joint> jointNodes = new ArrayList<Joint>();
-        Set<Parent> jointForest = new HashSet<Parent>(); // root's children that have joints in their trees
-        for (int i = 0; i < ma.getSize(); i++) {
-            // hack... ?
-            MNode c = n.getIncomingConnectionToType("ma[" + i + "]", "joint");
-            Joint jn = (Joint) resolveNode(c);
-            jointNodes.add(jn);
-            
-            Parent rootChild = jn; // root's child, which is an ancestor of joint jn
-            while (rootChild.getParent() != null) {
-                rootChild = rootChild.getParent();
-            }
-            jointForest.add(rootChild);
-        }
-        
-        MNode outputMeshMNode = resolveOutputMesh(n);
-        MNode inputMeshMNode = resolveInputMesh(n);
-        if (inputMeshMNode == null || outputMeshMNode == null) {
-            return;
-        }
-        // We must be able to find the original converter in the meshConverters map
-        MNode origOrigMesh = resolveOrigInputMesh(n);
-        //               println("ORIG ORIG={origOrigMesh}");
-        
-        // TODO: What is with this? origMesh
-        resolveNode(origOrigMesh).setVisible(false);
-
-        MArray bindPreMatrixArray = (MArray) n.getAttr("pm");
-        Affine bindGlobalMatrix = convertMatrix((MFloatArray) n.getAttr("gm"));
-
-        Affine[] bindPreMatrix = new Affine[bindPreMatrixArray.getSize()];
-        for (int i = 0; i < bindPreMatrixArray.getSize(); i++) {
-            bindPreMatrix[i] = convertMatrix((MFloatArray) bindPreMatrixArray.getData(i));
-        }
-
-        MArray mayaWeights = (MArray) n.getAttr("wl");
-        float[][] weights = new float [jointNodes.size()][mayaWeights.getSize()];
-        for (int i=0; i<mayaWeights.getSize(); i++) {
-            MFloatArray curWeights = (MFloatArray) mayaWeights.getData(i).getData("w");
-            for (int j = 0; j < jointNodes.size(); j++) {
-                weights[j][i] = j < curWeights.getSize() ? curWeights.get(j) : 0;
-            }
-        }
-        
-        Node sourceMayaMeshNode = resolveNode(inputMeshMNode);
-        Node targetMayaMeshNode = resolveNode(outputMeshMNode);
-        
-        if (sourceMayaMeshNode.getClass().equals(PolygonMeshView.class)) {
-            PolygonMeshView sourceMayaMeshView = (PolygonMeshView) sourceMayaMeshNode;
-            PolygonMeshView targetMayaMeshView = (PolygonMeshView) targetMayaMeshNode;
-            
-            PolygonMesh sourceMesh = (PolygonMesh) sourceMayaMeshView.getMesh();
-            SkinningMesh targetMesh = new SkinningMesh(sourceMesh, weights, bindPreMatrix, bindGlobalMatrix, jointNodes, new ArrayList(jointForest));
-            targetMayaMeshView.setMesh(targetMesh);
-
-            final SkinningMeshTimer skinningMeshTimer = new SkinningMeshTimer(targetMesh);
-            if (targetMayaMeshNode.getScene() != null) {
-                skinningMeshTimer.start();
-            }
-            targetMayaMeshView.sceneProperty().addListener((observable, oldValue, newValue) -> {
-                if (newValue == null) {
-                    skinningMeshTimer.stop();
-                } else {
-                    skinningMeshTimer.start();
-                }
-            });
-        } else {
-            Logger.getLogger(MayaImporter.class.getName()).log(Level.INFO, "Mesh skinning is not supported for triangle meshes. Select the 'Load as Polygons' option to load the mesh as polygon mesh.");
-            MeshView sourceMayaMeshView = (MeshView) sourceMayaMeshNode;
-            MeshView targetMayaMeshView = (MeshView) targetMayaMeshNode;
-            TriangleMesh sourceMesh = (TriangleMesh) sourceMayaMeshView.getMesh();
-            TriangleMesh targetMesh = (TriangleMesh) targetMayaMeshView.getMesh();
-            targetMesh.getPoints().setAll(sourceMesh.getPoints());
-            targetMesh.getTexCoords().setAll(sourceMesh.getTexCoords());
-            targetMesh.getFaces().setAll(sourceMesh.getFaces());
-            targetMesh.getFaceSmoothingGroups().setAll(sourceMesh.getFaceSmoothingGroups());
-        }
-    }
-    
-    private class SkinningMeshTimer extends AnimationTimer {
-        private SkinningMesh mesh;
-        SkinningMeshTimer(SkinningMesh mesh) {
-            this.mesh = mesh;
-        }
-        @Override
-        public void handle(long l) {
-            mesh.update();
-        }
-    }
-
-    protected Image loadImageFromFtnAttr(MNode fileNode, String name) {
-        Image image = null;
-        MString fileName = (MString) fileNode.getAttr("ftn");
-        String imageFilename = (String) fileName.get();
-        try {
-            File file = new File(imageFilename);
-            String filePath;
-            if (file.exists()) {
-                filePath = file.toURI().toString();
-            } else {
-                filePath = new URL(url, imageFilename).toString();
-            }
-            image = new Image(filePath);
-            if (DEBUG) {
-                System.out.println(name + " = " + filePath);
-                System.out.println(name + " w = " + image.getWidth() + " h = " + image.getHeight());
-            }
-        } catch (MalformedURLException ex) {
-            Logger.getLogger(MayaImporter.class.getName()).log(Level.SEVERE, "Failed to load " + name + " '" + imageFilename + "'!", ex);
-        }
-        return image;
-    }
-
-    protected void processMeshType(MNode n, Group parentNode) throws RuntimeException {
-        //=============================================================
-        // When JavaFX supports polygon mesh geometry,
-        // add the polygon mesh geometry here.
-        // Until then, add a unit square as a placeholder.
-        //=============================================================
-        Node node = resolveNode(n.getParentNodes().get(0));
-        //                if (node != null) {
-        //                if (node != null && !n.getName().endsWith("Orig")) {
-        // Original approach to mesh placeholder:
-        //                     meshParents.put(node, n);
-
-        // Try to find an image or color from n (MNode)
-        if (DEBUG) { System.out.println("________________________________________"); }
-        if (DEBUG) { System.out.println("n.getName(): " + n.getName()); }
-        if (DEBUG) { System.out.println("n.getNodeType(): " + n.getNodeType()); }
-        MNode shadingGroup = n.getOutgoingConnectionToType("iog", "shadingEngine", true);
-        MNode mat;
-        MNode mFile;
-        if (DEBUG) { System.out.println("shadingGroup: " + shadingGroup); }
-
-        MFloat3 mColor;
-        Vec3f diffuseColor = null;
-        Vec3f specularColor = null;
-
-        Image diffuseImage = null;
-        Image normalImage = null;
-        Image specularImage = null;
-        Float specularPower = null;
-
-        if (shadingGroup != null) {
-            mat = shadingGroup.getIncomingConnectionToType("ss", "lambert");
-            if (mat != null) {
-                // shader = shaderMap.get(mat.getName()) as FixedFunctionShader;
-                if (DEBUG) { System.out.println("lambert mat: " + mat); }
-                mColor = (MFloat3) mat.getAttr("c");
-                float diffuseIntensity = ((MFloat) mat.getAttr("dc")).get();
-                if (mColor != null) {
-                    diffuseColor = new Vec3f(
-                            mColor.get()[0] * diffuseIntensity,
-                            mColor.get()[1] * diffuseIntensity,
-                            mColor.get()[2] * diffuseIntensity);
-                    if (DEBUG) { System.out.println("diffuseColor = " + diffuseColor); }
-                }
-
-                mFile = mat.getIncomingConnectionToType("c", "file");
-                if (mFile != null) {
-                    diffuseImage = loadImageFromFtnAttr(mFile, "diffuseImage");
-                }
-                MNode bump2d = mat.getIncomingConnectionToType("n", "bump2d");
-                if (bump2d != null) {
-                    mFile = bump2d.getIncomingConnectionToType("bv", "file");
-                    if (mFile != null) {
-                        normalImage = loadImageFromFtnAttr(mFile, "normalImage");
-                    }
-                }
-            }
-            mat = shadingGroup.getIncomingConnectionToType("ss", "phong");
-            if (mat != null) {
-                // shader = shaderMap.get(mat.getName()) as FixedFunctionShader;
-                if (DEBUG) { System.out.println("phong mat: " + mat); }
-                mColor = (MFloat3) mat.getAttr("sc");
-                if (mColor != null) {
-                    specularColor = new Vec3f(
-                            mColor.get()[0],
-                            mColor.get()[1],
-                            mColor.get()[2]);
-                    if (DEBUG) { System.out.println("specularColor = " + specularColor); }
-                }
-                mFile = mat.getIncomingConnectionToType("sc", "file");
-                if (mFile != null) {
-                    specularImage = loadImageFromFtnAttr(mFile, "specularImage");
-                }
-
-                specularPower = ((MFloat) mat.getAttr("cp")).get();
-                if (DEBUG) { System.out.println("specularPower = " + specularPower); }
-            }
-        }
-
-        PhongMaterial material = new PhongMaterial();
-
-        if (diffuseImage != null) {
-            material.setDiffuseMap(diffuseImage);
-            material.setDiffuseColor(Color.WHITE);
-        } else {
-            if (diffuseColor != null) {
-                material.setDiffuseColor(
-                        new Color(
-                                diffuseColor.x,
-                                diffuseColor.y,
-                                diffuseColor.z, 1));
-                //                            material.setDiffuseColor(new Color(
-                //                                    0.5,
-                //                                    0.5,
-                //                                    0.5, 0));
-            } else {
-                material.setDiffuseColor(Color.GRAY);
-            }
-        }
-
-        if (normalImage != null) {
-            material.setBumpMap(normalImage);
-        }
-
-        if (specularImage != null) {
-            material.setSpecularMap(specularImage);
-        } else {
-            if (specularColor != null && specularPower != null) {
-                material.setSpecularColor(
-                        new Color(
-                                specularColor.x,
-                                specularColor.y,
-                                specularColor.z, 1));
-                material.setSpecularPower(specularPower / 33);
-                //                            material.setSpecularColor(new Color(
-                //                                    0,
-                //                                    1,
-                //                                    0, 1));
-                //                            material.setSpecularPower(1);
-            } else {
-                //                            material.setSpecularColor(new Color(
-                //                                    0.2,
-                //                                    0.2,
-                //                                    0.2, 1));
-                //                            material.setSpecularPower(1);
-                material.setSpecularColor(null);
-            }
-        }
-
-        Object mesh = convertToFXMesh(n);
-
-        if (asPolygonMesh) {
-            PolygonMeshView mv = new PolygonMeshView();
-            mv.setId(n.getName());
-            mv.setMaterial(material);
-            mv.setMesh((PolygonMesh) mesh);
-//            mv.setCullFace(CullFace.NONE); //TODO
-            loaded.put(n, mv);
-            if (node != null) {
-                ((Group) node).getChildren().add(mv);
-            }
-        } else {
-            MeshView mv = new MeshView();
-            mv.setId(n.getName());
-            mv.setMaterial(material);
-
-//            // TODO HACK for [JIRA] (RT-30449) FX 8 3D: Need to handle mirror transformation (flip culling);
-//            mv.setCullFace(CullFace.FRONT);
-
-            mv.setMesh((TriangleMesh) mesh);
-
-            loaded.put(n, mv);
-            if (node != null) {
-                ((Group) node).getChildren().add(mv);
-            }
-        }
-    }
-    
-    protected void processJointType(MNode n, Group parentNode) {
-        // [Note to Alex]: I've re-enabled joints, but not skinning yet [John]
-        Node result;
-        MFloat3 t = (MFloat3) n.getAttr("t");
-        MFloat3 jo = (MFloat3) n.getAttr("jo");
-        MFloat3 r = (MFloat3) n.getAttr("r");
-        MFloat3 s = (MFloat3) n.getAttr("s");
-        String id = n.getName();
-
-        Joint j = new Joint();
-        j.setId(id);
-
-        // There's various ways to get the same thing:
-        // n.getAttr("r").get()[0]
-        // n.getAttr("r").getX()
-        // n.getAttr("rx")
-        // Up to you which you prefer
-
-        j.t.setX(t.get()[0]);
-        j.t.setY(t.get()[1]);
-        j.t.setZ(t.get()[2]);
-
-        // if ssc (Segment Scale Compensate) is false, then it is = 1, 1, 1
-        boolean ssc = ((MBool) n.getAttr("ssc")).get();
-        if (ssc) {
-            List<MNode> parents = n.getParentNodes();
-            if (parents.size() > 0) {
-                MFloat3 parent_s = (MFloat3) n.getParentNodes().get(0).getAttr("s");
-                j.is.setX(1f / parent_s.getX());
-                j.is.setY(1f / parent_s.getY());
-                j.is.setZ(1f / parent_s.getZ());
-            } else {
-                j.is.setX(1f);
-                j.is.setY(1f);
-                j.is.setZ(1f);
-            }
-        } else {
-            j.is.setX(1f);
-            j.is.setY(1f);
-            j.is.setZ(1f);
-        }
-
-        /*
-        // This code doesn't seem to work right:
-        MFloat jox = (MFloat) n.getAttr("jox");
-        MFloat joy = (MFloat) n.getAttr("joy");
-        MFloat joz = (MFloat) n.getAttr("joz");
-        j.jox.setAngle(jox.get());
-        j.joy.setAngle(joy.get());
-        j.joz.setAngle(joz.get());
-        // The following code works right:
-        */
-
-        if (jo != null) {
-            j.jox.setAngle(jo.getX());
-            j.joy.setAngle(jo.getY());
-            j.joz.setAngle(jo.getZ());
-        } else {
-            j.jox.setAngle(0f);
-            j.joy.setAngle(0f);
-            j.joz.setAngle(0f);
-        }
-
-        MFloat rx = (MFloat) n.getAttr("rx");
-        MFloat ry = (MFloat) n.getAttr("ry");
-        MFloat rz = (MFloat) n.getAttr("rz");
-        j.rx.setAngle(rx.get());
-        j.ry.setAngle(ry.get());
-        j.rz.setAngle(rz.get());
-
-        j.s.setX(s.get()[0]);
-        j.s.setY(s.get()[1]);
-        j.s.setZ(s.get()[2]);
-
-        result = j;
-        // Add the Joint to the map
-        loaded.put(n, j);
-        j.setDepthTest(DepthTest.ENABLE);
-        // Add the Joint to its JavaFX parent
-        if (parentNode != null) {
-            parentNode.getChildren().add(j);
-            if (DEBUG) System.out.println("j.getDepthTest() : " + j.getDepthTest());
-        }
-        if (parentNode == null || !(parentNode instanceof Joint)) {
-            // [Note to Alex]: I've re-enabled joints, but lets not use rootJoint [John]
-            // rootJoint = j;
-        }
-    }
-
-    protected void processTransformType(MNode n, Group parentNode) {
-        MFloat3 t = (MFloat3) n.getAttr("t");
-        MFloat3 r = (MFloat3) n.getAttr("r");
-        MFloat3 s = (MFloat3) n.getAttr("s");
-        String id = n.getName();
-        // ignore cameras
-        if ("persp".equals(id) ||
-                "top".equals(id) ||
-                "front".equals(id) ||
-                "side".equals(id)) {
-            return;
-        }
-
-        MayaGroup mGroup = new MayaGroup();
-        mGroup.setId(n.getName());
-        // g.setBlendMode(BlendMode.SRC_OVER);
-
-        // if (DEBUG) System.out.println("t = " + t);
-        // if (DEBUG) System.out.println("r = " + r);
-        // if (DEBUG) System.out.println("s = " + s);
-
-        mGroup.t.setX(t.get()[0]);
-        mGroup.t.setY(t.get()[1]);
-        mGroup.t.setZ(t.get()[2]);
-
-        MFloat rx = (MFloat) n.getAttr("rx");
-        MFloat ry = (MFloat) n.getAttr("ry");
-        MFloat rz = (MFloat) n.getAttr("rz");
-        mGroup.rx.setAngle(rx.get());
-        mGroup.ry.setAngle(ry.get());
-        mGroup.rz.setAngle(rz.get());
-
-        mGroup.s.setX(s.get()[0]);
-        mGroup.s.setY(s.get()[1]);
-        mGroup.s.setZ(s.get()[2]);
-
-        MFloat rptx = (MFloat) n.getAttr("rptx");
-        MFloat rpty = (MFloat) n.getAttr("rpty");
-        MFloat rptz = (MFloat) n.getAttr("rptz");
-        mGroup.rpt.setX(rptx.get());
-        mGroup.rpt.setY(rpty.get());
-        mGroup.rpt.setZ(rptz.get());
-
-        MFloat rpx = (MFloat) n.getAttr("rpx");
-        MFloat rpy = (MFloat) n.getAttr("rpy");
-        MFloat rpz = (MFloat) n.getAttr("rpz");
-        mGroup.rp.setX(rpx.get());
-        mGroup.rp.setY(rpy.get());
-        mGroup.rp.setZ(rpz.get());
-
-        mGroup.rpi.setX(-rpx.get());
-        mGroup.rpi.setY(-rpy.get());
-        mGroup.rpi.setZ(-rpz.get());
-
-        MFloat sptx = (MFloat) n.getAttr("sptx");
-        MFloat spty = (MFloat) n.getAttr("spty");
-        MFloat sptz = (MFloat) n.getAttr("sptz");
-        mGroup.spt.setX(sptx.get());
-        mGroup.spt.setY(spty.get());
-        mGroup.spt.setZ(sptz.get());
-
-        MFloat spx = (MFloat) n.getAttr("spx");
-        MFloat spy = (MFloat) n.getAttr("spy");
-        MFloat spz = (MFloat) n.getAttr("spz");
-        mGroup.sp.setX(spx.get());
-        mGroup.sp.setY(spy.get());
-        mGroup.sp.setZ(spz.get());
-
-        mGroup.spi.setX(-spx.get());
-        mGroup.spi.setY(-spy.get());
-        mGroup.spi.setZ(-spz.get());
-
-        // Add the MayaGroup to the map
-        loaded.put(n, mGroup);
-        // Add the MayaGroup to its JavaFX parent
-        if (parentNode != null) {
-            parentNode.getChildren().add(mGroup);
-        }
-    }
-
-    protected void processAnimCurve(MNode n) {
-        // if (DEBUG) System.out.println("processing anim curve");
-        List<MPath> toPaths = n.getPathsConnectingFrom("o");
-        loaded.put(n, null);
-        for (MPath path : toPaths) {
-            MNode toNode = path.getTargetNode();
-            // if (DEBUG) System.out.println("toNode = "+ toNode.getNodeType());
-            if (toNode.isInstanceOf(transformType)) {
-                Node to = resolveNode(toNode);
-                if (to instanceof MayaGroup) {
-                    MayaGroup g = (MayaGroup) to;
-                    DoubleProperty ref = null;
-                    String s = path.getComponentSelector();
-                    // if (DEBUG) System.out.println("selector = " + s);
-                    if ("t[0]".equals(s)) {
-                        ref = g.t.xProperty();
-                    } else if ("t[1]".equals(s)) {
-                        ref = g.t.yProperty();
-                    } else if ("t[2]".equals(s)) {
-                        ref = g.t.zProperty();
-                    } else if ("s[0]".equals(s)) {
-                        ref = g.s.xProperty();
-                    } else if ("s[1]".equals(s)) {
-                        ref = g.s.yProperty();
-                    } else if ("s[2]".equals(s)) {
-                        ref = g.s.zProperty();
-                    } else if ("r[0]".equals(s)) {
-                        ref = g.rx.angleProperty();
-                    } else if ("r[1]".equals(s)) {
-                        ref = g.ry.angleProperty();
-                    } else if ("r[2]".equals(s)) {
-                        ref = g.rz.angleProperty();
-                    } else if ("rp[0]".equals(s)) {
-                        ref = g.rp.xProperty();
-                    } else if ("rp[1]".equals(s)) {
-                        ref = g.rp.yProperty();
-                    } else if ("rp[2]".equals(s)) {
-                        ref = g.rp.zProperty();
-                    } else if ("sp[0]".equals(s)) {
-                        ref = g.sp.xProperty();
-                    } else if ("sp[1]".equals(s)) {
-                        ref = g.sp.yProperty();
-                    } else if ("sp[2]".equals(s)) {
-                        ref = g.sp.zProperty();
-                    }
-                    // Note: may also want to consider adding rpt in addition to rp and sp
-                    if (ref != null) {
-                        convertAnimCurveRange(n, ref, true);
-                    }
-                }
-                // [Note to Alex]: I've re-enabled joints, but not skinning yet [John]
-                if (to instanceof Joint) {
-                    Joint j = (Joint) to;
-                    DoubleProperty ref = null;
-                    String s = path.getComponentSelector();
-                    // if (DEBUG) System.out.println("selector = " + s);
-                    if ("t[0]".equals(s)) {
-                        ref = j.t.xProperty();
-                    } else if ("t[1]".equals(s)) {
-                        ref = j.t.yProperty();
-                    } else if ("t[2]".equals(s)) {
-                        ref = j.t.zProperty();
-                    } else if ("s[0]".equals(s)) {
-                        ref = j.s.xProperty();
-                    } else if ("s[1]".equals(s)) {
-                        ref = j.s.yProperty();
-                    } else if ("s[2]".equals(s)) {
-                        ref = j.s.zProperty();
-                    } else if ("jo[0]".equals(s)) {
-                        ref = j.jox.angleProperty();
-                    } else if ("jo[1]".equals(s)) {
-                        ref = j.joy.angleProperty();
-                    } else if ("jo[2]".equals(s)) {
-                        ref = j.joz.angleProperty();
-                    } else if ("r[0]".equals(s)) {
-                        ref = j.rx.angleProperty();
-                    } else if ("r[1]".equals(s)) {
-                        ref = j.ry.angleProperty();
-                    } else if ("r[2]".equals(s)) {
-                        ref = j.rz.angleProperty();
-                    }
-                    if (ref != null) {
-                        convertAnimCurveRange(n, ref, true);
-                    }
-                }
-                break;
-            }
-        }
-    }
-
-    private Object convertToFXMesh(MNode n) {
-        mVerts = (MFloat3Array) n.getAttr("vt");
-        MPolyFace mPolys = (MPolyFace) n.getAttr("fc");
-        mPointTweaks = (MFloat3Array) n.getAttr("pt");
-        MInt3Array mEdges = (MInt3Array) n.getAttr("ed");
-        edgeData = mEdges.get();
-        uvSet = ((MArray) n.getAttr("uvst")).get();
-        String currentUVSet = ((MString) n.getAttr("cuvs")).get();
-        for (int i = 0; i < uvSet.size(); i++) {
-            if (((MString) uvSet.get(i).getData("uvsn")).get().equals(currentUVSet)) {
-                uvChannel = i;
-            }
-        }
-
-        if (mPolys.getFaces() == null) {
-            if (asPolygonMesh) {
-                return new PolygonMesh();
-            } else {
-                return new TriangleMesh();
-            }
-        }
-
-        MFloat3Array normals = (MFloat3Array) n.getAttr("n");
-        return buildMeshData(mPolys.getFaces(), normals);
-    }
-
-    private int edgeVert(int edgeNumber, boolean start) {
-        boolean reverse = (edgeNumber < 0);
-        if (reverse) {
-            edgeNumber = reverse(edgeNumber);
-            return edgeData[3 * edgeNumber + (start ? 1 : 0)];
-        } else {
-            return edgeData[3 * edgeNumber + (start ? 0 : 1)];
-        }
-    }
-
-    private int reverse(int edge) {
-        if (edge < 0) {
-            return -edge - 1;
-        }
-        return edge;
-    }
-
-    private boolean edgeIsSmooth(int edgeNumber) {
-        edgeNumber = reverse(edgeNumber);
-        return edgeData[3 * edgeNumber + 2] != 0;
-    }
-
-    private int edgeStart(int edgeNumber) {
-        return edgeVert(edgeNumber, true);
-    }
-
-    private int edgeEnd(int edgeNumber) {
-        return edgeVert(edgeNumber, false);
-    }
-
-    private float[] getTexCoords(int uvChannel) {
-        if (uvSet == null || uvChannel < 0 || uvChannel >= uvSet.size()) {
-            return new float[] {0,0};
-        }
-        MCompound compound = (MCompound) uvSet.get(uvChannel);
-        MFloat2Array uvs = (MFloat2Array) compound.getFieldData("uvsp");
-        if (uvs == null || uvs.get() == null) {
-            return new float[] {0,0};
-        }
-
-        float[] texCoords = new float[uvs.getSize() * 2];
-        float[] uvsData = uvs.get();
-        for (int i = 0; i < uvs.getSize(); i++) {
-            //note the 1 - v
-            texCoords[i * 2] = uvsData[2 * i];
-            texCoords[i * 2 + 1] = 1 - uvsData[2 * i + 1];
-        }
-        return texCoords;
-    }
-
-    private void getVert(int index, Vec3f vert) {
-        float[] verts = mVerts.get();
-        float[] tweaks = null;
-        if (mPointTweaks != null) {
-            tweaks = mPointTweaks.get();
-            if (tweaks != null) {
-                if ((3 * index + 2) >= tweaks.length) {
-                    tweaks = null;
-                }
-            }
-        }
-        if (tweaks == null) {
-            vert.set(verts[3 * index + 0], verts[3 * index + 1], verts[3 * index + 2]);
-        } else {
-            vert.set(
-                    verts[3 * index + 0] + tweaks[3 * index + 0],
-                    verts[3 * index + 1] + tweaks[3 * index + 1],
-                    verts[3 * index + 2] + tweaks[3 * index + 2]);
-        }
-    }
-
-    float FPS = 24.0f;
-    float TAN_FIXED = 1;
-    float TAN_LINEAR = 2;
-    float TAN_FLAT = 3;
-    float TAN_STEPPED = 5;
-    float TAN_SPLINE = 9;
-    float TAN_CLAMPED = 10;
-    float TAN_PLATEAU = 16;
-
-    // Experimentally trying to land the frames on whole frame values
-    // Duration is still double, but internally, in Animation/Timeline,
-    // the time is discrete.  6000 units per second.
-    // Without this EPSILON, the frames might not land on whole frame values.
-    // 0.000001f seems to work for now
-    // 0.0000001f was too small on a trial run
-    static final float EPSILON = 0.000001f;
-
-    static final float MAXIMUM = 10000000.0f;
-
-    // Empirically derived from playing with animation curve editor
-    float TAN_EPSILON = 0.05f;
-
-    //=========================================================================
-    // Loader.convertAnimCurveRange
-    //-------------------------------------------------------------------------
-    // This method adds to keyFrameMap which is a
-    // TreeMap Map<Float, List<KeyValue>>
-    //=========================================================================
-    void convertAnimCurveRange(
-            MNode n, final DoubleProperty property,
-            boolean convertAnglesToDegrees) {
-        Collection inputs = n.getConnectionsTo("i");
-        boolean isDrivenAnimCurve = (inputs.size() > 0);
-        boolean useTangentInterpolator = true;  // use the NEW tangent interpolator
-
-        //---------------------------------------------------------------------
-        // Tangent types we need to handle:
-        //   2 = Linear
-        //       - The in/out tangent points in the direction of the previous/next key
-        //   3 = Flat
-        //       - The in/out tangent has no y component
-        //   5 = Stepped
-        //       - If this is seen on the out tangent of the previous
-        //         frame, immediately goes to the next value
-        //   9 = Spline
-        //       - The in / out tangents around the current keyframe
-        //         match the slope defined by the previous and next
-        //         keyframes.
-        //  10 = Clamped
-        //       - Uses spline tangents unless the keyframe is very close to the next or
-        //         previous value, in which case it uses linear tangents.
-        //  16 = Plateau
-        //       - Generally speaking, if the keyframe is a local maximum or minimum,
-        //         uses flat tangents to prevent the curve from overshooting the keyframe.
-        //         Seems to use spline tangents when the keyframe is not a local extremum.
-        //         There is an epsilon factor built in when deciding whether the flattening
-        //         behavior is to be applied.
-        // Tangent types we aren't handling:
-        //   1 = Fixed
-        //  17 = StepNext
-        //---------------------------------------------------------------------
-
-        MArray ktv = (MArray) n.getAttr("ktv");
-        MInt tan = (MInt) n.getAttr("tan");
-        int len = ktv.getSize();
-
-        // Note: the kix, kiy, kox, koy from Maya
-        // are most likely unit vectors [kix, kiy] and [kox, koy]
-        // in some tricky units that Ken figured out.
-        MFloatArray kix = (MFloatArray) n.getAttr("kix");
-        MFloatArray kiy = (MFloatArray) n.getAttr("kiy");
-        MFloatArray kox = (MFloatArray) n.getAttr("kox");
-        MFloatArray koy = (MFloatArray) n.getAttr("koy");
-        MIntArray kit = (MIntArray) n.getAttr("kit");
-        MIntArray kot = (MIntArray) n.getAttr("kot");
-        boolean hasTangent = kix != null && kix.get() != null && kix.get().length > 0;
-        boolean isRotation = n.isInstanceOf(animCurveTA) || n.isInstanceOf(animCurveUA);
-        boolean keyTimesInSeconds =