BulletSim: fix line endings in BSActor*

user_profiles
Robert Adams 2013-03-31 17:38:13 -07:00
parent 747ece59d2
commit 75b8cf428e
2 changed files with 302 additions and 291 deletions

View File

@ -42,6 +42,7 @@ public class BSActorLockAxis : BSActor
public BSActorLockAxis(BSScene physicsScene, BSPhysObject pObj, string actorName) public BSActorLockAxis(BSScene physicsScene, BSPhysObject pObj, string actorName)
: base(physicsScene, pObj,actorName) : base(physicsScene, pObj,actorName)
{ {
PhysicsScene.DetailLog("{0},BSActorLockAxis,constructor", Prim.LocalID);
LockAxisConstraint = null; LockAxisConstraint = null;
} }
@ -52,8 +53,8 @@ public class BSActorLockAxis : BSActor
} }
// Release any connections and resources used by the actor. // Release any connections and resources used by the actor.
// BSActor.Release() // BSActor.Dispose()
public override void Release() public override void Dispose()
{ {
RemoveAxisLockConstraint(); RemoveAxisLockConstraint();
} }
@ -63,6 +64,8 @@ public class BSActorLockAxis : BSActor
// BSActor.Refresh() // BSActor.Refresh()
public override void Refresh() public override void Refresh()
{ {
PhysicsScene.DetailLog("{0},BSActorLockAxis,refresh,lockedAxis={1},enabled={2},pActive={3}",
Prim.LocalID, Prim.LockedAxis, Enabled, Prim.IsPhysicallyActive);
// If all the axis are free, we don't need to exist // If all the axis are free, we don't need to exist
if (Prim.LockedAxis == Prim.LockedAxisFree) if (Prim.LockedAxis == Prim.LockedAxisFree)
{ {

View File

@ -1,4 +1,4 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
@ -50,7 +50,7 @@ public class BSActorCollection
if (m_actors.ContainsKey(name)) if (m_actors.ContainsKey(name))
{ {
BSActor beingRemoved = m_actors[name]; BSActor beingRemoved = m_actors[name];
beingRemoved.Release(); beingRemoved.Dispose();
m_actors.Remove(name); m_actors.Remove(name);
ret = true; ret = true;
} }
@ -73,7 +73,7 @@ public class BSActorCollection
public void Release() public void Release()
{ {
ForEachActor(a => a.Release()); ForEachActor(a => a.Dispose());
} }
public void Refresh() public void Refresh()
{ {
@ -86,6 +86,14 @@ public class BSActorCollection
} }
// ============================================================================= // =============================================================================
/// <summary>
/// Each physical object can have 'actors' who are pushing the object around.
/// This can be used for hover, locking axis, making vehicles, etc.
/// Each physical object can have multiple actors acting on it.
///
/// An actor usually registers itself with physics scene events (pre-step action)
/// and modifies the parameters on the host physical object.
/// </summary>
public abstract class BSActor public abstract class BSActor
{ {
protected BSScene PhysicsScene { get; private set; } protected BSScene PhysicsScene { get; private set; }
@ -112,7 +120,7 @@ public abstract class BSActor
Enabled = setEnabled; Enabled = setEnabled;
} }
// Release any connections and resources used by the actor. // Release any connections and resources used by the actor.
public abstract void Release(); public abstract void Dispose();
// Called when physical parameters (properties set in Bullet) need to be re-applied. // Called when physical parameters (properties set in Bullet) need to be re-applied.
public abstract void Refresh(); public abstract void Refresh();
// The object's physical representation is being rebuilt so pick up any physical dependencies (constraints, ...). // The object's physical representation is being rebuilt so pick up any physical dependencies (constraints, ...).