diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneGraph.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneGraph.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneGraph.cs b/OpenSim/Region/Environment/Scenes/SceneGraph.cs index dbb8539..d998dbb 100644 --- a/OpenSim/Region/Environment/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Environment/Scenes/SceneGraph.cs | |||
@@ -159,6 +159,22 @@ namespace OpenSim.Region.Environment.Scenes | |||
159 | { | 159 | { |
160 | lock (m_syncRoot) | 160 | lock (m_syncRoot) |
161 | { | 161 | { |
162 | // Here is where the Scene calls the PhysicsScene. This is a one-way | ||
163 | // interaction; the PhysicsScene cannot access the calling Scene directly. | ||
164 | // But with joints, we want a PhysicsActor to be able to influence a | ||
165 | // non-physics SceneObjectPart. In particular, a PhysicsActor that is connected | ||
166 | // with a joint should be able to move the SceneObjectPart which is the visual | ||
167 | // representation of that joint (for editing and serialization purposes). | ||
168 | // However the PhysicsActor normally cannot directly influence anything outside | ||
169 | // of the PhysicsScene, and the non-physical SceneObjectPart which represents | ||
170 | // the joint in the Scene does not exist in the PhysicsScene. | ||
171 | // | ||
172 | // To solve this, we have an event in the PhysicsScene that is fired when a joint | ||
173 | // has changed position (because one of its associated PhysicsActors has changed | ||
174 | // position). | ||
175 | // | ||
176 | // Therefore, JointMoved and JointDeactivated events will be fired as a result of the following Simulate(). | ||
177 | |||
162 | return _PhyScene.Simulate((float)elapsed); | 178 | return _PhyScene.Simulate((float)elapsed); |
163 | } | 179 | } |
164 | } | 180 | } |
@@ -875,6 +891,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
875 | { | 891 | { |
876 | List<EntityBase> EntityList = GetEntities(); | 892 | List<EntityBase> EntityList = GetEntities(); |
877 | 893 | ||
894 | // FIXME: use a dictionary here | ||
878 | foreach (EntityBase ent in EntityList) | 895 | foreach (EntityBase ent in EntityList) |
879 | { | 896 | { |
880 | if (ent is SceneObjectGroup) | 897 | if (ent is SceneObjectGroup) |