diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs index 9e39088..b27bbc0 100644 --- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs +++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs | |||
@@ -39,7 +39,7 @@ using System; | |||
39 | using System.Collections.Generic; | 39 | using System.Collections.Generic; |
40 | using System.Drawing; | 40 | using System.Drawing; |
41 | 41 | ||
42 | using libsecondlife; | 42 | using OpenMetaverse; |
43 | 43 | ||
44 | using Nini.Config; | 44 | using Nini.Config; |
45 | 45 | ||
@@ -50,21 +50,19 @@ using OpenSim.Region.Physics.Manager; | |||
50 | 50 | ||
51 | using log4net; | 51 | using log4net; |
52 | 52 | ||
53 | using Axiom.Math; | ||
54 | |||
55 | namespace OpenSim.Region.Environment.Modules.ContentManagement | 53 | namespace OpenSim.Region.Environment.Modules.ContentManagement |
56 | { | 54 | { |
57 | public class BeamMetaEntity : PointMetaEntity | 55 | public class BeamMetaEntity : PointMetaEntity |
58 | { | 56 | { |
59 | #region Constructors | 57 | #region Constructors |
60 | 58 | ||
61 | public BeamMetaEntity(Scene scene, uint LocalId, LLVector3 groupPos, float transparency, SceneObjectPart To, LLVector3 color) | 59 | public BeamMetaEntity(Scene scene, uint LocalId, Vector3 groupPos, float transparency, SceneObjectPart To, Vector3 color) |
62 | : base(scene, LocalId, groupPos, transparency) | 60 | : base(scene, LocalId, groupPos, transparency) |
63 | { | 61 | { |
64 | SetBeamToUUID(To, color); | 62 | SetBeamToUUID(To, color); |
65 | } | 63 | } |
66 | 64 | ||
67 | public BeamMetaEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos, float transparency, SceneObjectPart To, LLVector3 color) | 65 | public BeamMetaEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos, float transparency, SceneObjectPart To, Vector3 color) |
68 | : base(scene, uuid, LocalId, groupPos, transparency) | 66 | : base(scene, uuid, LocalId, groupPos, transparency) |
69 | { | 67 | { |
70 | SetBeamToUUID(To, color); | 68 | SetBeamToUUID(To, color); |
@@ -74,13 +72,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
74 | 72 | ||
75 | #region Public Methods | 73 | #region Public Methods |
76 | 74 | ||
77 | public void SetBeamToUUID(SceneObjectPart To, LLVector3 color) | 75 | public void SetBeamToUUID(SceneObjectPart To, Vector3 color) |
78 | { | 76 | { |
79 | SceneObjectPart From = m_Entity.RootPart; | 77 | SceneObjectPart From = m_Entity.RootPart; |
80 | //Scale size of particles to distance objects are apart (for better visibility) | 78 | //Scale size of particles to distance objects are apart (for better visibility) |
81 | LLVector3 FromPos = From.GetWorldPosition(); | 79 | Vector3 FromPos = From.GetWorldPosition(); |
82 | LLVector3 ToPos = From.GetWorldPosition(); | 80 | Vector3 ToPos = From.GetWorldPosition(); |
83 | // LLUUID toUUID = To.UUID; | 81 | UUID toUUID = To.UUID; |
84 | float distance = (float) (Math.Sqrt(Math.Pow(FromPos.X-ToPos.X, 2) + | 82 | float distance = (float) (Math.Sqrt(Math.Pow(FromPos.X-ToPos.X, 2) + |
85 | Math.Pow(FromPos.X-ToPos.Y, 2) + | 83 | Math.Pow(FromPos.X-ToPos.Y, 2) + |
86 | Math.Pow(FromPos.X-ToPos.Z, 2) | 84 | Math.Pow(FromPos.X-ToPos.Z, 2) |
@@ -94,7 +92,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
94 | SetBeamToUUID(From, To, color, rate, scale, speed); | 92 | SetBeamToUUID(From, To, color, rate, scale, speed); |
95 | } | 93 | } |
96 | 94 | ||
97 | public void SetBeamToUUID(SceneObjectPart From, SceneObjectPart To, LLVector3 color, float rate, float scale, float speed) | 95 | public void SetBeamToUUID(SceneObjectPart From, SceneObjectPart To, Vector3 color, float rate, float scale, float speed) |
98 | { | 96 | { |
99 | Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); | 97 | Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); |
100 | //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive | | 98 | //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive | |
@@ -118,7 +116,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
118 | prules.PartAcceleration.Y = 0.0f; | 116 | prules.PartAcceleration.Y = 0.0f; |
119 | prules.PartAcceleration.Z = 0.0f; | 117 | prules.PartAcceleration.Z = 0.0f; |
120 | //prules.Pattern = Primitive.ParticleSystem.SourcePattern.Explode; //PSYS_SRC_PATTERN | 118 | //prules.Pattern = Primitive.ParticleSystem.SourcePattern.Explode; //PSYS_SRC_PATTERN |
121 | //prules.Texture = LLUUID.Zero;//= LLUUID //PSYS_SRC_TEXTURE, default used if blank | 119 | //prules.Texture = UUID.Zero;//= UUID //PSYS_SRC_TEXTURE, default used if blank |
122 | prules.BurstRate = rate; //PSYS_SRC_BURST_RATE | 120 | prules.BurstRate = rate; //PSYS_SRC_BURST_RATE |
123 | prules.BurstPartCount = 1; //PSYS_SRC_BURST_PART_COUNT | 121 | prules.BurstPartCount = 1; //PSYS_SRC_BURST_PART_COUNT |
124 | prules.BurstRadius = 0.5f; //PSYS_SRC_BURST_RADIUS | 122 | prules.BurstRadius = 0.5f; //PSYS_SRC_BURST_RADIUS |
@@ -138,4 +136,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
138 | 136 | ||
139 | #endregion Public Methods | 137 | #endregion Public Methods |
140 | } | 138 | } |
141 | } \ No newline at end of file | 139 | } |