From ebba112379ad67b066ad903a42f496b8fdb3aba4 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Tue, 8 Jan 2008 21:56:52 +0000 Subject: make Stopped a property of the SceneObjectPart instead of in the database code, so this is a shared concept. --- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 9a7f28e..5a02ad4 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -402,6 +402,19 @@ namespace OpenSim.Region.Environment.Scenes get { return m_shape.Scale; } } + public bool Stopped + { + get { + double threshold = 0.02; + return (Math.Abs(Velocity.X) < threshold && + Math.Abs(Velocity.Y) < threshold && + Math.Abs(Velocity.Z) < threshold && + Math.Abs(AngularVelocity.X) < threshold && + Math.Abs(AngularVelocity.Y) < threshold && + Math.Abs(AngularVelocity.Z) < threshold); + } + } + #endregion public LLUUID ObjectOwner -- cgit v1.1