diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsScene.cs | 56 |
1 files changed, 54 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 488900e..290b72e 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs | |||
@@ -43,6 +43,35 @@ namespace OpenSim.Region.Physics.Manager | |||
43 | public delegate void JointDeactivated(PhysicsJoint joint); | 43 | public delegate void JointDeactivated(PhysicsJoint joint); |
44 | public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation" | 44 | public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation" |
45 | 45 | ||
46 | public enum RayFilterFlags : ushort | ||
47 | { | ||
48 | // the flags | ||
49 | water = 0x01, | ||
50 | land = 0x02, | ||
51 | agent = 0x04, | ||
52 | nonphysical = 0x08, | ||
53 | physical = 0x10, | ||
54 | phantom = 0x20, | ||
55 | volumedtc = 0x40, | ||
56 | |||
57 | // ray cast colision control (may only work for meshs) | ||
58 | ContactsUnImportant = 0x2000, | ||
59 | BackFaceCull = 0x4000, | ||
60 | ClosestHit = 0x8000, | ||
61 | |||
62 | // some combinations | ||
63 | LSLPhantom = phantom | volumedtc, | ||
64 | PrimsNonPhantom = nonphysical | physical, | ||
65 | PrimsNonPhantomAgents = nonphysical | physical | agent, | ||
66 | |||
67 | AllPrims = nonphysical | phantom | volumedtc | physical, | ||
68 | AllButLand = agent | nonphysical | physical | phantom | volumedtc, | ||
69 | |||
70 | ClosestAndBackCull = ClosestHit | BackFaceCull, | ||
71 | |||
72 | All = 0x3f | ||
73 | } | ||
74 | |||
46 | public delegate void RequestAssetDelegate(UUID assetID, AssetReceivedDelegate callback); | 75 | public delegate void RequestAssetDelegate(UUID assetID, AssetReceivedDelegate callback); |
47 | public delegate void AssetReceivedDelegate(AssetBase asset); | 76 | public delegate void AssetReceivedDelegate(AssetBase asset); |
48 | 77 | ||
@@ -62,13 +91,20 @@ namespace OpenSim.Region.Physics.Manager | |||
62 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 91 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
63 | 92 | ||
64 | /// <summary> | 93 | /// <summary> |
65 | /// Name of this scene. Useful in debug messages to distinguish one OdeScene instance from another. | 94 | /// A unique identifying string for this instance of the physics engine. |
95 | /// Useful in debug messages to distinguish one OdeScene instance from another. | ||
96 | /// Usually set to include the region name that the physics engine is acting for. | ||
66 | /// </summary> | 97 | /// </summary> |
67 | public string Name { get; protected set; } | 98 | public string Name { get; protected set; } |
68 | 99 | ||
100 | /// <summary> | ||
101 | /// A string identifying the family of this physics engine. Most common values returned | ||
102 | /// are "OpenDynamicsEngine" and "BulletSim" but others are possible. | ||
103 | /// </summary> | ||
104 | public string EngineType { get; protected set; } | ||
105 | |||
69 | // The only thing that should register for this event is the SceneGraph | 106 | // The only thing that should register for this event is the SceneGraph |
70 | // Anything else could cause problems. | 107 | // Anything else could cause problems. |
71 | |||
72 | public event physicsCrash OnPhysicsCrash; | 108 | public event physicsCrash OnPhysicsCrash; |
73 | 109 | ||
74 | public static PhysicsScene Null | 110 | public static PhysicsScene Null |
@@ -130,6 +166,12 @@ namespace OpenSim.Region.Physics.Manager | |||
130 | public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | 166 | public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, |
131 | Vector3 size, Quaternion rotation, bool isPhysical, uint localid); | 167 | Vector3 size, Quaternion rotation, bool isPhysical, uint localid); |
132 | 168 | ||
169 | public virtual PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | ||
170 | Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, byte shapetype, uint localid) | ||
171 | { | ||
172 | return AddPrimShape(primName, pbs, position, size, rotation, isPhysical, localid); | ||
173 | } | ||
174 | |||
133 | public virtual float TimeDilation | 175 | public virtual float TimeDilation |
134 | { | 176 | { |
135 | get { return 1.0f; } | 177 | get { return 1.0f; } |
@@ -279,5 +321,15 @@ namespace OpenSim.Region.Physics.Manager | |||
279 | { | 321 | { |
280 | return new List<ContactResult>(); | 322 | return new List<ContactResult>(); |
281 | } | 323 | } |
324 | |||
325 | public virtual object RaycastWorld(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter) | ||
326 | { | ||
327 | return null; | ||
328 | } | ||
329 | |||
330 | public virtual bool SupportsRaycastWorldFiltered() | ||
331 | { | ||
332 | return false; | ||
333 | } | ||
282 | } | 334 | } |
283 | } | 335 | } |