Navigation
API > API/Plugins > API/Plugins/LensComponent
Component for applying a post-process lens distortion effect to a CineCameraComponent on the same actor
| Name | ULensComponent |
| Type | class |
| Header File | /Engine/Plugins/VirtualProduction/LensComponent/Source/LensComponent/Public/LensComponent.h |
| Include Path | #include "LensComponent.h" |
Syntax
UCLASS (MinimalAPI, HideCategories=(Tags, Activation, Cooking, AssetUserData, Collision),
Meta=(BlueprintSpawnableComponent))
class ULensComponent : public UActorComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → ULensComponent
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ULensComponent() |
LensComponent.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bWasDistortionEvaluated | bool | Whether distortion was evaluated this tick | LensComponent.h | |
| bWasLiveLinkFIZUpdated | bool | Whether LiveLink FIZ was received this tick | LensComponent.h | |
| bWasNodalOffsetAppliedThisTick | bool | Whether or not nodal offset was applied to a tracked component this tick | LensComponent.h | |
| FLensComponentDetailCustomization | friend | LensComponent.h | ||
| LastFocalLength | float | Latest focal length of the target camera, used to track external changes to the original (no overscan applied) focal length | LensComponent.h | |
| LiveLinkFocus | float | Latest LiveLink FIZ data, used to evaluate the LensFile | LensComponent.h | |
| LiveLinkIris | float | LensComponent.h | ||
| LiveLinkZoom | float | LensComponent.h | ||
| OnLensComponentModelChangedDelegate | FOnLensComponentModelChanged | Delegate that is triggered when the LensModel changes | LensComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ApplyNodalOffset
(
USceneComponent* ComponentToOffset, |
Manually apply nodal offset to the specified component. | LensComponent.h |
|
void ClearDistortionState() |
Reset the distortion state to defaults to represent "no distortion" | LensComponent.h |
|
FCameraFilmbackSettings GetCroppedFilmback() |
Get the cropped filmback (only relevant if the filmback override setting is set to use the CroppedFilmback | LensComponent.h |
|
PRAGMA_DISABLE_DEPRECATION_WARNINGS FDistortionHandlerPicker GetDistortionHandlerPicker() |
LensComponent.h | ||
EDistortionSource GetDistortionSource() |
Get the distortion source setting | LensComponent.h |
|
FLensDistortionState GetDistortionState() |
Get the current distortion state | LensComponent.h |
|
EFilmbackOverrideSource GetFilmbackOverrideSetting() |
Get the filmback override setting | LensComponent.h |
|
EFIZEvaluationMode GetFIZEvaluationMode() |
Get the evaluation mode used to evaluate the LensFile | LensComponent.h |
|
ULensDistortionModelHandlerBase * GetLensDistortionHandler() |
Returns the LensDistortionHandler in use for the current LensModel | LensComponent.h |
|
ULensFile * GetLensFile() |
Get the LensFile used by this component | LensComponent.h |
|
const FLensFileEvaluationInputs & GetLensFileEvaluationInputs() |
Get the data used by this component to evaluate the LensFile | LensComponent.h |
|
FLensFilePicker GetLensFilePicker() |
Get the LensFile picker used by this component | LensComponent.h |
|
TSubclassOf< ULensModel > GetLensModel() |
Get the current lens model | LensComponent.h |
|
float GetOriginalFocalLength() |
Get the original (not adjusted for overscan) focal length of the camera | LensComponent.h |
|
float GetOverscanMultiplier() |
Get the evaluation mode used to evaluate the LensFile | LensComponent.h |
|
FOnLensComponentModelChanged & OnLensComponentModelChanged() |
Returns the delegate that is triggered when the LensModel changes | LensComponent.h | |
void ReapplyNodalOffset() |
Reset the tracked component back to its original tracked pose and reapply nodal offset to it by re-evaluating the LensFile | LensComponent.h | |
void SetApplyDistortion
(
bool bApply |
Set whether distortion should be applied to the target camera | LensComponent.h |
|
void SetApplyNodalOffsetOnTick
(
bool bApplyNodalOffset |
Set whether nodal offset should be automatically applied during this component's tick | LensComponent.h |
|
void SetCroppedFilmback
(
FCameraFilmbackSettings Filmback |
Set the cropped filmback (only relevant if the filmback override setting is set to use the CroppedFilmback | LensComponent.h |
|
void SetDistortionSource
(
EDistortionSource Source |
Set the distortion source setting | LensComponent.h |
|
void SetDistortionState
(
FLensDistortionState State |
Set the current distortion state | LensComponent.h |
|
void SetFilmbackOverrideSetting
(
EFilmbackOverrideSource Setting |
Set the filmback override setting | LensComponent.h |
|
void SetFIZEvaluationMode
(
EFIZEvaluationMode Mode |
Set the evaluation mode used to evaluate the LensFile | LensComponent.h |
|
void SetLensFile
(
ULensFile* LensFile |
Set the LensFile used by this component | LensComponent.h |
|
void SetLensFileEvaluationInputs
(
float InFocus, |
Set the data used by this component to evaluate the LensFile | LensComponent.h |
|
void SetLensFilePicker
(
FLensFilePicker LensFile |
Set the LensFile picker used by this component | LensComponent.h |
|
void SetLensModel
(
TSubclassOf< ULensModel > Model |
Set the current lens model | LensComponent.h |
|
void SetOverscanMultiplier
(
float Multiplier |
Set the LensFile used by this component | LensComponent.h |
|
bool ShouldApplyDistortion() |
Whether distortion should be applied to the target camera | LensComponent.h |
|
bool ShouldApplyNodalOffsetOnTick() |
Returns true if nodal offset will be automatically applied during this component's tick, false otherwise | LensComponent.h |
|
bool WasDistortionEvaluated() |
Returns true if distortion was evaluated this tick | LensComponent.h |
|
bool WasNodalOffsetAppliedThisTick() |
Returns true if nodal offset was applied during the current tick, false otherwise | LensComponent.h |
|
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void DestroyComponent
(
bool bPromoteChildren |
LensComponent.h | ||
virtual void OnRegister() |
LensComponent.h | ||
virtual void OnUnregister() |
LensComponent.h | ||
virtual void TickComponent
(
float DeltaTime, |
LensComponent.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostDuplicate
(
bool bDuplicateForPIE |
LensComponent.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
LensComponent.h | ||
virtual void PostEditImport() |
LensComponent.h | ||
virtual void PostLoad() |
LensComponent.h | ||
virtual void Serialize
(
FArchive& Ar |
LensComponent.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| DistortionSource_DEPRECATED | PRAGMA_DISABLE_DEPRECATION_WARNINGS FDistortionHandlerPicker | LensComponent.h |
|
|
| OriginalCameraLocation_DEPRECATED | FVector | LensComponent.h | ||
| OriginalCameraRotation_DEPRECATED | FRotator | LensComponent.h |