OpenSim.Region.Framework.Scenes.SceneObjectPart.UpdateRotation C# (CSharp) Method

UpdateRotation() public method

public UpdateRotation ( Quaternion rot ) : void
rot Quaternion
return void
        public void UpdateRotation(Quaternion rot)
        {
            if ((rot.X != RotationOffset.X) ||
                (rot.Y != RotationOffset.Y) ||
                (rot.Z != RotationOffset.Z) ||
                (rot.W != RotationOffset.W))
            {
                RotationOffset = rot;
                ParentGroup.HasGroupChanged = true;
                ScheduleTerseUpdate();
            }
        }

Usage Example

Ejemplo n.º 1
0
        public void PlaybackState(SceneObjectPart part)
        {
            if (part != null)
            {
                part.Undoing = true;

                if (part.ParentID == 0)
                {
                    if (Position != Vector3.Zero)
                    {
                        part.ParentGroup.AbsolutePosition = Position;
                    }
                    part.RotationOffset = Rotation;
                    if (Scale != Vector3.Zero)
                    {
                        part.Scale = Scale;
                    }

                    lock (part.ParentGroup.Children)
                    {
                        foreach (SceneObjectPart child in
                                part.ParentGroup.Children.Values.Where(child => child.UUID != part.UUID))
                        {
                            child.Undo(); //No updates here, child undo will do it on their own
                        }
                    }
                }
                else
                {
                    if (Position != Vector3.Zero)
                    {
                        part.OffsetPosition = Position;
                    }
						
                    part.UpdateRotation(Rotation);
                    if (Scale != Vector3.Zero)
                    {
                        part.Resize(Scale);
                    }
                }
                part.Undoing = false;
                part.ScheduleFullUpdate();
            }
        }
All Usage Examples Of OpenSim.Region.Framework.Scenes.SceneObjectPart::UpdateRotation
SceneObjectPart