28 using System.Collections.Generic;
31 namespace OpenSim.
Region.PhysicsModule.BulletS
35 private Dictionary<string, BSActor> m_actors;
39 m_actors =
new Dictionary<string, BSActor>();
45 if (!m_actors.ContainsKey(name))
47 m_actors[name] = actor;
56 if (m_actors.ContainsKey(name))
58 BSActor beingRemoved = m_actors[name];
59 m_actors.Remove(name);
60 beingRemoved.Dispose();
70 ForEachActor(a => a.Dispose());
80 return m_actors.ContainsKey(name);
84 return m_actors.TryGetValue(actorName, out theActor);
90 foreach (KeyValuePair<string, BSActor> kvp
in m_actors)
97 ForEachActor(a => a.SetEnabled(enabl));
101 ForEachActor(a => a.Refresh());
105 ForEachActor(a => a.RemoveDependencies());
120 protected BSScene m_physicsScene {
get;
private set; }
122 public virtual bool Enabled {
get; set; }
123 public string ActorName {
get;
private set; }
127 m_physicsScene = physicsScene;
128 m_controllingPrim = pObj;
129 ActorName = actorName;
134 public virtual bool isActive
136 get {
return Enabled; }
143 Enabled = setEnabled;
146 public abstract void Dispose();
148 public abstract void Refresh();
151 public abstract void RemoveDependencies();
Each physical object can have 'actors' who are pushing the object around. This can be used for hover...
BSActor(BSScene physicsScene, BSPhysObject pObj, string actorName)
void SetEnabled(bool setEnabled)
void RemoveDependencies()
void ForEachActor(Action< BSActor > act)
bool HasActor(string name)
bool RemoveAndRelease(string name)
bool TryGetActor(string actorName, out BSActor theActor)
void Add(string name, BSActor actor)