UE5数字孪生系列笔记(三)

C++创建Pawn类玩家

  • 创建一个GameMode蓝图用来加载我们自定义的游戏Mode
  • 新建一个Pawn的C++,MyCharacter类作为玩家,新建一个相机组件与相机臂组件,box组件作为根组件
// Fill out your copyright notice in the Description page of Project Settings.#pragma once#include "CoreMinimal.h"
#include "GameFramework/Pawn.h"
#include "MyCharacter.generated.h"UCLASS()
class CITYTWIN_API AMyCharacter : public APawn
{GENERATED_BODY()public:// Sets default values for this pawn's propertiesAMyCharacter();//box作为根组件UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Camera")class UBoxComponent* CollisionBox;//相机组件UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Camera")class UCameraComponent* FollowCamera;//相机臂组件UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Camera")class USpringArmComponent* CameraBoom;protected:// Called when the game starts or when spawnedvirtual void BeginPlay() override;public:	// Called every framevirtual void Tick(float DeltaTime) override;// Called to bind functionality to inputvirtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;};
  • 声明创建组件,硬编码一些基本属性
// Fill out your copyright notice in the Description page of Project Settings.#include "MyCharacter.h"
#include "Components/BoxComponent.h"
#include "Camera/CameraComponent.h"
#include "GameFramework/SpringArmComponent.h"// Sets default values
AMyCharacter::AMyCharacter()
{// Set this pawn to call Tick() every frame.  You can turn this off to improve performance if you don't need it.PrimaryActorTick.bCanEverTick = true;CollisionBox = CreateDefaultSubobject<UBoxComponent>(TEXT("CollisionBox"));CollisionBox->SetupAttachment(GetRootComponent());CameraBoom = CreateDefaultSubobject<USpringArmComponent>(TEXT("CameraBoom"));CameraBoom->SetupAttachment(CollisionBox);CameraBoom->TargetArmLength = 1500.f;CameraBoom->bUsePawnControlRotation = false;CameraBoom->bEnableCameraLag = true;//摄像机臂平滑CameraBoom->bEnableCameraRotationLag = true;//启用相机旋转延迟CameraBoom->bDoCollisionTest = false;//关闭摄像机臂碰撞FollowCamera = CreateDefaultSubobject<UCameraComponent>(TEXT("FollowCamera"));FollowCamera->SetupAttachment(CameraBoom);FollowCamera->bUsePawnControlRotation = false;
}// Called when the game starts or when spawned
void AMyCharacter::BeginPlay()
{Super::BeginPlay();}// Called every frame
void AMyCharacter::Tick(float DeltaTime)
{Super::Tick(DeltaTime);}// Called to bind functionality to input
void AMyCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{Super::SetupPlayerInputComponent(PlayerInputComponent);}
  • 创建这个Pawn类的蓝图进行之前登录页面动画的视角旋转方向问题的解决
  • 首先将蓝图生成对齐到视角
    在这里插入图片描述
  • 将Pawn类自动接收玩家0
    在这里插入图片描述
  • 然后删除PlayerStart
    在这里插入图片描述
  • 运行结果
    请添加图片描述

移动增强输入系统

  • 在项目建立.cs文件中添加这个模块
    在这里插入图片描述
  • 绑定增强输入系统操作
  • MyCharacter.h
// Fill out your copyright notice in the Description page of Project Settings.#pragma once#include "CoreMinimal.h"
#include "GameFramework/Pawn.h"
#include "../../../../UE_5.2.1/UE_5.2/Engine/Plugins/EnhancedInput/Source/EnhancedInput/Public/InputActionValue.h"
#include "MyCharacter.generated.h"UCLASS()
class CITYTWIN_API AMyCharacter : public APawn
{GENERATED_BODY()public:// Sets default values for this pawn's propertiesAMyCharacter();//box作为根组件UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Camera")class UBoxComponent* CollisionBox;//相机组件UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Camera")class UCameraComponent* FollowCamera;//相机臂组件UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Camera")class USpringArmComponent* CameraBoom;//绑定映射UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")class UInputMappingContext* MappingContext;//移动绑定UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")class UInputAction* LeftButtonAction;protected:// Called when the game starts or when spawnedvirtual void BeginPlay() override;//鼠标按下操作事件void LeftMouseDown(const FInputActionValue& value);void LeftMouseUp(const FInputActionValue& value);public:	// Called every framevirtual void Tick(float DeltaTime) override;// Called to bind functionality to inputvirtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;};
  • MyCharacter.cpp
// Fill out your copyright notice in the Description page of Project Settings.
#include "MyCharacter.h"
#include "Components/BoxComponent.h"
#include "Camera/CameraComponent.h"
#include "GameFramework/SpringArmComponent.h"
#include "EnhancedInputSubsystems.h"
#include "EnhancedInputComponent.h"// Sets default values
AMyCharacter::AMyCharacter()
{// Set this pawn to call Tick() every frame.  You can turn this off to improve performance if you don't need it.PrimaryActorTick.bCanEverTick = true;CollisionBox = CreateDefaultSubobject<UBoxComponent>(TEXT("CollisionBox"));CollisionBox->SetupAttachment(GetRootComponent());CameraBoom = CreateDefaultSubobject<USpringArmComponent>(TEXT("CameraBoom"));CameraBoom->SetupAttachment(CollisionBox);CameraBoom->TargetArmLength = 1500.f;CameraBoom->bUsePawnControlRotation = false;CameraBoom->bEnableCameraLag = true;//摄像机臂平滑CameraBoom->bEnableCameraRotationLag = true;//启用相机旋转延迟CameraBoom->bDoCollisionTest = false;//关闭摄像机臂碰撞FollowCamera = CreateDefaultSubobject<UCameraComponent>(TEXT("FollowCamera"));FollowCamera->SetupAttachment(CameraBoom);FollowCamera->bUsePawnControlRotation = false;
}
// Called when the game starts or when spawned
void AMyCharacter::BeginPlay()
{Super::BeginPlay();APlayerController* PlayerController = Cast<APlayerController>(Controller);if (PlayerController){UEnhancedInputLocalPlayerSubsystem* Subsystem =ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(PlayerController->GetLocalPlayer());if (Subsystem){Subsystem->AddMappingContext(MappingContext, 0);}}
}
void AMyCharacter::LeftMouseDown(const FInputActionValue& value)
{
}void AMyCharacter::LeftMouseUp(const FInputActionValue& value)
{
}
// Called every frame
void AMyCharacter::Tick(float DeltaTime)
{Super::Tick(DeltaTime);}
// Called to bind functionality to input
void AMyCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{Super::SetupPlayerInputComponent(PlayerInputComponent);UEnhancedInputComponent* EnhancedInputConponent = Cast<UEnhancedInputComponent>(PlayerInputComponent);if (EnhancedInputConponent){EnhancedInputConponent->BindAction(LeftButtonAction, ETriggerEvent::Started, this, &AMyCharacter::LeftMouseDown);EnhancedInputConponent->BindAction(LeftButtonAction, ETriggerEvent::Completed, this, &AMyCharacter::LeftMouseUp);}
}

获取鼠标位置坐标与鼠标移动后的差量

  • 使用GetMousePosition函数来获取鼠标的坐标点
  • MyCharacter.h中新建一个函数专门用来获取鼠标的坐标点的函数
	//鼠标的坐标点FVector2D MousePos = FVector2D::ZeroVector;void GetMousePosition();
  • MyCharacter.cpp中实现此方法
void AMyCharacter::GetMousePosition()
{GetWorld()->GetFirstPlayerController()->GetMousePosition(MousePos.X, MousePos.Y);//打印鼠标信息到屏幕GEngine->AddOnScreenDebugMessage(-1, 1, FColor::Red, FString::Printf(TEXT("%f,%f"), MousePos.X, MousePos.Y));
}
  • 获取鼠标变化差量,当我们鼠标变化时,我们要获取到这个变化的差量值,我们可以定义两个变量,一个变量存储用来作为变化之前的绝对位置减去变化之后的当前绝对位置,然后另外两个变量来存储变化之后当前的绝对位置
	//鼠标的坐标点FVector2D MousePos = FVector2D::ZeroVector;//记录的鼠标变化差量FVector2D MouseVariationDifference = FVector2D::ZeroVector;//记录变化之后的鼠标坐标float MouseX = 0.f;float MouseY = 0.f;void AMyCharacter::GetMousePosition()
{//获取当前鼠标移动坐标GetWorld()->GetFirstPlayerController()->GetMousePosition(MousePos.X, MousePos.Y);//记录的鼠标变化差量MouseVariationDifference = MousePos - FVector2D(MouseX, MouseY);//记录变化后的鼠标位置MouseX = MousePos.X;MouseY = MousePos.Y;//打印鼠标信息到屏幕GEngine->AddOnScreenDebugMessage(1, 1, FColor::Red, FString::Printf(TEXT("%f,%f"), MousePos.X, MousePos.Y));GEngine->AddOnScreenDebugMessage(2, 1, FColor::Yellow, FString::Printf(TEXT("%f,%f"), MouseVariationDifference.X, MouseVariationDifference.Y));
}

设置滑动鼠标实现旋转视角效果

  • 通过获取的移动的鼠标差量进行鼠标滑动移动视角
  • 新建一个鼠标视角移动速度变量,用来控制鼠标实现视角旋转的移动速度
	//鼠标视角移动速度float MouseSpeed = 0.1f;
  • 新建一个鼠标视角移动函数,函数逻辑
  • ActorRotator.Pitch + (MouseVariationDifference.Y * MouseSpeed):Pitch是虚幻中的抬头与低头,在直角坐标系中用来Y来描述
  • ActorRotator.Yaw + (MouseVariationDifference.X * MouseSpeed * -1.f):Yaw是摇头转向,在直角坐标系中用来X来描述,实践中得乘以-1使用,估计是因为虚幻默认以右方向为正方向的原因
	//鼠标移动视角移动事件void MouseMove();void AMyCharacter::MouseMove()
{FRotator ActorRotator = GetActorRotation();FRotator NewActorRotator = FRotator(ActorRotator.Pitch + (MouseVariationDifference.Y * MouseSpeed),ActorRotator.Yaw + (MouseVariationDifference.X * MouseSpeed * -1.f), ActorRotator.Roll);SetActorRotation(NewActorRotator);
}
  • 调用函数
// Called every frame
void AMyCharacter::Tick(float DeltaTime)
{Super::Tick(DeltaTime);//获取鼠标坐标GetMousePosition();//鼠标移动视角MouseMove();}
  • 运行结果
    请添加图片描述

鼠标左键视觉拖动效果

  • 将滑动鼠标实现旋转视角效果设置为鼠标左键按下后才能实现
  • 添加一个布尔变量用来标识是否要开启鼠标旋转视角事情
	//标识鼠标左键是否按下bool bIsMouseLeftDown = false;void AMyCharacter::MouseMove()
{if (bIsMouseLeftDown){FRotator ActorRotator = GetActorRotation();//限制一下视角度数带来的错误FRotator NewActorRotator = FRotator(FMath::Clamp((ActorRotator.Pitch + (MouseVariationDifference.Y * MouseSpeed)),-80.f,-10.f),ActorRotator.Yaw + (MouseVariationDifference.X * MouseSpeed * -1.f), ActorRotator.Roll);SetActorRotation(NewActorRotator);}
}void AMyCharacter::LeftMouseDown(const FInputActionValue& value)
{bIsMouseLeftDown = true;
}void AMyCharacter::LeftMouseUp(const FInputActionValue& value)
{bIsMouseLeftDown = false;
}

鼠标右键视角移动效果

  • 添加右键的输入操作
    在这里插入图片描述
  • 新建右键是否按下的标识布尔变量,创建右键操作的输入行为,即绑定函数
	//移动绑定UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")class UInputAction* RightButtonAction;//标识鼠标右键是否按下bool bIsMouseRightDown = false;// Called to bind functionality to input
void AMyCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{Super::SetupPlayerInputComponent(PlayerInputComponent);UEnhancedInputComponent* EnhancedInputConponent = Cast<UEnhancedInputComponent>(PlayerInputComponent);if (EnhancedInputConponent){EnhancedInputConponent->BindAction(LeftButtonAction, ETriggerEvent::Started, this, &AMyCharacter::LeftMouseDown);EnhancedInputConponent->BindAction(LeftButtonAction, ETriggerEvent::Completed, this, &AMyCharacter::LeftMouseUp);EnhancedInputConponent->BindAction(RightButtonAction, ETriggerEvent::Started, this, &AMyCharacter::RightMouseDown);EnhancedInputConponent->BindAction(RightButtonAction, ETriggerEvent::Completed, this, &AMyCharacter::RightMouseUp);}
}void AMyCharacter::RightMouseDown(const FInputActionValue& value)
{bIsMouseRightDown = true;
}void AMyCharacter::RightMouseUp(const FInputActionValue& value)
{bIsMouseRightDown = false;
}
  • 新建鼠标右键移动速度变量,编写鼠标右键移动逻辑
	//鼠标右键移动速度float MouseRightSpeed = 100.f;void AMyCharacter::MouseMove()
{if (bIsMouseLeftDown){FRotator ActorRotator = GetActorRotation();//限制一下视角度数带来的错误FRotator NewActorRotator = FRotator(FMath::Clamp((ActorRotator.Pitch + (MouseVariationDifference.Y * MouseSpeed)),-80.f,-10.f),ActorRotator.Yaw + (MouseVariationDifference.X * MouseSpeed * -1.f), ActorRotator.Roll);SetActorRotation(NewActorRotator);}if (bIsMouseRightDown){FVector SpeedMove = FVector(MouseVariationDifference.Y * MouseRightSpeed,-1.0 * MouseRightSpeed * MouseVariationDifference.X, 0);AddActorLocalOffset(SpeedMove);//限制z轴FVector Location = GetActorLocation();FVector NewLocation = FVector(Location.X, Location.Y, 4520);SetActorLocation(NewLocation);}
}

鼠标中键控制摄像机臂长度,缩放地图效果

  • 新建鼠标中键的操作行为,添加一个鼠标中键移动速度变量,然后在鼠标中键操作事件中完成逻辑,逻辑是获取相机臂的长度,用获取鼠标滚轮的量值乘以鼠标中键移动速度变量被获取的相机臂原长度减去
	//移动绑定UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")class UInputAction* MiddleButtonAction;//鼠标中键移动速度float MouseMiddleSpeed = 1000.f;void AMyCharacter::MiddleMouseSlide(const FInputActionValue& value)
{float Axis = value.Get<float>();float CameraArm = CameraBoom->TargetArmLength;//限制相机臂长度CameraBoom->TargetArmLength = FMath::Clamp((CameraArm - Axis * MouseMiddleSpeed), 1000.f, 30000.f);
}
  • 运行结果
    请添加图片描述

源码

MyCharacter.h

// Fill out your copyright notice in the Description page of Project Settings.#pragma once#include "CoreMinimal.h"
#include "GameFramework/Pawn.h"
#include "../../../../UE_5.2.1/UE_5.2/Engine/Plugins/EnhancedInput/Source/EnhancedInput/Public/InputActionValue.h"
#include "MyCharacter.generated.h"UCLASS()
class CITYTWIN_API AMyCharacter : public APawn
{GENERATED_BODY()public:// Sets default values for this pawn's propertiesAMyCharacter();//box作为根组件UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Camera")class UBoxComponent* CollisionBox;//相机组件UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Camera")class UCameraComponent* FollowCamera;//相机臂组件UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Camera")class USpringArmComponent* CameraBoom;//绑定映射UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")class UInputMappingContext* MappingContext;//移动绑定UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")class UInputAction* LeftButtonAction;//移动绑定UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")class UInputAction* RightButtonAction;//移动绑定UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")class UInputAction* MiddleButtonAction;//鼠标的坐标点FVector2D MousePos = FVector2D::ZeroVector;//记录的鼠标变化差量FVector2D MouseVariationDifference = FVector2D::ZeroVector;//记录变化之后的鼠标坐标float MouseX = 0.f;float MouseY = 0.f;//鼠标视角移动速度float MouseSpeed = 0.1f;//鼠标右键移动速度float MouseRightSpeed = 100.f;//鼠标中键移动速度float MouseMiddleSpeed = 1000.f;//标识鼠标左键是否按下bool bIsMouseLeftDown = false;//标识鼠标右键是否按下bool bIsMouseRightDown = false;protected:// Called when the game starts or when spawnedvirtual void BeginPlay() override;//鼠标按下操作事件void LeftMouseDown(const FInputActionValue& value);void LeftMouseUp(const FInputActionValue& value);void RightMouseDown(const FInputActionValue& value);void RightMouseUp(const FInputActionValue& value);void MiddleMouseSlide(const FInputActionValue& value);//鼠标移动视角移动事件void MouseMove();public:	// Called every framevirtual void Tick(float DeltaTime) override;// Called to bind functionality to inputvirtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;void GetMousePosition();
};

MyCharacter.cpp

// Fill out your copyright notice in the Description page of Project Settings.#include "MyCharacter.h"
#include "Components/BoxComponent.h"
#include "Camera/CameraComponent.h"
#include "GameFramework/SpringArmComponent.h"
#include "EnhancedInputSubsystems.h"
#include "EnhancedInputComponent.h"
#include "Engine/Engine.h"// Sets default values
AMyCharacter::AMyCharacter()
{// Set this pawn to call Tick() every frame.  You can turn this off to improve performance if you don't need it.PrimaryActorTick.bCanEverTick = true;CollisionBox = CreateDefaultSubobject<UBoxComponent>(TEXT("CollisionBox"));CollisionBox->SetupAttachment(GetRootComponent());CameraBoom = CreateDefaultSubobject<USpringArmComponent>(TEXT("CameraBoom"));CameraBoom->SetupAttachment(CollisionBox);CameraBoom->TargetArmLength = 1500.f;CameraBoom->bUsePawnControlRotation = false;CameraBoom->bEnableCameraLag = true;//摄像机臂平滑CameraBoom->bEnableCameraRotationLag = true;//启用相机旋转延迟CameraBoom->bDoCollisionTest = false;//关闭摄像机臂碰撞FollowCamera = CreateDefaultSubobject<UCameraComponent>(TEXT("FollowCamera"));FollowCamera->SetupAttachment(CameraBoom);FollowCamera->bUsePawnControlRotation = false;
}// Called when the game starts or when spawned
void AMyCharacter::BeginPlay()
{Super::BeginPlay();APlayerController* PlayerController = Cast<APlayerController>(Controller);if (PlayerController){UEnhancedInputLocalPlayerSubsystem* Subsystem =ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(PlayerController->GetLocalPlayer());if (Subsystem){Subsystem->AddMappingContext(MappingContext, 0);}}
}void AMyCharacter::LeftMouseDown(const FInputActionValue& value)
{bIsMouseLeftDown = true;
}void AMyCharacter::LeftMouseUp(const FInputActionValue& value)
{bIsMouseLeftDown = false;
}void AMyCharacter::RightMouseDown(const FInputActionValue& value)
{bIsMouseRightDown = true;
}void AMyCharacter::RightMouseUp(const FInputActionValue& value)
{bIsMouseRightDown = false;
}void AMyCharacter::MiddleMouseSlide(const FInputActionValue& value)
{float Axis = value.Get<float>();float CameraArm = CameraBoom->TargetArmLength;//限制相机臂长度CameraBoom->TargetArmLength = FMath::Clamp((CameraArm - Axis * MouseMiddleSpeed), 1000.f, 30000.f);
}void AMyCharacter::MouseMove()
{if (bIsMouseLeftDown){FRotator ActorRotator = GetActorRotation();//限制一下视角度数带来的错误FRotator NewActorRotator = FRotator(FMath::Clamp((ActorRotator.Pitch + (MouseVariationDifference.Y * MouseSpeed)),-80.f,-10.f),ActorRotator.Yaw + (MouseVariationDifference.X * MouseSpeed * -1.f), ActorRotator.Roll);SetActorRotation(NewActorRotator);}if (bIsMouseRightDown){FVector SpeedMove = FVector(MouseVariationDifference.Y * MouseRightSpeed,-1.0 * MouseRightSpeed * MouseVariationDifference.X, 0);AddActorLocalOffset(SpeedMove);//限制z轴FVector Location = GetActorLocation();FVector NewLocation = FVector(Location.X, Location.Y, 4520);SetActorLocation(NewLocation);}
}// Called every frame
void AMyCharacter::Tick(float DeltaTime)
{Super::Tick(DeltaTime);//获取鼠标坐标GetMousePosition();//鼠标移动视角MouseMove();}// Called to bind functionality to input
void AMyCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{Super::SetupPlayerInputComponent(PlayerInputComponent);UEnhancedInputComponent* EnhancedInputConponent = Cast<UEnhancedInputComponent>(PlayerInputComponent);if (EnhancedInputConponent){EnhancedInputConponent->BindAction(LeftButtonAction, ETriggerEvent::Started, this, &AMyCharacter::LeftMouseDown);EnhancedInputConponent->BindAction(LeftButtonAction, ETriggerEvent::Completed, this, &AMyCharacter::LeftMouseUp);EnhancedInputConponent->BindAction(RightButtonAction, ETriggerEvent::Started, this, &AMyCharacter::RightMouseDown);EnhancedInputConponent->BindAction(RightButtonAction, ETriggerEvent::Completed, this, &AMyCharacter::RightMouseUp);EnhancedInputConponent->BindAction(MiddleButtonAction, ETriggerEvent::Triggered, this, &AMyCharacter::MiddleMouseSlide);}
}void AMyCharacter::GetMousePosition()
{//获取当前鼠标移动坐标GetWorld()->GetFirstPlayerController()->GetMousePosition(MousePos.X, MousePos.Y);//记录的鼠标变化差量MouseVariationDifference = MousePos - FVector2D(MouseX, MouseY);//记录变化后的鼠标位置MouseX = MousePos.X;MouseY = MousePos.Y;//打印鼠标信息到屏幕/*GEngine->AddOnScreenDebugMessage(1, 1, FColor::Red, FString::Printf(TEXT("%f,%f"), MousePos.X, MousePos.Y));GEngine->AddOnScreenDebugMessage(2, 1, FColor::Yellow, FString::Printf(TEXT("%f,%f"), MouseVariationDifference.X, MouseVariationDifference.Y));*/
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/290965.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

备考ICA----Istio实验13---使用 Istio Ingress 暴露应用

备考ICA----Istio实验13—使用Istio Ingress TLS暴露应用 1. 环境部署 清理之前实验遗留,并重新部署httpbin服务进行测试 # 清理之前的环境 kubectl delete vs httpbin kubectl delete gw mygateway # 部署httpbin kubectl apply -f istio/samples/httpbin/httpbin.yaml 确认…

从vivo X Fold3看vivo“质”变

撰文 | 何玺 排版 | 叶媛 vivo的气质变了&#xff01;虽然依旧内敛、低调&#xff0c;但更自信、从容&#xff0c;气场也更强大。这是玺哥在本次vivo X Fold3系列新品发布会上的一个直观感受。 是什么改变了vivo的气质&#xff1f;产品&#xff1f;技术&#xff1f;又或是其他…

衰老抑制剂原知因起源金NMN热销,“海弗里克极限”将被打破?

美国著名生物学家列奥纳多 海弗里克 , 在 1961 年研究人类胎儿的细胞群体分裂次数时提出了著名的 " 海弗里克极限 " 理论。该理论认为 , 正常细胞分裂的周期是 2-3 年 , 分裂次数大概是 50 次 , 得出人类的极限寿命高达 150 岁。半个世纪后 , 世界上最长寿的人 , 打…

医院信管系统的设计与实现|Springboot+ Mysql+Java+ B/S结构(可运行源码+数据库+设计文档)

本项目包含可运行源码数据库LW&#xff0c;文末可获取本项目的所有资料。 推荐阅读100套最新项目持续更新中..... 2024年计算机毕业论文&#xff08;设计&#xff09;学生选题参考合集推荐收藏&#xff08;包含Springboot、jsp、ssmvue等技术项目合集&#xff09; 1. 系统功能…

阿里云实时计算Flink的产品化思考与实践【下】

摘要&#xff1a;本文整理自阿里云高级产品专家黄鹏程和阿里云技术专家陈婧敏在 FFA 2023 平台建设专场中的分享。内容主要为以下五部分&#xff1a; 阿里云实时计算 Flink 产品化思考 产品化实践 SQL 产品化思考及实践 展望 接上篇&#xff1a;阿里云实时计算Flink的产品…

SD 修复 Midjourney 有瑕疵照片

Midjourney V6 生成的照片在质感上有了一个巨大的提升。下面4张图就是 Midjourney V6 生成的。 如果仔细观察人物和老虎的面部&#xff0c;细节真的很丰富。 但仔细观察上面四张图的手部细节&#xff0c;就会发现至少有两只手是有问题的。这也是目前所有 AI 绘图工具面临的问题…

DARTS-PT: RETHINKING ARCHITECTURE SELECTION IN DIFFERENTIABLE NAS

Rethinking Architecture Selection in Differentiable NAS 论文链接&#xff1a;https://arxiv.org/abs/2108.04392v1 项目链接&#xff1a;https://github.com/ruocwang/darts-pt ABSTRACT 可微架构搜索(Differentiable Neural Architecture Search, NAS)是目前最流行的网…

鸿蒙OS开发实例:【应用级别文件浏览器】

介绍 HarmonyOS的沙盒机制完全屏蔽了应用对手机公共存储空间的访问&#xff0c;安全性提高已不言而喻。 本篇文章的主要目的是为了能通过一个简单工具&#xff0c;可视化的让一个新手能相对轻松的学习文件&数据存储。HarmonyOS 应用开发工具DevEco Studio也没有提供读取存…

新能源汽车充电桩常见类型及充电桩站场的智能监管方案设计

随着新能源汽车市场的迅猛发展&#xff0c;充电桩作为支持其运行的基础设施&#xff0c;也呈现出多样化的类型。这些充电桩不仅在外形和功能上存在差异&#xff0c;更在充电速度、充电方式以及使用场景等方面展现出独特的优势。 一、充电桩类型及区别 1、慢充桩&#xff08;交…

GenMedicalEval:医疗大语言模型综合评测框架

推荐一个开源的医疗大语言模型综合评价框架。 项目链接 https://github.com/MediaBrain-SJTU/GenMedicalEval 项目简介 我们提出了一个医疗大语言模型的综合评测框架&#xff0c;具有以下三大特点&#xff1a; 1.大规模综合性能评测&#xff1a;GenMedicalEval构建了一个覆盖…

stm32定时器中断函数回调函数

方式一&#xff1a;stm32定时器中断可以直接在硬件中断函数TIM3_IRQHandler执行。 在HAL库中可以注册回调函数&#xff0c;在定时器中断发生时调用注册的函数&#xff0c;这样可以统一接口&#xff0c;大大提高函数可读性&#xff0c;和硬件解耦提高程序可移植性。 使用过程如…

uniapp实现的数据选择器,支持H5、微信小程序

采用uniapp-vue3实现的数据选择器&#xff0c;支持H5、微信小程序&#xff08;其他小程序未测试过&#xff0c;可自行尝试&#xff09; 支持本地自定义过滤、远程接口过滤&#xff0c;为了避免弹窗面板超出边界的情况&#xff0c;自动计算弹窗面板安置的位置&#xff08;在微信…

327京东一面

1.项目相关 2.手撕SQL 两道 3.JMeter性能测试 首先&#xff0c;进行基准测试&#xff1a; 单用户测试&#xff08;单用户循环多次得到的数据&#xff09;&#xff1b;为多用户并发执行提供参考 其次&#xff0c;进行负载测试&#xff1a; 通过逐步增加系统负载&#xff0…

C波段卫星与5G的干扰排查及解决方案

作者介绍 一、方案背景 目前造成C波段卫星信号受5G信号干扰有以下几个原因&#xff1a; ●C波段&#xff08;3.4-4.2GHz&#xff09;和电信5G频段&#xff08;3.4-3.7GHz&#xff09;间存在频谱重叠。 ●地面终端接收到的卫星信号通常比蜂窝信号弱几个数量级&#xff0c;同频…

ATTCK学习笔记

ATT&CK 前言知识 威胁情报&#xff1a;一般为网络流量中或者操作系统上观察到的能高度表明计算机被入侵的痕迹&#xff0c;例如某病毒的Hash值、服务器的IP地址等等。简单来说&#xff0c;威胁情报就像是当计算机被入侵时所表现出来的某种特征&#xff0c;我们将这些威胁…

【氮化镓】GaN器件中关态应力诱导的损伤定位

概括总结&#xff1a; 这项研究通过低频1/f噪声测量方法&#xff0c;探究了在关态&#xff08;OFF-state&#xff09;应力作用下&#xff0c;AlGaN/GaN高电子迁移率晶体管&#xff08;HEMTs&#xff09;中由应力引起的损伤的定位。研究中结合了电致发光&#xff08;EL&#xf…

每天五分钟深度学习:使用神经网络完成人脸的特征点检测

本文重点 我们上一节课程中学习了如何利用神经网络对图片中的对象进行定位,也就是通过输出四个参数值bx、by、bℎ和bw给出图片中对象的边界框。 本节课程我们学习特征点的检测,神经网络可以通过输出图片中对象的特征点的(x,y)坐标来实现对目标特征的识别,我们看几个例子。…

华清远见STM32U5开发板助力2024嵌入式大赛ST赛道智能可穿戴设备及IOT选题项目开发

第七届&#xff08;2024&#xff09;全国大学生嵌入式芯片与系统设计竞赛&#xff08;以下简称“大赛”&#xff09;已经拉开帷幕&#xff0c;大赛的报名热潮正席卷而来&#xff0c;高校电子电气类相关专业&#xff08;电子、信息、计算机、自动化、电气、仪科等&#xff09;全…

如何提高知识库系统管理水平?

我们都有过这样的经历--遇到问题或紧急请求时&#xff0c;第一时间就是向知识库系统寻求帮助。很多时候&#xff0c;当你翻遍了无穷无尽的文档&#xff0c;却发现没有任何东西能够摆脱此时的困境&#xff0c;这时&#xff0c;向服务台提交工单成了不可避免的解决方式&#xff0…

深入理解数据结构第一弹——二叉树(1)——堆

前言&#xff1a; 在前面我们已经学习了数据结构的基础操作&#xff1a;顺序表和链表及其相关内容&#xff0c;今天我们来学一点有些难度的知识——数据结构中的二叉树&#xff0c;今天我们先来学习二叉树中堆的知识&#xff0c;这部分内容还是非常有意思的&#xff0c;下面我们…