コード例 #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
ファイル: Vector3D.cs プロジェクト: jgcoded/MAVG-Jeden-Public
 //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
ファイル: Vector3D.cs プロジェクト: jgcoded/MAVG-Jeden-Public
 //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
ファイル: Camera.cs プロジェクト: jgcoded/MAVG-Jeden-Public
 public Camera()
 {
     position = new Vector3D(0, 0, 0);
     rotation = 0;
     scale = 1;
 }