Navigation
API > API/Plugins > API/Plugins/CameraCalibrationCore
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- ULensComponent
References
| Module | CameraCalibrationCore |
| Header | /Engine/Plugins/VirtualProduction/CameraCalibrationCore/Source/CameraCalibrationCore/Public/LensComponent.h |
| Include | #include "LensComponent.h" |
Syntax
UCLASS&40;HideCategories&61;&40;Tags, Activation, Cooking, AssetUserData, Collision&41;,
Meta&61;&40;BlueprintSpawnableComponent&41;&41;
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" | ||
| FCameraFilmbackSettings | Get the cropped filmback (only relevant if the filmback override setting is set to use the CroppedFilmback | ||
| 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 | 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 | ||
| bool | Returns true if distortion was evaluated this tick | ||
| bool | Returns true if nodal offset was applied during the current tick, false otherwise |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| void | DestroyComponent
(
bool bPromoteChildren |
Unregister the component, remove it from its outer Actor's Components array and mark for pending kill. | |
| void | OnRegister () |
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. | |
| void | OnUnregister () |
Called when a component is unregistered. | |
| void | TickComponent
(
float DeltaTime, |
Function called every frame on this ActorComponent. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | PostDuplicate
(
bool bDuplicateForPIE |
Called after duplication & serialization and before PostLoad. | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | Called after importing property values for this object (paste, duplicate or .t3d import) Allow the object to perform any cleanup for properties which shouldn't be duplicated or are unsupported by the script serialization | ||
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| PRAGMA_DISABLE_DEPRECATION_WARNINGSFDistortionHandlerPicker | DistortionSource_DEPRECATED | This property has been deprecated. The handler picker is no longer used to identify a distortion handler. Use the LensDistortionHandlerMap to get a handler for the current LensModel. | |
| FVector | OriginalCameraLocation_DEPRECATED | This property has been deprecated. The LensDistortion component no longer tracks the attached camera's original location. | |
| FRotator | OriginalCameraRotation_DEPRECATED | This property has been deprecated. The LensDistortion component no longer tracks the attached camera's original rotation. |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| PRAGMA_DISABLE_DEPRECATION_WARNINGSFDistortionHandlerPicker | This property is deprecated. Use GetDistortionSource() and SetDistortionSource() instead. |