diff options
author | Justin Clark-Casey (justincc) | 2011-04-14 17:33:55 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-04-14 17:33:55 +0100 |
commit | aaf912586948a3d0d9bb918952766ba48e90fd18 (patch) | |
tree | 0f972ef4312f412c3c300041f8cb32f1a951bc14 /OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs | |
parent | Use common coalesced serialization code for both tests and the InventoryAcces... (diff) | |
download | opensim-SC_OLD-aaf912586948a3d0d9bb918952766ba48e90fd18.zip opensim-SC_OLD-aaf912586948a3d0d9bb918952766ba48e90fd18.tar.gz opensim-SC_OLD-aaf912586948a3d0d9bb918952766ba48e90fd18.tar.bz2 opensim-SC_OLD-aaf912586948a3d0d9bb918952766ba48e90fd18.tar.xz |
simplify coalesced object tests by using existing scene object set up utils
this change makes it possible to set an absolute position on a group before it is put into a scene.
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs index c76a30a..9fc77a7 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs | |||
@@ -87,41 +87,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests | |||
87 | // log4net.Config.XmlConfigurator.Configure(); | 87 | // log4net.Config.XmlConfigurator.Configure(); |
88 | 88 | ||
89 | // Create asset | 89 | // Create asset |
90 | SceneObjectGroup object1; | 90 | SceneObjectGroup object1 = SceneSetupHelpers.CreateSceneObject(1, m_userId, "Object1", 0x20); |
91 | { | 91 | object1.AbsolutePosition = new Vector3(15, 30, 45); |
92 | string partName = "Object1"; | 92 | object1.Parts[0].Scale = new Vector3(1, 1, 1); |
93 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); | ||
94 | PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere(); | ||
95 | Vector3 groupPosition = new Vector3(10, 20, 30); | ||
96 | Quaternion rotationOffset = Quaternion.Identity; | ||
97 | Vector3 offsetPosition = new Vector3(5, 10, 15); | ||
98 | |||
99 | SceneObjectPart part1 | ||
100 | = new SceneObjectPart( | ||
101 | ownerId, shape, groupPosition, rotationOffset, offsetPosition); | ||
102 | part1.Scale = new Vector3(1, 1, 1); | ||
103 | part1.Name = partName; | ||
104 | |||
105 | object1 = new SceneObjectGroup(part1); | ||
106 | } | ||
107 | 93 | ||
108 | SceneObjectGroup object2; | 94 | SceneObjectGroup object2 = SceneSetupHelpers.CreateSceneObject(1, m_userId, "Object2", 0x40); |
109 | { | 95 | object2.AbsolutePosition = new Vector3(25, 50, 75); |
110 | string partName = "Object2"; | 96 | object2.Parts[0].Scale = new Vector3(1, 1, 1); |
111 | UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); | ||
112 | PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere(); | ||
113 | Vector3 groupPosition = new Vector3(20, 40, 60); | ||
114 | Quaternion rotationOffset = Quaternion.Identity; | ||
115 | Vector3 offsetPosition = new Vector3(5, 10, 15); | ||
116 | |||
117 | SceneObjectPart part1 | ||
118 | = new SceneObjectPart( | ||
119 | ownerId, shape, groupPosition, rotationOffset, offsetPosition); | ||
120 | part1.Scale = new Vector3(1, 1, 1); | ||
121 | part1.Name = partName; | ||
122 | |||
123 | object2 = new SceneObjectGroup(part1); | ||
124 | } | ||
125 | 97 | ||
126 | CoalescedSceneObjects coa = new CoalescedSceneObjects(m_userId, object1, object2); | 98 | CoalescedSceneObjects coa = new CoalescedSceneObjects(m_userId, object1, object2); |
127 | 99 | ||