Navigation
API > API/Plugins > API/Plugins/LensComponent
Inheritance Hierarchy
- UActorComponent
- ULensComponent
References
| Module | LensComponent |
| Header | /Engine/Plugins/VirtualProduction/LensComponent/Source/LensComponent/Public/LensComponent.h |
| Include | #include "LensComponent.h" |
Syntax
UCLASS (HideCategories=(Tags, Activation, Cooking, AssetUserData, Collision),
Meta=(BlueprintSpawnableComponent))
class ULensComponent : public UActorComponent
Remarks
Component for applying a post-process lens distortion effect to a CineCameraComponent on the same actor
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bApplyDistortion | Whether or not to apply distortion to the target camera component | |
| bool | bApplyNodalOffsetOnTick | If checked, nodal offset will be applied automatically when this component ticks. | |
| bool | bIsDistortionSetup | Whether a distortion effect is currently being applied to the target camera component | |
| bool | bScaleOverscan | Whether to scale the computed overscan by the overscan percentage | |
| FCameraFilmbackSettings | CroppedFilmback | Cropped filmback to use if the filmback override settings are set to use it | |
| FLensDistortionState | DistortionState | The current distortion state | |
| EDistortionSource | DistortionStateSource | Specifies from where the distortion state information comes | |
| FLensFileEvaluationInputs | EvalInputs | Inputs to LensFile evaluation | |
| EFIZEvaluationMode | EvaluationMode | Specify how the Lens File should be evaluated | |
| EFilmbackOverrideSource | FilmbackOverride | Controls whether this component can override the camera's filmback, and if so, which override to use | |
| TObjectPtr< UCineCameraComponent > | LastCameraComponent | Cached most recent target camera, used to clean up the old camera when the user changes the target | |
| TObjectPtr< UMaterialInstanceDynamic > | LastDistortionMID | Cached MID last applied to the target camera | |
| TMap< TSubclassOf< ULensModel >, TObjectPtr< ULensDistortionModelHandlerBase > > | LensDistortionHandlerMap | Map of lens models to handlers | |
| FLensFilePicker | LensFilePicker | Lens File used to drive distortion with current camera settings | |
| TSubclassOf< ULensModel > | LensModel | The current lens model used for distortion | |
| float | OriginalFocalLength | Focal length of the target camera before any overscan has been applied | |
| FTransform | OriginalTrackedComponentTransform | Serialized transform of the TrackedComponent prior to nodal offset being applied | |
| float | OverscanMultiplier | The percentage of the computed overscan that should be applied to the target camera | |
| FComponentReference | TargetCameraComponent | The CineCameraComponent on which to apply the post-process distortion effect | |
| TWeakObjectPtr< USceneComponent > | TrackedComponent | Scene component that should have nodal offset applied | |
| FString | TrackedComponentName | Serialized name of the TrackedComponent, used to determine which component to re-apply nodal offset to in spawnables | |
| TWeakObjectPtr< ULensFile > | WeakCachedLensFile | Weak pointer to the currently set LensFile. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | ApplyNodalOffset
(
USceneComponent* ComponentToOffset, |
Manually apply nodal offset to the specified component. | |
| void | Reset the distortion state to defaults to represent "no distortion" | ||
| void | DestroyComponent
(
bool bPromoteChildren |
||
| FCameraFilmbackSettings | Get the cropped filmback (only relevant if the filmback override setting is set to use the CroppedFilmback | ||
| PRAGMA_DISABLE_DEPRECATION_WARNINGS FDistortionHandlerPicker | |||
| EDistortionSource | Get the distortion source setting | ||
| FLensDistortionState | Get the current distortion state | ||
| EFilmbackOverrideSource | Get the filmback override setting | ||
| EFIZEvaluationMode | Get the evaluation mode used to evaluate the LensFile | ||
| ULensDistortionModelHandlerBase * | Returns the LensDistortionHandler in use for the current LensModel | ||
| ULensFile * | GetLensFile () |
Get the LensFile used by this component | |
| const FLensFileEvaluationInputs & | Get the data used by this component to evaluate the LensFile | ||
| FLensFilePicker | Get the LensFile picker used by this component | ||
| TSubclassOf< ULensModel > | GetLensModel () |
Get the current lens model | |
| float | Get the original (not adjusted for overscan) focal length of the camera | ||
| float | Get the evaluation mode used to evaluate the LensFile | ||
| FOnLensComponentModelChanged & | Returns the delegate that is triggered when the LensModel changes | ||
| void | OnRegister () |
||
| void | OnUnregister () |
||
| void | PostDuplicate
(
bool bDuplicateForPIE |
||
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
||
| void | |||
| void | PostLoad () |
||
| void | Reset the tracked component back to its original tracked pose and reapply nodal offset to it by re-evaluating the LensFile | ||
| void | SetApplyDistortion
(
bool bApply |
Set whether distortion should be applied to the target camera | |
| void | SetApplyNodalOffsetOnTick
(
bool bApplyNodalOffset |
Set whether nodal offset should be automatically applied during this component's tick | |
| void | SetCroppedFilmback
(
FCameraFilmbackSettings Filmback |
Set the cropped filmback (only relevant if the filmback override setting is set to use the CroppedFilmback | |
| void | SetDistortionSource
(
EDistortionSource Source |
Set the distortion source setting | |
| void | SetDistortionState
(
FLensDistortionState State |
Set the current distortion state | |
| void | SetFilmbackOverrideSetting
(
EFilmbackOverrideSource Setting |
Set the filmback override setting | |
| void | SetFIZEvaluationMode
(
EFIZEvaluationMode Mode |
Set the evaluation mode used to evaluate the LensFile | |
| void | SetLensFile
(
ULensFile* LensFile |
Set the LensFile used by this component | |
| void | SetLensFilePicker
(
FLensFilePicker LensFile |
Set the LensFile picker used by this component | |
| void | SetLensModel
(
TSubclassOf< ULensModel > Model |
Set the current lens model | |
| void | SetOverscanMultiplier
(
float Multiplier |
Set the LensFile used by this component | |
| bool | Whether distortion should be applied to the target camera | ||
| bool | Returns true if nodal offset will be automatically applied during this component's tick, false otherwise | ||
| void | TickComponent
(
float DeltaTime, |
||
| bool | Returns true if distortion was evaluated this tick | ||
| bool | Returns true if nodal offset was applied during the current tick, false otherwise |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| PRAGMA_DISABLE_DEPRECATION_WARNINGS FDistortionHandlerPicker | DistortionSource_DEPRECATED | ||
| FVector | OriginalCameraLocation_DEPRECATED | ||
| FRotator | OriginalCameraRotation_DEPRECATED |