void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Point3)) { LogError("owner is not initialized. Add Action \"newPoint3\"."); return; } OpenCVForUnity.CoreModule.Point3 wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Point3, OpenCVForUnity.CoreModule.Point3>(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); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Point3)) { LogError("owner is not initialized. Add Action \"newPoint3\"."); return; } OpenCVForUnity.CoreModule.Point3 wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Point3, OpenCVForUnity.CoreModule.Point3>(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(); }