More method doc and formatting changes. Makes DestroyOdeStructures() private
parent
64c42a729a
commit
32ba06a55c
|
@ -4744,6 +4744,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
position = presence.OffsetPosition;
|
position = presence.OffsetPosition;
|
||||||
velocity = presence.Velocity;
|
velocity = presence.Velocity;
|
||||||
acceleration = Vector3.Zero;
|
acceleration = Vector3.Zero;
|
||||||
|
|
||||||
|
// Interestingly, sending this to non-zero will cause the client's avatar to start moving & accelerating
|
||||||
|
// in that direction, even though we don't model this on the server. Implementing this in the future
|
||||||
|
// may improve movement smoothness.
|
||||||
|
// acceleration = new Vector3(1, 0, 0);
|
||||||
|
|
||||||
angularVelocity = Vector3.Zero;
|
angularVelocity = Vector3.Zero;
|
||||||
rotation = presence.Rotation;
|
rotation = presence.Rotation;
|
||||||
|
|
||||||
|
|
|
@ -202,10 +202,18 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
|
|
||||||
public virtual void SetMaterial (int material)
|
public virtual void SetMaterial (int material)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Position of this actor.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Setting this directly moves the actor to a given position.
|
||||||
|
/// Getting this retrieves the position calculated by physics scene updates, using factors such as velocity and
|
||||||
|
/// collisions.
|
||||||
|
/// </remarks>
|
||||||
public abstract Vector3 Position { get; set; }
|
public abstract Vector3 Position { get; set; }
|
||||||
|
|
||||||
public abstract float Mass { get; }
|
public abstract float Mass { get; }
|
||||||
public abstract Vector3 Force { get; set; }
|
public abstract Vector3 Force { get; set; }
|
||||||
|
|
||||||
|
@ -215,11 +223,24 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
public abstract void VehicleRotationParam(int param, Quaternion rotation);
|
public abstract void VehicleRotationParam(int param, Quaternion rotation);
|
||||||
public abstract void VehicleFlags(int param, bool remove);
|
public abstract void VehicleFlags(int param, bool remove);
|
||||||
|
|
||||||
public abstract void SetVolumeDetect(int param); // Allows the detection of collisions with inherently non-physical prims. see llVolumeDetect for more
|
/// <summary>
|
||||||
|
/// Allows the detection of collisions with inherently non-physical prims. see llVolumeDetect for more
|
||||||
|
/// </summary>
|
||||||
|
public abstract void SetVolumeDetect(int param);
|
||||||
|
|
||||||
public abstract Vector3 GeometricCenter { get; }
|
public abstract Vector3 GeometricCenter { get; }
|
||||||
public abstract Vector3 CenterOfMass { get; }
|
public abstract Vector3 CenterOfMass { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Velocity of this actor.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Setting this provides a target velocity for physics scene updates.
|
||||||
|
/// Getting this returns the velocity calculated by physics scene updates, using factors such as target velocity,
|
||||||
|
/// time to accelerate and collisions.
|
||||||
|
/// </remarks>
|
||||||
public abstract Vector3 Velocity { get; set; }
|
public abstract Vector3 Velocity { get; set; }
|
||||||
|
|
||||||
public abstract Vector3 Torque { get; set; }
|
public abstract Vector3 Torque { get; set; }
|
||||||
public abstract float CollisionScore { get; set;}
|
public abstract float CollisionScore { get; set;}
|
||||||
public abstract Vector3 Acceleration { get; }
|
public abstract Vector3 Acceleration { get; }
|
||||||
|
|
|
@ -886,7 +886,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
d.BodyAddForce(Body, force.X, force.Y, force.Z);
|
d.BodyAddForce(Body, force.X, force.Y, force.Z);
|
||||||
//d.BodySetRotation(Body, ref m_StandUpRotation);
|
//d.BodySetRotation(Body, ref m_StandUpRotation);
|
||||||
//standupStraight();
|
//standupStraight();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -901,7 +900,8 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
/// <param name="timeStep"></param>
|
/// <param name="timeStep"></param>
|
||||||
/// <param name="defects">
|
/// <param name="defects">
|
||||||
/// If there is something wrong with the character (e.g. its position is non-finite)
|
/// If there is something wrong with the character (e.g. its position is non-finite)
|
||||||
/// then it is added to this list. The ODE structures associated with it are also destroyed.</param>
|
/// then it is added to this list. The ODE structures associated with it are also destroyed.
|
||||||
|
/// </param>
|
||||||
public void Move(float timeStep, List<OdeCharacter> defects)
|
public void Move(float timeStep, List<OdeCharacter> defects)
|
||||||
{
|
{
|
||||||
// no lock; for now it's only called from within Simulate()
|
// no lock; for now it's only called from within Simulate()
|
||||||
|
@ -995,6 +995,10 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
// we're in mid air suspended
|
// we're in mid air suspended
|
||||||
vec.X = ((_target_velocity.X / movementdivisor) - vel.X) * (PID_D / 6);
|
vec.X = ((_target_velocity.X / movementdivisor) - vel.X) * (PID_D / 6);
|
||||||
vec.Y = ((_target_velocity.Y / movementdivisor) - vel.Y) * (PID_D / 6);
|
vec.Y = ((_target_velocity.Y / movementdivisor) - vel.Y) * (PID_D / 6);
|
||||||
|
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[ODE CHARACTER]: !m_iscolliding && flying, vec {0}, _target_velocity {1}, movementdivisor {2}, vel {3}",
|
||||||
|
// vec, _target_velocity, movementdivisor, vel);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_iscolliding && !flying && _target_velocity.Z > 0.0f)
|
if (m_iscolliding && !flying && _target_velocity.Z > 0.0f)
|
||||||
|
@ -1167,7 +1171,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used internally to destroy the ODE structures associated with this character.
|
/// Used internally to destroy the ODE structures associated with this character.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void DestroyOdeStructures()
|
private void DestroyOdeStructures()
|
||||||
{
|
{
|
||||||
// destroy avatar capsule and related ODE data
|
// destroy avatar capsule and related ODE data
|
||||||
if (Amotor != IntPtr.Zero)
|
if (Amotor != IntPtr.Zero)
|
||||||
|
|
Loading…
Reference in New Issue