diff options
author | Mic Bowman | 2012-04-25 09:52:44 -0700 |
---|---|---|
committer | Mic Bowman | 2012-04-25 09:52:44 -0700 |
commit | 1afae013111b7c817037371fca805a78c3ab67cc (patch) | |
tree | dc4f08217c64fd92f4fac250344f009f583fca4e /OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs | |
parent | Add try/catch around Json script method registration to avoild some issues (diff) | |
parent | Slight rewording of output messages. (diff) | |
download | opensim-SC-1afae013111b7c817037371fca805a78c3ab67cc.zip opensim-SC-1afae013111b7c817037371fca805a78c3ab67cc.tar.gz opensim-SC-1afae013111b7c817037371fca805a78c3ab67cc.tar.bz2 opensim-SC-1afae013111b7c817037371fca805a78c3ab67cc.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs')
-rw-r--r-- | OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs | 314 |
1 files changed, 314 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs new file mode 100644 index 0000000..b89eeed --- /dev/null +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs | |||
@@ -0,0 +1,314 @@ | |||
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 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using Nini.Config; | ||
31 | using OpenMetaverse; | ||
32 | using OpenSim.Framework; | ||
33 | using OpenSim.Region.Physics.Manager; | ||
34 | |||
35 | namespace OpenSim.Region.Physics.BasicPhysicsPlugin | ||
36 | { | ||
37 | public class BasicPhysicsPrim : PhysicsActor | ||
38 | { | ||
39 | private Vector3 _size; | ||
40 | private PrimitiveBaseShape _shape; | ||
41 | |||
42 | public BasicPhysicsPrim( | ||
43 | string name, uint localId, Vector3 position, Vector3 size, Quaternion orientation, PrimitiveBaseShape shape) | ||
44 | { | ||
45 | Name = name; | ||
46 | LocalID = localId; | ||
47 | Position = position; | ||
48 | Size = size; | ||
49 | Orientation = orientation; | ||
50 | Shape = shape; | ||
51 | } | ||
52 | |||
53 | public override int PhysicsActorType | ||
54 | { | ||
55 | get { return (int) ActorTypes.Agent; } | ||
56 | set { return; } | ||
57 | } | ||
58 | |||
59 | public override Vector3 RotationalVelocity { get; set; } | ||
60 | |||
61 | public override bool SetAlwaysRun | ||
62 | { | ||
63 | get { return false; } | ||
64 | set { return; } | ||
65 | } | ||
66 | |||
67 | public override uint LocalID | ||
68 | { | ||
69 | set { return; } | ||
70 | } | ||
71 | |||
72 | public override bool Grabbed | ||
73 | { | ||
74 | set { return; } | ||
75 | } | ||
76 | |||
77 | public override bool Selected | ||
78 | { | ||
79 | set { return; } | ||
80 | } | ||
81 | |||
82 | public override float Buoyancy | ||
83 | { | ||
84 | get { return 0f; } | ||
85 | set { return; } | ||
86 | } | ||
87 | |||
88 | public override bool FloatOnWater | ||
89 | { | ||
90 | set { return; } | ||
91 | } | ||
92 | |||
93 | public override bool IsPhysical | ||
94 | { | ||
95 | get { return false; } | ||
96 | set { return; } | ||
97 | } | ||
98 | |||
99 | public override bool ThrottleUpdates | ||
100 | { | ||
101 | get { return false; } | ||
102 | set { return; } | ||
103 | } | ||
104 | |||
105 | public override bool Flying { get; set; } | ||
106 | |||
107 | public override bool IsColliding { get; set; } | ||
108 | |||
109 | public override bool CollidingGround | ||
110 | { | ||
111 | get { return false; } | ||
112 | set { return; } | ||
113 | } | ||
114 | |||
115 | public override bool CollidingObj | ||
116 | { | ||
117 | get { return false; } | ||
118 | set { return; } | ||
119 | } | ||
120 | |||
121 | public override bool Stopped | ||
122 | { | ||
123 | get { return false; } | ||
124 | } | ||
125 | |||
126 | public override Vector3 Position { get; set; } | ||
127 | |||
128 | public override Vector3 Size | ||
129 | { | ||
130 | get { return _size; } | ||
131 | set { | ||
132 | _size = value; | ||
133 | _size.Z = _size.Z / 2.0f; | ||
134 | } | ||
135 | } | ||
136 | |||
137 | public override PrimitiveBaseShape Shape | ||
138 | { | ||
139 | set { _shape = value; } | ||
140 | } | ||
141 | |||
142 | public override float Mass | ||
143 | { | ||
144 | get { return 0f; } | ||
145 | } | ||
146 | |||
147 | public override Vector3 Force | ||
148 | { | ||
149 | get { return Vector3.Zero; } | ||
150 | set { return; } | ||
151 | } | ||
152 | |||
153 | public override int VehicleType | ||
154 | { | ||
155 | get { return 0; } | ||
156 | set { return; } | ||
157 | } | ||
158 | |||
159 | public override void VehicleFloatParam(int param, float value) | ||
160 | { | ||
161 | |||
162 | } | ||
163 | |||
164 | public override void VehicleVectorParam(int param, Vector3 value) | ||
165 | { | ||
166 | |||
167 | } | ||
168 | |||
169 | public override void VehicleRotationParam(int param, Quaternion rotation) | ||
170 | { | ||
171 | |||
172 | } | ||
173 | |||
174 | public override void VehicleFlags(int param, bool remove) | ||
175 | { | ||
176 | |||
177 | } | ||
178 | |||
179 | public override void SetVolumeDetect(int param) | ||
180 | { | ||
181 | |||
182 | } | ||
183 | |||
184 | public override Vector3 CenterOfMass | ||
185 | { | ||
186 | get { return Vector3.Zero; } | ||
187 | } | ||
188 | |||
189 | public override Vector3 GeometricCenter | ||
190 | { | ||
191 | get { return Vector3.Zero; } | ||
192 | } | ||
193 | |||
194 | public override Vector3 Velocity { get; set; } | ||
195 | |||
196 | public override Vector3 Torque | ||
197 | { | ||
198 | get { return Vector3.Zero; } | ||
199 | set { return; } | ||
200 | } | ||
201 | |||
202 | public override float CollisionScore | ||
203 | { | ||
204 | get { return 0f; } | ||
205 | set { } | ||
206 | } | ||
207 | |||
208 | public override Quaternion Orientation { get; set; } | ||
209 | |||
210 | public override Vector3 Acceleration { get; set; } | ||
211 | |||
212 | public override bool Kinematic | ||
213 | { | ||
214 | get { return true; } | ||
215 | set { } | ||
216 | } | ||
217 | |||
218 | public override void link(PhysicsActor obj) | ||
219 | { | ||
220 | } | ||
221 | |||
222 | public override void delink() | ||
223 | { | ||
224 | } | ||
225 | |||
226 | public override void LockAngularMotion(Vector3 axis) | ||
227 | { | ||
228 | } | ||
229 | |||
230 | public override void AddForce(Vector3 force, bool pushforce) | ||
231 | { | ||
232 | } | ||
233 | |||
234 | public override void AddAngularForce(Vector3 force, bool pushforce) | ||
235 | { | ||
236 | } | ||
237 | |||
238 | public override void SetMomentum(Vector3 momentum) | ||
239 | { | ||
240 | } | ||
241 | |||
242 | public override void CrossingFailure() | ||
243 | { | ||
244 | } | ||
245 | |||
246 | public override Vector3 PIDTarget | ||
247 | { | ||
248 | set { return; } | ||
249 | } | ||
250 | |||
251 | public override bool PIDActive | ||
252 | { | ||
253 | set { return; } | ||
254 | } | ||
255 | |||
256 | public override float PIDTau | ||
257 | { | ||
258 | set { return; } | ||
259 | } | ||
260 | |||
261 | public override float PIDHoverHeight | ||
262 | { | ||
263 | set { return; } | ||
264 | } | ||
265 | |||
266 | public override bool PIDHoverActive | ||
267 | { | ||
268 | set { return; } | ||
269 | } | ||
270 | |||
271 | public override PIDHoverType PIDHoverType | ||
272 | { | ||
273 | set { return; } | ||
274 | } | ||
275 | |||
276 | public override float PIDHoverTau | ||
277 | { | ||
278 | set { return; } | ||
279 | } | ||
280 | |||
281 | public override Quaternion APIDTarget | ||
282 | { | ||
283 | set { return; } | ||
284 | } | ||
285 | |||
286 | public override bool APIDActive | ||
287 | { | ||
288 | set { return; } | ||
289 | } | ||
290 | |||
291 | public override float APIDStrength | ||
292 | { | ||
293 | set { return; } | ||
294 | } | ||
295 | |||
296 | public override float APIDDamping | ||
297 | { | ||
298 | set { return; } | ||
299 | } | ||
300 | |||
301 | public override void SubscribeEvents(int ms) | ||
302 | { | ||
303 | } | ||
304 | |||
305 | public override void UnSubscribeEvents() | ||
306 | { | ||
307 | } | ||
308 | |||
309 | public override bool SubscribedEvents() | ||
310 | { | ||
311 | return false; | ||
312 | } | ||
313 | } | ||
314 | } | ||