This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 164b33a7a8dbe8fd0a7d02c95cc058ffbb8de4c1
Author: jsorel <[email protected]>
AuthorDate: Mon Aug 3 11:24:36 2026 +0200

    chore(Scene): move scene classes to a separate package outside the geometry 
package
---
 .../org.apache.sis.geometry/main/module-info.java  |  4 ++
 .../sis/{geometries => }/scene/Animation.java      |  2 +-
 .../{geometries => }/scene/AnimationSampler.java   |  2 +-
 .../apache/sis/{geometries => }/scene/Camera.java  |  2 +-
 .../apache/sis/{geometries => }/scene/Model.java   |  4 +-
 .../sis/{geometries => }/scene/MorphTarget.java    |  2 +-
 .../apache/sis/{geometries => }/scene/Sampler.java |  2 +-
 .../sis/{geometries => }/scene/SceneNode.java      | 12 ++---
 .../apache/sis/scene/SceneUtilities.java}          | 34 +++++++-----
 .../apache/sis/{geometries => }/scene/Skin.java    |  2 +-
 .../apache/sis/{geometries => }/scene/Surface.java |  6 +--
 .../apache/sis/{geometries => }/scene/Texture.java |  2 +-
 .../scene/lights => scene/light}/Directional.java  |  2 +-
 .../scene/lights => scene/light}/HDRI.java         |  2 +-
 .../scene/lights => scene/light}/Light.java        |  2 +-
 .../scene/lights => scene/light}/Point.java        |  2 +-
 .../scene/lights => scene/light}/Quad.java         |  2 +-
 .../scene/lights => scene/light}/Ring.java         |  2 +-
 .../scene/lights => scene/light}/Spot.java         |  2 +-
 .../scene/material/BlinnPhong.java                 |  4 +-
 .../{geometries => }/scene/material/Material.java  |  4 +-
 .../sis/{geometries => }/scene/material/PBR.java   |  4 +-
 .../sis/{geometries => }/scene/material/PBRSG.java |  4 +-
 .../sis/{geometries => }/scene/package-info.java   |  2 +-
 .../{geometries => }/scene/physics/Collider.java   |  2 +-
 .../scene/physics/ColliderGeometry.java            |  2 +-
 .../scene/physics/CollisionFilter.java             |  2 +-
 .../sis/{geometries => }/scene/physics/Joint.java  |  4 +-
 .../sis/{geometries => }/scene/physics/Motion.java |  2 +-
 .../scene/physics/PhysicalMaterial.java            |  2 +-
 .../{geometries => }/scene/physics/Trigger.java    |  4 +-
 .../scene/physics/package-info.java                |  2 +-
 .../org/apache/sis/scene/SceneUtilitiesTest.java   | 62 ++++++++++++++++++++++
 33 files changed, 131 insertions(+), 57 deletions(-)

diff --git a/incubator/src/org.apache.sis.geometry/main/module-info.java 
b/incubator/src/org.apache.sis.geometry/main/module-info.java
index a5f21d8373..92576ee13e 100644
--- a/incubator/src/org.apache.sis.geometry/main/module-info.java
+++ b/incubator/src/org.apache.sis.geometry/main/module-info.java
@@ -31,6 +31,10 @@ module org.apache.sis.geometry {
     exports org.apache.sis.geometries.operation;
     exports org.apache.sis.geometries.processor;
     exports org.apache.sis.geometries.math;
+    exports org.apache.sis.scene;
+    exports org.apache.sis.scene.light;
+    exports org.apache.sis.scene.material;
+    exports org.apache.sis.scene.physics;
 
     exports org.apache.sis.geometries.internal.shared to
             org.apache.sis.referencing.dggs;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Animation.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Animation.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Animation.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Animation.java
index c54fc5f6b6..74b51a99a8 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Animation.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Animation.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene;
+package org.apache.sis.scene;
 
 import java.util.Objects;
 
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/AnimationSampler.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/AnimationSampler.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/AnimationSampler.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/AnimationSampler.java
index a658dce384..2fa5b8fd16 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/AnimationSampler.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/AnimationSampler.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene;
+package org.apache.sis.scene;
 
 import java.util.Objects;
 import org.apache.sis.geometries.math.Array;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Camera.java
 b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Camera.java
similarity index 99%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Camera.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Camera.java
index 5e0ebd2435..3471af793e 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Camera.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Camera.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene;
+package org.apache.sis.scene;
 
 import java.util.Objects;
 
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Model.java
 b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Model.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Model.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Model.java
index b49c4050ef..46a97bb17c 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Model.java
+++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Model.java
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene;
+package org.apache.sis.scene;
 
-import org.apache.sis.geometries.scene.material.Material;
+import org.apache.sis.scene.material.Material;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/MorphTarget.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/MorphTarget.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/MorphTarget.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/MorphTarget.java
index 8eaa341334..f4d742cac2 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/MorphTarget.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/MorphTarget.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene;
+package org.apache.sis.scene;
 
 import java.util.LinkedHashMap;
 import java.util.List;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Sampler.java
 b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Sampler.java
similarity index 99%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Sampler.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Sampler.java
index 391ab2c8c0..941192b20e 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Sampler.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Sampler.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene;
+package org.apache.sis.scene;
 
 import java.util.Objects;
 import org.apache.sis.util.ArgumentChecks;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/SceneNode.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/SceneNode.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/SceneNode.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/SceneNode.java
index 5c241d7302..5016b5f88e 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/SceneNode.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/SceneNode.java
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene;
+package org.apache.sis.scene;
 
-import org.apache.sis.geometries.scene.lights.Light;
+import org.apache.sis.scene.light.Light;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -32,10 +32,10 @@ import org.opengis.referencing.operation.TransformException;
 import org.apache.sis.geometries.Geometries;
 import org.apache.sis.geometries.math.Similarity;
 import org.apache.sis.geometries.math.Similarity3D;
-import org.apache.sis.geometries.scene.physics.Collider;
-import org.apache.sis.geometries.scene.physics.Joint;
-import org.apache.sis.geometries.scene.physics.Motion;
-import org.apache.sis.geometries.scene.physics.Trigger;
+import org.apache.sis.scene.physics.Collider;
+import org.apache.sis.scene.physics.Joint;
+import org.apache.sis.scene.physics.Motion;
+import org.apache.sis.scene.physics.Trigger;
 import org.apache.sis.geometry.Envelopes;
 import org.apache.sis.geometry.GeneralEnvelope;
 import org.apache.sis.measure.NumberRange;
diff --git a/incubator/src/org.apache.sis.geometry/main/module-info.java 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/SceneUtilities.java
similarity index 54%
copy from incubator/src/org.apache.sis.geometry/main/module-info.java
copy to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/SceneUtilities.java
index a5f21d8373..326d689517 100644
--- a/incubator/src/org.apache.sis.geometry/main/module-info.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/SceneUtilities.java
@@ -14,26 +14,34 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.sis.scene;
+
+import org.apache.sis.geometries.math.Matrix;
+import org.apache.sis.geometries.math.Similarity3D;
 
 /**
- * Geometries.
  *
  * @author Johann Sorel (Geomatys)
  */
-module org.apache.sis.geometry {
-    requires esri.geometry.api;     // TODO: remove (this is for tests).
-    requires org.apache.sis.feature;
-    requires org.apache.sis.util;
-    requires transitive org.apache.sis.storage;
-
+public final class SceneUtilities {
 
-    exports org.apache.sis.geometries;
-    exports org.apache.sis.geometries.operation;
-    exports org.apache.sis.geometries.processor;
-    exports org.apache.sis.geometries.math;
+    private SceneUtilities(){}
 
-    exports org.apache.sis.geometries.internal.shared to
-            org.apache.sis.referencing.dggs;
+    /**
+     * Compute the root to node transform.
+     */
+    public static Similarity3D computeRootOtNodeTransform(SceneNode node) {
 
+        Matrix<?> matrix = node.getTransform().toMatrix();
+        SceneNode parent = node.getParent();
+        while (parent != null) {
+            Matrix<?> m = parent.getTransform().toMatrix();
+            matrix = m.multiply(matrix);
+            parent = parent.getParent();
+        }
 
+        final Similarity3D t = new Similarity3D();
+        t.setFromMatrix(matrix);
+        return t;
+    }
 }
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Skin.java
 b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Skin.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Skin.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Skin.java
index a2f80322bd..def257bcc6 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Skin.java
+++ b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Skin.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene;
+package org.apache.sis.scene;
 
 import java.util.List;
 import java.util.Objects;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Surface.java
 b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Surface.java
similarity index 95%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Surface.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Surface.java
index 3e25e8e44e..048e75bed9 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Surface.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Surface.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene;
+package org.apache.sis.scene;
 
-import org.apache.sis.geometries.scene.material.PBR;
-import org.apache.sis.geometries.scene.material.Material;
+import org.apache.sis.scene.material.PBR;
+import org.apache.sis.scene.material.Material;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Objects;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Texture.java
 b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Texture.java
similarity index 99%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Texture.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Texture.java
index fd44d0de36..d3765026af 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/Texture.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/Texture.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene;
+package org.apache.sis.scene;
 
 import java.awt.Point;
 import java.awt.image.ColorModel;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Directional.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Directional.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Directional.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Directional.java
index 5ac377c368..a9bcbced96 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Directional.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Directional.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.lights;
+package org.apache.sis.scene.light;
 
 import java.util.Objects;
 import org.apache.sis.util.ArgumentChecks;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/HDRI.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/HDRI.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/HDRI.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/HDRI.java
index 251c9ac406..4537a1861f 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/HDRI.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/HDRI.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.lights;
+package org.apache.sis.scene.light;
 
 import java.awt.image.RenderedImage;
 import java.util.Objects;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Light.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Light.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Light.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Light.java
index e5b75f2cdd..297f6c089b 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Light.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Light.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.lights;
+package org.apache.sis.scene.light;
 
 import java.awt.Color;
 import org.apache.sis.util.ArgumentChecks;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Point.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Point.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Point.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Point.java
index bb09971669..e8ebffa203 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Point.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Point.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.lights;
+package org.apache.sis.scene.light;
 
 import java.util.Objects;
 import org.apache.sis.util.ArgumentChecks;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Quad.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Quad.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Quad.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Quad.java
index df92a9e9ef..c78164b264 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Quad.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Quad.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.lights;
+package org.apache.sis.scene.light;
 
 import java.util.Objects;
 import org.apache.sis.util.ArgumentChecks;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Ring.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Ring.java
similarity index 99%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Ring.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Ring.java
index a27fb9aa4f..010dab7e1e 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Ring.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Ring.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.lights;
+package org.apache.sis.scene.light;
 
 import java.util.Objects;
 import org.apache.sis.util.ArgumentChecks;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Spot.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Spot.java
similarity index 99%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Spot.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Spot.java
index 03b9375488..817fb21cf4 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/lights/Spot.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/light/Spot.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.lights;
+package org.apache.sis.scene.light;
 
 import java.util.Objects;
 import org.apache.sis.util.ArgumentChecks;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/material/BlinnPhong.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/material/BlinnPhong.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/material/BlinnPhong.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/material/BlinnPhong.java
index 1b25c2fbc5..25cc6a93a2 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/material/BlinnPhong.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/material/BlinnPhong.java
@@ -14,11 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.material;
+package org.apache.sis.scene.material;
 
 import java.awt.Color;
 import java.util.Objects;
-import org.apache.sis.geometries.scene.Texture;
+import org.apache.sis.scene.Texture;
 
 
 /**
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/material/Material.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/material/Material.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/material/Material.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/material/Material.java
index 443ac5c8e0..4e3b22626c 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/material/Material.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/material/Material.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.material;
+package org.apache.sis.scene.material;
 
 import java.awt.Color;
-import org.apache.sis.geometries.scene.Texture;
+import org.apache.sis.scene.Texture;
 import org.apache.sis.util.ArgumentChecks;
 
 
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/material/PBR.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/material/PBR.java
similarity index 99%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/material/PBR.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/material/PBR.java
index d26cde3c81..2f5c9bc8f0 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/material/PBR.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/material/PBR.java
@@ -14,11 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.material;
+package org.apache.sis.scene.material;
 
 import java.awt.Color;
 import java.util.Objects;
-import org.apache.sis.geometries.scene.Texture;
+import org.apache.sis.scene.Texture;
 import org.apache.sis.util.ArgumentChecks;
 
 
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/material/PBRSG.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/material/PBRSG.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/material/PBRSG.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/material/PBRSG.java
index 6dec15207d..adf5fc3363 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/material/PBRSG.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/material/PBRSG.java
@@ -14,11 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.material;
+package org.apache.sis.scene.material;
 
 import java.awt.Color;
 import java.util.Objects;
-import org.apache.sis.geometries.scene.Texture;
+import org.apache.sis.scene.Texture;
 import org.apache.sis.util.ArgumentChecks;
 
 
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/package-info.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/package-info.java
similarity index 96%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/package-info.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/package-info.java
index e52ef5bdb7..abbaaf617a 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/package-info.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/package-info.java
@@ -24,4 +24,4 @@
  * <li>Khronos ANARI https://github.com/KhronosGroup/ANARI-SDK</li>
  * </ul>
  */
-package org.apache.sis.geometries.scene;
+package org.apache.sis.scene;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/Collider.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/Collider.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/Collider.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/Collider.java
index 4d38126ae7..d8a10dfbc9 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/Collider.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/Collider.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.physics;
+package org.apache.sis.scene.physics;
 
 
 /**
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/ColliderGeometry.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/ColliderGeometry.java
similarity index 97%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/ColliderGeometry.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/ColliderGeometry.java
index b3716674f5..0a1af9a761 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/ColliderGeometry.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/ColliderGeometry.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.physics;
+package org.apache.sis.scene.physics;
 
 import org.apache.sis.geometries.Geometry;
 
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/CollisionFilter.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/CollisionFilter.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/CollisionFilter.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/CollisionFilter.java
index c0d92c85ba..13ece21435 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/CollisionFilter.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/CollisionFilter.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.physics;
+package org.apache.sis.scene.physics;
 
 import java.util.Set;
 
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/Joint.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/Joint.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/Joint.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/Joint.java
index 3d2161de76..82062af0ec 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/Joint.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/Joint.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.physics;
+package org.apache.sis.scene.physics;
 
 import java.util.List;
-import org.apache.sis.geometries.scene.SceneNode;
+import org.apache.sis.scene.SceneNode;
 
 
 /**
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/Motion.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/Motion.java
similarity index 99%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/Motion.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/Motion.java
index 83ee4ea9f9..b28dacc82a 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/Motion.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/Motion.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.physics;
+package org.apache.sis.scene.physics;
 
 import org.apache.sis.geometries.math.Quaternion;
 import org.apache.sis.geometries.math.Vector3D;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/PhysicalMaterial.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/PhysicalMaterial.java
similarity index 98%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/PhysicalMaterial.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/PhysicalMaterial.java
index 7988a19737..3f871d32a5 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/PhysicalMaterial.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/PhysicalMaterial.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.physics;
+package org.apache.sis.scene.physics;
 
 
 /**
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/Trigger.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/Trigger.java
similarity index 96%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/Trigger.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/Trigger.java
index 245f888d9e..38df640434 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/Trigger.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/Trigger.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.geometries.scene.physics;
+package org.apache.sis.scene.physics;
 
 import java.util.List;
-import org.apache.sis.geometries.scene.SceneNode;
+import org.apache.sis.scene.SceneNode;
 
 
 /**
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/package-info.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/package-info.java
similarity index 96%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/package-info.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/package-info.java
index 9f98ca73f5..82831d78b6 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/scene/physics/package-info.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/scene/physics/package-info.java
@@ -24,4 +24,4 @@
  * <li>Khronos GLTF-2 : KHR_physics_rigid_bodies 
https://github.com/eoineoineoin/glTF_Physics/tree/master/extensions/2.0/Khronos/KHR_physics_rigid_bodies</li>
  * </ul>
  */
-package org.apache.sis.geometries.scene.physics;
+package org.apache.sis.scene.physics;
diff --git 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/scene/SceneUtilitiesTest.java
 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/scene/SceneUtilitiesTest.java
new file mode 100644
index 0000000000..372525581c
--- /dev/null
+++ 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/scene/SceneUtilitiesTest.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.scene;
+
+import org.apache.sis.geometries.math.Similarity3D;
+import org.apache.sis.geometries.math.Vector3D;
+
+// Test dependencies
+import static org.junit.jupiter.api.Assertions.*;
+import org.junit.jupiter.api.Test;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public class SceneUtilitiesTest {
+
+    @Test
+    public void testComputeRootToNode() {
+
+        final SceneNode root = new SceneNode();
+        final SceneNode n0 = new SceneNode();
+        final SceneNode n1 = new SceneNode();
+        final SceneNode n2 = new SceneNode();
+        final SceneNode n3 = new SceneNode();
+        n0.getTransform().setTranslation(new Vector3D.Double(1,2,3));
+        n1.getTransform().setTranslation(new Vector3D.Double(4,5,6));
+        n2.getTransform().setTranslation(new Vector3D.Double(10,20,30));
+        n3.getTransform().setTranslation(new Vector3D.Double(100,200,300));
+
+        root.getChildren().add(n0);
+        root.getChildren().add(n1);
+        n1.getChildren().add(n2);
+        n1.getChildren().add(n3);
+
+        Similarity3D t = SceneUtilities.computeRootOtNodeTransform(n0);
+        assertEquals(new Vector3D.Double(1,2,3), t.getTranslation());
+
+        t = SceneUtilities.computeRootOtNodeTransform(n1);
+        assertEquals(new Vector3D.Double(4,5,6), t.getTranslation());
+
+        t = SceneUtilities.computeRootOtNodeTransform(n2);
+        assertEquals(new Vector3D.Double(14,25,36), t.getTranslation());
+
+        t = SceneUtilities.computeRootOtNodeTransform(n3);
+        assertEquals(new Vector3D.Double(104,205,306), t.getTranslation());
+    }
+}

Reply via email to