Exemple #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);
        }
            void Capture(ref aeCameraData dst)
            {
                var src = m_target;

                dst.visibility        = src.gameObject.activeSelf;
                dst.nearClippingPlane = src.nearClipPlane;
                dst.farClippingPlane  = src.farClipPlane;
                dst.fieldOfView       = src.fieldOfView;
                if (m_params != null)
                {
                    dst.focalLength   = m_params.m_focalLength;
                    dst.focusDistance = m_params.m_focusDistance;
                    dst.aperture      = m_params.m_aperture;
                    dst.aspectRatio   = m_params.GetAspectRatio();
                }
            }
            public override void Capture()
            {
                if (m_target == null)
                {
                    return;
                }
                var cam = m_target;

                var data = aeCameraData.defaultValue;

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