void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Subdiv2D)) { LogError("owner is not initialized. Add Action \"newSubdiv2D\"."); return; } OpenCVForUnity.ImgprocModule.Subdiv2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Subdiv2D, OpenCVForUnity.ImgprocModule.Subdiv2D>(owner); if (!(pt.Value is OpenCVForUnityPlayMakerActions.Point)) { LogError("pt is not initialized. Add Action \"newPoint\"."); return; } OpenCVForUnity.CoreModule.Point wrapped_pt = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Point, OpenCVForUnity.CoreModule.Point>(pt); if (!(nearestPt.Value is OpenCVForUnityPlayMakerActions.Point)) { LogError("nearestPt is not initialized. Add Action \"newPoint\"."); return; } OpenCVForUnity.CoreModule.Point wrapped_nearestPt = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Point, OpenCVForUnity.CoreModule.Point>(nearestPt); storeResult.Value = wrapped_owner.findNearest(wrapped_pt, wrapped_nearestPt); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Subdiv2D)) { LogError("owner is not initialized. Add Action \"newSubdiv2D\"."); return; } OpenCVForUnity.ImgprocModule.Subdiv2D wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Subdiv2D, OpenCVForUnity.ImgprocModule.Subdiv2D>(owner); storeResult.Value = wrapped_owner.findNearest(new OpenCVForUnity.CoreModule.Point((double)pt_x.Value, (double)pt_y.Value), new OpenCVForUnity.CoreModule.Point((double)nearestPt_x.Value, (double)nearestPt_y.Value)); }