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

            if (!(x.Value is OpenCVForUnityPlayMakerActions.Double))
            {
                LogError("x is not initialized. Add Action \"newDouble\".");
                return;
            }
            System.Double wrapped_x = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Double, System.Double>(x);

            if (!(y.Value is OpenCVForUnityPlayMakerActions.Double))
            {
                LogError("y is not initialized. Add Action \"newDouble\".");
                return;
            }
            System.Double wrapped_y = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Double, System.Double>(y);

            storeResult.Value = wrapped_owner.contains(wrapped_x, wrapped_y);

            Fsm.Event(storeResult.Value ? trueEvent : falseEvent);
        }
Example #2
0
        void DoProcess()
        {
            if (!(owner.Value is OpenCVForUnityPlayMakerActions.Rect2d))
            {
                LogError("owner is not initialized. Add Action \"newRect2d\".");
                return;
            }
            OpenCVForUnity.CoreModule.Rect2d wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Rect2d, OpenCVForUnity.CoreModule.Rect2d>(owner);

            storeResult.Value = wrapped_owner.contains(new OpenCVForUnity.CoreModule.Point((double)p_x.Value, (double)p_y.Value));

            Fsm.Event(storeResult.Value ? trueEvent : falseEvent);
        }