public TrackBallController(TrackBallController trackBallToCopy)
		{
			this.screenCenter = trackBallToCopy.screenCenter;
			this.rotationTrackingRadius = trackBallToCopy.rotationTrackingRadius;
			this.currentRotationMatrix = trackBallToCopy.currentRotationMatrix;
			this.currentTranslationMatrix = trackBallToCopy.currentTranslationMatrix;
		}
Example #2
0
 public TrackBallController(TrackBallController trackBallToCopy)
 {
     this.screenCenter             = trackBallToCopy.screenCenter;
     this.rotationTrackingRadius   = trackBallToCopy.rotationTrackingRadius;
     this.currentRotationMatrix    = trackBallToCopy.currentRotationMatrix;
     this.currentTranslationMatrix = trackBallToCopy.currentTranslationMatrix;
 }
        public void CopyTransforms(TrackBallController trackBallToCopy)
        {
            rotationTrackingRadiusPixels = trackBallToCopy.rotationTrackingRadiusPixels;
            this.world.RotationMatrix    = trackBallToCopy.world.RotationMatrix;
            this.world.TranslationMatrix = trackBallToCopy.world.TranslationMatrix;

            OnTransformChanged(null);
        }
Example #4
0
        public override void OnResize()
        {
            Vector2 screenCenter = new Vector2(Width / 2, Height / 2);
            double trackingRadius = Math.Min(Width * .45, Height * .45);
            if (mainTrackBallController == null)
            {
                mainTrackBallController = new TrackBallController(screenCenter, trackingRadius);
                mainTrackBallController.Scale = .1;
            }
            else
            {
                mainTrackBallController.ScreenCenter = screenCenter;
                mainTrackBallController.TrackBallRadius = trackingRadius;
            }

            base.OnResize();
        }
        public override void OnResize()
        {
            SetupScene((int)Width, (int)Height);
            trackBallController = new TrackBallController(new Vector2(Width / 2, Height / 2), Math.Min(Width * .45, Height * .45));

            rayTraceScene();

            base.OnResize();
        }