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>
96 lines
3.4 KiB
C++
96 lines
3.4 KiB
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/Actor.h"
|
|
#include "PlanetDataTypes.h"
|
|
#include "ComputePointActor.generated.h"
|
|
|
|
class UStaticMeshComponent;
|
|
class UBillboardComponent;
|
|
|
|
UENUM(BlueprintType)
|
|
enum class EPointVisualState : uint8
|
|
{
|
|
Normal UMETA(DisplayName="Normal"),
|
|
Hovered UMETA(DisplayName="Hovered"),
|
|
Selected UMETA(DisplayName="Selected"),
|
|
};
|
|
|
|
/**
|
|
* AComputePointActor
|
|
*
|
|
* Represents one supercomputer data point on the Cesium globe.
|
|
*
|
|
* Usage:
|
|
* 1. Create a Blueprint subclass: Content Browser → New Blueprint →
|
|
* search "AComputePointActor" as parent class → name it BP_ComputePointActor
|
|
* 2. In the Blueprint, assign a sphere mesh to SphereMesh (Engine/BasicShapes/Sphere)
|
|
* 3. Assign a material to NormalMaterial / HoveredMaterial / SelectedMaterial
|
|
* 4. Set this Blueprint class in APlanetDataManager → ComputePointClass
|
|
*/
|
|
UCLASS(BlueprintType, Blueprintable)
|
|
class PLANETCLIENT_API AComputePointActor : public AActor
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
AComputePointActor();
|
|
|
|
// -----------------------------------------------------------------------
|
|
// Components
|
|
// -----------------------------------------------------------------------
|
|
|
|
// The visible sphere. Assign a sphere mesh in your Blueprint subclass.
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Planet|Components")
|
|
UStaticMeshComponent* SphereMesh;
|
|
|
|
// -----------------------------------------------------------------------
|
|
// Materials (assign in Blueprint subclass)
|
|
// -----------------------------------------------------------------------
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Planet|Visual")
|
|
UMaterialInterface* NormalMaterial;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Planet|Visual")
|
|
UMaterialInterface* HoveredMaterial;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Planet|Visual")
|
|
UMaterialInterface* SelectedMaterial;
|
|
|
|
// -----------------------------------------------------------------------
|
|
// Point scale (world units). Tweak this in the Details Panel.
|
|
// -----------------------------------------------------------------------
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Planet|Visual")
|
|
float PointScale = 80000.f;
|
|
|
|
// -----------------------------------------------------------------------
|
|
// Data (set by APlanetDataManager after spawn)
|
|
// -----------------------------------------------------------------------
|
|
UPROPERTY(BlueprintReadOnly, Category="Planet|Data")
|
|
FComputePoint PointData;
|
|
|
|
UPROPERTY(BlueprintReadOnly, Category="Planet|Data")
|
|
EPointVisualState VisualState = EPointVisualState::Normal;
|
|
|
|
// -----------------------------------------------------------------------
|
|
// Public API
|
|
// -----------------------------------------------------------------------
|
|
|
|
// Called by APlanetDataManager immediately after spawning.
|
|
UFUNCTION(BlueprintCallable, Category="Planet")
|
|
void SetPointData(const FComputePoint& Data);
|
|
|
|
// Called by PlanetPlayerController on hover/select.
|
|
UFUNCTION(BlueprintCallable, Category="Planet")
|
|
void SetVisualState(EPointVisualState NewState);
|
|
|
|
// Convenience: is this point currently selected?
|
|
UFUNCTION(BlueprintPure, Category="Planet")
|
|
bool IsSelected() const { return VisualState == EPointVisualState::Selected; }
|
|
|
|
protected:
|
|
virtual void BeginPlay() override;
|
|
|
|
private:
|
|
void ApplyMaterial();
|
|
};
|