diff options
author | Jeff Ames | 2008-09-09 01:26:48 +0000 |
---|---|---|
committer | Jeff Ames | 2008-09-09 01:26:48 +0000 |
commit | fae34bb10cfa10702faf5c19d8c8517faa018cb5 (patch) | |
tree | 2001f24703b010957254dbb49ef5e222ff30b84d /OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs | |
parent | Fix state xxx within state xxx itself triggering a state "change" to (diff) | |
download | opensim-SC-fae34bb10cfa10702faf5c19d8c8517faa018cb5.zip opensim-SC-fae34bb10cfa10702faf5c19d8c8517faa018cb5.tar.gz opensim-SC-fae34bb10cfa10702faf5c19d8c8517faa018cb5.tar.bz2 opensim-SC-fae34bb10cfa10702faf5c19d8c8517faa018cb5.tar.xz |
Update svn properties, formatting cleanup.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs index 301de56..ca20ee6 100644 --- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs +++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs | |||
@@ -79,15 +79,15 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
79 | Vector3 FromPos = From.GetWorldPosition(); | 79 | Vector3 FromPos = From.GetWorldPosition(); |
80 | Vector3 ToPos = From.GetWorldPosition(); | 80 | Vector3 ToPos = From.GetWorldPosition(); |
81 | // UUID toUUID = To.UUID; | 81 | // UUID toUUID = To.UUID; |
82 | 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) + |
83 | Math.Pow(FromPos.X-ToPos.Y, 2) + | 83 | Math.Pow(FromPos.X-ToPos.Y, 2) + |
84 | Math.Pow(FromPos.X-ToPos.Z, 2) | 84 | Math.Pow(FromPos.X-ToPos.Z, 2) |
85 | ) | 85 | ) |
86 | ); | 86 | ); |
87 | //float rate = (float) (distance/4f); | 87 | //float rate = (float) (distance/4f); |
88 | float rate = 0.5f; | 88 | float rate = 0.5f; |
89 | float scale = (float) (distance/128f); | 89 | float scale = (float) (distance/128f); |
90 | float speed = (float) (2.0f - distance/128f); | 90 | float speed = (float) (2.0f - distance/128f); |
91 | 91 | ||
92 | SetBeamToUUID(From, To, color, rate, scale, speed); | 92 | SetBeamToUUID(From, To, color, rate, scale, speed); |
93 | } | 93 | } |
@@ -95,42 +95,42 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
95 | public void SetBeamToUUID(SceneObjectPart From, SceneObjectPart To, Vector3 color, float rate, float scale, float speed) | 95 | public void SetBeamToUUID(SceneObjectPart From, SceneObjectPart To, Vector3 color, float rate, float scale, float speed) |
96 | { | 96 | { |
97 | Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); | 97 | Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); |
98 | //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive | | 98 | //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive | |
99 | // Primitive.ParticleSystem.ParticleDataFlags.FollowSrc; //PSYS_PART_FLAGS | 99 | // Primitive.ParticleSystem.ParticleDataFlags.FollowSrc; //PSYS_PART_FLAGS |
100 | prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Beam | | 100 | prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Beam | |
101 | Primitive.ParticleSystem.ParticleDataFlags.TargetPos; | 101 | Primitive.ParticleSystem.ParticleDataFlags.TargetPos; |
102 | prules.PartStartColor.R = color.X; //PSYS_PART_START_COLOR | 102 | prules.PartStartColor.R = color.X; //PSYS_PART_START_COLOR |
103 | prules.PartStartColor.G = color.Y; | 103 | prules.PartStartColor.G = color.Y; |
104 | prules.PartStartColor.B = color.Z; | 104 | prules.PartStartColor.B = color.Z; |
105 | prules.PartStartColor.A = 1.0f; //PSYS_PART_START_ALPHA, transparency | 105 | prules.PartStartColor.A = 1.0f; //PSYS_PART_START_ALPHA, transparency |
106 | prules.PartEndColor.R = color.X; //PSYS_PART_END_COLOR | 106 | prules.PartEndColor.R = color.X; //PSYS_PART_END_COLOR |
107 | prules.PartEndColor.G = color.Y; | 107 | prules.PartEndColor.G = color.Y; |
108 | prules.PartEndColor.B = color.Z; | 108 | prules.PartEndColor.B = color.Z; |
109 | prules.PartEndColor.A = 1.0f; //PSYS_PART_END_ALPHA, transparency | 109 | prules.PartEndColor.A = 1.0f; //PSYS_PART_END_ALPHA, transparency |
110 | prules.PartStartScaleX = scale; //PSYS_PART_START_SCALE | 110 | prules.PartStartScaleX = scale; //PSYS_PART_START_SCALE |
111 | prules.PartStartScaleY = scale; | 111 | prules.PartStartScaleY = scale; |
112 | prules.PartEndScaleX = scale; //PSYS_PART_END_SCALE | 112 | prules.PartEndScaleX = scale; //PSYS_PART_END_SCALE |
113 | prules.PartEndScaleY = scale; | 113 | prules.PartEndScaleY = scale; |
114 | prules.PartMaxAge = 1.0f; //PSYS_PART_MAX_AGE | 114 | prules.PartMaxAge = 1.0f; //PSYS_PART_MAX_AGE |
115 | prules.PartAcceleration.X = 0.0f; //PSYS_SRC_ACCEL | 115 | prules.PartAcceleration.X = 0.0f; //PSYS_SRC_ACCEL |
116 | prules.PartAcceleration.Y = 0.0f; | 116 | prules.PartAcceleration.Y = 0.0f; |
117 | prules.PartAcceleration.Z = 0.0f; | 117 | prules.PartAcceleration.Z = 0.0f; |
118 | //prules.Pattern = Primitive.ParticleSystem.SourcePattern.Explode; //PSYS_SRC_PATTERN | 118 | //prules.Pattern = Primitive.ParticleSystem.SourcePattern.Explode; //PSYS_SRC_PATTERN |
119 | //prules.Texture = UUID.Zero;//= UUID //PSYS_SRC_TEXTURE, default used if blank | 119 | //prules.Texture = UUID.Zero;//= UUID //PSYS_SRC_TEXTURE, default used if blank |
120 | prules.BurstRate = rate; //PSYS_SRC_BURST_RATE | 120 | prules.BurstRate = rate; //PSYS_SRC_BURST_RATE |
121 | prules.BurstPartCount = 1; //PSYS_SRC_BURST_PART_COUNT | 121 | prules.BurstPartCount = 1; //PSYS_SRC_BURST_PART_COUNT |
122 | prules.BurstRadius = 0.5f; //PSYS_SRC_BURST_RADIUS | 122 | prules.BurstRadius = 0.5f; //PSYS_SRC_BURST_RADIUS |
123 | prules.BurstSpeedMin = speed; //PSYS_SRC_BURST_SPEED_MIN | 123 | prules.BurstSpeedMin = speed; //PSYS_SRC_BURST_SPEED_MIN |
124 | prules.BurstSpeedMax = speed; //PSYS_SRC_BURST_SPEED_MAX | 124 | prules.BurstSpeedMax = speed; //PSYS_SRC_BURST_SPEED_MAX |
125 | prules.MaxAge = 0.0f; //PSYS_SRC_MAX_AGE | 125 | prules.MaxAge = 0.0f; //PSYS_SRC_MAX_AGE |
126 | prules.Target = To.UUID; //PSYS_SRC_TARGET_KEY | 126 | prules.Target = To.UUID; //PSYS_SRC_TARGET_KEY |
127 | prules.AngularVelocity.X = 0.0f; //PSYS_SRC_OMEGA | 127 | prules.AngularVelocity.X = 0.0f; //PSYS_SRC_OMEGA |
128 | prules.AngularVelocity.Y = 0.0f; | 128 | prules.AngularVelocity.Y = 0.0f; |
129 | prules.AngularVelocity.Z = 0.0f; | 129 | prules.AngularVelocity.Z = 0.0f; |
130 | prules.InnerAngle = 0.0f; //PSYS_SRC_ANGLE_BEGIN | 130 | prules.InnerAngle = 0.0f; //PSYS_SRC_ANGLE_BEGIN |
131 | prules.OuterAngle = 0.0f; //PSYS_SRC_ANGLE_END | 131 | prules.OuterAngle = 0.0f; //PSYS_SRC_ANGLE_END |
132 | 132 | ||
133 | prules.CRC = 1; //activates the particle system?? | 133 | prules.CRC = 1; //activates the particle system?? |
134 | From.AddNewParticleSystem(prules); | 134 | From.AddNewParticleSystem(prules); |
135 | } | 135 | } |
136 | 136 | ||