aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/ContentManagementSystem/PointMetaEntity.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/ContentManagementSystem/PointMetaEntity.cs')
-rw-r--r--OpenSim/Region/OptionalModules/ContentManagementSystem/PointMetaEntity.cs104
1 files changed, 0 insertions, 104 deletions
diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/PointMetaEntity.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/PointMetaEntity.cs
deleted file mode 100644
index 2c5093f..0000000
--- a/OpenSim/Region/OptionalModules/ContentManagementSystem/PointMetaEntity.cs
+++ /dev/null
@@ -1,104 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Drawing;
31
32using OpenMetaverse;
33
34using Nini.Config;
35
36using OpenSim.Framework;
37using OpenSim.Region.Framework.Interfaces;
38using OpenSim.Region.Framework.Scenes;
39using OpenSim.Region.Physics.Manager;
40
41using log4net;
42
43namespace OpenSim.Region.OptionalModules.ContentManagement
44{
45 public class PointMetaEntity : MetaEntity
46 {
47 #region Constructors
48
49 public PointMetaEntity(Scene scene, Vector3 groupPos, float transparency)
50 : base()
51 {
52 CreatePointEntity(scene, UUID.Random(), groupPos);
53 SetPartTransparency(m_Entity.RootPart, transparency);
54 }
55
56 public PointMetaEntity(Scene scene, UUID uuid, Vector3 groupPos, float transparency)
57 : base()
58 {
59 CreatePointEntity(scene, uuid, groupPos);
60 SetPartTransparency(m_Entity.RootPart, transparency);
61 }
62
63 #endregion Constructors
64
65 #region Private Methods
66
67 private void CreatePointEntity(Scene scene, UUID uuid, Vector3 groupPos)
68 {
69 SceneObjectPart y = new SceneObjectPart();
70
71 //Initialize part
72 y.Name = "Very Small Point";
73 y.RegionHandle = scene.RegionInfo.RegionHandle;
74 y.CreationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
75 y.OwnerID = UUID.Zero;
76 y.CreatorID = UUID.Zero;
77 y.LastOwnerID = UUID.Zero;
78 y.UUID = uuid;
79
80 y.Shape = PrimitiveBaseShape.CreateBox();
81 y.Scale = new Vector3(0.01f,0.01f,0.01f);
82 y.LastOwnerID = UUID.Zero;
83 y.GroupPosition = groupPos;
84 y.OffsetPosition = Vector3.Zero;
85 y.RotationOffset = Quaternion.Identity;
86 y.Velocity = Vector3.Zero;
87 y.AngularVelocity = Vector3.Zero;
88 y.Acceleration = Vector3.Zero;
89
90 y.Flags = 0;
91 y.TrimPermissions();
92
93 //Initialize group and add part as root part
94 SceneObjectGroup x = new SceneObjectGroup(y);
95 x.SetScene(scene);
96 x.RegionHandle = scene.RegionInfo.RegionHandle;
97 x.SetScene(scene);
98
99 m_Entity = x;
100 }
101
102 #endregion Private Methods
103 }
104}