res.status === 200含义

博客指出200是HTTP请求成功的响应值,涉及HTTP相关信息技术知识。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题
200本身就是http请求成功的响应值

// Fill out your copyright notice in the Description page of Project Settings. #include "PXRFunctionLibrary.h" #include "Engine/Engine.h" #include "BStreamingSDK.h" int UPXRFunctionLibrary::StartStreamingSDK() { return BStreamingSDK_Init(nullptr); } int UPXRFunctionLibrary::ReleaseStreamingSDK() { return BStreamingSDK_Deinit(); } void UPXRFunctionLibrary::GetHandTrackerEvent(FPxrHandAimState aimState,bool& Computed, bool& RayValid, bool& Pinch, FPxrPosef& RayPose,float& PinchStrength) { uint64 StateULong = aimState.Status; RayPose = aimState.AimPose; Computed = (StateULong & 1) != 0; RayValid = (StateULong & 2) != 0; Pinch = (StateULong & 512) != 0; PinchStrength = aimState.ClickStrength; } FPxrHandAimState UPXRFunctionLibrary::GetHandTrackerAimState(int hand) { const float EditorWorldToMetersScale = GWorld->GetWorldSettings()->WorldToMeters; PxrHandAimState state; FPxrHandAimState fstate; int res = BStreamingSDK_GetHandTrackerAimState(hand, state); if (res == 0) { fstate.AimPose.Position.X = -state.aimPose.Position.z * EditorWorldToMetersScale; fstate.AimPose.Position.Y = state.aimPose.Position.x * EditorWorldToMetersScale; fstate.AimPose.Position.Z = state.aimPose.Position.y * EditorWorldToMetersScale; fstate.AimPose.Orientation.X = -state.aimPose.Orientation.z; fstate.AimPose.Orientation.Y = state.aimPose.Orientation.x; fstate.AimPose.Orientation.Z = state.aimPose.Orientation.y; fstate.AimPose.Orientation.W = -state.aimPose.Orientation.w; fstate.Status = state.Status; fstate.ClickStrength = state.ClickStrength; fstate.PinchStrengthIndex = state.pinchStrengthIndex; fstate.PinchStrengthLittle = state.pinchStrengthLittle; fstate.PinchStrengthMiddle = state.pinchStrengthMiddle; fstate.PinchStrengthRing = state.pinchStrengthRing; } return fstate; } int UPXRFunctionLibrary::GetHandTrackerJointLocations(int hand, FPxrHandJointsLocations& jointLocations) { PxrHandJointsLocations jointsLocations; int res = BStreamingSDK_GetHandTrackerJointLocations(hand, jointsLocations); if (res == 0) { jointLocations.IsActive = jointsLocations.isActive; jointLocations.JointCount = jointsLocations.jointCount; jointLocations.HandScale = jointsLocations.HandScale; const float EditorWorldToMetersScale = GWorld->GetWorldSettings()->WorldToMeters; for (int i = 0; i < jointLocations.JointCount; i++) { FPxrHandJointsLocation jointsLocation; jointsLocation.Pose.Position.X = -jointsLocations.jointLocations[i].pose.Position.z* EditorWorldToMetersScale; jointsLocation.Pose.Position.Y = jointsLocations.jointLocations[i].pose.Position.x * EditorWorldToMetersScale; jointsLocation.Pose.Position.Z = jointsLocations.jointLocations[i].pose.Position.y * EditorWorldToMetersScale; jointsLocation.Pose.Orientation.X = -jointsLocations.jointLocations[i].pose.Orientation.z; jointsLocation.Pose.Orientation.Y = jointsLocations.jointLocations[i].pose.Orientation.x; jointsLocation.Pose.Orientation.Z = jointsLocations.jointLocations[i].pose.Orientation.y; jointsLocation.Pose.Orientation.W = -jointsLocations.jointLocations[i].pose.Orientation.w; jointsLocation.Radius = jointsLocations.jointLocations[i].radius; jointsLocation.LocationFlags = jointsLocations.jointLocations[i].locationFlags; if (i < jointLocations.JointLocations.Num()) { jointLocations.JointLocations[i] = jointsLocation; } else { jointLocations.JointLocations.Add(jointsLocation); } } } return res; } void UPXRFunctionLibrary::ConvertPXPoseToVectorAndQuaternion(FPxrPosef pose, FVector& Location, FQuat& Quat) { Location = FVector(pose.Position.X, pose.Position.Y, pose.Position.Z); Quat = FQuat(pose.Orientation.X, pose.Orientation.Y, pose.Orientation.Z, pose.Orientation.W); } 是什么意思
最新发布
03-22
优化这段代码 public void handForDevice(RequestEvent evt, Device device, Element element) { try { //收到的数据 JSONObject jsonObject = XmlUtils.xmlToBean(element, JSONObject.class); JSONObject request = (JSONObject) jsonObject.get("request"); C2_8Req_ReqCamResState c2_8Req_reqCamResState = JsonUtils.toBean(JsonUtils.toString(request.get("parameters")), C2_8Req_ReqCamResState.class); C2_8Res_ReqCamResState c2_8Res_ReqCamResState = new C2_8Res_ReqCamResState(); List<C2_8Res_Group> c2_8Res_groupList = new ArrayList<>(); C2_8Res_Group c2_8Res_group = new C2_8Res_Group(); List<C2_8Res_Url> c2_8Res_urlList = new ArrayList<>(); C2_8Res_Url c2_8Res_url = new C2_8Res_Url(); for (int i = 0; i < c2_8Req_reqCamResState.getGroup().getURL().size(); i++) { String resid = c2_8Req_reqCamResState.getGroup().getURL().get(i).getResId(); AjaxResult ajaxResult = remoteUserService.getCameraListById(resid); List<DeviceChannel> channerStatueList = JsonUtils.toBean(JsonUtils.toString(ajaxResult.get("data")), DeviceChannel.class); c2_8Res_url.setResId(resid); if (channerStatueList.get(i).getStatus() == 1) { c2_8Res_url.setState("有图像"); } else { c2_8Res_url.setState("无图像"); } c2_8Res_urlList.add(c2_8Res_url); } c2_8Res_group.setURL(c2_8Res_urlList); c2_8Res_groupList.add(c2_8Res_group); c2_8Res_ReqCamResState.setGroup(c2_8Res_groupList); String result = ResponseUtils.getXmlResponse(c2_8Res_ReqCamResState, method, true, null); responseQcrXmlAck(evt, result); } catch (SipException | InvalidArgumentException | ParseException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } }
06-01
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值