diff options
Diffstat (limited to 'OpenSim/Region/PhysicsModules/SharedBase')
-rw-r--r-- | OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs | 23 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs | 9 |
2 files changed, 22 insertions, 10 deletions
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs index 04ccbf0..250b155 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs | |||
@@ -55,6 +55,14 @@ namespace OpenSim.Region.PhysicsModules.SharedBase | |||
55 | Absolute | 55 | Absolute |
56 | } | 56 | } |
57 | 57 | ||
58 | public struct CameraData | ||
59 | { | ||
60 | public Quaternion CameraRotation; | ||
61 | public Vector3 CameraAtAxis; | ||
62 | public bool MouseLook; | ||
63 | public bool Valid; | ||
64 | } | ||
65 | |||
58 | public struct ContactPoint | 66 | public struct ContactPoint |
59 | { | 67 | { |
60 | public Vector3 Position; | 68 | public Vector3 Position; |
@@ -159,13 +167,15 @@ namespace OpenSim.Region.PhysicsModules.SharedBase | |||
159 | public delegate void RequestTerseUpdate(); | 167 | public delegate void RequestTerseUpdate(); |
160 | public delegate void CollisionUpdate(EventArgs e); | 168 | public delegate void CollisionUpdate(EventArgs e); |
161 | public delegate void OutOfBounds(Vector3 pos); | 169 | public delegate void OutOfBounds(Vector3 pos); |
170 | public delegate CameraData GetCameraData(); | ||
162 | 171 | ||
163 | // disable warning: public events | 172 | // disable warning: public events |
164 | #pragma warning disable 67 | 173 | #pragma warning disable 67 |
165 | public event PositionUpdate OnPositionUpdate; | 174 | public event PositionUpdate OnPositionUpdate; |
166 | public event VelocityUpdate OnVelocityUpdate; | 175 | public event VelocityUpdate OnVelocityUpdate; |
167 | public event OrientationUpdate OnOrientationUpdate; | 176 | public event OrientationUpdate OnOrientationUpdate; |
168 | public event RequestTerseUpdate OnRequestTerseUpdate; | 177 | public event RequestTerseUpdate OnRequestTerseUpdate; |
178 | public event GetCameraData OnPhysicsRequestingCameraData; | ||
169 | 179 | ||
170 | /// <summary> | 180 | /// <summary> |
171 | /// Subscribers to this event must synchronously handle the dictionary of collisions received, since the event | 181 | /// Subscribers to this event must synchronously handle the dictionary of collisions received, since the event |
@@ -176,6 +186,17 @@ namespace OpenSim.Region.PhysicsModules.SharedBase | |||
176 | public event OutOfBounds OnOutOfBounds; | 186 | public event OutOfBounds OnOutOfBounds; |
177 | #pragma warning restore 67 | 187 | #pragma warning restore 67 |
178 | 188 | ||
189 | public CameraData TryGetCameraData() | ||
190 | { | ||
191 | GetCameraData handler = OnPhysicsRequestingCameraData; | ||
192 | if (handler != null) | ||
193 | { | ||
194 | return handler(); | ||
195 | } | ||
196 | |||
197 | return new CameraData { Valid = false }; | ||
198 | } | ||
199 | |||
179 | public static PhysicsActor Null | 200 | public static PhysicsActor Null |
180 | { | 201 | { |
181 | get { return new NullPhysicsActor(); } | 202 | get { return new NullPhysicsActor(); } |
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs index 65d8867..aa51c4e 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs | |||
@@ -332,15 +332,6 @@ namespace OpenSim.Region.PhysicsModules.SharedBase | |||
332 | return false; | 332 | return false; |
333 | } | 333 | } |
334 | 334 | ||
335 | public virtual bool SupportsCombining() | ||
336 | { | ||
337 | return false; | ||
338 | } | ||
339 | |||
340 | public virtual void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents) {} | ||
341 | public virtual void CombineTerrain(float[] heightMap, Vector3 pOffset) {} | ||
342 | public virtual void UnCombine(PhysicsScene pScene) {} | ||
343 | |||
344 | /// <summary> | 335 | /// <summary> |
345 | /// Queue a raycast against the physics scene. | 336 | /// Queue a raycast against the physics scene. |
346 | /// The provided callback method will be called when the raycast is complete | 337 | /// The provided callback method will be called when the raycast is complete |