Files
UnrealEngineUWP/Engine/Source/Runtime/IESFile/Public/IESConverter.h
Marc Audy 4c1bb11c29 Merge UE5/Release-Engine-Staging to UE5/Main @ 14548662
This represents UE4/Main @ 14525125 + cherrypicked fixes
#skipundocheck

[CL 14551026 by Marc Audy in ue5-main branch]
2020-10-22 19:19:16 -04:00

58 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
/**
* To load the IES file image format. IES files exist for many real world lights. The file stores how much light is emitted in a specific direction.
* The data is usually measured but tools to paint IES files exist.
*/
class IESFILE_API FIESConverter
{
public:
/** is loading the file, can take some time, success can be checked with IsValid() */
FIESConverter(const uint8* Buffer, uint32 BufferLength);
/**
* @return true if the photometric data are valid
* @note Call GetError to get a description of the error
*/
bool IsValid() const;
/**
* @return a brief description of the reason why the IES data is invalid
*/
const TCHAR* GetError() const;
/**
* @return Multiplier as the texture is normalized
*/
float GetMultiplier() const
{
return Multiplier;
}
/**
* @return data to create UTextureProfile
*/
const TArray<uint8>& GetRawData() const
{
return RawData;
}
uint32 GetWidth() const;
uint32 GetHeight() const;
/**
* @return brightness in Lumens
*/
float GetBrightness() const;
private:
TArray<uint8> RawData;
float Multiplier;
TSharedPtr<class FIESLoader> Impl;
};