예제 #1
0
 private pxcmStatus OnModuleSetProfile(Int32 mid, IntPtr module)
 {
     if (mid == PXCMFaceModule.CUID)
     {
         return(handler.onModuleSetProfile(mid, new PXCMFaceModule(sm.faceEvents, module, false)));
     }
     if (mid == PXCMHandModule.CUID)
     {
         return(handler.onModuleSetProfile(mid, new PXCMHandModule(sm.handEvents, module, false)));
     }
     return(handler.onModuleSetProfile(mid, PXCMBase.IntPtr2PXCMBase(module, mid)));
 }
예제 #2
0
 private pxcmStatus OnModuleProcessedFrame(Int32 mid, IntPtr module, IntPtr images)
 {
     PXCMCapture.Sample sample = new PXCMCapture.Sample(images);
     if (mid == PXCMFaceModule.CUID)
     {
         return(handler.onModuleProcessedFrame(mid, new PXCMFaceModule(sm.faceEvents, module, false), sample));
     }
     if (mid == PXCMHandModule.CUID)
     {
         return(handler.onModuleProcessedFrame(mid, new PXCMHandModule(sm.handEvents, module, false), sample));
     }
     return(handler.onModuleProcessedFrame(mid, PXCMBase.IntPtr2PXCMBase(module, mid), sample));
 }
예제 #3
0
    /**
     * @brief	Return the module instance. Between AcquireFrame/ReleaseFrame, the function returns
     * NULL if the specified module hasn't completed processing the current frame of image data.
     * The instance is managed internally by the SenseManager. Do not release the instance.
     * @param[in] mid		The module identifier. Usually this is the interface identifier.
     * @return The module instance.
     */
    public PXCMBase QueryModule(Int32 mid)
    {
        if (mid == PXCMHandModule.CUID)
        {
            return(QueryFace());
        }
        if (mid == PXCMFaceModule.CUID)
        {
            return(QueryHand());
        }
        if (mid == PXCMTouchlessController.CUID)
        {
            return(QueryTouchlessController());
        }

        IntPtr pbase = PXCMSenseManager_QueryModule(instance, mid);

        if (pbase == IntPtr.Zero)
        {
            return(null);
        }
        return(PXCMBase.IntPtr2PXCMBase(pbase, mid));
    }