diff options
Diffstat (limited to 'OpenSim/Region/Physics/Manager/PhysicsActor.cs')
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsActor.cs | 75 |
1 files changed, 74 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 0587054..aaeae86 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs | |||
@@ -59,15 +59,30 @@ namespace OpenSim.Region.Physics.Manager | |||
59 | public Vector3 Position; | 59 | public Vector3 Position; |
60 | public Vector3 SurfaceNormal; | 60 | public Vector3 SurfaceNormal; |
61 | public float PenetrationDepth; | 61 | public float PenetrationDepth; |
62 | public float RelativeSpeed; | ||
62 | 63 | ||
63 | public ContactPoint(Vector3 position, Vector3 surfaceNormal, float penetrationDepth) | 64 | public ContactPoint(Vector3 position, Vector3 surfaceNormal, float penetrationDepth) |
64 | { | 65 | { |
65 | Position = position; | 66 | Position = position; |
66 | SurfaceNormal = surfaceNormal; | 67 | SurfaceNormal = surfaceNormal; |
67 | PenetrationDepth = penetrationDepth; | 68 | PenetrationDepth = penetrationDepth; |
69 | RelativeSpeed = 0f; // for now let this one be set explicity | ||
68 | } | 70 | } |
69 | } | 71 | } |
70 | 72 | ||
73 | public struct ContactData | ||
74 | { | ||
75 | public float mu; | ||
76 | public float bounce; | ||
77 | public bool softcolide; | ||
78 | |||
79 | public ContactData(float _mu, float _bounce, bool _softcolide) | ||
80 | { | ||
81 | mu = _mu; | ||
82 | bounce = _bounce; | ||
83 | softcolide = _softcolide; | ||
84 | } | ||
85 | } | ||
71 | /// <summary> | 86 | /// <summary> |
72 | /// Used to pass collision information to OnCollisionUpdate listeners. | 87 | /// Used to pass collision information to OnCollisionUpdate listeners. |
73 | /// </summary> | 88 | /// </summary> |
@@ -135,6 +150,8 @@ namespace OpenSim.Region.Physics.Manager | |||
135 | /// </summary> | 150 | /// </summary> |
136 | public event CollisionUpdate OnCollisionUpdate; | 151 | public event CollisionUpdate OnCollisionUpdate; |
137 | 152 | ||
153 | public virtual void SetVehicle(object vdata) { } | ||
154 | |||
138 | public event OutOfBounds OnOutOfBounds; | 155 | public event OutOfBounds OnOutOfBounds; |
139 | #pragma warning restore 67 | 156 | #pragma warning restore 67 |
140 | 157 | ||
@@ -142,11 +159,29 @@ namespace OpenSim.Region.Physics.Manager | |||
142 | { | 159 | { |
143 | get { return new NullPhysicsActor(); } | 160 | get { return new NullPhysicsActor(); } |
144 | } | 161 | } |
162 | |||
163 | public virtual bool Building { get; set; } | ||
164 | |||
165 | public virtual void getContactData(ref ContactData cdata) | ||
166 | { | ||
167 | cdata.mu = 0; | ||
168 | cdata.bounce = 0; | ||
169 | } | ||
145 | 170 | ||
146 | public abstract bool Stopped { get; } | 171 | public abstract bool Stopped { get; } |
147 | 172 | ||
148 | public abstract Vector3 Size { get; set; } | 173 | public abstract Vector3 Size { get; set; } |
149 | 174 | ||
175 | public virtual bool Phantom { get; set; } | ||
176 | |||
177 | public virtual bool IsVolumeDtc | ||
178 | { | ||
179 | get { return false; } | ||
180 | set { return; } | ||
181 | } | ||
182 | |||
183 | public virtual byte PhysicsShapeType { get; set; } | ||
184 | |||
150 | public abstract PrimitiveBaseShape Shape { set; } | 185 | public abstract PrimitiveBaseShape Shape { set; } |
151 | 186 | ||
152 | uint m_baseLocalID; | 187 | uint m_baseLocalID; |
@@ -195,6 +230,11 @@ namespace OpenSim.Region.Physics.Manager | |||
195 | } | 230 | } |
196 | } | 231 | } |
197 | 232 | ||
233 | public virtual byte[] Serialize(bool PhysIsRunning) | ||
234 | { | ||
235 | return new byte[0]; | ||
236 | } | ||
237 | |||
198 | public virtual void RaiseOutOfBounds(Vector3 pos) | 238 | public virtual void RaiseOutOfBounds(Vector3 pos) |
199 | { | 239 | { |
200 | // Make a temporary copy of the event to avoid possibility of | 240 | // Make a temporary copy of the event to avoid possibility of |
@@ -222,6 +262,11 @@ namespace OpenSim.Region.Physics.Manager | |||
222 | { | 262 | { |
223 | } | 263 | } |
224 | 264 | ||
265 | public virtual float Density { get; set; } | ||
266 | public virtual float GravModifier { get; set; } | ||
267 | public virtual float Friction { get; set; } | ||
268 | public virtual float Bounce { get; set; } | ||
269 | |||
225 | /// <summary> | 270 | /// <summary> |
226 | /// Position of this actor. | 271 | /// Position of this actor. |
227 | /// </summary> | 272 | /// </summary> |
@@ -249,6 +294,34 @@ namespace OpenSim.Region.Physics.Manager | |||
249 | public abstract Vector3 GeometricCenter { get; } | 294 | public abstract Vector3 GeometricCenter { get; } |
250 | public abstract Vector3 CenterOfMass { get; } | 295 | public abstract Vector3 CenterOfMass { get; } |
251 | 296 | ||
297 | public virtual Vector3 OOBsize | ||
298 | { | ||
299 | get | ||
300 | { | ||
301 | Vector3 s=Size; | ||
302 | s.X *=0.5f; | ||
303 | s.Y *=0.5f; | ||
304 | s.Z *=0.5f; | ||
305 | return s; | ||
306 | } | ||
307 | } | ||
308 | |||
309 | public virtual Vector3 OOBoffset | ||
310 | { | ||
311 | get | ||
312 | { | ||
313 | return Vector3.Zero; | ||
314 | } | ||
315 | } | ||
316 | |||
317 | public virtual float OOBRadiusSQ | ||
318 | { | ||
319 | get | ||
320 | { | ||
321 | return Size.LengthSquared() * 0.25f; // ((0.5^2) | ||
322 | } | ||
323 | } | ||
324 | |||
252 | /// <summary> | 325 | /// <summary> |
253 | /// Velocity of this actor. | 326 | /// Velocity of this actor. |
254 | /// </summary> | 327 | /// </summary> |
@@ -384,7 +457,6 @@ namespace OpenSim.Region.Physics.Manager | |||
384 | 457 | ||
385 | public override void VehicleFloatParam(int param, float value) | 458 | public override void VehicleFloatParam(int param, float value) |
386 | { | 459 | { |
387 | |||
388 | } | 460 | } |
389 | 461 | ||
390 | public override void VehicleVectorParam(int param, Vector3 value) | 462 | public override void VehicleVectorParam(int param, Vector3 value) |
@@ -554,5 +626,6 @@ namespace OpenSim.Region.Physics.Manager | |||
554 | { | 626 | { |
555 | return false; | 627 | return false; |
556 | } | 628 | } |
629 | |||
557 | } | 630 | } |
558 | } | 631 | } |