From afe292fec6a04f148a50776901ab726b96202178 Mon Sep 17 00:00:00 2001 From: phil Date: Sat, 22 Oct 2016 11:43:13 +1300 Subject: Final javax.media.j3d package reference updated This commit 6aa301b9466351538d779b98e3b756ac5bd34236 Moved the baseline to org.jogamp.java3d.util but there are some state packages, that also need to be renamed The org.jogamp.java3d.utils.scenegraph.io.retained.Controller createState uses reflection to load the correct State class, and this was broken by the state classes having the old name in their package. --- .../scenegraph/io/SceneGraphStateProvider.java | 2 +- .../utils/scenegraph/io/retained/Controller.java | 8 +- .../io/retained/RandomAccessFileControl.java | 4 +- .../scenegraph/io/retained/StreamControl.java | 3 +- .../utils/scenegraph/io/retained/SymbolTable.java | 6 +- .../scenegraph/io/retained/SymbolTableData.java | 3 +- .../KBRotPosScaleSplinePathInterpolatorState.java | 129 --- .../RotPosScaleTCBSplinePathInterpolatorState.java | 125 --- .../utils/behaviors/mouse/MouseBehaviorState.java | 82 -- .../state/com/sun/j3d/utils/geometry/BoxState.java | 160 ---- .../com/sun/j3d/utils/geometry/ColorCubeState.java | 100 --- .../com/sun/j3d/utils/geometry/ConeState.java | 146 ---- .../com/sun/j3d/utils/geometry/CylinderState.java | 149 ---- .../com/sun/j3d/utils/geometry/PrimitiveState.java | 88 -- .../com/sun/j3d/utils/geometry/SphereState.java | 126 --- .../com/sun/j3d/utils/geometry/Text2DState.java | 141 ---- .../sun/j3d/utils/image/ImageComponent2DURL.java | 117 --- .../utils/image/ImageComponent2DURLIOListener.java | 66 -- .../j3d/utils/image/ImageComponent2DURLState.java | 122 --- .../j3d/utils/universe/PlatformGeometryState.java | 59 -- .../j3d/utils/universe/SimpleUniverseState.java | 328 -------- .../sun/j3d/utils/universe/ViewerAvatarState.java | 59 -- .../io/state/javax/media/j3d/AlphaState.java | 100 --- .../javax/media/j3d/AlternateAppearanceState.java | 127 --- .../state/javax/media/j3d/AmbientLightState.java | 57 -- .../io/state/javax/media/j3d/AppearanceState.java | 192 ----- .../javax/media/j3d/AuralAttributesState.java | 124 --- .../javax/media/j3d/BackgroundSoundState.java | 73 -- .../io/state/javax/media/j3d/BackgroundState.java | 149 ---- .../io/state/javax/media/j3d/BehaviorState.java | 107 --- .../io/state/javax/media/j3d/BillboardState.java | 106 --- .../state/javax/media/j3d/BoundingLeafState.java | 81 -- .../io/state/javax/media/j3d/BranchGroupState.java | 60 -- .../io/state/javax/media/j3d/ClipState.java | 85 -- .../javax/media/j3d/ColorInterpolatorState.java | 117 --- .../javax/media/j3d/ColoringAttributesState.java | 84 -- .../javax/media/j3d/CompressedGeometryState.java | 152 ---- .../io/state/javax/media/j3d/ConeSoundState.java | 122 --- .../io/state/javax/media/j3d/DecalGroupState.java | 61 -- .../javax/media/j3d/DepthComponentFloatState.java | 114 --- .../javax/media/j3d/DepthComponentIntState.java | 114 --- .../javax/media/j3d/DepthComponentNativeState.java | 95 --- .../javax/media/j3d/DirectionalLightState.java | 79 -- .../io/state/javax/media/j3d/DistanceLODState.java | 111 --- .../state/javax/media/j3d/ExponentialFogState.java | 77 -- .../io/state/javax/media/j3d/FogState.java | 107 --- .../io/state/javax/media/j3d/Font3DState.java | 179 ---- .../state/javax/media/j3d/GeometryArrayState.java | 921 --------------------- .../io/state/javax/media/j3d/GeometryState.java | 52 -- .../javax/media/j3d/GeometryStripArrayState.java | 80 -- .../io/state/javax/media/j3d/GroupState.java | 144 ---- .../javax/media/j3d/ImageComponent2DState.java | 106 --- .../javax/media/j3d/ImageComponent3DState.java | 131 --- .../state/javax/media/j3d/ImageComponentState.java | 408 --------- .../javax/media/j3d/IndexedGeometryArrayState.java | 181 ---- .../media/j3d/IndexedGeometryStripArrayState.java | 80 -- .../javax/media/j3d/IndexedLineArrayState.java | 89 -- .../media/j3d/IndexedLineStripArrayState.java | 77 -- .../javax/media/j3d/IndexedPointArrayState.java | 90 -- .../javax/media/j3d/IndexedQuadArrayState.java | 89 -- .../javax/media/j3d/IndexedTriangleArrayState.java | 89 -- .../media/j3d/IndexedTriangleFanArrayState.java | 92 -- .../media/j3d/IndexedTriangleStripArrayState.java | 92 -- .../state/javax/media/j3d/InterpolatorState.java | 87 -- .../io/state/javax/media/j3d/LODState.java | 94 --- .../io/state/javax/media/j3d/LeafState.java | 52 -- .../io/state/javax/media/j3d/LightState.java | 115 --- .../io/state/javax/media/j3d/LineArrayState.java | 74 -- .../state/javax/media/j3d/LineAttributesState.java | 86 -- .../state/javax/media/j3d/LineStripArrayState.java | 76 -- .../io/state/javax/media/j3d/LinearFogState.java | 79 -- .../io/state/javax/media/j3d/LinkState.java | 104 --- .../io/state/javax/media/j3d/MaterialState.java | 95 --- .../state/javax/media/j3d/MediaContainerState.java | 116 --- .../io/state/javax/media/j3d/ModelClipState.java | 133 --- .../io/state/javax/media/j3d/MorphState.java | 134 --- .../state/javax/media/j3d/NodeComponentState.java | 82 -- .../io/state/javax/media/j3d/NodeState.java | 86 -- .../javax/media/j3d/NullSceneGraphObjectState.java | 100 --- .../state/javax/media/j3d/OrderedGroupState.java | 85 -- .../javax/media/j3d/OrientedShape3DState.java | 95 --- .../javax/media/j3d/PathInterpolatorState.java | 79 -- .../javax/media/j3d/PointAttributesState.java | 80 -- .../io/state/javax/media/j3d/PointLightState.java | 81 -- .../io/state/javax/media/j3d/PointSoundState.java | 100 --- .../javax/media/j3d/PolygonAttributesState.java | 86 -- .../javax/media/j3d/PositionInterpolatorState.java | 87 -- .../media/j3d/PositionPathInterpolatorState.java | 105 --- .../io/state/javax/media/j3d/QuadArrayState.java | 89 -- .../io/state/javax/media/j3d/RasterState.java | 140 ---- .../javax/media/j3d/RenderingAttributesState.java | 92 -- .../media/j3d/RotPosPathInterpolatorState.java | 119 --- .../j3d/RotPosScalePathInterpolatorState.java | 125 --- .../javax/media/j3d/RotationInterpolatorState.java | 89 -- .../media/j3d/RotationPathInterpolatorState.java | 109 --- .../javax/media/j3d/ScaleInterpolatorState.java | 88 -- .../javax/media/j3d/SceneGraphObjectState.java | 525 ------------ .../io/state/javax/media/j3d/Shape3DState.java | 121 --- .../io/state/javax/media/j3d/SharedGroupState.java | 60 -- .../io/state/javax/media/j3d/SoundState.java | 125 --- .../io/state/javax/media/j3d/SoundscapeState.java | 103 --- .../io/state/javax/media/j3d/SpotLightState.java | 104 --- .../io/state/javax/media/j3d/SwitchState.java | 81 -- .../media/j3d/SwitchValueInterpolatorState.java | 103 --- .../javax/media/j3d/TexCoordGenerationState.java | 96 --- .../io/state/javax/media/j3d/Text3DState.java | 123 --- .../io/state/javax/media/j3d/Texture2DState.java | 143 ---- .../io/state/javax/media/j3d/Texture3DState.java | 106 --- .../javax/media/j3d/TextureAttributesState.java | 138 --- .../state/javax/media/j3d/TextureCubeMapState.java | 114 --- .../io/state/javax/media/j3d/TextureState.java | 233 ------ .../javax/media/j3d/TextureUnitStateState.java | 111 --- .../state/javax/media/j3d/TransformGroupState.java | 91 -- .../media/j3d/TransformInterpolatorState.java | 85 -- .../media/j3d/TransparencyAttributesState.java | 84 -- .../media/j3d/TransparencyInterpolatorState.java | 112 --- .../state/javax/media/j3d/TriangleArrayState.java | 89 -- .../javax/media/j3d/TriangleFanArrayState.java | 91 -- .../javax/media/j3d/TriangleStripArrayState.java | 92 -- .../state/javax/media/j3d/ViewPlatformState.java | 82 -- .../io/state/org/jogamp/java3d/AlphaState.java | 100 +++ .../jogamp/java3d/AlternateAppearanceState.java | 127 +++ .../state/org/jogamp/java3d/AmbientLightState.java | 57 ++ .../state/org/jogamp/java3d/AppearanceState.java | 192 +++++ .../org/jogamp/java3d/AuralAttributesState.java | 124 +++ .../org/jogamp/java3d/BackgroundSoundState.java | 73 ++ .../state/org/jogamp/java3d/BackgroundState.java | 149 ++++ .../io/state/org/jogamp/java3d/BehaviorState.java | 107 +++ .../io/state/org/jogamp/java3d/BillboardState.java | 106 +++ .../state/org/jogamp/java3d/BoundingLeafState.java | 81 ++ .../state/org/jogamp/java3d/BranchGroupState.java | 60 ++ .../io/state/org/jogamp/java3d/ClipState.java | 85 ++ .../org/jogamp/java3d/ColorInterpolatorState.java | 117 +++ .../org/jogamp/java3d/ColoringAttributesState.java | 84 ++ .../org/jogamp/java3d/CompressedGeometryState.java | 152 ++++ .../io/state/org/jogamp/java3d/ConeSoundState.java | 122 +++ .../state/org/jogamp/java3d/DecalGroupState.java | 61 ++ .../jogamp/java3d/DepthComponentFloatState.java | 114 +++ .../org/jogamp/java3d/DepthComponentIntState.java | 114 +++ .../jogamp/java3d/DepthComponentNativeState.java | 95 +++ .../org/jogamp/java3d/DirectionalLightState.java | 79 ++ .../state/org/jogamp/java3d/DistanceLODState.java | 111 +++ .../org/jogamp/java3d/ExponentialFogState.java | 77 ++ .../io/state/org/jogamp/java3d/FogState.java | 107 +++ .../io/state/org/jogamp/java3d/Font3DState.java | 179 ++++ .../org/jogamp/java3d/GeometryArrayState.java | 921 +++++++++++++++++++++ .../io/state/org/jogamp/java3d/GeometryState.java | 52 ++ .../org/jogamp/java3d/GeometryStripArrayState.java | 80 ++ .../io/state/org/jogamp/java3d/GroupState.java | 144 ++++ .../org/jogamp/java3d/ImageComponent2DState.java | 106 +++ .../org/jogamp/java3d/ImageComponent3DState.java | 131 +++ .../org/jogamp/java3d/ImageComponentState.java | 408 +++++++++ .../jogamp/java3d/IndexedGeometryArrayState.java | 181 ++++ .../java3d/IndexedGeometryStripArrayState.java | 80 ++ .../org/jogamp/java3d/IndexedLineArrayState.java | 89 ++ .../jogamp/java3d/IndexedLineStripArrayState.java | 77 ++ .../org/jogamp/java3d/IndexedPointArrayState.java | 90 ++ .../org/jogamp/java3d/IndexedQuadArrayState.java | 89 ++ .../jogamp/java3d/IndexedTriangleArrayState.java | 89 ++ .../java3d/IndexedTriangleFanArrayState.java | 92 ++ .../java3d/IndexedTriangleStripArrayState.java | 92 ++ .../state/org/jogamp/java3d/InterpolatorState.java | 87 ++ .../io/state/org/jogamp/java3d/LODState.java | 94 +++ .../io/state/org/jogamp/java3d/LeafState.java | 52 ++ .../io/state/org/jogamp/java3d/LightState.java | 115 +++ .../io/state/org/jogamp/java3d/LineArrayState.java | 74 ++ .../org/jogamp/java3d/LineAttributesState.java | 86 ++ .../org/jogamp/java3d/LineStripArrayState.java | 76 ++ .../io/state/org/jogamp/java3d/LinearFogState.java | 79 ++ .../io/state/org/jogamp/java3d/LinkState.java | 104 +++ .../io/state/org/jogamp/java3d/MaterialState.java | 95 +++ .../org/jogamp/java3d/MediaContainerState.java | 116 +++ .../io/state/org/jogamp/java3d/ModelClipState.java | 133 +++ .../io/state/org/jogamp/java3d/MorphState.java | 134 +++ .../org/jogamp/java3d/NodeComponentState.java | 82 ++ .../io/state/org/jogamp/java3d/NodeState.java | 86 ++ .../jogamp/java3d/NullSceneGraphObjectState.java | 100 +++ .../state/org/jogamp/java3d/OrderedGroupState.java | 85 ++ .../org/jogamp/java3d/OrientedShape3DState.java | 95 +++ .../org/jogamp/java3d/PathInterpolatorState.java | 79 ++ .../org/jogamp/java3d/PointAttributesState.java | 80 ++ .../state/org/jogamp/java3d/PointLightState.java | 81 ++ .../state/org/jogamp/java3d/PointSoundState.java | 100 +++ .../org/jogamp/java3d/PolygonAttributesState.java | 86 ++ .../jogamp/java3d/PositionInterpolatorState.java | 87 ++ .../java3d/PositionPathInterpolatorState.java | 105 +++ .../io/state/org/jogamp/java3d/QuadArrayState.java | 89 ++ .../io/state/org/jogamp/java3d/RasterState.java | 140 ++++ .../jogamp/java3d/RenderingAttributesState.java | 92 ++ .../jogamp/java3d/RotPosPathInterpolatorState.java | 119 +++ .../java3d/RotPosScalePathInterpolatorState.java | 125 +++ .../jogamp/java3d/RotationInterpolatorState.java | 89 ++ .../java3d/RotationPathInterpolatorState.java | 109 +++ .../org/jogamp/java3d/ScaleInterpolatorState.java | 88 ++ .../org/jogamp/java3d/SceneGraphObjectState.java | 525 ++++++++++++ .../io/state/org/jogamp/java3d/Shape3DState.java | 121 +++ .../state/org/jogamp/java3d/SharedGroupState.java | 60 ++ .../io/state/org/jogamp/java3d/SoundState.java | 125 +++ .../state/org/jogamp/java3d/SoundscapeState.java | 103 +++ .../io/state/org/jogamp/java3d/SpotLightState.java | 104 +++ .../io/state/org/jogamp/java3d/SwitchState.java | 81 ++ .../java3d/SwitchValueInterpolatorState.java | 103 +++ .../org/jogamp/java3d/TexCoordGenerationState.java | 96 +++ .../io/state/org/jogamp/java3d/Text3DState.java | 123 +++ .../io/state/org/jogamp/java3d/Texture2DState.java | 143 ++++ .../io/state/org/jogamp/java3d/Texture3DState.java | 106 +++ .../org/jogamp/java3d/TextureAttributesState.java | 138 +++ .../org/jogamp/java3d/TextureCubeMapState.java | 114 +++ .../io/state/org/jogamp/java3d/TextureState.java | 233 ++++++ .../org/jogamp/java3d/TextureUnitStateState.java | 111 +++ .../org/jogamp/java3d/TransformGroupState.java | 91 ++ .../jogamp/java3d/TransformInterpolatorState.java | 85 ++ .../jogamp/java3d/TransparencyAttributesState.java | 84 ++ .../java3d/TransparencyInterpolatorState.java | 112 +++ .../org/jogamp/java3d/TriangleArrayState.java | 89 ++ .../org/jogamp/java3d/TriangleFanArrayState.java | 91 ++ .../org/jogamp/java3d/TriangleStripArrayState.java | 92 ++ .../state/org/jogamp/java3d/ViewPlatformState.java | 82 ++ .../KBRotPosScaleSplinePathInterpolatorState.java | 129 +++ .../RotPosScaleTCBSplinePathInterpolatorState.java | 125 +++ .../utils/behaviors/mouse/MouseBehaviorState.java | 82 ++ .../org/jogamp/java3d/utils/geometry/BoxState.java | 160 ++++ .../java3d/utils/geometry/ColorCubeState.java | 100 +++ .../jogamp/java3d/utils/geometry/ConeState.java | 146 ++++ .../java3d/utils/geometry/CylinderState.java | 149 ++++ .../java3d/utils/geometry/PrimitiveState.java | 88 ++ .../jogamp/java3d/utils/geometry/SphereState.java | 126 +++ .../jogamp/java3d/utils/geometry/Text2DState.java | 141 ++++ .../java3d/utils/image/ImageComponent2DURL.java | 117 +++ .../utils/image/ImageComponent2DURLIOListener.java | 66 ++ .../utils/image/ImageComponent2DURLState.java | 122 +++ .../utils/universe/PlatformGeometryState.java | 59 ++ .../java3d/utils/universe/SimpleUniverseState.java | 328 ++++++++ .../java3d/utils/universe/ViewerAvatarState.java | 59 ++ 234 files changed, 13577 insertions(+), 13579 deletions(-) delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/interpolators/KBRotPosScaleSplinePathInterpolatorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/interpolators/RotPosScaleTCBSplinePathInterpolatorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/mouse/MouseBehaviorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/BoxState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/ColorCubeState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/ConeState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/CylinderState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/PrimitiveState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/SphereState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/geometry/Text2DState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/image/ImageComponent2DURL.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/image/ImageComponent2DURLIOListener.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/image/ImageComponent2DURLState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/universe/PlatformGeometryState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/universe/SimpleUniverseState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/universe/ViewerAvatarState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/AlphaState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/AlternateAppearanceState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/AmbientLightState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/AppearanceState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/AuralAttributesState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/BackgroundSoundState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/BackgroundState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/BehaviorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/BillboardState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/BoundingLeafState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/BranchGroupState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/ClipState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/ColorInterpolatorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/ColoringAttributesState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/CompressedGeometryState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/ConeSoundState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/DecalGroupState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/DepthComponentFloatState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/DepthComponentIntState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/DepthComponentNativeState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/DirectionalLightState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/DistanceLODState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/ExponentialFogState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/FogState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/Font3DState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/GeometryArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/GeometryState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/GeometryStripArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/GroupState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponent2DState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponent3DState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponentState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/IndexedGeometryArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/IndexedGeometryStripArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/IndexedLineArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/IndexedLineStripArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/IndexedPointArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/IndexedQuadArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/IndexedTriangleArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/IndexedTriangleFanArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/IndexedTriangleStripArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/InterpolatorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/LODState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/LeafState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/LightState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/LineArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/LineAttributesState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/LineStripArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/LinearFogState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/LinkState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/MaterialState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/MediaContainerState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/ModelClipState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/MorphState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/NodeComponentState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/NodeState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/NullSceneGraphObjectState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/OrderedGroupState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/OrientedShape3DState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/PathInterpolatorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/PointAttributesState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/PointLightState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/PointSoundState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/PolygonAttributesState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/PositionInterpolatorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/PositionPathInterpolatorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/QuadArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/RasterState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/RenderingAttributesState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/RotPosPathInterpolatorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/RotPosScalePathInterpolatorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/RotationInterpolatorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/RotationPathInterpolatorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/ScaleInterpolatorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/SceneGraphObjectState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/Shape3DState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/SharedGroupState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/SoundState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/SoundscapeState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/SpotLightState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/SwitchState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/SwitchValueInterpolatorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TexCoordGenerationState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/Text3DState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/Texture2DState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/Texture3DState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TextureAttributesState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TextureCubeMapState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TextureState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TextureUnitStateState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TransformGroupState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TransformInterpolatorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TransparencyAttributesState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TransparencyInterpolatorState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TriangleArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TriangleFanArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TriangleStripArrayState.java delete mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/ViewPlatformState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/AlphaState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/AlternateAppearanceState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/AmbientLightState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/AppearanceState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/AuralAttributesState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/BackgroundSoundState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/BackgroundState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/BehaviorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/BillboardState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/BoundingLeafState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/BranchGroupState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/ClipState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/ColorInterpolatorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/ColoringAttributesState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/CompressedGeometryState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/ConeSoundState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/DecalGroupState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/DepthComponentFloatState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/DepthComponentIntState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/DepthComponentNativeState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/DirectionalLightState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/DistanceLODState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/ExponentialFogState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/FogState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/Font3DState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/GeometryArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/GeometryState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/GeometryStripArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/GroupState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/ImageComponent2DState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/ImageComponent3DState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/ImageComponentState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/IndexedGeometryArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/IndexedGeometryStripArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/IndexedLineArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/IndexedLineStripArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/IndexedPointArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/IndexedQuadArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/IndexedTriangleArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/IndexedTriangleFanArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/IndexedTriangleStripArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/InterpolatorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/LODState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/LeafState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/LightState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/LineArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/LineAttributesState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/LineStripArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/LinearFogState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/LinkState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/MaterialState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/MediaContainerState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/ModelClipState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/MorphState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/NodeComponentState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/NodeState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/NullSceneGraphObjectState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/OrderedGroupState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/OrientedShape3DState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/PathInterpolatorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/PointAttributesState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/PointLightState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/PointSoundState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/PolygonAttributesState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/PositionInterpolatorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/PositionPathInterpolatorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/QuadArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/RasterState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/RenderingAttributesState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/RotPosPathInterpolatorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/RotPosScalePathInterpolatorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/RotationInterpolatorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/RotationPathInterpolatorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/ScaleInterpolatorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/SceneGraphObjectState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/Shape3DState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/SharedGroupState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/SoundState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/SoundscapeState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/SpotLightState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/SwitchState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/SwitchValueInterpolatorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TexCoordGenerationState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/Text3DState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/Texture2DState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/Texture3DState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TextureAttributesState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TextureCubeMapState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TextureState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TextureUnitStateState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TransformGroupState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TransformInterpolatorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TransparencyAttributesState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TransparencyInterpolatorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TriangleArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TriangleFanArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TriangleStripArrayState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/ViewPlatformState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/utils/behaviors/interpolators/KBRotPosScaleSplinePathInterpolatorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/utils/behaviors/interpolators/RotPosScaleTCBSplinePathInterpolatorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/utils/behaviors/mouse/MouseBehaviorState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/utils/geometry/BoxState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/utils/geometry/ColorCubeState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/utils/geometry/ConeState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/utils/geometry/CylinderState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/utils/geometry/PrimitiveState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/utils/geometry/SphereState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/utils/geometry/Text2DState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/utils/image/ImageComponent2DURL.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/utils/image/ImageComponent2DURLIOListener.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/utils/image/ImageComponent2DURLState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/utils/universe/PlatformGeometryState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/utils/universe/SimpleUniverseState.java create mode 100644 src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/utils/universe/ViewerAvatarState.java (limited to 'src') diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/SceneGraphStateProvider.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/SceneGraphStateProvider.java index 070fad6..5aa9071 100644 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/SceneGraphStateProvider.java +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/SceneGraphStateProvider.java @@ -39,7 +39,7 @@ package org.jogamp.java3d.utils.scenegraph.io; -import org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d.SceneGraphObjectState; +import org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d.SceneGraphObjectState; /** * This interface allows developers to provide their own custom IO control for diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/Controller.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/Controller.java index 3acbd84..49b6fc0 100644 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/Controller.java +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/Controller.java @@ -78,10 +78,10 @@ import org.jogamp.java3d.utils.scenegraph.io.NamedObjectException; import org.jogamp.java3d.utils.scenegraph.io.ObjectNotLoadedException; import org.jogamp.java3d.utils.scenegraph.io.SceneGraphStateProvider; import org.jogamp.java3d.utils.scenegraph.io.UnsupportedUniverseException; -import org.jogamp.java3d.utils.scenegraph.io.state.com.sun.j3d.utils.universe.SimpleUniverseState; -import org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d.ImageComponentState; -import org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d.NullSceneGraphObjectState; -import org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d.SceneGraphObjectState; +import org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d.ImageComponentState; +import org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d.NullSceneGraphObjectState; +import org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d.SceneGraphObjectState; +import org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d.utils.universe.SimpleUniverseState; import org.jogamp.java3d.utils.universe.ConfiguredUniverse; import org.jogamp.java3d.utils.universe.SimpleUniverse; diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/RandomAccessFileControl.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/RandomAccessFileControl.java index 05da707..831ee6b 100644 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/RandomAccessFileControl.java +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/RandomAccessFileControl.java @@ -49,8 +49,8 @@ import org.jogamp.java3d.Canvas3D; import org.jogamp.java3d.CapabilityNotSetException; import org.jogamp.java3d.utils.scenegraph.io.UnsupportedUniverseException; -import org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d.BranchGroupState; -import org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d.SceneGraphObjectState; +import org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d.BranchGroupState; +import org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d.SceneGraphObjectState; import org.jogamp.java3d.utils.universe.ConfiguredUniverse; import org.jogamp.java3d.utils.universe.SimpleUniverse; diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/StreamControl.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/StreamControl.java index bb68718..f77dd00 100644 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/StreamControl.java +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/StreamControl.java @@ -45,8 +45,7 @@ import java.io.IOException; import java.util.HashMap; import org.jogamp.java3d.BranchGroup; - -import org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d.SceneGraphObjectState; +import org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d.SceneGraphObjectState; /** * Provides the infrastructure for ScenGraphStream Reader and Writer diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/SymbolTable.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/SymbolTable.java index 6141292..93386a4 100644 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/SymbolTable.java +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/SymbolTable.java @@ -54,9 +54,9 @@ import org.jogamp.java3d.SceneGraphObject; import org.jogamp.java3d.utils.scenegraph.io.NamedObjectException; import org.jogamp.java3d.utils.scenegraph.io.ObjectNotLoadedException; import org.jogamp.java3d.utils.scenegraph.io.SceneGraphObjectReferenceControl; -import org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d.NodeComponentState; -import org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d.NullSceneGraphObjectState; -import org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d.SceneGraphObjectState; +import org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d.NodeComponentState; +import org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d.NullSceneGraphObjectState; +import org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d.SceneGraphObjectState; /** * SymbolTable class for SceneGraph I/O. diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/SymbolTableData.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/SymbolTableData.java index ff3fa08..04cafe4 100644 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/SymbolTableData.java +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/retained/SymbolTableData.java @@ -44,8 +44,7 @@ import java.io.DataOutput; import java.io.IOException; import org.jogamp.java3d.SceneGraphObject; - -import org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d.SceneGraphObjectState; +import org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d.SceneGraphObjectState; /** * Encapsulates all the data for a node which is stored in the Symbol table diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/interpolators/KBRotPosScaleSplinePathInterpolatorState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/interpolators/KBRotPosScaleSplinePathInterpolatorState.java deleted file mode 100644 index 3feb7ce..0000000 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/com/sun/j3d/utils/behaviors/interpolators/KBRotPosScaleSplinePathInterpolatorState.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistribution of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistribution 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 Sun Microsystems, Inc. or the names of - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any - * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND - * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY - * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL - * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF - * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS - * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR - * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, - * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND - * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR - * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - * - * You acknowledge that this software is not designed, licensed or - * intended for use in the design, construction, operation or - * maintenance of any nuclear facility. - * - */ - -package org.jogamp.java3d.utils.scenegraph.io.state.com.sun.j3d.utils.behaviors.interpolators; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -import org.jogamp.java3d.SceneGraphObject; -import org.jogamp.java3d.Transform3D; -import org.jogamp.java3d.TransformGroup; - -import org.jogamp.java3d.utils.behaviors.interpolators.KBKeyFrame; -import org.jogamp.java3d.utils.behaviors.interpolators.KBRotPosScaleSplinePathInterpolator; -import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; -import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; -import org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d.TransformInterpolatorState; - -public class KBRotPosScaleSplinePathInterpolatorState extends TransformInterpolatorState { - - private KBKeyFrame[] keyFrames; - private Transform3D axisOfTranslation; - - public KBRotPosScaleSplinePathInterpolatorState(SymbolTableData symbol,Controller control) { - super( symbol, control ); - } - - @Override - public void writeConstructorParams( DataOutput out ) throws IOException { - super.writeConstructorParams( out ); - - control.writeTransform3D( out, ((KBRotPosScaleSplinePathInterpolator)node).getAxisOfRotPosScale() ); - - int length = ((KBRotPosScaleSplinePathInterpolator)node).getArrayLength(); - out.writeInt( length ); - - for(int i=0; i allLocales = universe.getAllLocales(); - out.writeInt( universe.numLocales() ); - localeBGs = new ArrayList( universe.numLocales() ); - int currentLocale = 0; - int graphID = 0; - while( allLocales.hasMoreElements() ) { - Locale locale = allLocales.nextElement(); - HiResCoord hiRes = new HiResCoord(); - writeHiResCoord( out, hiRes ); - int bgs[]; - if (currentLocale==0) - bgs = new int[locale.numBranchGraphs()-1]; // Disregard ViewingPlatform - else - bgs = new int[locale.numBranchGraphs()]; - out.writeInt( bgs.length ); - int count=0; - Enumeration e = locale.getAllBranchGraphs(); - while( e.hasMoreElements() ) { - BranchGroup bg = (BranchGroup)e.nextElement(); - if (!(bg instanceof ViewingPlatform)) { - control.getSymbolTable().addBranchGraphReference( bg, graphID ); - bgs[count] = graphID++; - out.writeInt( bgs[count] ); - count++; - totalBGs++; - } - } - localeBGs.add( bgs ); - } - } - - private void readLocales( DataInput in ) throws IOException { - int numLocales = in.readInt(); - localeBGs = new ArrayList( numLocales ); - Locale locale; - for(int i=0; i e = universe.getAllLocales(); - for( int i=0; i e = universe.getAllLocales(); - Locale locale; - - for( int i=0; i0) // TODO - remove if, workaround for bug in daily - app.setTextureUnitState( texUnitState ); - - app.setTransparencyAttributes( (TransparencyAttributes)control.getSymbolTable().getJ3dNode(transparencyAttributes) ); - - super.buildGraph(); // Must be last call in method - } - - @Override - protected org.jogamp.java3d.SceneGraphObject createNode() { - return new Appearance(); - } - -} - diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/AuralAttributesState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/AuralAttributesState.java deleted file mode 100644 index 58a5e9f..0000000 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/AuralAttributesState.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistribution of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistribution 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 Sun Microsystems, Inc. or the names of - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any - * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND - * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY - * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL - * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF - * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS - * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR - * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, - * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND - * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR - * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - * - * You acknowledge that this software is not designed, licensed or - * intended for use in the design, construction, operation or - * maintenance of any nuclear facility. - * - */ - -package org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -import org.jogamp.java3d.AuralAttributes; -import org.jogamp.java3d.SceneGraphObject; - -import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; -import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; - -public class AuralAttributesState extends NodeComponentState { - - public AuralAttributesState(SymbolTableData symbol,Controller control) { - super( symbol, control ); - - } - - @Override - public void writeObject( DataOutput out ) throws IOException { - super.writeObject( out ); - - out.writeFloat( ((AuralAttributes)node).getAttributeGain() ); - - float[] distance = new float[ ((AuralAttributes)node).getDistanceFilterLength() ]; - float[] cutoff = new float[ distance.length ]; - - ((AuralAttributes)node).getDistanceFilter( distance, cutoff ); - out.writeInt( distance.length ); - for(int i=0; i1) - ((NodeComponent)this.node).setDuplicateOnCloneTree(in.readBoolean()); - - } - - @Override - public void writeObject( DataOutput out ) throws IOException { - super.writeObject(out); - out.writeBoolean(((NodeComponent)this.node).getDuplicateOnCloneTree()); - } - - /** - * Called when this component reference count is incremented. - * Allows this component to update the reference count of any components - * that it references. - */ - public void addSubReference() { - } - -} - diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/NodeState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/NodeState.java deleted file mode 100644 index f7b2f30..0000000 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/NodeState.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistribution of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistribution 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 Sun Microsystems, Inc. or the names of - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any - * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND - * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY - * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL - * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF - * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS - * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR - * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, - * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND - * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR - * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - * - * You acknowledge that this software is not designed, licensed or - * intended for use in the design, construction, operation or - * maintenance of any nuclear facility. - * - */ - -package org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -import org.jogamp.java3d.Node; - -import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; -import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; - -public class NodeState extends SceneGraphObjectState { - - public NodeState( SymbolTableData symbol, Controller control ) { - super(symbol, control); - } - - @Override - public void writeObject( DataOutput out ) throws - IOException { - - super.writeObject( out ); - - control.writeBounds( out, ((Node)node).getBounds() ); - - out.writeBoolean( ((Node)node).getPickable() ); - out.writeBoolean( ((Node)node).getCollidable() ); - out.writeBoolean( ((Node)node).getBoundsAutoCompute() ); - - } - - @Override - public void readObject( DataInput in ) throws - IOException { - super.readObject(in); - - ((Node)node).setBounds( control.readBounds(in) ); - - ((Node)node).setPickable( in.readBoolean() ); - ((Node)node).setCollidable( in.readBoolean() ); - ((Node)node).setBoundsAutoCompute( in.readBoolean() ); - } - - - -} - diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/NullSceneGraphObjectState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/NullSceneGraphObjectState.java deleted file mode 100644 index d520fd9..0000000 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/NullSceneGraphObjectState.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistribution of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistribution 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 Sun Microsystems, Inc. or the names of - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any - * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND - * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY - * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL - * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF - * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS - * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR - * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, - * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND - * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR - * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - * - * You acknowledge that this software is not designed, licensed or - * intended for use in the design, construction, operation or - * maintenance of any nuclear facility. - * - */ - -package org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -import org.jogamp.java3d.SceneGraphObject; - -import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; -import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; - -public class NullSceneGraphObjectState extends SceneGraphObjectState { - - SymbolTableData symbolTableData; - - /** - * Dummy class to represent a null object in the scene graph - * - */ - public NullSceneGraphObjectState(SymbolTableData symbol,Controller control) { - super( null, control ); - symbolTableData = new SymbolTableData( -1, null, this, -1 ); - } - - /** - * DO NOT call symbolTable.addReference in writeObject as this (may) - * result in a concurrentModificationException. - * - * All references should be created in the constructor - */ - @Override - public void writeObject( DataOutput out ) throws IOException { - } - - @Override - public void readObject( DataInput in ) throws IOException { - } - - @Override - public SceneGraphObject getNode() { - return null; - } - - @Override - public int getNodeID() { - return -1; - } - - @Override - public SymbolTableData getSymbol() { - return symbolTableData; - } - - - @Override - protected org.jogamp.java3d.SceneGraphObject createNode() { - return null; - } - - -} diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/OrderedGroupState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/OrderedGroupState.java deleted file mode 100644 index 734d4e9..0000000 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/OrderedGroupState.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistribution of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistribution 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 Sun Microsystems, Inc. or the names of - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any - * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND - * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY - * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL - * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF - * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS - * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR - * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, - * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND - * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR - * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - * - * You acknowledge that this software is not designed, licensed or - * intended for use in the design, construction, operation or - * maintenance of any nuclear facility. - * - */ - -package org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -import org.jogamp.java3d.OrderedGroup; - -import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; -import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; - -public class OrderedGroupState extends GroupState { - - /** Creates new BranchGroupState */ - public OrderedGroupState(SymbolTableData symbol,Controller control) { - super( symbol, control ); - } - - @Override - public void writeObject( DataOutput out ) throws IOException { - super.writeObject( out ); - - int[] childIndexOrder = ((OrderedGroup)node).getChildIndexOrder(); - out.writeInt( childIndexOrder.length ); - for ( int i=0;i2) { - node.setName(readString(in)); - } - - readCapabilities( in ); - } - - public SceneGraphObject getNode() { - return node; - } - - public int getNodeID() { - return symbol.nodeID; - } - - public SymbolTableData getSymbol() { - return symbol; - } - - private void readUserData( DataInput in ) throws IOException { - - node.setUserData( control.readSerializedData( in )); - } - - private void writeUserData( DataOutput out ) throws IOException { - Object obj = node.getUserData(); - if (obj != null && !(obj instanceof java.io.Serializable)) { - System.err.println("UserData is not Serializable and will not be saved"); - obj = null; - } - - control.writeSerializedData( out, (Serializable)obj ); - } - - /* - * NOTE: This implementation assumes a maximum of 64 capability - * bits per node class. If this changes in the future, this - * implementation will need to be updated. - */ - private void writeCapabilities( DataOutput out ) throws IOException { - long capabilities = 0; - long frequentCapabilities = 0; - - for ( int i=0;i<64;i++ ) { - if ( node.getCapability( i ) ) capabilities |= (1L << i); - if ( !(node.getCapabilityIsFrequent( i )) ) frequentCapabilities |= (1L << i); - } - out.writeLong( capabilities ); - out.writeLong( frequentCapabilities ); - } - - private void readCapabilities( DataInput in ) throws IOException { - long capabilities = in.readLong(); - long frequentCapabilities = in.readLong(); - - for ( int i=0;i<64;i++ ) { - if ( (capabilities&(1L<= 5) { - ((PointLight) node).setAttenuation(control.readPoint3f(in)); - ((PointLight) node).setPosition(control.readPoint3f(in)); - } - - ((SpotLight) node).setDirection(control.readVector3f(in)); - ((SpotLight) node).setSpreadAngle(in.readFloat()); - ((SpotLight) node).setConcentration(in.readFloat()); - } - - @Override - protected org.jogamp.java3d.SceneGraphObject createNode() { - return new SpotLight(); - } - -} diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/SwitchState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/SwitchState.java deleted file mode 100644 index ad64b5f..0000000 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/SwitchState.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistribution of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistribution 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 Sun Microsystems, Inc. or the names of - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any - * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND - * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY - * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL - * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF - * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS - * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR - * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, - * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND - * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR - * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - * - * You acknowledge that this software is not designed, licensed or - * intended for use in the design, construction, operation or - * maintenance of any nuclear facility. - * - */ - -package org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -import org.jogamp.java3d.Switch; - -import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; -import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; - -public class SwitchState extends GroupState { - - public SwitchState(SymbolTableData symbol,Controller control) { - super(symbol, control); - } - - @Override - public void writeObject( DataOutput out ) throws IOException { - super.writeObject( out ); - Switch attr = (Switch)node; - control.writeSerializedData( out, attr.getChildMask() ); - out.writeInt( attr.getWhichChild() ); - } - - @Override - public void readObject( DataInput in ) throws IOException { - super.readObject( in ); - Switch attr = (Switch)node; - - attr.setChildMask( (java.util.BitSet)control.readSerializedData(in) ); - attr.setWhichChild( in.readInt() ); - } - - @Override - protected org.jogamp.java3d.SceneGraphObject createNode() { - return new Switch(); - } - - -} - diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/SwitchValueInterpolatorState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/SwitchValueInterpolatorState.java deleted file mode 100644 index b40710d..0000000 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/SwitchValueInterpolatorState.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistribution of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistribution 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 Sun Microsystems, Inc. or the names of - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any - * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND - * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY - * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL - * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF - * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS - * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR - * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, - * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND - * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR - * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - * - * You acknowledge that this software is not designed, licensed or - * intended for use in the design, construction, operation or - * maintenance of any nuclear facility. - * - */ - -package org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -import org.jogamp.java3d.SceneGraphObject; -import org.jogamp.java3d.Switch; -import org.jogamp.java3d.SwitchValueInterpolator; - -import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; -import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; - -public class SwitchValueInterpolatorState extends InterpolatorState { - - private int target; - - public SwitchValueInterpolatorState(SymbolTableData symbol,Controller control) { - super( symbol, control ); - - if (node!=null) - target = control.getSymbolTable().addReference( ((SwitchValueInterpolator)node).getTarget() ); - } - - @Override - public void writeObject( DataOutput out ) throws IOException { - super.writeObject( out ); - - out.writeInt( target ); - out.writeInt( ((SwitchValueInterpolator)node).getFirstChildIndex() ); - out.writeInt( ((SwitchValueInterpolator)node).getLastChildIndex() ); - } - - @Override - public void readObject( DataInput in ) throws IOException { - super.readObject( in ); - - target = in.readInt(); - ((SwitchValueInterpolator)node).setFirstChildIndex( in.readInt() ); - ((SwitchValueInterpolator)node).setLastChildIndex( in.readInt() ); - } - - - @Override - public void buildGraph() { - ((SwitchValueInterpolator)node).setTarget( (Switch)control.getSymbolTable().getJ3dNode( target )); - super.buildGraph(); // Must be last call in method - } - - @Override - public SceneGraphObject createNode( Class j3dClass ) { - return createNode( j3dClass, new Class[] { org.jogamp.java3d.Alpha.class, - org.jogamp.java3d.Switch.class }, - new Object[] { null, - null } ); - } - - @Override - protected org.jogamp.java3d.SceneGraphObject createNode() { - return new SwitchValueInterpolator( null, null ); - } - - -} diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TexCoordGenerationState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TexCoordGenerationState.java deleted file mode 100644 index 3dfc64f..0000000 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TexCoordGenerationState.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistribution of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistribution 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 Sun Microsystems, Inc. or the names of - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any - * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND - * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY - * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL - * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF - * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS - * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR - * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, - * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND - * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR - * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - * - * You acknowledge that this software is not designed, licensed or - * intended for use in the design, construction, operation or - * maintenance of any nuclear facility. - * - */ - -package org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -import org.jogamp.java3d.TexCoordGeneration; -import org.jogamp.vecmath.Vector4f; - -import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; -import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; - -public class TexCoordGenerationState extends NodeComponentState { - - public TexCoordGenerationState( SymbolTableData symbol, Controller control ) { - super(symbol, control); - } - - @Override - public void writeObject( DataOutput out ) throws IOException { - super.writeObject( out ); - TexCoordGeneration attr = (TexCoordGeneration)node; - Vector4f vec = new Vector4f(); - out.writeBoolean( attr.getEnable() ); - out.writeInt( attr.getFormat() ); - out.writeInt( attr.getGenMode() ); - attr.getPlaneR( vec ); - control.writeVector4f( out, vec ); - attr.getPlaneS( vec ); - control.writeVector4f( out, vec ); - attr.getPlaneT( vec ); - control.writeVector4f( out, vec ); - attr.getPlaneQ( vec ); - control.writeVector4f( out, vec ); - } - - @Override - public void readObject( DataInput in ) throws IOException { - super.readObject( in ); - TexCoordGeneration attr = (TexCoordGeneration)node; - attr.setEnable( in.readBoolean() ); - attr.setFormat( in.readInt() ); - attr.setGenMode( in.readInt() ); - attr.setPlaneR( control.readVector4f( in )); - attr.setPlaneS( control.readVector4f( in )); - attr.setPlaneT( control.readVector4f( in )); - attr.setPlaneQ( control.readVector4f( in )); - } - - @Override - protected org.jogamp.java3d.SceneGraphObject createNode() { - return new TexCoordGeneration(); - } - - -} - diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/Text3DState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/Text3DState.java deleted file mode 100644 index 1299480..0000000 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/Text3DState.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistribution of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistribution 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 Sun Microsystems, Inc. or the names of - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any - * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND - * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY - * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL - * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF - * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS - * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR - * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, - * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND - * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR - * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - * - * You acknowledge that this software is not designed, licensed or - * intended for use in the design, construction, operation or - * maintenance of any nuclear facility. - * - */ - -package org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -import org.jogamp.java3d.Font3D; -import org.jogamp.java3d.Text3D; -import org.jogamp.vecmath.Point3f; - -import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; -import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; - -public class Text3DState extends GeometryState { - - private int font3d; - private String string; - - public Text3DState(SymbolTableData symbol, Controller control) { - super(symbol, control); - - if (node != null) { - font3d = control.getSymbolTable().addReference( - ((Text3D) node).getFont3D()); - } - } - - @Override - public void writeObject(DataOutput out) throws IOException { - super.writeObject(out); - - out.writeInt(((Text3D) node).getAlignment()); - out.writeFloat(((Text3D) node).getCharacterSpacing()); - out.writeInt(font3d); - - out.writeInt(((Text3D) node).getPath()); - - Point3f pos = new Point3f(); - ((Text3D) node).getPosition(pos); - control.writePoint3f(out, pos); - - out.writeUTF(((Text3D) node).getString()); - } - - @Override - public void readObject(DataInput in) throws IOException { - super.readObject(in); - - ((Text3D) node).setAlignment(in.readInt()); - ((Text3D) node).setCharacterSpacing(in.readFloat()); - font3d = in.readInt(); - ((Text3D) node).setPath(in.readInt()); - ((Text3D) node).setPosition(control.readPoint3f(in)); - // issue 483: must wait until the Font3D is set in buildGraph() - string = in.readUTF(); - // old: ((Text3D)node).setString( in.readUTF() ); - } - - /** - * Called when this component reference count is incremented. Allows this - * component to update the reference count of any components that it - * references. - */ - @Override - public void addSubReference() { - control.getSymbolTable().incNodeComponentRefCount(font3d); - } - - @Override - public void buildGraph() { - ((Text3D) node).setFont3D(((Font3D) control.getSymbolTable() - .getJ3dNode(font3d))); - // issue 483 - ((Text3D) node).setString(string); - - super.buildGraph(); // Must be last call in method - } - - @Override - protected org.jogamp.java3d.SceneGraphObject createNode() { - return new Text3D(); - } - -} diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/Texture2DState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/Texture2DState.java deleted file mode 100644 index eeef326..0000000 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/Texture2DState.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistribution of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistribution 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 Sun Microsystems, Inc. or the names of - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any - * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND - * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY - * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL - * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF - * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS - * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR - * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, - * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND - * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR - * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - * - * You acknowledge that this software is not designed, licensed or - * intended for use in the design, construction, operation or - * maintenance of any nuclear facility. - * - */ - -package org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -import org.jogamp.java3d.ImageComponent2D; -import org.jogamp.java3d.SceneGraphObject; -import org.jogamp.java3d.Texture2D; - -import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; -import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; - -public class Texture2DState extends TextureState { - - private int detailImage=0; - - public Texture2DState( SymbolTableData symbol, Controller control ) { - super(symbol, control); - - // Set up references during save - if ( node!=null ) { - Texture2D t = (Texture2D)node; - detailImage = control.getSymbolTable().addReference( t.getDetailImage() ); - } - } - - @Override - public void writeObject( DataOutput out ) throws IOException { - super.writeObject( out ); - - out.writeInt( detailImage ); - - out.writeInt( ((Texture2D)node).getDetailTextureMode() ); - out.writeInt( ((Texture2D)node).getDetailTextureLevel() ); - - int num = ((Texture2D)node).getDetailTextureFuncPointsCount(); - out.writeInt( num ); - float[] lod = new float[ num ]; - float[] pts = new float[ num ]; - ((Texture2D)node).getDetailTextureFunc( lod, pts ); - for (int i = 0 ; i < num ; i++) { - out.writeFloat( lod[ i ] ); - out.writeFloat( pts[ i ] ); - } - } - - @Override - public void readObject( DataInput in ) throws IOException { - super.readObject( in ); - - detailImage = in.readInt(); - - ((Texture2D)node).setDetailTextureMode( in.readInt() ); - ((Texture2D)node).setDetailTextureLevel( in.readInt() ); - int num = in.readInt(); - float[] lod = new float[ num ]; - float[] pts = new float[ num ]; - for (int i = 0 ; i < num ; i++) { - lod[ i ] = in.readFloat(); - pts[ i ] = in.readFloat(); - } - ((Texture2D)node).setDetailTextureFunc( lod, pts ); - } - - /** - * Called when this component reference count is incremented. - * Allows this component to update the reference count of any components - * that it references. - */ - @Override - public void addSubReference() { - control.getSymbolTable().incNodeComponentRefCount( detailImage ); - } - - // Set up references during load - @Override - public void buildGraph() { - Texture2D t = (Texture2D)node; - t.setDetailImage( (ImageComponent2D)control.getSymbolTable().getJ3dNode( detailImage ) ); - super.buildGraph(); // Must be last call in method - } - - @Override - public SceneGraphObject createNode( Class j3dClass ) { - return createNode( j3dClass, new Class[] { Integer.TYPE, - Integer.TYPE, - Integer.TYPE, - Integer.TYPE, - Integer.TYPE }, - new Object[] { new Integer( mipMapMode ), - new Integer( format ), - new Integer( width ), - new Integer( height ), - new Integer( boundaryWidth ) } ); - } - - @Override - protected org.jogamp.java3d.SceneGraphObject createNode() { - return new Texture2D( mipMapMode, format, width, height, boundaryWidth ); - } - - -} diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/Texture3DState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/Texture3DState.java deleted file mode 100644 index 5d23289..0000000 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/Texture3DState.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistribution of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistribution 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 Sun Microsystems, Inc. or the names of - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any - * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND - * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY - * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL - * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF - * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS - * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR - * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, - * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND - * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR - * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - * - * You acknowledge that this software is not designed, licensed or - * intended for use in the design, construction, operation or - * maintenance of any nuclear facility. - * - */ - -package org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -import org.jogamp.java3d.SceneGraphObject; -import org.jogamp.java3d.Texture3D; - -import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; -import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; - -public class Texture3DState extends TextureState { - - private int depth; - - public Texture3DState( SymbolTableData symbol, Controller control ) { - super(symbol, control); - } - - @Override - public void writeObject( DataOutput out ) throws IOException { - super.writeObject( out ); - out.writeInt( ((Texture3D)node).getBoundaryModeR() ); - } - - @Override - public void readObject( DataInput in ) throws IOException { - super.readObject( in ); - ((Texture3D)node).setBoundaryModeR( in.readInt() ); - } - - @Override - public void writeConstructorParams( DataOutput out ) throws IOException { - super.writeConstructorParams( out ); - out.writeInt( ((Texture3D)node).getDepth() ); - } - - @Override - public void readConstructorParams( DataInput in ) throws IOException { - super.readConstructorParams( in ); - depth = in.readInt(); - } - - @Override - public SceneGraphObject createNode( Class j3dClass ) { - return createNode( j3dClass, new Class[] { Integer.TYPE, - Integer.TYPE, - Integer.TYPE, - Integer.TYPE, - Integer.TYPE, - Integer.TYPE }, - new Object[] { new Integer( mipMapMode ), - new Integer( format ), - new Integer( width ), - new Integer( height ), - new Integer( depth ), - new Integer( boundaryWidth ) } ); - } - - @Override - protected org.jogamp.java3d.SceneGraphObject createNode() { - return new Texture3D( mipMapMode, format, width, height, depth, boundaryWidth ); - } - - -} diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TextureAttributesState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TextureAttributesState.java deleted file mode 100644 index e910c48..0000000 --- a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/javax/media/j3d/TextureAttributesState.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistribution of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistribution 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 Sun Microsystems, Inc. or the names of - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any - * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND - * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY - * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL - * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF - * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS - * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR - * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, - * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND - * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR - * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - * - * You acknowledge that this software is not designed, licensed or - * intended for use in the design, construction, operation or - * maintenance of any nuclear facility. - * - */ - -package org.jogamp.java3d.utils.scenegraph.io.state.javax.media.j3d; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -import org.jogamp.java3d.TextureAttributes; -import org.jogamp.java3d.Transform3D; -import org.jogamp.vecmath.Color4f; -import org.jogamp.vecmath.Matrix4d; - -import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; -import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; - -public class TextureAttributesState extends NodeComponentState { - - private static final int MAX_COLOR_OPERANDS = 2; - - public TextureAttributesState( SymbolTableData symbol, Controller control ) { - super(symbol, control); - } - - @Override - public void writeObject( DataOutput out ) throws IOException { - super.writeObject( out ); - TextureAttributes attr = (TextureAttributes)node; - Color4f clr = new Color4f(); - Matrix4d mat = new Matrix4d(); - Transform3D trans = new Transform3D(); - int tableComponents = attr.getNumTextureColorTableComponents(); - int tableSize = attr.getTextureColorTableSize(); - int[][] colorTable = new int[tableComponents][tableSize]; - - out.writeInt( attr.getPerspectiveCorrectionMode() ); - attr.getTextureBlendColor( clr ); - control.writeColor4f( out, clr ); - out.writeInt( tableComponents ); - out.writeInt( tableSize ); - attr.getTextureColorTable( colorTable ); - for(int i=0; i0 ) { - float[] lod = new float[ points ]; - float[] pts = new float[ points ]; - attr.getSharpenTextureFunc( lod, pts ); - for (int i = 0 ; i < points ; i++) { - out.writeFloat( lod[i] ); - out.writeFloat( pts[i] ); - } - } - - points = attr.getFilter4FuncPointsCount(); - out.writeInt( points ); - if ( points>=4 ) { - float[] weights = new float[ points ]; - attr.getFilter4Func( weights ); - for (int i = 0 ; i < points ; i++) { - out.writeFloat( weights[i] ); - } - } - } - - @Override - public void readObject( DataInput in ) throws IOException { - super.readObject( in ); - Texture attr = (Texture)node; - attr.setBoundaryColor( control.readColor4f( in )); - attr.setBoundaryModeS( in.readInt() ); - attr.setBoundaryModeT( in.readInt() ); - attr.setEnable( in.readBoolean() ); - - imageComponents = new int[ in.readInt() ]; - for(int i=0; i0 ) { - float[] lod = new float[ points ]; - float[] pts = new float[ points ]; - for (int i = 0 ; i < points ; i++) { - lod[i] = in.readFloat(); - pts[i] = in.readFloat(); - } - attr.setSharpenTextureFunc( lod, pts ); - } - - points = in.readInt(); - if ( points >= 4 ) { - float[] weights = new float[ points ]; - for (int i = 0 ; i < points ; i++) { - weights[i] = in.readFloat(); - } - attr.setFilter4Func( weights ); - } - } - - @Override - public void addSubReference() { - if ( !(node instanceof TextureCubeMap) ) { - for( int i=0; i0) // TODO - remove if, workaround for bug in daily + app.setTextureUnitState( texUnitState ); + + app.setTransparencyAttributes( (TransparencyAttributes)control.getSymbolTable().getJ3dNode(transparencyAttributes) ); + + super.buildGraph(); // Must be last call in method + } + + @Override + protected org.jogamp.java3d.SceneGraphObject createNode() { + return new Appearance(); + } + +} + diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/AuralAttributesState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/AuralAttributesState.java new file mode 100644 index 0000000..e2d8ae5 --- /dev/null +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/AuralAttributesState.java @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution 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 Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any + * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND + * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY + * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL + * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF + * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS + * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR + * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, + * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND + * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR + * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + * + * You acknowledge that this software is not designed, licensed or + * intended for use in the design, construction, operation or + * maintenance of any nuclear facility. + * + */ + +package org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.jogamp.java3d.AuralAttributes; +import org.jogamp.java3d.SceneGraphObject; + +import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; +import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; + +public class AuralAttributesState extends NodeComponentState { + + public AuralAttributesState(SymbolTableData symbol,Controller control) { + super( symbol, control ); + + } + + @Override + public void writeObject( DataOutput out ) throws IOException { + super.writeObject( out ); + + out.writeFloat( ((AuralAttributes)node).getAttributeGain() ); + + float[] distance = new float[ ((AuralAttributes)node).getDistanceFilterLength() ]; + float[] cutoff = new float[ distance.length ]; + + ((AuralAttributes)node).getDistanceFilter( distance, cutoff ); + out.writeInt( distance.length ); + for(int i=0; i1) + ((NodeComponent)this.node).setDuplicateOnCloneTree(in.readBoolean()); + + } + + @Override + public void writeObject( DataOutput out ) throws IOException { + super.writeObject(out); + out.writeBoolean(((NodeComponent)this.node).getDuplicateOnCloneTree()); + } + + /** + * Called when this component reference count is incremented. + * Allows this component to update the reference count of any components + * that it references. + */ + public void addSubReference() { + } + +} + diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/NodeState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/NodeState.java new file mode 100644 index 0000000..705241f --- /dev/null +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/NodeState.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution 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 Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any + * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND + * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY + * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL + * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF + * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS + * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR + * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, + * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND + * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR + * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + * + * You acknowledge that this software is not designed, licensed or + * intended for use in the design, construction, operation or + * maintenance of any nuclear facility. + * + */ + +package org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.jogamp.java3d.Node; + +import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; +import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; + +public class NodeState extends SceneGraphObjectState { + + public NodeState( SymbolTableData symbol, Controller control ) { + super(symbol, control); + } + + @Override + public void writeObject( DataOutput out ) throws + IOException { + + super.writeObject( out ); + + control.writeBounds( out, ((Node)node).getBounds() ); + + out.writeBoolean( ((Node)node).getPickable() ); + out.writeBoolean( ((Node)node).getCollidable() ); + out.writeBoolean( ((Node)node).getBoundsAutoCompute() ); + + } + + @Override + public void readObject( DataInput in ) throws + IOException { + super.readObject(in); + + ((Node)node).setBounds( control.readBounds(in) ); + + ((Node)node).setPickable( in.readBoolean() ); + ((Node)node).setCollidable( in.readBoolean() ); + ((Node)node).setBoundsAutoCompute( in.readBoolean() ); + } + + + +} + diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/NullSceneGraphObjectState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/NullSceneGraphObjectState.java new file mode 100644 index 0000000..7d12bfd --- /dev/null +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/NullSceneGraphObjectState.java @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution 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 Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any + * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND + * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY + * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL + * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF + * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS + * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR + * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, + * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND + * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR + * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + * + * You acknowledge that this software is not designed, licensed or + * intended for use in the design, construction, operation or + * maintenance of any nuclear facility. + * + */ + +package org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.jogamp.java3d.SceneGraphObject; + +import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; +import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; + +public class NullSceneGraphObjectState extends SceneGraphObjectState { + + SymbolTableData symbolTableData; + + /** + * Dummy class to represent a null object in the scene graph + * + */ + public NullSceneGraphObjectState(SymbolTableData symbol,Controller control) { + super( null, control ); + symbolTableData = new SymbolTableData( -1, null, this, -1 ); + } + + /** + * DO NOT call symbolTable.addReference in writeObject as this (may) + * result in a concurrentModificationException. + * + * All references should be created in the constructor + */ + @Override + public void writeObject( DataOutput out ) throws IOException { + } + + @Override + public void readObject( DataInput in ) throws IOException { + } + + @Override + public SceneGraphObject getNode() { + return null; + } + + @Override + public int getNodeID() { + return -1; + } + + @Override + public SymbolTableData getSymbol() { + return symbolTableData; + } + + + @Override + protected org.jogamp.java3d.SceneGraphObject createNode() { + return null; + } + + +} diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/OrderedGroupState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/OrderedGroupState.java new file mode 100644 index 0000000..2a1e488 --- /dev/null +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/OrderedGroupState.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution 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 Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any + * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND + * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY + * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL + * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF + * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS + * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR + * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, + * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND + * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR + * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + * + * You acknowledge that this software is not designed, licensed or + * intended for use in the design, construction, operation or + * maintenance of any nuclear facility. + * + */ + +package org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.jogamp.java3d.OrderedGroup; + +import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; +import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; + +public class OrderedGroupState extends GroupState { + + /** Creates new BranchGroupState */ + public OrderedGroupState(SymbolTableData symbol,Controller control) { + super( symbol, control ); + } + + @Override + public void writeObject( DataOutput out ) throws IOException { + super.writeObject( out ); + + int[] childIndexOrder = ((OrderedGroup)node).getChildIndexOrder(); + out.writeInt( childIndexOrder.length ); + for ( int i=0;i2) { + node.setName(readString(in)); + } + + readCapabilities( in ); + } + + public SceneGraphObject getNode() { + return node; + } + + public int getNodeID() { + return symbol.nodeID; + } + + public SymbolTableData getSymbol() { + return symbol; + } + + private void readUserData( DataInput in ) throws IOException { + + node.setUserData( control.readSerializedData( in )); + } + + private void writeUserData( DataOutput out ) throws IOException { + Object obj = node.getUserData(); + if (obj != null && !(obj instanceof java.io.Serializable)) { + System.err.println("UserData is not Serializable and will not be saved"); + obj = null; + } + + control.writeSerializedData( out, (Serializable)obj ); + } + + /* + * NOTE: This implementation assumes a maximum of 64 capability + * bits per node class. If this changes in the future, this + * implementation will need to be updated. + */ + private void writeCapabilities( DataOutput out ) throws IOException { + long capabilities = 0; + long frequentCapabilities = 0; + + for ( int i=0;i<64;i++ ) { + if ( node.getCapability( i ) ) capabilities |= (1L << i); + if ( !(node.getCapabilityIsFrequent( i )) ) frequentCapabilities |= (1L << i); + } + out.writeLong( capabilities ); + out.writeLong( frequentCapabilities ); + } + + private void readCapabilities( DataInput in ) throws IOException { + long capabilities = in.readLong(); + long frequentCapabilities = in.readLong(); + + for ( int i=0;i<64;i++ ) { + if ( (capabilities&(1L<= 5) { + ((PointLight) node).setAttenuation(control.readPoint3f(in)); + ((PointLight) node).setPosition(control.readPoint3f(in)); + } + + ((SpotLight) node).setDirection(control.readVector3f(in)); + ((SpotLight) node).setSpreadAngle(in.readFloat()); + ((SpotLight) node).setConcentration(in.readFloat()); + } + + @Override + protected org.jogamp.java3d.SceneGraphObject createNode() { + return new SpotLight(); + } + +} diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/SwitchState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/SwitchState.java new file mode 100644 index 0000000..2cacb78 --- /dev/null +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/SwitchState.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution 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 Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any + * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND + * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY + * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL + * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF + * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS + * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR + * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, + * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND + * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR + * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + * + * You acknowledge that this software is not designed, licensed or + * intended for use in the design, construction, operation or + * maintenance of any nuclear facility. + * + */ + +package org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.jogamp.java3d.Switch; + +import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; +import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; + +public class SwitchState extends GroupState { + + public SwitchState(SymbolTableData symbol,Controller control) { + super(symbol, control); + } + + @Override + public void writeObject( DataOutput out ) throws IOException { + super.writeObject( out ); + Switch attr = (Switch)node; + control.writeSerializedData( out, attr.getChildMask() ); + out.writeInt( attr.getWhichChild() ); + } + + @Override + public void readObject( DataInput in ) throws IOException { + super.readObject( in ); + Switch attr = (Switch)node; + + attr.setChildMask( (java.util.BitSet)control.readSerializedData(in) ); + attr.setWhichChild( in.readInt() ); + } + + @Override + protected org.jogamp.java3d.SceneGraphObject createNode() { + return new Switch(); + } + + +} + diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/SwitchValueInterpolatorState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/SwitchValueInterpolatorState.java new file mode 100644 index 0000000..160a858 --- /dev/null +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/SwitchValueInterpolatorState.java @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution 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 Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any + * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND + * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY + * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL + * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF + * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS + * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR + * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, + * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND + * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR + * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + * + * You acknowledge that this software is not designed, licensed or + * intended for use in the design, construction, operation or + * maintenance of any nuclear facility. + * + */ + +package org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.jogamp.java3d.SceneGraphObject; +import org.jogamp.java3d.Switch; +import org.jogamp.java3d.SwitchValueInterpolator; + +import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; +import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; + +public class SwitchValueInterpolatorState extends InterpolatorState { + + private int target; + + public SwitchValueInterpolatorState(SymbolTableData symbol,Controller control) { + super( symbol, control ); + + if (node!=null) + target = control.getSymbolTable().addReference( ((SwitchValueInterpolator)node).getTarget() ); + } + + @Override + public void writeObject( DataOutput out ) throws IOException { + super.writeObject( out ); + + out.writeInt( target ); + out.writeInt( ((SwitchValueInterpolator)node).getFirstChildIndex() ); + out.writeInt( ((SwitchValueInterpolator)node).getLastChildIndex() ); + } + + @Override + public void readObject( DataInput in ) throws IOException { + super.readObject( in ); + + target = in.readInt(); + ((SwitchValueInterpolator)node).setFirstChildIndex( in.readInt() ); + ((SwitchValueInterpolator)node).setLastChildIndex( in.readInt() ); + } + + + @Override + public void buildGraph() { + ((SwitchValueInterpolator)node).setTarget( (Switch)control.getSymbolTable().getJ3dNode( target )); + super.buildGraph(); // Must be last call in method + } + + @Override + public SceneGraphObject createNode( Class j3dClass ) { + return createNode( j3dClass, new Class[] { org.jogamp.java3d.Alpha.class, + org.jogamp.java3d.Switch.class }, + new Object[] { null, + null } ); + } + + @Override + protected org.jogamp.java3d.SceneGraphObject createNode() { + return new SwitchValueInterpolator( null, null ); + } + + +} diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TexCoordGenerationState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TexCoordGenerationState.java new file mode 100644 index 0000000..faa67b1 --- /dev/null +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TexCoordGenerationState.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution 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 Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any + * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND + * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY + * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL + * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF + * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS + * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR + * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, + * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND + * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR + * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + * + * You acknowledge that this software is not designed, licensed or + * intended for use in the design, construction, operation or + * maintenance of any nuclear facility. + * + */ + +package org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.jogamp.java3d.TexCoordGeneration; +import org.jogamp.vecmath.Vector4f; + +import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; +import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; + +public class TexCoordGenerationState extends NodeComponentState { + + public TexCoordGenerationState( SymbolTableData symbol, Controller control ) { + super(symbol, control); + } + + @Override + public void writeObject( DataOutput out ) throws IOException { + super.writeObject( out ); + TexCoordGeneration attr = (TexCoordGeneration)node; + Vector4f vec = new Vector4f(); + out.writeBoolean( attr.getEnable() ); + out.writeInt( attr.getFormat() ); + out.writeInt( attr.getGenMode() ); + attr.getPlaneR( vec ); + control.writeVector4f( out, vec ); + attr.getPlaneS( vec ); + control.writeVector4f( out, vec ); + attr.getPlaneT( vec ); + control.writeVector4f( out, vec ); + attr.getPlaneQ( vec ); + control.writeVector4f( out, vec ); + } + + @Override + public void readObject( DataInput in ) throws IOException { + super.readObject( in ); + TexCoordGeneration attr = (TexCoordGeneration)node; + attr.setEnable( in.readBoolean() ); + attr.setFormat( in.readInt() ); + attr.setGenMode( in.readInt() ); + attr.setPlaneR( control.readVector4f( in )); + attr.setPlaneS( control.readVector4f( in )); + attr.setPlaneT( control.readVector4f( in )); + attr.setPlaneQ( control.readVector4f( in )); + } + + @Override + protected org.jogamp.java3d.SceneGraphObject createNode() { + return new TexCoordGeneration(); + } + + +} + diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/Text3DState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/Text3DState.java new file mode 100644 index 0000000..ef091df --- /dev/null +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/Text3DState.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution 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 Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any + * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND + * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY + * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL + * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF + * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS + * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR + * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, + * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND + * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR + * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + * + * You acknowledge that this software is not designed, licensed or + * intended for use in the design, construction, operation or + * maintenance of any nuclear facility. + * + */ + +package org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.jogamp.java3d.Font3D; +import org.jogamp.java3d.Text3D; +import org.jogamp.vecmath.Point3f; + +import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; +import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; + +public class Text3DState extends GeometryState { + + private int font3d; + private String string; + + public Text3DState(SymbolTableData symbol, Controller control) { + super(symbol, control); + + if (node != null) { + font3d = control.getSymbolTable().addReference( + ((Text3D) node).getFont3D()); + } + } + + @Override + public void writeObject(DataOutput out) throws IOException { + super.writeObject(out); + + out.writeInt(((Text3D) node).getAlignment()); + out.writeFloat(((Text3D) node).getCharacterSpacing()); + out.writeInt(font3d); + + out.writeInt(((Text3D) node).getPath()); + + Point3f pos = new Point3f(); + ((Text3D) node).getPosition(pos); + control.writePoint3f(out, pos); + + out.writeUTF(((Text3D) node).getString()); + } + + @Override + public void readObject(DataInput in) throws IOException { + super.readObject(in); + + ((Text3D) node).setAlignment(in.readInt()); + ((Text3D) node).setCharacterSpacing(in.readFloat()); + font3d = in.readInt(); + ((Text3D) node).setPath(in.readInt()); + ((Text3D) node).setPosition(control.readPoint3f(in)); + // issue 483: must wait until the Font3D is set in buildGraph() + string = in.readUTF(); + // old: ((Text3D)node).setString( in.readUTF() ); + } + + /** + * Called when this component reference count is incremented. Allows this + * component to update the reference count of any components that it + * references. + */ + @Override + public void addSubReference() { + control.getSymbolTable().incNodeComponentRefCount(font3d); + } + + @Override + public void buildGraph() { + ((Text3D) node).setFont3D(((Font3D) control.getSymbolTable() + .getJ3dNode(font3d))); + // issue 483 + ((Text3D) node).setString(string); + + super.buildGraph(); // Must be last call in method + } + + @Override + protected org.jogamp.java3d.SceneGraphObject createNode() { + return new Text3D(); + } + +} diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/Texture2DState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/Texture2DState.java new file mode 100644 index 0000000..a6a5eb1 --- /dev/null +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/Texture2DState.java @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution 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 Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any + * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND + * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY + * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL + * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF + * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS + * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR + * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, + * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND + * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR + * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + * + * You acknowledge that this software is not designed, licensed or + * intended for use in the design, construction, operation or + * maintenance of any nuclear facility. + * + */ + +package org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.jogamp.java3d.ImageComponent2D; +import org.jogamp.java3d.SceneGraphObject; +import org.jogamp.java3d.Texture2D; + +import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; +import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; + +public class Texture2DState extends TextureState { + + private int detailImage=0; + + public Texture2DState( SymbolTableData symbol, Controller control ) { + super(symbol, control); + + // Set up references during save + if ( node!=null ) { + Texture2D t = (Texture2D)node; + detailImage = control.getSymbolTable().addReference( t.getDetailImage() ); + } + } + + @Override + public void writeObject( DataOutput out ) throws IOException { + super.writeObject( out ); + + out.writeInt( detailImage ); + + out.writeInt( ((Texture2D)node).getDetailTextureMode() ); + out.writeInt( ((Texture2D)node).getDetailTextureLevel() ); + + int num = ((Texture2D)node).getDetailTextureFuncPointsCount(); + out.writeInt( num ); + float[] lod = new float[ num ]; + float[] pts = new float[ num ]; + ((Texture2D)node).getDetailTextureFunc( lod, pts ); + for (int i = 0 ; i < num ; i++) { + out.writeFloat( lod[ i ] ); + out.writeFloat( pts[ i ] ); + } + } + + @Override + public void readObject( DataInput in ) throws IOException { + super.readObject( in ); + + detailImage = in.readInt(); + + ((Texture2D)node).setDetailTextureMode( in.readInt() ); + ((Texture2D)node).setDetailTextureLevel( in.readInt() ); + int num = in.readInt(); + float[] lod = new float[ num ]; + float[] pts = new float[ num ]; + for (int i = 0 ; i < num ; i++) { + lod[ i ] = in.readFloat(); + pts[ i ] = in.readFloat(); + } + ((Texture2D)node).setDetailTextureFunc( lod, pts ); + } + + /** + * Called when this component reference count is incremented. + * Allows this component to update the reference count of any components + * that it references. + */ + @Override + public void addSubReference() { + control.getSymbolTable().incNodeComponentRefCount( detailImage ); + } + + // Set up references during load + @Override + public void buildGraph() { + Texture2D t = (Texture2D)node; + t.setDetailImage( (ImageComponent2D)control.getSymbolTable().getJ3dNode( detailImage ) ); + super.buildGraph(); // Must be last call in method + } + + @Override + public SceneGraphObject createNode( Class j3dClass ) { + return createNode( j3dClass, new Class[] { Integer.TYPE, + Integer.TYPE, + Integer.TYPE, + Integer.TYPE, + Integer.TYPE }, + new Object[] { new Integer( mipMapMode ), + new Integer( format ), + new Integer( width ), + new Integer( height ), + new Integer( boundaryWidth ) } ); + } + + @Override + protected org.jogamp.java3d.SceneGraphObject createNode() { + return new Texture2D( mipMapMode, format, width, height, boundaryWidth ); + } + + +} diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/Texture3DState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/Texture3DState.java new file mode 100644 index 0000000..a31fc16 --- /dev/null +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/Texture3DState.java @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution 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 Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any + * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND + * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY + * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL + * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF + * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS + * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR + * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, + * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND + * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR + * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + * + * You acknowledge that this software is not designed, licensed or + * intended for use in the design, construction, operation or + * maintenance of any nuclear facility. + * + */ + +package org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.jogamp.java3d.SceneGraphObject; +import org.jogamp.java3d.Texture3D; + +import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; +import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; + +public class Texture3DState extends TextureState { + + private int depth; + + public Texture3DState( SymbolTableData symbol, Controller control ) { + super(symbol, control); + } + + @Override + public void writeObject( DataOutput out ) throws IOException { + super.writeObject( out ); + out.writeInt( ((Texture3D)node).getBoundaryModeR() ); + } + + @Override + public void readObject( DataInput in ) throws IOException { + super.readObject( in ); + ((Texture3D)node).setBoundaryModeR( in.readInt() ); + } + + @Override + public void writeConstructorParams( DataOutput out ) throws IOException { + super.writeConstructorParams( out ); + out.writeInt( ((Texture3D)node).getDepth() ); + } + + @Override + public void readConstructorParams( DataInput in ) throws IOException { + super.readConstructorParams( in ); + depth = in.readInt(); + } + + @Override + public SceneGraphObject createNode( Class j3dClass ) { + return createNode( j3dClass, new Class[] { Integer.TYPE, + Integer.TYPE, + Integer.TYPE, + Integer.TYPE, + Integer.TYPE, + Integer.TYPE }, + new Object[] { new Integer( mipMapMode ), + new Integer( format ), + new Integer( width ), + new Integer( height ), + new Integer( depth ), + new Integer( boundaryWidth ) } ); + } + + @Override + protected org.jogamp.java3d.SceneGraphObject createNode() { + return new Texture3D( mipMapMode, format, width, height, depth, boundaryWidth ); + } + + +} diff --git a/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TextureAttributesState.java b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TextureAttributesState.java new file mode 100644 index 0000000..97b21b0 --- /dev/null +++ b/src/main/java/org/jogamp/java3d/utils/scenegraph/io/state/org/jogamp/java3d/TextureAttributesState.java @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution 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 Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any + * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND + * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY + * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL + * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF + * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS + * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR + * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, + * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND + * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR + * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + * + * You acknowledge that this software is not designed, licensed or + * intended for use in the design, construction, operation or + * maintenance of any nuclear facility. + * + */ + +package org.jogamp.java3d.utils.scenegraph.io.state.org.jogamp.java3d; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.jogamp.java3d.TextureAttributes; +import org.jogamp.java3d.Transform3D; +import org.jogamp.vecmath.Color4f; +import org.jogamp.vecmath.Matrix4d; + +import org.jogamp.java3d.utils.scenegraph.io.retained.Controller; +import org.jogamp.java3d.utils.scenegraph.io.retained.SymbolTableData; + +public class TextureAttributesState extends NodeComponentState { + + private static final int MAX_COLOR_OPERANDS = 2; + + public TextureAttributesState( SymbolTableData symbol, Controller control ) { + super(symbol, control); + } + + @Override + public void writeObject( DataOutput out ) throws IOException { + super.writeObject( out ); + TextureAttributes attr = (TextureAttributes)node; + Color4f clr = new Color4f(); + Matrix4d mat = new Matrix4d(); + Transform3D trans = new Transform3D(); + int tableComponents = attr.getNumTextureColorTableComponents(); + int tableSize = attr.getTextureColorTableSize(); + int[][] colorTable = new int[tableComponents][tableSize]; + + out.writeInt( attr.getPerspectiveCorrectionMode() ); + attr.getTextureBlendColor( clr ); + control.writeColor4f( out, clr ); + out.writeInt( tableComponents ); + out.writeInt( tableSize ); + attr.getTextureColorTable( colorTable ); + for(int i=0; i0 ) { + float[] lod = new float[ points ]; + float[] pts = new float[ points ]; + attr.getSharpenTextureFunc( lod, pts ); + for (int i = 0 ; i < points ; i++) { + out.writeFloat( lod[i] ); + out.writeFloat( pts[i] ); + } + } + + points = attr.getFilter4FuncPointsCount(); + out.writeInt( points ); + if ( points>=4 ) { + float[] weights = new float[ points ]; + attr.getFilter4Func( weights ); + for (int i = 0 ; i < points ; i++) { + out.writeFloat( weights[i] ); + } + } + } + + @Override + public void readObject( DataInput in ) throws IOException { + super.readObject( in ); + Texture attr = (Texture)node; + attr.setBoundaryColor( control.readColor4f( in )); + attr.setBoundaryModeS( in.readInt() ); + attr.setBoundaryModeT( in.readInt() ); + attr.setEnable( in.readBoolean() ); + + imageComponents = new int[ in.readInt() ]; + for(int i=0; i0 ) { + float[] lod = new float[ points ]; + float[] pts = new float[ points ]; + for (int i = 0 ; i < points ; i++) { + lod[i] = in.readFloat(); + pts[i] = in.readFloat(); + } + attr.setSharpenTextureFunc( lod, pts ); + } + + points = in.readInt(); + if ( points >= 4 ) { + float[] weights = new float[ points ]; + for (int i = 0 ; i < points ; i++) { + weights[i] = in.readFloat(); + } + attr.setFilter4Func( weights ); + } + } + + @Override + public void addSubReference() { + if ( !(node instanceof TextureCubeMap) ) { + for( int i=0; i allLocales = universe.getAllLocales(); + out.writeInt( universe.numLocales() ); + localeBGs = new ArrayList( universe.numLocales() ); + int currentLocale = 0; + int graphID = 0; + while( allLocales.hasMoreElements() ) { + Locale locale = allLocales.nextElement(); + HiResCoord hiRes = new HiResCoord(); + writeHiResCoord( out, hiRes ); + int bgs[]; + if (currentLocale==0) + bgs = new int[locale.numBranchGraphs()-1]; // Disregard ViewingPlatform + else + bgs = new int[locale.numBranchGraphs()]; + out.writeInt( bgs.length ); + int count=0; + Enumeration e = locale.getAllBranchGraphs(); + while( e.hasMoreElements() ) { + BranchGroup bg = (BranchGroup)e.nextElement(); + if (!(bg instanceof ViewingPlatform)) { + control.getSymbolTable().addBranchGraphReference( bg, graphID ); + bgs[count] = graphID++; + out.writeInt( bgs[count] ); + count++; + totalBGs++; + } + } + localeBGs.add( bgs ); + } + } + + private void readLocales( DataInput in ) throws IOException { + int numLocales = in.readInt(); + localeBGs = new ArrayList( numLocales ); + Locale locale; + for(int i=0; i e = universe.getAllLocales(); + for( int i=0; i e = universe.getAllLocales(); + Locale locale; + + for( int i=0; i