diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs index c197cb9..c76a30a 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs | |||
@@ -93,12 +93,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests | |||
93 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); | 93 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); |
94 | PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere(); | 94 | PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere(); |
95 | Vector3 groupPosition = new Vector3(10, 20, 30); | 95 | Vector3 groupPosition = new Vector3(10, 20, 30); |
96 | Quaternion rotationOffset = new Quaternion(20, 30, 40, 50); | 96 | Quaternion rotationOffset = Quaternion.Identity; |
97 | Vector3 offsetPosition = new Vector3(5, 10, 15); | 97 | Vector3 offsetPosition = new Vector3(5, 10, 15); |
98 | 98 | ||
99 | SceneObjectPart part1 | 99 | SceneObjectPart part1 |
100 | = new SceneObjectPart( | 100 | = new SceneObjectPart( |
101 | ownerId, shape, groupPosition, rotationOffset, offsetPosition); | 101 | ownerId, shape, groupPosition, rotationOffset, offsetPosition); |
102 | part1.Scale = new Vector3(1, 1, 1); | ||
102 | part1.Name = partName; | 103 | part1.Name = partName; |
103 | 104 | ||
104 | object1 = new SceneObjectGroup(part1); | 105 | object1 = new SceneObjectGroup(part1); |
@@ -109,13 +110,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests | |||
109 | string partName = "Object2"; | 110 | string partName = "Object2"; |
110 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); | 111 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); |
111 | PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere(); | 112 | PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere(); |
112 | Vector3 groupPosition = new Vector3(10, 20, 30); | 113 | Vector3 groupPosition = new Vector3(20, 40, 60); |
113 | Quaternion rotationOffset = new Quaternion(20, 30, 40, 50); | 114 | Quaternion rotationOffset = Quaternion.Identity; |
114 | Vector3 offsetPosition = new Vector3(5, 10, 15); | 115 | Vector3 offsetPosition = new Vector3(5, 10, 15); |
115 | 116 | ||
116 | SceneObjectPart part1 | 117 | SceneObjectPart part1 |
117 | = new SceneObjectPart( | 118 | = new SceneObjectPart( |
118 | ownerId, shape, groupPosition, rotationOffset, offsetPosition); | 119 | ownerId, shape, groupPosition, rotationOffset, offsetPosition); |
120 | part1.Scale = new Vector3(1, 1, 1); | ||
119 | part1.Name = partName; | 121 | part1.Name = partName; |
120 | 122 | ||
121 | object2 = new SceneObjectGroup(part1); | 123 | object2 = new SceneObjectGroup(part1); |
@@ -141,7 +143,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests | |||
141 | 143 | ||
142 | SceneObjectGroup so | 144 | SceneObjectGroup so |
143 | = m_iam.RezObject( | 145 | = m_iam.RezObject( |
144 | m_tc, item1Id, Vector3.Zero, Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false); | 146 | m_tc, item1Id, new Vector3(100, 100, 100), Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false); |
145 | 147 | ||
146 | Assert.That(so, Is.Not.Null); | 148 | Assert.That(so, Is.Not.Null); |
147 | 149 | ||
@@ -154,8 +156,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests | |||
154 | Assert.That(retrievedObj1Part, Is.Not.Null); | 156 | Assert.That(retrievedObj1Part, Is.Not.Null); |
155 | Assert.That(retrievedObj1Part.Name, Is.EqualTo(item1.Name)); | 157 | Assert.That(retrievedObj1Part.Name, Is.EqualTo(item1.Name)); |
156 | 158 | ||
159 | // Bottom of coalescence is placed on ground, hence we end up with 100.5 rather than 85 since the bottom | ||
160 | // object is unit square. | ||
161 | Assert.That(retrievedObj1Part.AbsolutePosition, Is.EqualTo(new Vector3(95, 90, 100.5f))); | ||
162 | |||
157 | SceneObjectPart retrievedObj2Part = m_scene.GetSceneObjectPart(object2.Name); | 163 | SceneObjectPart retrievedObj2Part = m_scene.GetSceneObjectPart(object2.Name); |
158 | Assert.That(retrievedObj2Part, Is.Not.Null); | 164 | Assert.That(retrievedObj2Part, Is.Not.Null); |
165 | Assert.That(retrievedObj2Part.Name, Is.EqualTo(object2.Name)); | ||
166 | Assert.That(retrievedObj2Part.AbsolutePosition, Is.EqualTo(new Vector3(105, 110, 130.5f))); | ||
159 | } | 167 | } |
160 | 168 | ||
161 | [Test] | 169 | [Test] |