Ejemplo n.º 1
0
        public override void Redo()
        {
            base.Redo();

            for (int i = 0; i < m_affectedActors.Count; i++)
            {
                Vector3 localScale = m_affectedActors[i].Transform.LocalScale;
                localScale.X *= m_delta.X;
                localScale.Y *= m_delta.Y;
                localScale.Z *= m_delta.Z;
                m_affectedActors[i].Transform.LocalScale = localScale;
            }

            m_actorEditor.UpdateGizmoTransform();
        }
Ejemplo n.º 2
0
        public override void Redo()
        {
            base.Redo();

            for (int i = 0; i < m_affectedActors.Count; i++)
            {
                if (m_transformSpace == FTransformSpace.Local)
                {
                    m_affectedActors[i].Transform.Rotation *= m_delta;
                }
                else
                {
                    m_affectedActors[i].Transform.Rotation = m_delta * m_affectedActors[i].Transform.Rotation;
                }
            }

            m_actorEditor.UpdateGizmoTransform();
        }
Ejemplo n.º 3
0
        public override void Redo()
        {
            base.Redo();
            for (int i = 0; i < m_affectedActors.Count; i++)
            {
                Vector3 transformedDelta = Vector3.Zero;
                if (m_transformSpace == FTransformSpace.World)
                {
                    transformedDelta = m_delta;
                }
                else
                {
                    transformedDelta = Vector3.Transform(m_delta, m_affectedActors[i].Transform.Rotation);
                }

                m_affectedActors[i].Transform.Position += transformedDelta;
            }

            m_actorEditor.UpdateGizmoTransform();
        }
        public override void Redo()
        {
            base.Redo();

            // ToDo: This raises a lot of events which kind of blasts the UI with events.
            m_selectionListRef.Clear();
            for (int i = 0; i < m_newActorList.Length; i++)
            {
                m_selectionListRef.Add(m_newActorList[i]);
            }

            // Update their selected states
            for (int i = 0; i < m_oldActorList.Length; i++)
            {
                m_oldActorList[i].Flags &= ~ActorFlags.Selected;
            }

            for (int i = 0; i < m_newActorList.Length; i++)
            {
                m_newActorList[i].Flags |= ActorFlags.Selected;
            }

            m_actorEditor.UpdateGizmoTransform();
        }