Esempio n. 1
0
    public static void CaptureCamera(AbcAPI.aeObject abc, Camera cam, AlembicCameraParams cparams = null)
    {
        var data = AbcAPI.aeCameraData.default_value;

        data.nearClippingPlane = cam.nearClipPlane;
        data.farClippingPlane  = cam.farClipPlane;
        data.fieldOfView       = cam.fieldOfView;
        if (cparams != null)
        {
            data.focalLength   = cparams.m_focalLength;
            data.focusDistance = cparams.m_focusDistance;
            data.aperture      = cparams.m_aperture;
            data.aspectRatio   = cparams.GetAspectRatio();
        }
        AbcAPI.aeCameraWriteSample(abc, ref data);
    }