Removing duplicate SceneObjectPart.RotationalVelocity property

0.6.8-post-fixes
John Hurliman 2009-11-02 11:28:35 -08:00
parent 6309fcc5b4
commit 67ac9881fa
8 changed files with 26 additions and 36 deletions

View File

@ -1049,7 +1049,7 @@ VALUES
if (!(primRow["ParticleSystem"] is DBNull))
prim.ParticleSystem = (Byte[])primRow["ParticleSystem"];
prim.RotationalVelocity = new Vector3(
prim.AngularVelocity = new Vector3(
Convert.ToSingle(primRow["OmegaX"]),
Convert.ToSingle(primRow["OmegaY"]),
Convert.ToSingle(primRow["OmegaZ"]));
@ -1429,9 +1429,9 @@ VALUES
parameters.Add(_Database.CreateParameter("TextureAnimation", prim.TextureAnimation));
parameters.Add(_Database.CreateParameter("ParticleSystem", prim.ParticleSystem));
parameters.Add(_Database.CreateParameter("OmegaX", prim.RotationalVelocity.X));
parameters.Add(_Database.CreateParameter("OmegaY", prim.RotationalVelocity.Y));
parameters.Add(_Database.CreateParameter("OmegaZ", prim.RotationalVelocity.Z));
parameters.Add(_Database.CreateParameter("OmegaX", prim.AngularVelocity.X));
parameters.Add(_Database.CreateParameter("OmegaY", prim.AngularVelocity.Y));
parameters.Add(_Database.CreateParameter("OmegaZ", prim.AngularVelocity.Z));
parameters.Add(_Database.CreateParameter("CameraEyeOffsetX", prim.GetCameraEyeOffset().X));
parameters.Add(_Database.CreateParameter("CameraEyeOffsetY", prim.GetCameraEyeOffset().Y));

View File

@ -908,7 +908,7 @@ namespace OpenSim.Data.MySQL
if (!(row["ParticleSystem"] is DBNull))
prim.ParticleSystem = (byte[])row["ParticleSystem"];
prim.RotationalVelocity = new Vector3(
prim.AngularVelocity = new Vector3(
(float)(double)row["OmegaX"],
(float)(double)row["OmegaY"],
(float)(double)row["OmegaZ"]
@ -1240,9 +1240,9 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("TextureAnimation", prim.TextureAnimation);
cmd.Parameters.AddWithValue("ParticleSystem", prim.ParticleSystem);
cmd.Parameters.AddWithValue("OmegaX", (double)prim.RotationalVelocity.X);
cmd.Parameters.AddWithValue("OmegaY", (double)prim.RotationalVelocity.Y);
cmd.Parameters.AddWithValue("OmegaZ", (double)prim.RotationalVelocity.Z);
cmd.Parameters.AddWithValue("OmegaX", (double)prim.AngularVelocity.X);
cmd.Parameters.AddWithValue("OmegaY", (double)prim.AngularVelocity.Y);
cmd.Parameters.AddWithValue("OmegaZ", (double)prim.AngularVelocity.Z);
cmd.Parameters.AddWithValue("CameraEyeOffsetX", (double)prim.GetCameraEyeOffset().X);
cmd.Parameters.AddWithValue("CameraEyeOffsetY", (double)prim.GetCameraEyeOffset().Y);

View File

@ -1213,7 +1213,7 @@ namespace OpenSim.Data.SQLite
if (!row.IsNull("ParticleSystem"))
prim.ParticleSystem = Convert.FromBase64String(row["ParticleSystem"].ToString());
prim.RotationalVelocity = new Vector3(
prim.AngularVelocity = new Vector3(
Convert.ToSingle(row["OmegaX"]),
Convert.ToSingle(row["OmegaY"]),
Convert.ToSingle(row["OmegaZ"])
@ -1530,9 +1530,9 @@ namespace OpenSim.Data.SQLite
row["TextureAnimation"] = Convert.ToBase64String(prim.TextureAnimation);
row["ParticleSystem"] = Convert.ToBase64String(prim.ParticleSystem);
row["OmegaX"] = prim.RotationalVelocity.X;
row["OmegaY"] = prim.RotationalVelocity.Y;
row["OmegaZ"] = prim.RotationalVelocity.Z;
row["OmegaX"] = prim.AngularVelocity.X;
row["OmegaY"] = prim.AngularVelocity.Y;
row["OmegaZ"] = prim.AngularVelocity.Z;
row["CameraEyeOffsetX"] = prim.GetCameraEyeOffset().X;
row["CameraEyeOffsetY"] = prim.GetCameraEyeOffset().Y;

View File

@ -4635,7 +4635,7 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectPart trackedBody = GetSceneObjectPart(joint.TrackedBodyName); // FIXME: causes a sequential lookup
if (trackedBody == null) return; // the actor may have been deleted but the joint still lingers around a few frames waiting for deletion. during this time, trackedBody is NULL to prevent further motion of the joint proxy.
jointProxyObject.Velocity = trackedBody.Velocity;
jointProxyObject.RotationalVelocity = trackedBody.RotationalVelocity;
jointProxyObject.AngularVelocity = trackedBody.AngularVelocity;
switch (joint.Type)
{
case PhysicsJointType.Ball:

View File

@ -683,12 +683,6 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public Vector3 RotationalVelocity
{
get { return AngularVelocity; }
set { AngularVelocity = value; }
}
/// <summary></summary>
public Vector3 AngularVelocity
{
@ -1552,9 +1546,9 @@ if (m_shape != null) {
m_parentGroup.Scene.PhysicsScene.RequestJointDeletion(Name); // FIXME: what if the name changed?
// make sure client isn't interpolating the joint proxy object
Velocity = new Vector3(0, 0, 0);
RotationalVelocity = new Vector3(0, 0, 0);
Acceleration = new Vector3(0, 0, 0);
Velocity = Vector3.Zero;
AngularVelocity = Vector3.Zero;
Acceleration = Vector3.Zero;
}
}
}
@ -2384,7 +2378,7 @@ if (m_shape != null) {
byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A};
remoteClient.SendPrimitiveToClient(new SendPrimitiveData(m_regionHandle, m_parentGroup.GetTimeDilation(), LocalId, m_shape,
lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, _ownerID,
lPos, Velocity, Acceleration, RotationOffset, AngularVelocity, clientFlags, m_uuid, _ownerID,
m_text, color, _parentID, m_particleSystem, m_clickAction, (byte)m_material, m_TextureAnimation, IsAttachment,
AttachmentPoint,FromItemID, Sound, SoundGain, SoundFlags, SoundRadius, ParentGroup.GetUpdatePriority(remoteClient)));
}
@ -2405,7 +2399,7 @@ if (m_shape != null) {
if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
!Acceleration.Equals(m_lastAcceleration) ||
!Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) ||
!RotationalVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) ||
!AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) ||
!OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
{
@ -2425,7 +2419,7 @@ if (m_shape != null) {
m_lastRotation = RotationOffset;
m_lastVelocity = Velocity;
m_lastAcceleration = Acceleration;
m_lastAngularVelocity = RotationalVelocity;
m_lastAngularVelocity = AngularVelocity;
m_lastTerseSent = Environment.TickCount;
}
}
@ -3787,7 +3781,7 @@ if (m_shape != null) {
remoteClient.SendPrimTerseUpdate(new SendPrimitiveTerseData(m_regionHandle,
m_parentGroup.GetTimeDilation(), LocalId, lPos,
RotationOffset, Velocity, Acceleration,
RotationalVelocity, state, FromItemID,
AngularVelocity, state, FromItemID,
OwnerID, (int)AttachmentPoint, null, ParentGroup.GetUpdatePriority(remoteClient)));
}

View File

@ -81,12 +81,11 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
y.Scale = new Vector3(0.01f,0.01f,0.01f);
y.LastOwnerID = UUID.Zero;
y.GroupPosition = groupPos;
y.OffsetPosition = new Vector3(0, 0, 0);
y.RotationOffset = new Quaternion(0,0,0,0);
y.Velocity = new Vector3(0, 0, 0);
y.RotationalVelocity = new Vector3(0, 0, 0);
y.AngularVelocity = new Vector3(0, 0, 0);
y.Acceleration = new Vector3(0, 0, 0);
y.OffsetPosition = Vector3.Zero;
y.RotationOffset = Quaternion.Identity;
y.Velocity = Vector3.Zero;
y.AngularVelocity = Vector3.Zero;
y.Acceleration = Vector3.Zero;
y.Flags = 0;
y.TrimPermissions();

View File

@ -172,8 +172,6 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
result |= Diff.ANGULARVELOCITY;
if (!AreVectorsEquivalent(first.OffsetPosition, second.OffsetPosition))
result |= Diff.OFFSETPOSITION;
if (!AreVectorsEquivalent(first.RotationalVelocity, second.RotationalVelocity))
result |= Diff.ROTATIONALVELOCITY;
if (!AreVectorsEquivalent(first.Scale, second.Scale))
result |= Diff.SCALE;
if (!AreVectorsEquivalent(first.Velocity, second.Velocity))

View File

@ -2163,7 +2163,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Vector llGetOmega()
{
m_host.AddScriptLPS(1);
return new LSL_Vector(m_host.RotationalVelocity.X, m_host.RotationalVelocity.Y, m_host.RotationalVelocity.Z);
return new LSL_Vector(m_host.AngularVelocity.X, m_host.AngularVelocity.Y, m_host.AngularVelocity.Z);
}
public LSL_Float llGetTimeOfDay()
@ -3159,7 +3159,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llTargetOmega(LSL_Vector axis, double spinrate, double gain)
{
m_host.AddScriptLPS(1);
m_host.RotationalVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
m_host.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
m_host.ScheduleTerseUpdate();
m_host.SendTerseUpdateToAllClients();