aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
diff options
context:
space:
mode:
authorRobert Adams2013-08-01 17:43:06 -0700
committerRobert Adams2013-08-02 09:47:12 -0700
commit24df15dab7befd50f7a45eb54f001e6e481f0ec4 (patch)
treef3502a9782d68848c00fe3cb9b4b2a04dfa91f61 /OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
parentBulletSim: add BSLinkInfo structure to remember link specific information (diff)
downloadopensim-SC_OLD-24df15dab7befd50f7a45eb54f001e6e481f0ec4.zip
opensim-SC_OLD-24df15dab7befd50f7a45eb54f001e6e481f0ec4.tar.gz
opensim-SC_OLD-24df15dab7befd50f7a45eb54f001e6e481f0ec4.tar.bz2
opensim-SC_OLD-24df15dab7befd50f7a45eb54f001e6e481f0ec4.tar.xz
BulletSim: add implementation of 'physSetLinksetType' and 'physGetLinksetType'
and processing routines in BulletSim. Add linkset rebuild/conversion routine in BSLinkset.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs44
1 files changed, 44 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index e92a1d2..a0b6abc 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -1541,6 +1541,50 @@ public class BSPrim : BSPhysObject
1541 PhysicalActors.RemoveDependencies(); 1541 PhysicalActors.RemoveDependencies();
1542 } 1542 }
1543 1543
1544 #region Extension
1545 public override object Extension(string pFunct, params object[] pParams)
1546 {
1547 object ret = null;
1548 switch (pFunct)
1549 {
1550 case BSScene.PhysFunctGetLinksetType:
1551 {
1552 BSPrimLinkable myHandle = this as BSPrimLinkable;
1553 if (myHandle != null)
1554 {
1555 ret = (object)myHandle.LinksetType;
1556 }
1557 m_log.DebugFormat("{0} Extension.physGetLinksetType, type={1}", LogHeader, ret);
1558 break;
1559 }
1560 case BSScene.PhysFunctSetLinksetType:
1561 {
1562 if (pParams.Length > 0)
1563 {
1564 BSLinkset.LinksetImplementation linksetType = (BSLinkset.LinksetImplementation)pParams[0];
1565 BSPrimLinkable myHandle = this as BSPrimLinkable;
1566 if (myHandle != null && myHandle.Linkset.IsRoot(myHandle))
1567 {
1568 PhysScene.TaintedObject("BSPrim.PhysFunctSetLinksetType", delegate()
1569 {
1570 // Cause the linkset type to change
1571 m_log.DebugFormat("{0} Extension.physSetLinksetType, oldType={1}, newType={2}",
1572 LogHeader, myHandle.Linkset.LinksetImpl, linksetType);
1573 myHandle.ConvertLinkset(linksetType);
1574 });
1575 }
1576 ret = (object)(int)linksetType;
1577 }
1578 break;
1579 }
1580 default:
1581 ret = base.Extension(pFunct, pParams);
1582 break;
1583 }
1584 return ret;
1585 }
1586 #endregion // Extension
1587
1544 // The physics engine says that properties have updated. Update same and inform 1588 // The physics engine says that properties have updated. Update same and inform
1545 // the world that things have changed. 1589 // the world that things have changed.
1546 // NOTE: BSPrim.UpdateProperties is overloaded by BSPrimLinkable which modifies updates from root and children prims. 1590 // NOTE: BSPrim.UpdateProperties is overloaded by BSPrimLinkable which modifies updates from root and children prims.