Esempio n. 1
0
        public void AddCamera(int camId, BaseCamera newCam)
        {
            if (GetCamera(camId) != null) return;

            newCam.id = camId;
            Cameras.Add(camId, newCam);

            /// if this is the first camera, make it the default
            if (Cameras.Count == 1)
                SetCurrentCamera(camId);
        }
Esempio n. 2
0
 public void UpdateCamera(BaseCamera c, Matrix v, Matrix p)
 {
     cam = c;
     view = v;
     proj = p;
 }
Esempio n. 3
0
 public void SetCurrentCamera(int camId)
 {
     BaseCamera cam = GetCamera(camId);
     if (cam == null) return;
     currentCamera = cam;
 }
Esempio n. 4
0
        public void NextCamera()
        {
            if (Cameras.Count == 0)
                return;

            int index = Cameras.IndexOfKey(currentCamera.id);
            index++;
            if (index >= Cameras.Count)
                index = 0;
            currentCamera= Cameras.Values[index];
        }