diff options
author | Justin Clark-Casey (justincc) | 2011-07-16 03:52:30 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-07-16 03:52:30 +0100 |
commit | 4b5a6b655becd5162054bc53365fdcd9c7ed1772 (patch) | |
tree | 1b5f3e6418b180fcd0da65caaf09005c7d349018 /OpenSim/Region/Framework/Scenes/Tests | |
parent | refactor: make SceneObjectGroup.GroupScale() a property rather than a mehod (diff) | |
download | opensim-SC-4b5a6b655becd5162054bc53365fdcd9c7ed1772.zip opensim-SC-4b5a6b655becd5162054bc53365fdcd9c7ed1772.tar.gz opensim-SC-4b5a6b655becd5162054bc53365fdcd9c7ed1772.tar.bz2 opensim-SC-4b5a6b655becd5162054bc53365fdcd9c7ed1772.tar.xz |
add test for resizing one part in a group
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs | 35 |
1 files changed, 35 insertions, 0 deletions
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 | |||
63 | Assert.That(g1Post.RootPart.Scale.Y, Is.EqualTo(3)); | 63 | Assert.That(g1Post.RootPart.Scale.Y, Is.EqualTo(3)); |
64 | Assert.That(g1Post.RootPart.Scale.Z, Is.EqualTo(4)); | 64 | Assert.That(g1Post.RootPart.Scale.Z, Is.EqualTo(4)); |
65 | } | 65 | } |
66 | |||
67 | /// <summary> | ||
68 | /// Test resizing an individual part in a scene object. | ||
69 | /// </summary> | ||
70 | [Test] | ||
71 | public void TestResizeSceneObjectPart() | ||
72 | { | ||
73 | TestHelper.InMethod(); | ||
74 | //log4net.Config.XmlConfigurator.Configure(); | ||
75 | |||
76 | Scene scene = SceneSetupHelpers.SetupScene(); | ||
77 | |||
78 | SceneObjectGroup g1 = SceneSetupHelpers.CreateSceneObject(2, UUID.Zero); | ||
79 | g1.RootPart.Scale = new Vector3(2, 3, 4); | ||
80 | g1.Parts[1].Scale = new Vector3(5, 6, 7); | ||
81 | |||
82 | scene.AddSceneObject(g1); | ||
83 | |||
84 | SceneObjectGroup g1Post = scene.GetSceneObjectGroup(g1.UUID); | ||
85 | |||
86 | g1Post.Resize(new Vector3(8, 9, 10), g1Post.Parts[1].LocalId); | ||
87 | |||
88 | SceneObjectGroup g1PostPost = scene.GetSceneObjectGroup(g1.UUID); | ||
89 | |||
90 | SceneObjectPart g1RootPart = g1PostPost.RootPart; | ||
91 | SceneObjectPart g1ChildPart = g1PostPost.Parts[1]; | ||
92 | |||
93 | Assert.That(g1RootPart.Scale.X, Is.EqualTo(2)); | ||
94 | Assert.That(g1RootPart.Scale.Y, Is.EqualTo(3)); | ||
95 | Assert.That(g1RootPart.Scale.Z, Is.EqualTo(4)); | ||
96 | |||
97 | Assert.That(g1ChildPart.Scale.X, Is.EqualTo(8)); | ||
98 | Assert.That(g1ChildPart.Scale.Y, Is.EqualTo(9)); | ||
99 | Assert.That(g1ChildPart.Scale.Z, Is.EqualTo(10)); | ||
100 | } | ||
66 | } | 101 | } |
67 | } \ No newline at end of file | 102 | } \ No newline at end of file |