// Copyright Ralpha Team. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "UObject/NoExportTypes.h" #include "Dom/JsonObject.h" #include "Dom/JsonValue.h" #include "RalphaParameterBridge.generated.h" class APostProcessVolume; class ADirectionalLight; class ASkyLight; class AExponentialHeightFog; class ACineCameraActor; /** * Bridge between MCP commands and UE5 rendering systems. * Handles getting/setting parameters on post-process volumes, lights, fog, cameras, etc. */ UCLASS(BlueprintType) class RALPHACORE_API URalphaParameterBridge : public UObject { GENERATED_BODY() public: URalphaParameterBridge(); // Get all current rendering parameters TSharedPtr GetAllParameters(); // Post-Process Volume bool SetPostProcessParameters(const TSharedPtr& Params); TSharedPtr GetPostProcessParameters(); // Directional Light (Sun) bool SetDirectionalLightParameters(const TSharedPtr& Params); TSharedPtr GetDirectionalLightParameters(); // Sky Light bool SetSkyLightParameters(const TSharedPtr& Params); TSharedPtr GetSkyLightParameters(); // Exponential Height Fog bool SetFogParameters(const TSharedPtr& Params); TSharedPtr GetFogParameters(); // Camera bool SetCameraParameters(const TSharedPtr& Params); TSharedPtr GetCameraParameters(); // Render Quality bool SetRenderQuality(const TSharedPtr& Settings); // Asset Search TArray> SearchAssets(const FString& Query, const FString& AssetType, int32 MaxResults); TArray> ListAssets(const FString& FolderPath, const FString& AssetType, bool bRecursive); // Actor Management bool SpawnActor(const FString& AssetPath, const FVector& Location, const FRotator& Rotation, float Scale, const FString& ActorLabel, FString& OutActorId); bool DeleteActor(const FString& ActorId); TArray> ListActors(const FString& ClassFilter, const FString& NameFilter, bool bIncludeTransforms); bool SetActorTransform(const FString& ActorId, const FVector* Location, const FRotator* Rotation, const float* Scale, bool bRelative); TSharedPtr GetActorDetails(const FString& ActorId, bool bIncludeComponents, bool bIncludeMaterials); bool SetActorMaterial(const FString& ActorId, const FString& MaterialPath, int32 MaterialIndex); // Create a simple material with specified properties and apply to actor bool SetActorSimpleMaterial(const FString& ActorId, const FLinearColor& BaseColor, float Metallic, float Roughness, float Opacity); // Scene Setup - creates required actors for rendering control TSharedPtr SetupScene(); private: // Find actors of specific types in the world APostProcessVolume* FindPostProcessVolume(); ADirectionalLight* FindDirectionalLight(); ASkyLight* FindSkyLight(); AExponentialHeightFog* FindExponentialHeightFog(); ACineCameraActor* FindCineCamera(); // Get the current world UWorld* GetCurrentWorld(); // Parse hex color string to FLinearColor FLinearColor ParseHexColor(const FString& HexColor); FString ColorToHex(const FLinearColor& Color); // Refresh BP_Sky_Sphere when sun position changes void RefreshSkySphere(); };