void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.MatOfDouble)) { LogError("owner is not initialized. Add Action \"newMatOfDouble\"."); return; } OpenCVForUnity.CoreModule.MatOfDouble wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfDouble, OpenCVForUnity.CoreModule.MatOfDouble>(owner); if (!(a.Value is OpenCVForUnityPlayMakerActions.DoubleArray)) { LogError("a is not initialized. Add Action \"newDoubleArray\"."); return; } System.Double[] wrapped_a = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.DoubleArray, System.Double[]>(a); wrapped_owner.fromArray(wrapped_a); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.MatOfDouble)) { LogError("owner is not initialized. Add Action \"newMatOfDouble\"."); return; } OpenCVForUnity.CoreModule.MatOfDouble wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfDouble, OpenCVForUnity.CoreModule.MatOfDouble>(owner); float[] float_a = a.floatValues; double[] casted_a = new double[float_a.Length]; float_a.CopyTo(casted_a, 0); wrapped_owner.fromArray(casted_a); for (int i = 0; i < casted_a.Length; i++) { a.Set(i, (float)casted_a[i]); } a.SaveChanges(); }