diff options
author | Melanie | 2012-12-16 21:19:30 +0000 |
---|---|---|
committer | Melanie | 2012-12-16 21:19:30 +0000 |
commit | 0a876a305c32e52d7d0b437c8246119227fce51c (patch) | |
tree | 59772311fcbaf528749b3b9661b252d99f0776ba /OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Make WebStatsModule properly handle scenes added or removed after initial sta... (diff) | |
download | opensim-SC-0a876a305c32e52d7d0b437c8246119227fce51c.zip opensim-SC-0a876a305c32e52d7d0b437c8246119227fce51c.tar.gz opensim-SC-0a876a305c32e52d7d0b437c8246119227fce51c.tar.bz2 opensim-SC-0a876a305c32e52d7d0b437c8246119227fce51c.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs index 0df4310..ce0fbe6 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | |||
@@ -32,6 +32,14 @@ using OMV = OpenMetaverse; | |||
32 | 32 | ||
33 | namespace OpenSim.Region.Physics.BulletSPlugin | 33 | namespace OpenSim.Region.Physics.BulletSPlugin |
34 | { | 34 | { |
35 | |||
36 | // A BSPrim can get individual information about its linkedness attached | ||
37 | // to it through an instance of a subclass of LinksetInfo. | ||
38 | // Each type of linkset will define the information needed for its type. | ||
39 | public abstract class BSLinksetInfo | ||
40 | { | ||
41 | } | ||
42 | |||
35 | public abstract class BSLinkset | 43 | public abstract class BSLinkset |
36 | { | 44 | { |
37 | // private static string LogHeader = "[BULLETSIM LINKSET]"; | 45 | // private static string LogHeader = "[BULLETSIM LINKSET]"; |
@@ -116,7 +124,7 @@ public abstract class BSLinkset | |||
116 | get { return ComputeLinksetGeometricCenter(); } | 124 | get { return ComputeLinksetGeometricCenter(); } |
117 | } | 125 | } |
118 | 126 | ||
119 | protected void Initialize(BSScene scene, BSPhysObject parent) | 127 | protected BSLinkset(BSScene scene, BSPhysObject parent) |
120 | { | 128 | { |
121 | // A simple linkset of one (no children) | 129 | // A simple linkset of one (no children) |
122 | LinksetID = m_nextLinksetID++; | 130 | LinksetID = m_nextLinksetID++; |
@@ -127,6 +135,7 @@ public abstract class BSLinkset | |||
127 | LinksetRoot = parent; | 135 | LinksetRoot = parent; |
128 | m_children = new HashSet<BSPhysObject>(); | 136 | m_children = new HashSet<BSPhysObject>(); |
129 | m_mass = parent.RawMass; | 137 | m_mass = parent.RawMass; |
138 | Rebuilding = false; | ||
130 | } | 139 | } |
131 | 140 | ||
132 | // Link to a linkset where the child knows the parent. | 141 | // Link to a linkset where the child knows the parent. |
@@ -219,7 +228,7 @@ public abstract class BSLinkset | |||
219 | // I am the root of a linkset and a new child is being added | 228 | // I am the root of a linkset and a new child is being added |
220 | // Called while LinkActivity is locked. | 229 | // Called while LinkActivity is locked. |
221 | protected abstract void AddChildToLinkset(BSPhysObject child); | 230 | protected abstract void AddChildToLinkset(BSPhysObject child); |
222 | 231 | ||
223 | // I am the root of a linkset and one of my children is being removed. | 232 | // I am the root of a linkset and one of my children is being removed. |
224 | // Safe to call even if the child is not really in my linkset. | 233 | // Safe to call even if the child is not really in my linkset. |
225 | protected abstract void RemoveChildFromLinkset(BSPhysObject child); | 234 | protected abstract void RemoveChildFromLinkset(BSPhysObject child); |
@@ -229,6 +238,10 @@ public abstract class BSLinkset | |||
229 | // May be called at runtime or taint-time. | 238 | // May be called at runtime or taint-time. |
230 | public abstract void Refresh(BSPhysObject requestor); | 239 | public abstract void Refresh(BSPhysObject requestor); |
231 | 240 | ||
241 | // Flag denoting the linkset is in the process of being rebuilt. | ||
242 | // Used to know not the schedule a rebuild in the middle of a rebuild. | ||
243 | protected bool Rebuilding { get; set; } | ||
244 | |||
232 | // The object is going dynamic (physical). Do any setup necessary | 245 | // The object is going dynamic (physical). Do any setup necessary |
233 | // for a dynamic linkset. | 246 | // for a dynamic linkset. |
234 | // Only the state of the passed object can be modified. The rest of the linkset | 247 | // Only the state of the passed object can be modified. The rest of the linkset |