Implemented Resize Method in OdePrim.

attached the links to that from SceneObject, so now resizing works (as much as resizing currently works in opensim, fixing resizing in general is on my todo list for today).
Rotation of a root prim also now updates the physics engine.
So think there really is only deleteprim left, then it should be usable (Different shapes (other than boxes that it currently uses) can wait a little bit longer).
[of course there are still the other issues of ODE not really working when there is more than one region in a instance of opensim].
This commit is contained in:
MW
2007-08-23 11:38:50 +00:00
parent 8264ba849f
commit edd50f2e8e
3 changed files with 31 additions and 8 deletions

View File

@@ -717,6 +717,13 @@ namespace OpenSim.Region.Environment.Scenes
if (part != null)
{
part.Resize(scale);
if (part.UUID == this.m_rootPart.UUID)
{
if (m_rootPart.PhysActor != null)
{
m_rootPart.PhysActor.Size = new PhysicsVector(m_rootPart.Scale.X, m_rootPart.Scale.Y, m_rootPart.Scale.Z);
}
}
}
}
#endregion
@@ -789,6 +796,10 @@ namespace OpenSim.Region.Environment.Scenes
public void UpdateGroupRotation(LLQuaternion rot)
{
this.m_rootPart.UpdateRotation(rot);
if (m_rootPart.PhysActor != null)
{
m_rootPart.PhysActor.Orientation = new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z);
}
this.ScheduleGroupForTerseUpdate();
}
@@ -800,6 +811,10 @@ namespace OpenSim.Region.Environment.Scenes
public void UpdateGroupRotation(LLVector3 pos, LLQuaternion rot)
{
this.m_rootPart.UpdateRotation(rot);
if (m_rootPart.PhysActor != null)
{
m_rootPart.PhysActor.Orientation = new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z);
}
this.AbsolutePosition = pos;
this.ScheduleGroupForTerseUpdate();
}
@@ -832,6 +847,10 @@ namespace OpenSim.Region.Environment.Scenes
private void UpdateRootRotation(LLQuaternion rot)
{
this.m_rootPart.UpdateRotation(rot);
if (m_rootPart.PhysActor != null)
{
m_rootPart.PhysActor.Orientation = new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z);
}
Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z);
Axiom.Math.Quaternion oldParentRot = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z);