Struct XRCameraIntrinsics | AR Subsystems | 3.1.10
docs.unity3d.com
    Show / Hide Table of Contents

    Struct XRCameraIntrinsics

    Camera intrinsics describe physical characteristics of a camera.

    Namespace: UnityEngine.XR.ARSubsystems
    Syntax
    public struct XRCameraIntrinsics : IEquatable<XRCameraIntrinsics>
    Remarks

    These intrinsics are based on a pinhole camera model. A pinhole camera is a simple type of lens-less camera, a box with a single pinhole in one side. Rays of light enter the pinhole and land on the opposite wall of the box (the image plane), forming an image. Most cameras use larger apertures with lenses to focus the light, but the pinhole camera provides a simplified mathematical model.

    Constructors

    XRCameraIntrinsics(Vector2, Vector2, Vector2Int)

    Constructs a XRCameraIntrinsics from the given parameters.

    Declaration
    public XRCameraIntrinsics(Vector2 focalLength, Vector2 principalPoint, Vector2Int resolution)
    Parameters
    Type Name Description
    Vector2 focalLength

    The focal length in pixels.

    Vector2 principalPoint

    The principal point from the top-left of the image, in pixels.

    Vector2Int resolution

    The dimensions of the image.

    Properties

    focalLength

    The focal length in pixels.

    Declaration
    public Vector2 focalLength { get; }
    Property Value
    Type Description
    Vector2

    The focal length in pixels.

    Remarks

    The focal length is the distance between the camera's pinhole and the image plane. In a pinhole camera, the x and y values would be the same, but these can vary for real cameras.

    principalPoint

    The principal point from the top-left corner of the image, expressed in pixels.

    Declaration
    public Vector2 principalPoint { get; }
    Property Value
    Type Description
    Vector2

    The principal point from the top-left corner of the image, expressed in pixels.

    Remarks

    The principal point is the point of intersection between the image plane and a line perpendicular to the image plane passing through the camera's pinhole.

    resolution

    The dimensions of the image in pixels.

    Declaration
    public Vector2Int resolution { get; }
    Property Value
    Type Description
    Vector2Int

    The dimensions of the image in pixels.

    Methods

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)

    Equals(XRCameraIntrinsics)

    Declaration
    public bool Equals(XRCameraIntrinsics other)
    Parameters
    Type Name Description
    XRCameraIntrinsics other
    Returns
    Type Description
    Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    ValueType.ToString()

    Operators

    Equality(XRCameraIntrinsics, XRCameraIntrinsics)

    Declaration
    public static bool operator ==(XRCameraIntrinsics lhs, XRCameraIntrinsics rhs)
    Parameters
    Type Name Description
    XRCameraIntrinsics lhs
    XRCameraIntrinsics rhs
    Returns
    Type Description
    Boolean

    Inequality(XRCameraIntrinsics, XRCameraIntrinsics)

    Declaration
    public static bool operator !=(XRCameraIntrinsics lhs, XRCameraIntrinsics rhs)
    Parameters
    Type Name Description
    XRCameraIntrinsics lhs
    XRCameraIntrinsics rhs
    Returns
    Type Description
    Boolean
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023