aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/POSPlugin/POSPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/POSPlugin/POSPrim.cs')
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSPrim.cs262
1 files changed, 262 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/POSPlugin/POSPrim.cs b/OpenSim/Region/Physics/POSPlugin/POSPrim.cs
new file mode 100644
index 0000000..c767917
--- /dev/null
+++ b/OpenSim/Region/Physics/POSPlugin/POSPrim.cs
@@ -0,0 +1,262 @@
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 OpenSim 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 Axiom.Math;
31using Nini.Config;
32using OpenSim.Framework;
33using OpenSim.Region.Physics.Manager;
34
35namespace OpenSim.Region.Physics.POSPlugin
36{
37 public class POSPrim : 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 Quaternion _orientation;
45 private bool iscolliding;
46
47 public POSPrim()
48 {
49 _velocity = new PhysicsVector();
50 _position = new PhysicsVector();
51 _acceleration = new PhysicsVector();
52 }
53
54 public override int PhysicsActorType
55 {
56 get { return (int) ActorTypes.Prim; }
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 IsPhysical
67 {
68 get { return false; }
69 set { return; }
70 }
71
72 public override bool ThrottleUpdates
73 {
74 get { return false; }
75 set { return; }
76 }
77
78 public override bool IsColliding
79 {
80 get { return iscolliding; }
81 set { iscolliding = value; }
82 }
83
84 public override bool CollidingGround
85 {
86 get { return false; }
87 set { return; }
88 }
89
90 public override bool CollidingObj
91 {
92 get { return false; }
93 set { return; }
94 }
95
96 public override bool Stopped
97 {
98 get { return false; }
99 }
100
101 public override PhysicsVector Position
102 {
103 get { return _position; }
104 set { _position = value; }
105 }
106
107 public override PhysicsVector Size
108 {
109 get { return _size; }
110 set { _size = value; }
111 }
112
113 public override float Mass
114 {
115 get { return 0f; }
116 }
117
118 public override PhysicsVector Force
119 {
120 get { return PhysicsVector.Zero; }
121 }
122
123 public override PhysicsVector CenterOfMass
124 {
125 get { return PhysicsVector.Zero; }
126 }
127
128 public override PhysicsVector GeometricCenter
129 {
130 get { return PhysicsVector.Zero; }
131 }
132
133 public override PrimitiveBaseShape Shape
134 {
135 set { return; }
136 }
137
138 public override float Buoyancy
139 {
140 get { return 0f; }
141 set { return; }
142 }
143
144 public override bool FloatOnWater
145 {
146 set { return; }
147 }
148
149 public override PhysicsVector Velocity
150 {
151 get { return _velocity; }
152 set { _velocity = value; }
153 }
154
155 public override float CollisionScore
156 {
157 get { return 0f; }
158 set { }
159 }
160
161 public override Quaternion Orientation
162 {
163 get { return _orientation; }
164 set { _orientation = value; }
165 }
166
167 public override PhysicsVector Acceleration
168 {
169 get { return _acceleration; }
170 }
171
172 public override bool Kinematic
173 {
174 get { return true; }
175 set { }
176 }
177
178 public void SetAcceleration(PhysicsVector accel)
179 {
180 _acceleration = accel;
181 }
182
183 public override void AddForce(PhysicsVector force, bool pushforce)
184 {
185 }
186
187 public override void SetMomentum(PhysicsVector momentum)
188 {
189 }
190
191 public override bool Flying
192 {
193 get { return false; }
194 set { }
195 }
196
197 public override bool SetAlwaysRun
198 {
199 get { return false; }
200 set { return; }
201 }
202
203 public override uint LocalID
204 {
205 set { return; }
206 }
207
208 public override bool Grabbed
209 {
210 set { return; }
211 }
212
213 public override void link(PhysicsActor obj)
214 {
215 }
216
217 public override void delink()
218 {
219 }
220
221 public override void LockAngularMotion(PhysicsVector axis)
222 {
223 }
224
225 public override bool Selected
226 {
227 set { return; }
228 }
229
230 public override void CrossingFailure()
231 {
232 }
233
234 public override PhysicsVector PIDTarget
235 {
236 set { return; }
237 }
238
239 public override bool PIDActive
240 {
241 set { return; }
242 }
243
244 public override float PIDTau
245 {
246 set { return; }
247 }
248
249 public override void SubscribeEvents(int ms)
250 {
251 }
252
253 public override void UnSubscribeEvents()
254 {
255 }
256
257 public override bool SubscribedEvents()
258 {
259 return false;
260 }
261 }
262}