aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tests/Common')
-rw-r--r--OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index aa4b285..b7b7383 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -465,5 +465,37 @@ namespace OpenSim.Tests.Common.Setup
465 465
466 return part; 466 return part;
467 } 467 }
468
469 /// <summary>
470 /// Create a scene object but do not add it to the scene.
471 /// </summary>
472 /// <remarks>
473 /// UUID always starts at 00000000-0000-0000-0000-000000000001
474 /// </remarks>
475 /// <param name="parts">The number of parts that should be in the scene object</param>
476 /// <param name="ownerId"></param>
477 /// <returns></returns>
478 public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId)
479 {
480 SceneObjectPart rootPart
481 = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
482 { Name = "part1", UUID = new UUID("00000000-0000-0000-0000-000000000001") };
483 SceneObjectGroup sog = new SceneObjectGroup(rootPart);
484
485 if (parts > 1)
486 {
487 for (int i = 2; i <= parts; i++)
488 {
489 sog.AddPart(
490 new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
491 {
492 Name = string.Format("obj{0}", i),
493 UUID = new UUID(string.Format("00000000-0000-0000-0000-{0:D12}", i))
494 });
495 }
496 }
497
498 return sog;
499 }
468 } 500 }
469} 501}