コード例 #1
0
    // Populate lens data
    void PopulateLens()
    {
        ProCamsLensDataTable.FilmFormatData curFilmFormat = ProCamsLensDataTable.Instance.GetFilmFormat(_filmFormatName.stringValue);
        if (curFilmFormat != null)
        {
            if (_lensKitIndex.intValue < 0 || _lensKitIndex.intValue > curFilmFormat._lensKits.Count)
            {
                _lensKitIndex.intValue = 0;
            }

            ProCamsLensDataTable.LensKitData lensKitData = curFilmFormat.GetLensKitData(_lensKitIndex.intValue);
            if (lensKitData != null)
            {
                // Set available lens data for this film format
                cb.LensFOVList = lensKitData._fovDataset.ToArray();

                if (_lensIndex.intValue < 0 || _lensIndex.intValue > cb.LensFOVList.Length)
                {
                    _lensIndex.intValue = 0;
                }
            }

            // Populate lens names
            int numLenses = lensKitData._fovDataset.Count;
            _lensOptions = new string[numLenses];
            for (int i = 0; i < numLenses; ++i)
            {
                _lensOptions[i] = lensKitData._fovDataset[i]._focalLength + "mm";
            }
        }
    }
コード例 #2
0
ファイル: CameraBody.cs プロジェクト: britkern/PPOL
 void Start()
 {
     // Populate lens data
     ProCamsLensDataTable.FilmFormatData curFilmFormat = ProCamsLensDataTable.Instance.GetFilmFormat(_filmFormatName);
     if (curFilmFormat != null)
     {
         ProCamsLensDataTable.LensKitData lensKitData = curFilmFormat.GetLensKitData(_lensKitIndex);
         if (lensKitData != null)
         {
             // Set available lens data for this film format
             _lensFOVList = lensKitData._fovDataset.ToArray();
         }
     }
 }