Better support for blueprints in SceneCaptureSensor
This commit is contained in:
parent
93809422bd
commit
8cfee9696d
|
@ -46,25 +46,26 @@ public:
|
||||||
return ImageHeight;
|
return ImageHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
UFUNCTION(BlueprintCallable)
|
||||||
|
|
||||||
void EnablePostProcessingEffects(bool Enable = true)
|
void EnablePostProcessingEffects(bool Enable = true)
|
||||||
{
|
{
|
||||||
bEnablePostProcessingEffects = Enable;
|
bEnablePostProcessingEffects = Enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
UFUNCTION(BlueprintCallable)
|
||||||
|
|
||||||
bool ArePostProcessingEffectsEnabled() const
|
bool ArePostProcessingEffectsEnabled() const
|
||||||
{
|
{
|
||||||
return bEnablePostProcessingEffects;
|
return bEnablePostProcessingEffects;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable)
|
||||||
void SetFOVAngle(float FOVAngle);
|
void SetFOVAngle(float FOVAngle);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable)
|
||||||
float GetFOVAngle() const;
|
float GetFOVAngle() const;
|
||||||
|
|
||||||
/// Use for debugging purposes only.
|
/// Use for debugging purposes only.
|
||||||
|
UFUNCTION(BlueprintCallable)
|
||||||
bool ReadPixels(TArray<FColor> &BitMap) const
|
bool ReadPixels(TArray<FColor> &BitMap) const
|
||||||
{
|
{
|
||||||
check(CaptureRenderTarget != nullptr);
|
check(CaptureRenderTarget != nullptr);
|
||||||
|
@ -72,6 +73,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Use for debugging purposes only.
|
/// Use for debugging purposes only.
|
||||||
|
UFUNCTION(BlueprintCallable)
|
||||||
bool SaveCaptureToDisk(const FString &FilePath) const
|
bool SaveCaptureToDisk(const FString &FilePath) const
|
||||||
{
|
{
|
||||||
check(CaptureRenderTarget != nullptr);
|
check(CaptureRenderTarget != nullptr);
|
||||||
|
@ -95,19 +97,19 @@ private:
|
||||||
void UpdateDrawFrustum();
|
void UpdateDrawFrustum();
|
||||||
|
|
||||||
/// Image width in pixels.
|
/// Image width in pixels.
|
||||||
UPROPERTY(Category = "Scene Capture", EditAnywhere)
|
UPROPERTY(EditAnywhere)
|
||||||
uint32 ImageWidth = 800u;
|
uint32 ImageWidth = 800u;
|
||||||
|
|
||||||
/// Image height in pixels.
|
/// Image height in pixels.
|
||||||
UPROPERTY(Category = "Scene Capture", EditAnywhere)
|
UPROPERTY(EditAnywhere)
|
||||||
uint32 ImageHeight = 600u;
|
uint32 ImageHeight = 600u;
|
||||||
|
|
||||||
/// Whether to render the post-processing effects present in the scene.
|
/// Whether to render the post-processing effects present in the scene.
|
||||||
UPROPERTY(Category = "Scene Capture", EditAnywhere)
|
UPROPERTY(EditAnywhere)
|
||||||
bool bEnablePostProcessingEffects = true;
|
bool bEnablePostProcessingEffects = true;
|
||||||
|
|
||||||
/// Render target necessary for scene capture.
|
/// Render target necessary for scene capture.
|
||||||
UPROPERTY()
|
UPROPERTY(EditAnywhere)
|
||||||
UTextureRenderTarget2D *CaptureRenderTarget = nullptr;
|
UTextureRenderTarget2D *CaptureRenderTarget = nullptr;
|
||||||
|
|
||||||
/// Scene capture component.
|
/// Scene capture component.
|
||||||
|
|
Loading…
Reference in New Issue