aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Examples/SimpleModule
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-06 22:21:25 +0000
committerJustin Clarke Casey2008-11-06 22:21:25 +0000
commit0d17ba2a76d4eb01f0bd6097c3974cd9d9fb2061 (patch)
tree82fc3cdd059f30d72407875a69ff662bb5747e41 /OpenSim/Region/Examples/SimpleModule
parentadd create_time and access_time to asset db for mysql, as well (diff)
downloadopensim-SC_OLD-0d17ba2a76d4eb01f0bd6097c3974cd9d9fb2061.zip
opensim-SC_OLD-0d17ba2a76d4eb01f0bd6097c3974cd9d9fb2061.tar.gz
opensim-SC_OLD-0d17ba2a76d4eb01f0bd6097c3974cd9d9fb2061.tar.bz2
opensim-SC_OLD-0d17ba2a76d4eb01f0bd6097c3974cd9d9fb2061.tar.xz
* refactor: Attach a scene object to a scene separately from its construction
Diffstat (limited to 'OpenSim/Region/Examples/SimpleModule')
-rw-r--r--OpenSim/Region/Examples/SimpleModule/ComplexObject.cs24
-rw-r--r--OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs4
-rw-r--r--OpenSim/Region/Examples/SimpleModule/FileSystemObject.cs2
3 files changed, 14 insertions, 16 deletions
diff --git a/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs b/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs
index 3b776e7..9ad4897 100644
--- a/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs
+++ b/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs
@@ -51,11 +51,9 @@ namespace OpenSim.Region.Examples.SimpleModule
51 { 51 {
52 } 52 }
53 53
54 public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, UUID ownerID, uint localID, 54 public RotatingWheel(SceneObjectGroup parent, UUID ownerID, uint localID,
55 Vector3 groupPosition, Vector3 offsetPosition, Quaternion rotationDirection) 55 Vector3 groupPosition, Vector3 offsetPosition, Quaternion rotationDirection)
56 : base( 56 : base(parent, ownerID, localID, PrimitiveBaseShape.Default, groupPosition, offsetPosition)
57 regionHandle, parent, ownerID, localID, PrimitiveBaseShape.Default, groupPosition, offsetPosition
58 )
59 { 57 {
60 m_rotationDirection = rotationDirection; 58 m_rotationDirection = rotationDirection;
61 59
@@ -64,13 +62,13 @@ namespace OpenSim.Region.Examples.SimpleModule
64 62
65 public override void UpdateMovement() 63 public override void UpdateMovement()
66 { 64 {
67 UpdateRotation(RotationOffset*m_rotationDirection); 65 UpdateRotation(RotationOffset * m_rotationDirection);
68 } 66 }
69 } 67 }
70 68
71 public override void UpdateMovement() 69 public override void UpdateMovement()
72 { 70 {
73 UpdateGroupRotation(GroupRotation*m_rotationDirection); 71 UpdateGroupRotation(GroupRotation * m_rotationDirection);
74 72
75 base.UpdateMovement(); 73 base.UpdateMovement();
76 } 74 }
@@ -80,29 +78,29 @@ namespace OpenSim.Region.Examples.SimpleModule
80 } 78 }
81 79
82 public ComplexObject(Scene scene, ulong regionHandle, UUID ownerID, uint localID, Vector3 pos) 80 public ComplexObject(Scene scene, ulong regionHandle, UUID ownerID, uint localID, Vector3 pos)
83 : base(scene, regionHandle, ownerID, localID, pos, PrimitiveBaseShape.Default) 81 : base(ownerID, localID, pos, PrimitiveBaseShape.Default)
84 { 82 {
85 m_rotationDirection = new Quaternion(0.05f, 0.1f, 0.15f); 83 m_rotationDirection = new Quaternion(0.05f, 0.1f, 0.15f);
86 84
87 AddPart( 85 AddPart(
88 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0, 0.75f), 86 new RotatingWheel(this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0, 0.75f),
89 new Quaternion(0.05f, 0, 0))); 87 new Quaternion(0.05f, 0, 0)));
90 AddPart( 88 AddPart(
91 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0, -0.75f), 89 new RotatingWheel(this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0, -0.75f),
92 new Quaternion(-0.05f, 0, 0))); 90 new Quaternion(-0.05f, 0, 0)));
93 91
94 AddPart( 92 AddPart(
95 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0.75f, 0), 93 new RotatingWheel(this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0.75f, 0),
96 new Quaternion(0.5f, 0, 0.05f))); 94 new Quaternion(0.5f, 0, 0.05f)));
97 AddPart( 95 AddPart(
98 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, -0.75f, 0), 96 new RotatingWheel(this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, -0.75f, 0),
99 new Quaternion(-0.5f, 0, -0.05f))); 97 new Quaternion(-0.5f, 0, -0.05f)));
100 98
101 AddPart( 99 AddPart(
102 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0.75f, 0, 0), 100 new RotatingWheel(this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0.75f, 0, 0),
103 new Quaternion(0, 0.5f, 0.05f))); 101 new Quaternion(0, 0.5f, 0.05f)));
104 AddPart( 102 AddPart(
105 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(-0.75f, 0, 0), 103 new RotatingWheel(this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(-0.75f, 0, 0),
106 new Quaternion(0, -0.5f, -0.05f))); 104 new Quaternion(0, -0.5f, -0.05f)));
107 105
108 RootPart.Flags |= PrimFlags.Touch; 106 RootPart.Flags |= PrimFlags.Touch;
diff --git a/OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs b/OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs
index 126ccd3..83bced5 100644
--- a/OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs
+++ b/OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs
@@ -45,8 +45,8 @@ namespace OpenSim.Region.Examples.SimpleModule
45 45
46 private PerformanceCounter m_counter; 46 private PerformanceCounter m_counter;
47 47
48 public CpuCounterObject(Scene world, ulong regionHandle, UUID ownerID, uint localID, Vector3 pos) 48 public CpuCounterObject(UUID ownerID, uint localID, Vector3 pos)
49 : base(world, regionHandle, ownerID, localID, pos, PrimitiveBaseShape.Default) 49 : base(ownerID, localID, pos, PrimitiveBaseShape.Default)
50 { 50 {
51 String objectName = "Processor"; 51 String objectName = "Processor";
52 String counterName = "% Processor Time"; 52 String counterName = "% Processor Time";
diff --git a/OpenSim/Region/Examples/SimpleModule/FileSystemObject.cs b/OpenSim/Region/Examples/SimpleModule/FileSystemObject.cs
index 3b43c7a..0903edd 100644
--- a/OpenSim/Region/Examples/SimpleModule/FileSystemObject.cs
+++ b/OpenSim/Region/Examples/SimpleModule/FileSystemObject.cs
@@ -35,7 +35,7 @@ namespace OpenSim.Region.Examples.SimpleModule
35 public class FileSystemObject : SceneObjectGroup 35 public class FileSystemObject : SceneObjectGroup
36 { 36 {
37 public FileSystemObject(Scene world, FileInfo fileInfo, Vector3 pos) 37 public FileSystemObject(Scene world, FileInfo fileInfo, Vector3 pos)
38 : base(world, world.RegionInfo.RegionHandle, UUID.Zero, world.NextLocalId, pos, PrimitiveBaseShape.Default) 38 : base(UUID.Zero, world.NextLocalId, pos, PrimitiveBaseShape.Default)
39 { 39 {
40 Text = fileInfo.Name; 40 Text = fileInfo.Name;
41 } 41 }