From 4b5a6b655becd5162054bc53365fdcd9c7ed1772 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 16 Jul 2011 03:52:30 +0100
Subject: add test for resizing one part in a group
---
OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +-
.../Scenes/Tests/SceneObjectResizeTests.cs | 35 ++++++++++++++++++++++
2 files changed, 36 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 0e5ffc0..df6908a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1210,7 +1210,7 @@ namespace OpenSim.Region.Framework.Scenes
#region Client Event handlers
///
- ///
+ /// Update the scale of an individual prim.
///
///
///
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs
index 627f294..95ecfc6 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs
@@ -63,5 +63,40 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(g1Post.RootPart.Scale.Y, Is.EqualTo(3));
Assert.That(g1Post.RootPart.Scale.Z, Is.EqualTo(4));
}
+
+ ///
+ /// Test resizing an individual part in a scene object.
+ ///
+ [Test]
+ public void TestResizeSceneObjectPart()
+ {
+ TestHelper.InMethod();
+ //log4net.Config.XmlConfigurator.Configure();
+
+ Scene scene = SceneSetupHelpers.SetupScene();
+
+ SceneObjectGroup g1 = SceneSetupHelpers.CreateSceneObject(2, UUID.Zero);
+ g1.RootPart.Scale = new Vector3(2, 3, 4);
+ g1.Parts[1].Scale = new Vector3(5, 6, 7);
+
+ scene.AddSceneObject(g1);
+
+ SceneObjectGroup g1Post = scene.GetSceneObjectGroup(g1.UUID);
+
+ g1Post.Resize(new Vector3(8, 9, 10), g1Post.Parts[1].LocalId);
+
+ SceneObjectGroup g1PostPost = scene.GetSceneObjectGroup(g1.UUID);
+
+ SceneObjectPart g1RootPart = g1PostPost.RootPart;
+ SceneObjectPart g1ChildPart = g1PostPost.Parts[1];
+
+ Assert.That(g1RootPart.Scale.X, Is.EqualTo(2));
+ Assert.That(g1RootPart.Scale.Y, Is.EqualTo(3));
+ Assert.That(g1RootPart.Scale.Z, Is.EqualTo(4));
+
+ Assert.That(g1ChildPart.Scale.X, Is.EqualTo(8));
+ Assert.That(g1ChildPart.Scale.Y, Is.EqualTo(9));
+ Assert.That(g1ChildPart.Scale.Z, Is.EqualTo(10));
+ }
}
}
\ No newline at end of file
--
cgit v1.1