Files
planet/ue_client/Source/PlanetClient/PlanetGameMode.cpp
T
linkongandClaude Sonnet 4.6 1e6f4b338b feat: add UE5 LED display client — backend API, C++ source, stereo framework
Backend:
- Add /api/v1/ue/* endpoints (compute-points, cables, landing-points, satellites, status)
  returning flat JSON optimised for UE5 C++ parsing

UE5 client (ue_client/):
- PlanetDataManager: HTTP fetch + local mock JSON loader, spawns ComputePointActors
- ComputePointActor / InteractiveObjectBase: hover/select state, material switching
- GlobeInteractionComponent: drag-to-rotate via CesiumGeoreference origin shift, inertia, zoom
- StereoRenderingManager: runtime SbS/TbB stereo toggle, IPD control (format TBD)
- MotionCaptureInterface: protocol-agnostic gesture/rotate/zoom delegate interface (impl TBD)
- PlanetPlayerController: unified mouse + motion-capture input routing
- PlanetGameMode, Build.cs, Config, mock data

Docs:
- ue5_mvp_fused_plan.md updated to v3.0 for LED display context
- ue_client_setup_guide.md: step-by-step editor setup guide
- ue_todo.md: pending items blocked on vendor answers (stereo format + mocap protocol)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 18:39:05 +08:00

29 lines
977 B
C++

#include "PlanetGameMode.h"
#include "PlanetPlayerController.h"
#include "StereoRenderingManager.h"
#include "GameFramework/SpectatorPawn.h"
#include "Engine/World.h"
APlanetGameMode::APlanetGameMode()
{
PlayerControllerClass = APlanetPlayerController::StaticClass();
// 真实运行时在 World Settings 里改为 CesiumDynamicPawn
DefaultPawnClass = ASpectatorPawn::StaticClass();
}
void APlanetGameMode::BeginPlay()
{
Super::BeginPlay();
// 自动在场景里生成 StereoRenderingManager(如果场景里没有的话)
TArray<AActor*> Found;
UGameplayStatics::GetAllActorsOfClass(GetWorld(), AStereoRenderingManager::StaticClass(), Found);
if (Found.Num() == 0)
{
GetWorld()->SpawnActor<AStereoRenderingManager>(
AStereoRenderingManager::StaticClass(),
FVector::ZeroVector, FRotator::ZeroRotator);
UE_LOG(LogTemp, Log, TEXT("PlanetGameMode: 已自动生成 StereoRenderingManager"));
}
}