diff options
author | Robert Adams | 2013-08-07 10:24:37 -0700 |
---|---|---|
committer | Robert Adams | 2013-09-11 09:11:43 -0700 |
commit | c6a6631efc74ac8c139e0ae8cad683496fdd0050 (patch) | |
tree | e204bdac98d5c7c2b53ca034cd70618fad5fcbd8 /OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs | |
parent | BulletSim: add unmanaged and XNA functions for hinge, slider and spring const... (diff) | |
download | opensim-SC_OLD-c6a6631efc74ac8c139e0ae8cad683496fdd0050.zip opensim-SC_OLD-c6a6631efc74ac8c139e0ae8cad683496fdd0050.tar.gz opensim-SC_OLD-c6a6631efc74ac8c139e0ae8cad683496fdd0050.tar.bz2 opensim-SC_OLD-c6a6631efc74ac8c139e0ae8cad683496fdd0050.tar.xz |
BulletSim: move linkset extension operations into BSPrimLinkable where they should be.
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs index 38d1f88..fc639ad 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs | |||
@@ -41,6 +41,8 @@ public class BSPrimLinkable : BSPrimDisplaced | |||
41 | // operations necessary for keeping the linkset created and, additionally, this | 41 | // operations necessary for keeping the linkset created and, additionally, this |
42 | // calls the linkset implementation for its creation and management. | 42 | // calls the linkset implementation for its creation and management. |
43 | 43 | ||
44 | private static readonly string LogHeader = "[BULLETS PRIMLINKABLE]"; | ||
45 | |||
44 | // This adds the overrides for link() and delink() so the prim is linkable. | 46 | // This adds the overrides for link() and delink() so the prim is linkable. |
45 | 47 | ||
46 | public BSLinkset Linkset { get; set; } | 48 | public BSLinkset Linkset { get; set; } |
@@ -279,5 +281,44 @@ public class BSPrimLinkable : BSPrimDisplaced | |||
279 | } | 281 | } |
280 | return ret; | 282 | return ret; |
281 | } | 283 | } |
284 | |||
285 | #region Extension | ||
286 | public override object Extension(string pFunct, params object[] pParams) | ||
287 | { | ||
288 | object ret = null; | ||
289 | switch (pFunct) | ||
290 | { | ||
291 | case BSScene.PhysFunctGetLinksetType: | ||
292 | { | ||
293 | ret = (object)LinksetType; | ||
294 | m_log.DebugFormat("{0} Extension.physGetLinksetType, type={1}", LogHeader, ret); | ||
295 | break; | ||
296 | } | ||
297 | case BSScene.PhysFunctSetLinksetType: | ||
298 | { | ||
299 | if (pParams.Length > 0) | ||
300 | { | ||
301 | BSLinkset.LinksetImplementation linksetType = (BSLinkset.LinksetImplementation)pParams[0]; | ||
302 | if (Linkset.IsRoot(this)) | ||
303 | { | ||
304 | PhysScene.TaintedObject("BSPrim.PhysFunctSetLinksetType", delegate() | ||
305 | { | ||
306 | // Cause the linkset type to change | ||
307 | m_log.DebugFormat("{0} Extension.physSetLinksetType, oldType={1}, newType={2}", | ||
308 | LogHeader, Linkset.LinksetImpl, linksetType); | ||
309 | ConvertLinkset(linksetType); | ||
310 | }); | ||
311 | } | ||
312 | ret = (object)(int)linksetType; | ||
313 | } | ||
314 | break; | ||
315 | } | ||
316 | default: | ||
317 | ret = base.Extension(pFunct, pParams); | ||
318 | break; | ||
319 | } | ||
320 | return ret; | ||
321 | } | ||
322 | #endregion // Extension | ||
282 | } | 323 | } |
283 | } | 324 | } |