aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
diff options
context:
space:
mode:
authorSean Dague2008-09-03 18:11:44 +0000
committerSean Dague2008-09-03 18:11:44 +0000
commitaf5c7e52b1163cf65f897e5c7ecf9ef2d9f6e88e (patch)
treefcc52c0f3e20f005873def97e3be5cd9ca16270e /OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
parentwhite space fixes (diff)
downloadopensim-SC-af5c7e52b1163cf65f897e5c7ecf9ef2d9f6e88e.zip
opensim-SC-af5c7e52b1163cf65f897e5c7ecf9ef2d9f6e88e.tar.gz
opensim-SC-af5c7e52b1163cf65f897e5c7ecf9ef2d9f6e88e.tar.bz2
opensim-SC-af5c7e52b1163cf65f897e5c7ecf9ef2d9f6e88e.tar.xz
narrange to do basic cleanup of the CMS module
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs100
1 files changed, 58 insertions, 42 deletions
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
index 55365ac..bfa7e5d 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
@@ -1,81 +1,97 @@
1#region Header
2
1// PointMetaEntity.cs created with MonoDevelop 3// PointMetaEntity.cs created with MonoDevelop
2// User: bongiojp at 3:03 PM 8/6/2008 4// User: bongiojp at 3:03 PM 8/6/2008
3// 5//
4// To change standard headers go to Edit->Preferences->Coding->Standard Headers 6// To change standard headers go to Edit->Preferences->Coding->Standard Headers
5// 7//
6 8
9#endregion Header
10
7using System; 11using System;
8using System.Collections.Generic; 12using System.Collections.Generic;
9using System.Drawing; 13using System.Drawing;
14
10using libsecondlife; 15using libsecondlife;
16
11using Nini.Config; 17using Nini.Config;
18
12using OpenSim.Framework; 19using OpenSim.Framework;
13using OpenSim.Region.Environment.Interfaces; 20using OpenSim.Region.Environment.Interfaces;
14using OpenSim.Region.Environment.Scenes; 21using OpenSim.Region.Environment.Scenes;
15using log4net;
16using OpenSim.Region.Physics.Manager; 22using OpenSim.Region.Physics.Manager;
23
24using log4net;
25
17using Axiom.Math; 26using Axiom.Math;
18 27
19namespace OpenSim.Region.Environment.Modules.ContentManagement 28namespace OpenSim.Region.Environment.Modules.ContentManagement
20{ 29{
21 30 public class PointMetaEntity : MetaEntity
22 31 {
23 public class PointMetaEntity : MetaEntity 32 #region Constructors
24 { 33
25 34 public PointMetaEntity(Scene scene, uint LocalId, LLVector3 groupPos, float transparency)
26 public PointMetaEntity(Scene scene, uint LocalId, LLVector3 groupPos, float transparency) : base() 35 : base()
27 { 36 {
28 CreatePointEntity(scene, LLUUID.Random(), LocalId, groupPos); 37 CreatePointEntity(scene, LLUUID.Random(), LocalId, groupPos);
29 SetPartTransparency(m_Entity.RootPart, transparency); 38 SetPartTransparency(m_Entity.RootPart, transparency);
30 } 39 }
31 40
32 public PointMetaEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos, float transparency) : base() 41 public PointMetaEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos, float transparency)
33 { 42 : base()
34 CreatePointEntity(scene, uuid, LocalId, groupPos); 43 {
35 SetPartTransparency(m_Entity.RootPart, transparency); 44 CreatePointEntity(scene, uuid, LocalId, groupPos);
36 } 45 SetPartTransparency(m_Entity.RootPart, transparency);
37 46 }
38 private void CreatePointEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos) 47
39 { 48 #endregion Constructors
40 SceneObjectGroup x = new SceneObjectGroup(); 49
41 SceneObjectPart y = new SceneObjectPart(); 50 #region Private Methods
42 51
43 //Initialize part 52 private void CreatePointEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos)
44 y.Name = "Very Small Point"; 53 {
54 SceneObjectGroup x = new SceneObjectGroup();
55 SceneObjectPart y = new SceneObjectPart();
56
57 //Initialize part
58 y.Name = "Very Small Point";
45 y.RegionHandle = scene.RegionInfo.RegionHandle; 59 y.RegionHandle = scene.RegionInfo.RegionHandle;
46 y.CreationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 60 y.CreationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
47 y.OwnerID = LLUUID.Zero; 61 y.OwnerID = LLUUID.Zero;
48 y.CreatorID = LLUUID.Zero; 62 y.CreatorID = LLUUID.Zero;
49 y.LastOwnerID = LLUUID.Zero; 63 y.LastOwnerID = LLUUID.Zero;
50 y.UUID = uuid; 64 y.UUID = uuid;
51 65
52 y.LocalId = LocalId; 66 y.LocalId = LocalId;
53 67
54 y.Shape = PrimitiveBaseShape.CreateBox(); 68 y.Shape = PrimitiveBaseShape.CreateBox();
55 y.Scale = new LLVector3(0.01f,0.01f,0.01f); 69 y.Scale = new LLVector3(0.01f,0.01f,0.01f);
56 y.LastOwnerID = LLUUID.Zero; 70 y.LastOwnerID = LLUUID.Zero;
57 y.GroupPosition = groupPos; 71 y.GroupPosition = groupPos;
58 y.OffsetPosition = new LLVector3(0, 0, 0); 72 y.OffsetPosition = new LLVector3(0, 0, 0);
59 y.RotationOffset = new LLQuaternion(0,0,0,0); 73 y.RotationOffset = new LLQuaternion(0,0,0,0);
60 y.Velocity = new LLVector3(0, 0, 0); 74 y.Velocity = new LLVector3(0, 0, 0);
61 y.RotationalVelocity = new LLVector3(0, 0, 0); 75 y.RotationalVelocity = new LLVector3(0, 0, 0);
62 y.AngularVelocity = new LLVector3(0, 0, 0); 76 y.AngularVelocity = new LLVector3(0, 0, 0);
63 y.Acceleration = new LLVector3(0, 0, 0); 77 y.Acceleration = new LLVector3(0, 0, 0);
64 78
65 y.Flags = 0; 79 y.Flags = 0;
66 y.TrimPermissions(); 80 y.TrimPermissions();
67 81
68 //Initialize group and add part as root part 82 //Initialize group and add part as root part
69 x.SetScene(scene); 83 x.SetScene(scene);
70 y.SetParent(x); 84 y.SetParent(x);
71 y.ParentID = 0; 85 y.ParentID = 0;
72 y.LinkNum = 0; 86 y.LinkNum = 0;
73 x.Children.Add(y.UUID, y); 87 x.Children.Add(y.UUID, y);
74 x.RootPart = y; 88 x.RootPart = y;
75 x.RegionHandle = scene.RegionInfo.RegionHandle; 89 x.RegionHandle = scene.RegionInfo.RegionHandle;
76 x.SetScene(scene); 90 x.SetScene(scene);
77 91
78 m_Entity = x; 92 m_Entity = x;
79 } 93 }
80 } 94
81} 95 #endregion Private Methods
96 }
97} \ No newline at end of file