Struct LensIntrinsics
Contains all the parameters needed to model a physical camera lens.
Namespace: Unity.LiveCapture.VirtualCamera
Syntax
public struct LensIntrinsics : IEquatable<LensIntrinsics>
Fields
DefaultParams
The default Lens.
Declaration
public static readonly LensIntrinsics DefaultParams
Field Value
Type | Description |
---|---|
LensIntrinsics |
Properties
Anamorphism
Stretch the sensor to simulate an anamorphic look. Positive values distort the Camera vertically, negative will distort the Camera horizontally.
Declaration
public float Anamorphism { get; set; }
Property Value
Type | Description |
---|---|
Single |
ApertureRange
Range of the aperture of the lens.
Declaration
public Vector2 ApertureRange { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
BarrelClipping
The strength of the “cat eye” effect. You can see this effect on bokeh as a result of lens shadowing (distortion along the edges of the frame).
Declaration
public float BarrelClipping { get; set; }
Property Value
Type | Description |
---|---|
Single |
BladeCount
Number of diaphragm blades the Camera uses to form the aperture.
Declaration
public int BladeCount { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
CloseFocusDistance
The lens close focus distance.
Declaration
public float CloseFocusDistance { get; set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
The close focus distance represents the minimal focus distance supported by the lens.
Curvature
Maps an aperture range to blade curvature.
Declaration
public Vector2 Curvature { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Remarks
Aperture blades become more visible on bokeh at higher aperture values. Tweak this range to define how the bokeh looks at a given aperture. The minimum value results in fully-curved, perfectly-circular bokeh, and the maximum value results in fully-shaped bokeh with visible aperture blades.
FocalLengthRange
Range of the focal length of the lens.
Declaration
public Vector2 FocalLengthRange { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
LensShift
The horizontal and vertical shift from the center.
Declaration
public Vector2 LensShift { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Remarks
Values are multiples of the sensor size; for example, a shift of 0.5 along the X axis offsets the sensor by half its horizontal size. You can use lens shifts to correct distortion that occurs when the camera is at an angle to the subject (for example, converging parallel lines). Shift the lens along either axis to make the camera frustum oblique.
Methods
Equals(Object)
Determines whether the specified object is equal to the current LensIntrinsics.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object to compare with the current LensIntrinsics. |
Returns
Type | Description |
---|---|
Boolean | true if the specified object is equal to the current LensIntrinsics; otherwise, false. |
Equals(LensIntrinsics)
Determines whether the specified LensIntrinsics is equal to the current LensIntrinsics.
Declaration
public bool Equals(LensIntrinsics other)
Parameters
Type | Name | Description |
---|---|---|
LensIntrinsics | other | The LensIntrinsics to compare with the current LensIntrinsics. |
Returns
Type | Description |
---|---|
Boolean | true if the specified LensIntrinsics is equal to the current LensIntrinsics; otherwise, false. |
GetHashCode()
Gets the hash code for the LensIntrinsics.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | The hash value generated for this LensIntrinsics. |
Operators
Equality(LensIntrinsics, LensIntrinsics)
Determines whether the two specified LensIntrinsics are equal.
Declaration
public static bool operator ==(LensIntrinsics a, LensIntrinsics b)
Parameters
Type | Name | Description |
---|---|---|
LensIntrinsics | a | The first LensIntrinsics. |
LensIntrinsics | b | The second LensIntrinsics. |
Returns
Type | Description |
---|---|
Boolean | true if the specified LensIntrinsics are equal; otherwise, false. |
Inequality(LensIntrinsics, LensIntrinsics)
Determines whether the two specified LensIntrinsics are different.
Declaration
public static bool operator !=(LensIntrinsics a, LensIntrinsics b)
Parameters
Type | Name | Description |
---|---|---|
LensIntrinsics | a | The first LensIntrinsics. |
LensIntrinsics | b | The second LensIntrinsics. |
Returns
Type | Description |
---|---|
Boolean | true if the specified LensIntrinsics are different; otherwise, false. |