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