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