void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Size))
            {
                LogError("owner is not initialized. Add Action \"newSize\".");
                return;
            }
            OpenCVForUnity.CoreModule.Size wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Size, OpenCVForUnity.CoreModule.Size>(owner);

            if (!(vals.Value is OpenCVForUnityPlayMakerActions.DoubleArray))
            {
                LogError("vals is not initialized. Add Action \"newDoubleArray\".");
                return;
            }
            System.Double[] wrapped_vals = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.DoubleArray, System.Double[]>(vals);

            wrapped_owner.set(wrapped_vals);
        }
Ejemplo n.º 2
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Size))
            {
                LogError("owner is not initialized. Add Action \"newSize\".");
                return;
            }
            OpenCVForUnity.CoreModule.Size wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Size, OpenCVForUnity.CoreModule.Size>(owner);

            float[]  float_vals  = vals.floatValues;
            double[] casted_vals = new double[float_vals.Length];
            float_vals.CopyTo(casted_vals, 0);

            wrapped_owner.set(casted_vals);

            for (int i = 0; i < casted_vals.Length; i++)
            {
                vals.Set(i, (float)casted_vals[i]);
            }
            vals.SaveChanges();
        }