81 lines
2.8 KiB
C++
81 lines
2.8 KiB
C++
// 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<FJsonObject> GetAllParameters();
|
|
|
|
// Post-Process Volume
|
|
bool SetPostProcessParameters(const TSharedPtr<FJsonObject>& Params);
|
|
TSharedPtr<FJsonObject> GetPostProcessParameters();
|
|
|
|
// Directional Light (Sun)
|
|
bool SetDirectionalLightParameters(const TSharedPtr<FJsonObject>& Params);
|
|
TSharedPtr<FJsonObject> GetDirectionalLightParameters();
|
|
|
|
// Sky Light
|
|
bool SetSkyLightParameters(const TSharedPtr<FJsonObject>& Params);
|
|
TSharedPtr<FJsonObject> GetSkyLightParameters();
|
|
|
|
// Exponential Height Fog
|
|
bool SetFogParameters(const TSharedPtr<FJsonObject>& Params);
|
|
TSharedPtr<FJsonObject> GetFogParameters();
|
|
|
|
// Camera
|
|
bool SetCameraParameters(const TSharedPtr<FJsonObject>& Params);
|
|
TSharedPtr<FJsonObject> GetCameraParameters();
|
|
|
|
// Render Quality
|
|
bool SetRenderQuality(const TSharedPtr<FJsonObject>& Settings);
|
|
|
|
// Asset Search
|
|
TArray<TSharedPtr<FJsonValue>> SearchAssets(const FString& Query, const FString& AssetType, int32 MaxResults);
|
|
TArray<TSharedPtr<FJsonValue>> 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<TSharedPtr<FJsonValue>> 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<FJsonObject> GetActorDetails(const FString& ActorId, bool bIncludeComponents, bool bIncludeMaterials);
|
|
|
|
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);
|
|
};
|