private static bool Command(TrackMethod method, string docKeyForTrack, string fileId = null, string callbackUrl = null, string users = null, string status = null) { Global.Logger.DebugFormat("DocService command {0} fileId '{1}' docKey '{2}' callbackUrl '{3}' users '{4}' status '{5}'", method, fileId, docKeyForTrack, callbackUrl, users, status); try { var response = DocumentServiceConnector.CommandRequest(method.ToString().ToLower(CultureInfo.InvariantCulture), docKeyForTrack, callbackUrl, users, status); Global.Logger.DebugFormat("DocService command response: '{0}'", response); var jResponse = JObject.Parse(response); var result = (CommandResultTypes)jResponse.Value <int>("error"); return(result == CommandResultTypes.NoError); } catch (Exception e) { Global.Logger.Error("DocService command error", e); return(false); } }
internal static extern pxcmStatus PXCMEnhancedVideo_EnableTracker(IntPtr ev, IntPtr boundingMask, TrackMethod method);
/** * EnableTracker: creates an object tracker with a specific tracking method and an * initial bounding mask as a hint for the object to detect. * boundingMask: a hint on what object to detect setting the target pixels to 255 and background to 0. * method: Tracking method for depth layer tracking or object tracking. */ public pxcmStatus EnableTracker(PXCMImage boundingMask, TrackMethod method) { return(PXCMEnhancedVideo_EnableTracker(instance, (boundingMask == null)? IntPtr.Zero: boundingMask.instance, method)); }
private static bool Command(TrackMethod method, string docKeyForTrack, string fileId = null, string callbackUrl = null, string users = null, string status = null) { Global.Logger.DebugFormat("DocService command {0} fileId '{1}' docKey '{2}' callbackUrl '{3}' users '{4}' status '{5}'", method, fileId, docKeyForTrack, callbackUrl, users, status); try { var response = DocumentServiceConnector.CommandRequest(method.ToString().ToLower(CultureInfo.InvariantCulture), docKeyForTrack, callbackUrl, users, status); Global.Logger.DebugFormat("DocService command response: '{0}'", response); var jResponse = JObject.Parse(response); var result = (CommandResultTypes) jResponse.Value<int>("error"); return result == CommandResultTypes.NoError; } catch (Exception e) { Global.Logger.Error("DocService command error", e); return false; } }
Vector3 GetPlayerMoveTarget(PlayerController follower, PlayerController hoster, float distance, TrackMethod method) { Vector3 diff = hoster.Position - follower.Position; Vector3 retOffset = new Vector3(); if (method(diff, distance)) { Vector3 dir = diff.normalized; Vector3 targetPos = hoster.Position + -dir * distance; retOffset = targetPos - follower.Position; } return(retOffset); }
/** * EnableTracker: creates an object tracker with a specific tracking method and an * initial bounding mask as a hint for the object to detect. * boundingMask: a hint on what object to detect setting the target pixels to 255 and background to 0. * method: Tracking method for depth layer tracking or object tracking. */ public pxcmStatus EnableTracker(PXCMImage boundingMask, TrackMethod method) { return PXCMEnhancedVideo_EnableTracker(instance, (boundingMask == null)? IntPtr.Zero: boundingMask.instance, method); }