diff options
Diffstat (limited to 'OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs')
-rw-r--r-- | OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index b7b7383..87b6389 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | |||
@@ -454,9 +454,7 @@ namespace OpenSim.Tests.Common.Setup | |||
454 | /// <returns></returns> | 454 | /// <returns></returns> |
455 | public static SceneObjectPart AddSceneObject(Scene scene, string name) | 455 | public static SceneObjectPart AddSceneObject(Scene scene, string name) |
456 | { | 456 | { |
457 | SceneObjectPart part | 457 | SceneObjectPart part = CreateSceneObjectPart(name, UUID.Random(), UUID.Zero); |
458 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero); | ||
459 | part.Name = name; | ||
460 | 458 | ||
461 | //part.UpdatePrimFlags(false, false, true); | 459 | //part.UpdatePrimFlags(false, false, true); |
462 | //part.ObjectFlags |= (uint)PrimFlags.Phantom; | 460 | //part.ObjectFlags |= (uint)PrimFlags.Phantom; |
@@ -467,6 +465,20 @@ namespace OpenSim.Tests.Common.Setup | |||
467 | } | 465 | } |
468 | 466 | ||
469 | /// <summary> | 467 | /// <summary> |
468 | /// Create a scene object part. | ||
469 | /// </summary> | ||
470 | /// <param name="name"></param> | ||
471 | /// <param name="id"></param> | ||
472 | /// <param name="ownerId"></param> | ||
473 | /// <returns></returns> | ||
474 | public static SceneObjectPart CreateSceneObjectPart(string name, UUID id, UUID ownerId) | ||
475 | { | ||
476 | return new SceneObjectPart( | ||
477 | ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | ||
478 | { Name = name, UUID = id }; | ||
479 | } | ||
480 | |||
481 | /// <summary> | ||
470 | /// Create a scene object but do not add it to the scene. | 482 | /// Create a scene object but do not add it to the scene. |
471 | /// </summary> | 483 | /// </summary> |
472 | /// <remarks> | 484 | /// <remarks> |
@@ -477,25 +489,19 @@ namespace OpenSim.Tests.Common.Setup | |||
477 | /// <returns></returns> | 489 | /// <returns></returns> |
478 | public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId) | 490 | public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId) |
479 | { | 491 | { |
480 | SceneObjectPart rootPart | 492 | SceneObjectGroup sog |
481 | = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 493 | = new SceneObjectGroup( |
482 | { Name = "part1", UUID = new UUID("00000000-0000-0000-0000-000000000001") }; | 494 | CreateSceneObjectPart("part1", new UUID("00000000-0000-0000-0000-000000000001"), ownerId)); |
483 | SceneObjectGroup sog = new SceneObjectGroup(rootPart); | ||
484 | 495 | ||
485 | if (parts > 1) | 496 | if (parts > 1) |
486 | { | ||
487 | for (int i = 2; i <= parts; i++) | 497 | for (int i = 2; i <= parts; i++) |
488 | { | ||
489 | sog.AddPart( | 498 | sog.AddPart( |
490 | new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 499 | CreateSceneObjectPart( |
491 | { | 500 | string.Format("obj{0}", i), |
492 | Name = string.Format("obj{0}", i), | 501 | new UUID(string.Format("00000000-0000-0000-0000-{0:D12}", i)), |
493 | UUID = new UUID(string.Format("00000000-0000-0000-0000-{0:D12}", i)) | 502 | ownerId)); |
494 | }); | ||
495 | } | ||
496 | } | ||
497 | 503 | ||
498 | return sog; | 504 | return sog; |
499 | } | 505 | } |
500 | } | 506 | } |
501 | } | 507 | } \ No newline at end of file |