Beispiel #1
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            ResetCamera();
            effect = new BasicEffect(GraphicsDevice);
            object3D = new Object3D(GraphicsDevice, SpaceSize);

            base.Initialize();
        }
Beispiel #2
0
        public ArcBallControls(Object3D object3D, Vector3 arcBallOrigin, bool arcBallOriginLocked, float screenWidth, float screenHeight)
        {
            this.object3D = object3D;
            this.ArcBallOrigin = arcBallOrigin;
            this.ArcBallOriginLocked = arcBallOriginLocked;

            this.RotateSpeed = 1.5f;
            this.ZoomSpeed = 1f;
            this.MaxZoom = 15f;
            this.PanSpeed = 300f;

            UpdateScreenDimentions(screenWidth, screenHeight);
        }
Beispiel #3
0
 public void AddObject(Object3D object3D)
 {
     this.objects.Add(object3D);
     if (object3D.RequiresUpdate)
         this.updatableObjects.Add(object3D);
 }