Exemplo n.º 1
0
 public bool CompareTypes(Camera c)
 {
     return c.GetCameraType() == eType;
 }
Exemplo n.º 2
0
 public FindCameraType(Camera.ECamType _type)
 {
     eType = _type;
 }
Exemplo n.º 3
0
 public Camera GetCamera(Camera.ECamType type)
 {
     return m_CameraList.Find(new FindCameraType(type).CompareTypes);
 }
Exemplo n.º 4
0
 public bool CompareID(Camera c)
 {
     return c.GetID() == iID;
 }
Exemplo n.º 5
0
        public int CreateCamera(Camera.ECamType type, bool bActive, Object3D target, Vector3 pos, Vector3 rot)
        {
            int iCameraID = ++m_iIDCameraCounter;

            if (GetCamera(iCameraID) != null)
                return INVALID_CAMERA_ID;

            if (type == Camera.ECamType.ECAMERA_TYPE_TARGET)
            {
                CameraTarget newCamera = new CameraTarget();
                newCamera.Init(iCameraID, target);
                m_CameraList.Add(newCamera);
            }
            else if (type == Camera.ECamType.ECAMERA_TYPE_FREE)
            {
                CameraFree newCamera = new CameraFree();
                newCamera.Init(iCameraID, pos, rot);
                m_CameraList.Add(newCamera);
            }

            if (bActive)
            {
                // we set as active camera by default the first created one
                m_iActiveCameraID = iCameraID;
            }

            return iCameraID;
        }