Removing duplicate SceneObjectPart.RotationalVelocity property
parent
6309fcc5b4
commit
67ac9881fa
|
@ -1049,7 +1049,7 @@ VALUES
|
||||||
if (!(primRow["ParticleSystem"] is DBNull))
|
if (!(primRow["ParticleSystem"] is DBNull))
|
||||||
prim.ParticleSystem = (Byte[])primRow["ParticleSystem"];
|
prim.ParticleSystem = (Byte[])primRow["ParticleSystem"];
|
||||||
|
|
||||||
prim.RotationalVelocity = new Vector3(
|
prim.AngularVelocity = new Vector3(
|
||||||
Convert.ToSingle(primRow["OmegaX"]),
|
Convert.ToSingle(primRow["OmegaX"]),
|
||||||
Convert.ToSingle(primRow["OmegaY"]),
|
Convert.ToSingle(primRow["OmegaY"]),
|
||||||
Convert.ToSingle(primRow["OmegaZ"]));
|
Convert.ToSingle(primRow["OmegaZ"]));
|
||||||
|
@ -1429,9 +1429,9 @@ VALUES
|
||||||
parameters.Add(_Database.CreateParameter("TextureAnimation", prim.TextureAnimation));
|
parameters.Add(_Database.CreateParameter("TextureAnimation", prim.TextureAnimation));
|
||||||
parameters.Add(_Database.CreateParameter("ParticleSystem", prim.ParticleSystem));
|
parameters.Add(_Database.CreateParameter("ParticleSystem", prim.ParticleSystem));
|
||||||
|
|
||||||
parameters.Add(_Database.CreateParameter("OmegaX", prim.RotationalVelocity.X));
|
parameters.Add(_Database.CreateParameter("OmegaX", prim.AngularVelocity.X));
|
||||||
parameters.Add(_Database.CreateParameter("OmegaY", prim.RotationalVelocity.Y));
|
parameters.Add(_Database.CreateParameter("OmegaY", prim.AngularVelocity.Y));
|
||||||
parameters.Add(_Database.CreateParameter("OmegaZ", prim.RotationalVelocity.Z));
|
parameters.Add(_Database.CreateParameter("OmegaZ", prim.AngularVelocity.Z));
|
||||||
|
|
||||||
parameters.Add(_Database.CreateParameter("CameraEyeOffsetX", prim.GetCameraEyeOffset().X));
|
parameters.Add(_Database.CreateParameter("CameraEyeOffsetX", prim.GetCameraEyeOffset().X));
|
||||||
parameters.Add(_Database.CreateParameter("CameraEyeOffsetY", prim.GetCameraEyeOffset().Y));
|
parameters.Add(_Database.CreateParameter("CameraEyeOffsetY", prim.GetCameraEyeOffset().Y));
|
||||||
|
|
|
@ -908,7 +908,7 @@ namespace OpenSim.Data.MySQL
|
||||||
if (!(row["ParticleSystem"] is DBNull))
|
if (!(row["ParticleSystem"] is DBNull))
|
||||||
prim.ParticleSystem = (byte[])row["ParticleSystem"];
|
prim.ParticleSystem = (byte[])row["ParticleSystem"];
|
||||||
|
|
||||||
prim.RotationalVelocity = new Vector3(
|
prim.AngularVelocity = new Vector3(
|
||||||
(float)(double)row["OmegaX"],
|
(float)(double)row["OmegaX"],
|
||||||
(float)(double)row["OmegaY"],
|
(float)(double)row["OmegaY"],
|
||||||
(float)(double)row["OmegaZ"]
|
(float)(double)row["OmegaZ"]
|
||||||
|
@ -1240,9 +1240,9 @@ namespace OpenSim.Data.MySQL
|
||||||
cmd.Parameters.AddWithValue("TextureAnimation", prim.TextureAnimation);
|
cmd.Parameters.AddWithValue("TextureAnimation", prim.TextureAnimation);
|
||||||
cmd.Parameters.AddWithValue("ParticleSystem", prim.ParticleSystem);
|
cmd.Parameters.AddWithValue("ParticleSystem", prim.ParticleSystem);
|
||||||
|
|
||||||
cmd.Parameters.AddWithValue("OmegaX", (double)prim.RotationalVelocity.X);
|
cmd.Parameters.AddWithValue("OmegaX", (double)prim.AngularVelocity.X);
|
||||||
cmd.Parameters.AddWithValue("OmegaY", (double)prim.RotationalVelocity.Y);
|
cmd.Parameters.AddWithValue("OmegaY", (double)prim.AngularVelocity.Y);
|
||||||
cmd.Parameters.AddWithValue("OmegaZ", (double)prim.RotationalVelocity.Z);
|
cmd.Parameters.AddWithValue("OmegaZ", (double)prim.AngularVelocity.Z);
|
||||||
|
|
||||||
cmd.Parameters.AddWithValue("CameraEyeOffsetX", (double)prim.GetCameraEyeOffset().X);
|
cmd.Parameters.AddWithValue("CameraEyeOffsetX", (double)prim.GetCameraEyeOffset().X);
|
||||||
cmd.Parameters.AddWithValue("CameraEyeOffsetY", (double)prim.GetCameraEyeOffset().Y);
|
cmd.Parameters.AddWithValue("CameraEyeOffsetY", (double)prim.GetCameraEyeOffset().Y);
|
||||||
|
|
|
@ -1213,7 +1213,7 @@ namespace OpenSim.Data.SQLite
|
||||||
if (!row.IsNull("ParticleSystem"))
|
if (!row.IsNull("ParticleSystem"))
|
||||||
prim.ParticleSystem = Convert.FromBase64String(row["ParticleSystem"].ToString());
|
prim.ParticleSystem = Convert.FromBase64String(row["ParticleSystem"].ToString());
|
||||||
|
|
||||||
prim.RotationalVelocity = new Vector3(
|
prim.AngularVelocity = new Vector3(
|
||||||
Convert.ToSingle(row["OmegaX"]),
|
Convert.ToSingle(row["OmegaX"]),
|
||||||
Convert.ToSingle(row["OmegaY"]),
|
Convert.ToSingle(row["OmegaY"]),
|
||||||
Convert.ToSingle(row["OmegaZ"])
|
Convert.ToSingle(row["OmegaZ"])
|
||||||
|
@ -1530,9 +1530,9 @@ namespace OpenSim.Data.SQLite
|
||||||
row["TextureAnimation"] = Convert.ToBase64String(prim.TextureAnimation);
|
row["TextureAnimation"] = Convert.ToBase64String(prim.TextureAnimation);
|
||||||
row["ParticleSystem"] = Convert.ToBase64String(prim.ParticleSystem);
|
row["ParticleSystem"] = Convert.ToBase64String(prim.ParticleSystem);
|
||||||
|
|
||||||
row["OmegaX"] = prim.RotationalVelocity.X;
|
row["OmegaX"] = prim.AngularVelocity.X;
|
||||||
row["OmegaY"] = prim.RotationalVelocity.Y;
|
row["OmegaY"] = prim.AngularVelocity.Y;
|
||||||
row["OmegaZ"] = prim.RotationalVelocity.Z;
|
row["OmegaZ"] = prim.AngularVelocity.Z;
|
||||||
|
|
||||||
row["CameraEyeOffsetX"] = prim.GetCameraEyeOffset().X;
|
row["CameraEyeOffsetX"] = prim.GetCameraEyeOffset().X;
|
||||||
row["CameraEyeOffsetY"] = prim.GetCameraEyeOffset().Y;
|
row["CameraEyeOffsetY"] = prim.GetCameraEyeOffset().Y;
|
||||||
|
|
|
@ -4635,7 +4635,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectPart trackedBody = GetSceneObjectPart(joint.TrackedBodyName); // FIXME: causes a sequential lookup
|
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.
|
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.Velocity = trackedBody.Velocity;
|
||||||
jointProxyObject.RotationalVelocity = trackedBody.RotationalVelocity;
|
jointProxyObject.AngularVelocity = trackedBody.AngularVelocity;
|
||||||
switch (joint.Type)
|
switch (joint.Type)
|
||||||
{
|
{
|
||||||
case PhysicsJointType.Ball:
|
case PhysicsJointType.Ball:
|
||||||
|
|
|
@ -683,12 +683,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector3 RotationalVelocity
|
|
||||||
{
|
|
||||||
get { return AngularVelocity; }
|
|
||||||
set { AngularVelocity = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary></summary>
|
/// <summary></summary>
|
||||||
public Vector3 AngularVelocity
|
public Vector3 AngularVelocity
|
||||||
{
|
{
|
||||||
|
@ -1552,9 +1546,9 @@ if (m_shape != null) {
|
||||||
m_parentGroup.Scene.PhysicsScene.RequestJointDeletion(Name); // FIXME: what if the name changed?
|
m_parentGroup.Scene.PhysicsScene.RequestJointDeletion(Name); // FIXME: what if the name changed?
|
||||||
|
|
||||||
// make sure client isn't interpolating the joint proxy object
|
// make sure client isn't interpolating the joint proxy object
|
||||||
Velocity = new Vector3(0, 0, 0);
|
Velocity = Vector3.Zero;
|
||||||
RotationalVelocity = new Vector3(0, 0, 0);
|
AngularVelocity = Vector3.Zero;
|
||||||
Acceleration = new Vector3(0, 0, 0);
|
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};
|
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,
|
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,
|
m_text, color, _parentID, m_particleSystem, m_clickAction, (byte)m_material, m_TextureAnimation, IsAttachment,
|
||||||
AttachmentPoint,FromItemID, Sound, SoundGain, SoundFlags, SoundRadius, ParentGroup.GetUpdatePriority(remoteClient)));
|
AttachmentPoint,FromItemID, Sound, SoundGain, SoundFlags, SoundRadius, ParentGroup.GetUpdatePriority(remoteClient)));
|
||||||
}
|
}
|
||||||
|
@ -2405,7 +2399,7 @@ if (m_shape != null) {
|
||||||
if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
|
if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
|
||||||
!Acceleration.Equals(m_lastAcceleration) ||
|
!Acceleration.Equals(m_lastAcceleration) ||
|
||||||
!Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) ||
|
!Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) ||
|
||||||
!RotationalVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) ||
|
!AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) ||
|
||||||
!OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
|
!OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
|
||||||
Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
|
Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
|
||||||
{
|
{
|
||||||
|
@ -2425,7 +2419,7 @@ if (m_shape != null) {
|
||||||
m_lastRotation = RotationOffset;
|
m_lastRotation = RotationOffset;
|
||||||
m_lastVelocity = Velocity;
|
m_lastVelocity = Velocity;
|
||||||
m_lastAcceleration = Acceleration;
|
m_lastAcceleration = Acceleration;
|
||||||
m_lastAngularVelocity = RotationalVelocity;
|
m_lastAngularVelocity = AngularVelocity;
|
||||||
m_lastTerseSent = Environment.TickCount;
|
m_lastTerseSent = Environment.TickCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3787,7 +3781,7 @@ if (m_shape != null) {
|
||||||
remoteClient.SendPrimTerseUpdate(new SendPrimitiveTerseData(m_regionHandle,
|
remoteClient.SendPrimTerseUpdate(new SendPrimitiveTerseData(m_regionHandle,
|
||||||
m_parentGroup.GetTimeDilation(), LocalId, lPos,
|
m_parentGroup.GetTimeDilation(), LocalId, lPos,
|
||||||
RotationOffset, Velocity, Acceleration,
|
RotationOffset, Velocity, Acceleration,
|
||||||
RotationalVelocity, state, FromItemID,
|
AngularVelocity, state, FromItemID,
|
||||||
OwnerID, (int)AttachmentPoint, null, ParentGroup.GetUpdatePriority(remoteClient)));
|
OwnerID, (int)AttachmentPoint, null, ParentGroup.GetUpdatePriority(remoteClient)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,12 +81,11 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
|
||||||
y.Scale = new Vector3(0.01f,0.01f,0.01f);
|
y.Scale = new Vector3(0.01f,0.01f,0.01f);
|
||||||
y.LastOwnerID = UUID.Zero;
|
y.LastOwnerID = UUID.Zero;
|
||||||
y.GroupPosition = groupPos;
|
y.GroupPosition = groupPos;
|
||||||
y.OffsetPosition = new Vector3(0, 0, 0);
|
y.OffsetPosition = Vector3.Zero;
|
||||||
y.RotationOffset = new Quaternion(0,0,0,0);
|
y.RotationOffset = Quaternion.Identity;
|
||||||
y.Velocity = new Vector3(0, 0, 0);
|
y.Velocity = Vector3.Zero;
|
||||||
y.RotationalVelocity = new Vector3(0, 0, 0);
|
y.AngularVelocity = Vector3.Zero;
|
||||||
y.AngularVelocity = new Vector3(0, 0, 0);
|
y.Acceleration = Vector3.Zero;
|
||||||
y.Acceleration = new Vector3(0, 0, 0);
|
|
||||||
|
|
||||||
y.Flags = 0;
|
y.Flags = 0;
|
||||||
y.TrimPermissions();
|
y.TrimPermissions();
|
||||||
|
|
|
@ -172,8 +172,6 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
|
||||||
result |= Diff.ANGULARVELOCITY;
|
result |= Diff.ANGULARVELOCITY;
|
||||||
if (!AreVectorsEquivalent(first.OffsetPosition, second.OffsetPosition))
|
if (!AreVectorsEquivalent(first.OffsetPosition, second.OffsetPosition))
|
||||||
result |= Diff.OFFSETPOSITION;
|
result |= Diff.OFFSETPOSITION;
|
||||||
if (!AreVectorsEquivalent(first.RotationalVelocity, second.RotationalVelocity))
|
|
||||||
result |= Diff.ROTATIONALVELOCITY;
|
|
||||||
if (!AreVectorsEquivalent(first.Scale, second.Scale))
|
if (!AreVectorsEquivalent(first.Scale, second.Scale))
|
||||||
result |= Diff.SCALE;
|
result |= Diff.SCALE;
|
||||||
if (!AreVectorsEquivalent(first.Velocity, second.Velocity))
|
if (!AreVectorsEquivalent(first.Velocity, second.Velocity))
|
||||||
|
|
|
@ -2163,7 +2163,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public LSL_Vector llGetOmega()
|
public LSL_Vector llGetOmega()
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
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()
|
public LSL_Float llGetTimeOfDay()
|
||||||
|
@ -3159,7 +3159,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public void llTargetOmega(LSL_Vector axis, double spinrate, double gain)
|
public void llTargetOmega(LSL_Vector axis, double spinrate, double gain)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
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.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
|
||||||
m_host.ScheduleTerseUpdate();
|
m_host.ScheduleTerseUpdate();
|
||||||
m_host.SendTerseUpdateToAllClients();
|
m_host.SendTerseUpdateToAllClients();
|
||||||
|
|
Loading…
Reference in New Issue