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