예제 #1
0
        Vector3D viewOffset; //for camera shake;

        #endregion Fields

        #region Constructors

        public Camera()
        {
            this.random = new Random();
            this.position = new Vector3D(0, 0, 0);
            this.viewOffset = new Vector3D(0, 0, 0);
            this.rotation = 0;
            this.scale = 1;
            this.shakeIntensity = 0;
        }
예제 #2
0
 //How to get from this to other
 public Vector3D getDifference(Vector3D other)
 {
     return new Vector3D(other.x - this.x, other.y - this.y, other.z - this.z);
 }
예제 #3
0
 //Get the distance between two vectors
 public float getDistance(Vector3D other)
 {
     Vector3D difference = this.getDifference(other);
     return (float)Math.Sqrt(difference.x*difference.x + difference.y*difference.y + difference.z*difference.z);
 }
예제 #4
0
 public Camera()
 {
     position = new Vector3D(0, 0, 0);
     rotation = 0;
     scale = 1;
 }