// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "ThumbnailHelpers.h" #include "UObject/ObjectPtr.h" #include "UObject/WeakObjectPtrTemplates.h" class AActor; class AGeometryCacheActor; class AGroomActor; class AGroomActor; class ASkeletalMeshActor; class UGroomBindingAsset; class FGroomBindingAssetThumbnailScene : public FThumbnailPreviewScene { public: /** Constructor */ HAIRSTRANDSEDITOR_API FGroomBindingAssetThumbnailScene(); /** Sets the groom binding to use in the next CreateView() */ HAIRSTRANDSEDITOR_API void SetGroomBindingAsset(UGroomBindingAsset* GroomBindingAsset); /** Sets the groom binding to use in the next CreateView() */ HAIRSTRANDSEDITOR_API void CleanupSceneAfterThumbnailRender(); protected: // FThumbnailPreviewScene implementation HAIRSTRANDSEDITOR_API virtual void GetViewMatrixParameters(const float InFOVDegrees, FVector& OutOrigin, float& OutOrbitPitch, float& OutOrbitYaw, float& OutOrbitZoom) const override; HAIRSTRANDSEDITOR_API virtual bool ShouldClampOrbitZoom() const override; private: /** The groom actor used to display all groom asset thumbnails */ TObjectPtr PreviewGroomActor; /** The skeletal mesh actor for which the binding is created that will be previewed */ TObjectPtr PreviewSkeletalMeshActor; /** The geometry cache actor for which the binding is created that will be previewed */ TObjectPtr PreviewGeometryCacheActor; /** Actor used as the root of the scene for thumbnail */ TObjectPtr PreviewRootActor = nullptr; TWeakObjectPtr CachedBindingAsset; };