コード例 #1
0
ファイル: Wall.cs プロジェクト: pusp/o2platform
		protected override Motion GetBeforeMotion(int deltaIndex)
		{
			double aspect = Owner.ElementWidth / Owner.ElementHeight;
			double ItemWidth = aspect;
			double ItemHeight = 1;
			
			int row = -1;
			int column = -1;
			int slot = Math.Abs(deltaIndex);
			if (slot <= 2)
			{
				row = 0;
				column = 2 - slot;
			}
			else
			{
				row = -1 - ((slot - 3) / Columns);
				column = (slot - 3) % Columns;
			}

			Motion m = new Motion();

			m.Angle = 0;
			m.Axis = new Vector3D(1, 0, 0);
			m.X = (column - 2) * (ItemWidth + Owner.ItemGap);
			m.Y = -1 * row * (ItemHeight + Owner.ItemGap);

			return m;
		}
コード例 #2
0
ファイル: VirtCoverFlow.cs プロジェクト: Ghawken/FrontView
		protected override Motion GetSelectionMotion(int index)
		{
			var m = new Motion {
                           Angle = 0, 
                           Axis = new Vector3D(0, 1, 0), 
                           X = 0, Z = Owner.PopoutDistance
                           };
		    return m;
		}
コード例 #3
0
ファイル: TimeMachine.cs プロジェクト: Ghawken/FrontView
		protected override Motion GetAfterMotion(int deltaIndex)
		{
			Motion m = new Motion();

			m.X = Owner.ItemGap * deltaIndex;
			m.Z = -1 * Owner.ItemGap * deltaIndex;

			return m;
		}
コード例 #4
0
ファイル: VForm.cs プロジェクト: slytsal/nmtmdz
        protected override Motion GetSelectionMotion()
        {
            Motion m = new Motion();

            m.Axis = new Vector3D(0, 1, 0);
            m.Z = Owner.PopoutDistance;

            return m;
        }
コード例 #5
0
        protected override Motion GetPreviousMotion(int index)
        {
            Motion m = new Motion();

            m.X = -1*Owner.FrontItemGap;
            m.Z = -1*Owner.ItemGap*(Owner.SelectedIndex - index);

            return m;
        }
コード例 #6
0
ファイル: TimeMachine2.cs プロジェクト: Ghawken/FrontView
		protected override Motion GetAfterMotion(int deltaIndex)
		{
			Motion m = new Motion();

			m.X = -1 * Owner.FrontItemGap;
			m.Z = -1 * Owner.ItemGap * deltaIndex + Owner.PopoutDistance * 2 / 3;

			return m;
		}
コード例 #7
0
ファイル: TimeMachine2.cs プロジェクト: slytsal/nmtmdz
        protected override Motion GetBeforeMotion(int deltaIndex)
        {
            Motion m = new Motion();

            m.X = -1 * Owner.FrontItemGap;
            m.Z = Owner.ItemGap * deltaIndex;

            return m;
        }
コード例 #8
0
ファイル: RollerCoaster.cs プロジェクト: slytsal/nmtmdz
        protected override Motion GetSelectionMotion()
        {
            Motion m = new Motion();

            m.X = -1 * (Owner.ItemGap + Owner.PopoutDistance);
            m.Y = Owner.ItemGap;

            return m;
        }
コード例 #9
0
        protected override Motion GetNextMotion(int index)
        {
            Motion m = new Motion();

            m.X = -1*Owner.FrontItemGap;
            m.Z = Owner.ItemGap*(index - Owner.SelectedIndex);

            return m;
        }
コード例 #10
0
ファイル: Rolodex.cs プロジェクト: fivesixty/StandaloneMB
        protected override Motion GetSelectionMotion(int index)
        {
            Motion m = new Motion();

            m.Angle = 0;
            m.Y = 0;
            m.Z = Owner.PopoutDistance;

            return m;
        }
コード例 #11
0
ファイル: Rolodex.cs プロジェクト: fivesixty/StandaloneMB
        protected override Motion GetPreviousMotion(int index)
        {
            Motion m = new Motion();

            m.Angle = Owner.TiltAngle;
            m.Axis = new Vector3D(1, 0, 0);
            m.Y = -1*Owner.ItemGap*(Owner.SelectedIndex - index) - Owner.FrontItemGap;

            return m;
        }
コード例 #12
0
ファイル: CoverFlow.cs プロジェクト: Ghawken/FrontView
		protected override Motion GetAfterMotion(int deltaIndex)
		{
			Motion m = new Motion();

			m.Angle = -1 * Owner.TiltAngle;
			m.Axis = new Vector3D(0, 1, 0);
			m.X = Owner.ItemGap * deltaIndex + Owner.FrontItemGap;

			return m;
		}
コード例 #13
0
ファイル: Rolodex.cs プロジェクト: GroupXTech/Yatse2
        protected override Motion GetBeforeMotion(int deltaIndex)
        {
            Motion m = new Motion();

            m.Angle = Owner.TiltAngle;
            m.Axis = new Vector3D(1, 0, 0);
            m.Y = Owner.ItemGap * deltaIndex - Owner.FrontItemGap;

            return m;
        }
コード例 #14
0
ファイル: CoverFlow.cs プロジェクト: fivesixty/StandaloneMB
        protected override Motion GetNextMotion(int index)
        {
            Motion m = new Motion();

            m.Angle = -1*Owner.TiltAngle;
            m.Axis = new Vector3D(0, 1, 0);
            m.X = Owner.ItemGap*(index - Owner.SelectedIndex) + Owner.FrontItemGap;

            return m;
        }
コード例 #15
0
ファイル: VForm.cs プロジェクト: fivesixty/StandaloneMB
        protected override Motion GetPreviousMotion(int index)
        {
            Motion m = new Motion();

            m.Axis = new Vector3D(0, 1, 0);
            m.X = -1*(Owner.FrontItemGap + Owner.ItemGap*(Owner.SelectedIndex - index));
            m.Z = -1*Owner.ItemGap*(Owner.SelectedIndex - index);

            return m;
        }
コード例 #16
0
ファイル: VForm.cs プロジェクト: slytsal/nmtmdz
        protected override Motion GetBeforeMotion(int deltaIndex)
        {
            Motion m = new Motion();

            m.Axis = new Vector3D(0, 1, 0);
            m.X = Owner.FrontItemGap + Owner.ItemGap * deltaIndex;
            m.Z = Owner.ItemGap * deltaIndex;

            return m;
        }
コード例 #17
0
ファイル: TimeMachine.cs プロジェクト: Ghawken/FrontView
		protected override Motion GetSelectionMotion()
		{
			Motion m = new Motion();

			m.Angle = -1 * 45;
			m.Axis = new Vector3D(0, 0, 1);
			m.X = 2 * Owner.ItemGap;

			return m;
		}
コード例 #18
0
ファイル: VirtCoverFlow.cs プロジェクト: Ghawken/FrontView
		protected override Motion GetNextMotion(int index)
		{
			var m = new Motion
			            {
			                Angle = -1*Owner.TiltAngle,
			                Axis = new Vector3D(0, 1, 0),
			                X = Owner.ItemGap*(index - Owner.GetPositionIndex(Owner.SelectedIndex)) + Owner.FrontItemGap
			            };
		    return m;
		}
コード例 #19
0
ファイル: TimeMachine2.cs プロジェクト: Ghawken/FrontView
		protected override Motion GetSelectionMotion()
		{
			Motion m = new Motion();

			m.Angle = 0;
			m.Axis = new Vector3D(0, 0, 1);
			m.X = 0;	//Owner.FrontItemGap;
			m.Z = Owner.PopoutDistance;

			return m;
		}
コード例 #20
0
ファイル: Carousel.cs プロジェクト: Ghawken/FrontView
		protected override Motion GetSelectionMotion()
		{
			double angle = Math.PI/2;
			Motion m = new Motion();
			m.X = Radius*Math.Cos(angle);
			m.Z = Owner.PopoutDistance + Radius*Math.Sin(angle);
			m.Y = 0;
			m.Axis = new Vector3D(0, 1, 0);

			return m;
		}
コード例 #21
0
ファイル: SlideDeck.cs プロジェクト: pusp/o2platform
		protected override Motion GetSelectionMotion()
		{
			Motion m = new Motion();

			m.Angle = -45;
			m.Axis = new Vector3D(1, 0, 0);
			m.X = 0;
			m.Y = Owner.PopoutDistance;

			return m;
		}
コード例 #22
0
ファイル: Carousel.cs プロジェクト: GroupXTech/Yatse2
        protected override Motion GetBeforeMotion(int deltaIndex)
        {
            double angle = Math.PI/2 + UnitAngle*deltaIndex;
            Motion m = new Motion();
            m.X = -Radius*Math.Cos(angle);
            m.Z = -1*Owner.FrontItemGap + Radius*Math.Sin(angle);
            m.Y = 0;
            m.Angle = Owner.TiltAngle;
            m.Axis = new Vector3D(0, 1, 0);

            return m;
        }
コード例 #23
0
ファイル: RollerCoaster.cs プロジェクト: slytsal/nmtmdz
        protected override Motion GetBeforeMotion(int deltaIndex)
        {
            Motion m = new Motion();

            m.Angle = Owner.TiltAngle;
            m.Axis = new Vector3D(0, 0, 1);
            m.X = Owner.ItemGap * deltaIndex;
            m.Y = Owner.ItemGap * deltaIndex;
            m.Z = Owner.ItemGap * deltaIndex;

            return m;
        }
コード例 #24
0
ファイル: LayoutBase.cs プロジェクト: Ghawken/FrontView
        private void PrepareStoryboard(Storyboard sb, Motion motion)
        {
            // Child animations
            AxisAngleRotation3D rotation = (sb.Children[0] as Rotation3DAnimation).To as AxisAngleRotation3D;
            DoubleAnimation xAnim = sb.Children[1] as DoubleAnimation;
            DoubleAnimation yAnim = sb.Children[2] as DoubleAnimation;
            DoubleAnimation zAnim = sb.Children[3] as DoubleAnimation;

            rotation.Angle = motion.Angle;
            rotation.Axis = motion.Axis;
            xAnim.To = motion.X;
            yAnim.To = motion.Y;
            zAnim.To = motion.Z;
        }
コード例 #25
0
ファイル: ViewStateBase.cs プロジェクト: Ghawken/FrontView
		private static void PrepareStoryboard(Storyboard sb, Motion motion)
		{
			// Child animations
			var rotation = ((Rotation3DAnimation) sb.Children[0]).To as AxisAngleRotation3D;
			var xAnim = sb.Children[1] as DoubleAnimation;
			var yAnim = sb.Children[2] as DoubleAnimation;
			var zAnim = sb.Children[3] as DoubleAnimation;

		    if (rotation != null)
		    {
		        rotation.Angle = motion.Angle;
		        rotation.Axis = motion.Axis;
		    }
		    if (xAnim != null) xAnim.To = motion.X;
		    if (yAnim != null) yAnim.To = motion.Y;
		    if (zAnim != null) zAnim.To = motion.Z;
		}