diff options
author | Robert Adams | 2013-05-09 22:16:32 -0700 |
---|---|---|
committer | Robert Adams | 2013-05-09 22:16:32 -0700 |
commit | d48c9b433afcfefe63a7294c19831a7f4be0ee61 (patch) | |
tree | 2d44a344441e3f951adf382f467ac27854301164 /OpenSim/Region/Physics/Manager | |
parent | vh: add material physical property definitions to PhysicsActor (diff) | |
download | opensim-SC_OLD-d48c9b433afcfefe63a7294c19831a7f4be0ee61.zip opensim-SC_OLD-d48c9b433afcfefe63a7294c19831a7f4be0ee61.tar.gz opensim-SC_OLD-d48c9b433afcfefe63a7294c19831a7f4be0ee61.tar.bz2 opensim-SC_OLD-d48c9b433afcfefe63a7294c19831a7f4be0ee61.tar.xz |
vh: Update physics parameter get/set to string based from old float
value based.
Diffstat (limited to 'OpenSim/Region/Physics/Manager')
-rwxr-xr-x | OpenSim/Region/Physics/Manager/IPhysicsParameters.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsScene.cs | 56 |
2 files changed, 57 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/Manager/IPhysicsParameters.cs b/OpenSim/Region/Physics/Manager/IPhysicsParameters.cs index b8676ba..31a397c 100755 --- a/OpenSim/Region/Physics/Manager/IPhysicsParameters.cs +++ b/OpenSim/Region/Physics/Manager/IPhysicsParameters.cs | |||
@@ -60,14 +60,14 @@ namespace OpenSim.Region.Physics.Manager | |||
60 | 60 | ||
61 | // Set parameter on a specific or all instances. | 61 | // Set parameter on a specific or all instances. |
62 | // Return 'false' if not able to set the parameter. | 62 | // Return 'false' if not able to set the parameter. |
63 | bool SetPhysicsParameter(string parm, float value, uint localID); | 63 | bool SetPhysicsParameter(string parm, string value, uint localID); |
64 | 64 | ||
65 | // Get parameter. | 65 | // Get parameter. |
66 | // Return 'false' if not able to get the parameter. | 66 | // Return 'false' if not able to get the parameter. |
67 | bool GetPhysicsParameter(string parm, out float value); | 67 | bool GetPhysicsParameter(string parm, out string value); |
68 | 68 | ||
69 | // Get parameter from a particular object | 69 | // Get parameter from a particular object |
70 | // TODO: | 70 | // TODO: |
71 | // bool GetPhysicsParameter(string parm, out float value, uint localID); | 71 | // bool GetPhysicsParameter(string parm, out string value, uint localID); |
72 | } | 72 | } |
73 | } | 73 | } |
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 | } |