Show / Hide Table of Contents

    Class ArucoObject

    Describes the shared properties of all the ArUco objects. Trackers, Creators and Calibrators use this interface.

    Inheritance
    Object
    ArucoObject
    ArucoBoard
    ArucoDiamond
    ArucoMarker
    Namespace: ArucoUnity.Objects
    Assembly: Assembly-CSharp.dll
    Syntax
    public abstract class ArucoObject : MonoBehaviour

    Fields

    | Improve this Doc View Source

    metersToPixels300ppp

    Declaration
    protected const float metersToPixels300ppp = 11811.0234F
    Field Value
    Type Description
    Single

    Properties

    | Improve this Doc View Source

    ArucoHashCode

    Declaration
    public int ArucoHashCode { get; protected set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    Dictionary

    Gets or sets the dictionary to use.

    Declaration
    public Aruco.Dictionary Dictionary { get; set; }
    Property Value
    Type Description
    Aruco.Dictionary
    | Improve this Doc View Source

    DisplayInEditor

    Declaration
    public bool DisplayInEditor { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    MarkerBorderBits

    Gets or sets the number of bits in marker borders (default: 1). Used by Creators.

    Declaration
    public uint MarkerBorderBits { get; set; }
    Property Value
    Type Description
    UInt32
    | Improve this Doc View Source

    MarkerSideLength

    Gets or sets the side length of each marker. In pixels for Creators. In meters for Trackers and Calibrators.

    Declaration
    public float MarkerSideLength { get; set; }
    Property Value
    Type Description
    Single

    Methods

    | Improve this Doc View Source

    Awake()

    Calls UpdateProperties().

    Declaration
    protected virtual void Awake()
    | Improve this Doc View Source

    Draw()

    Returns the image of the ArUco object. In editor it should returns null and no exception if the object is incorrectly configured.

    Declaration
    public abstract Cv.Mat Draw()
    Returns
    Type Description
    Cv.Mat

    The image of the ArUco object.

    | Improve this Doc View Source

    GenerateName()

    Returns a generated name depending on the value of the properties.

    Declaration
    public abstract string GenerateName()
    Returns
    Type Description
    String
    | Improve this Doc View Source

    GetGameObjectScale()

    Gets the scale to MarkerSideLength length.

    Declaration
    public abstract Vector3 GetGameObjectScale()
    Returns
    Type Description
    Vector3
    | Improve this Doc View Source

    GetInPixels(Single)

    Returns a value as an int, with a conversion from meters to pixels if the property value is less than 10.

    Declaration
    protected int GetInPixels(float propertyValue)
    Parameters
    Type Name Description
    Single propertyValue
    Returns
    Type Description
    Int32
    | Improve this Doc View Source

    OnPropertyUpdated()

    Calls UpdateProperties() and the PropertyUpdated event.

    Declaration
    protected void OnPropertyUpdated()
    | Improve this Doc View Source

    OnPropertyUpdating()

    Calls the event PropertyUpdating.

    Declaration
    protected void OnPropertyUpdating()
    | Improve this Doc View Source

    OnValidate()

    Calls OnPropertyUpdated() in editor mode.

    Declaration
    protected virtual void OnValidate()
    | Improve this Doc View Source

    UpdateArucoHashCode()

    Updates the ArUco hash code of the object.

    Declaration
    protected abstract void UpdateArucoHashCode()
    | Improve this Doc View Source

    UpdateProperties()

    Initializes the properties and calls the UpdateArucoHashCode() method.

    Declaration
    protected virtual void UpdateProperties()

    Events

    | Improve this Doc View Source

    PropertyUpdated

    Executed after a property has been updated.

    Declaration
    public event Action<ArucoObject> PropertyUpdated
    Event Type
    Type Description
    Action<ArucoObject>
    | Improve this Doc View Source

    PropertyUpdating

    Executed before a property is going to be updated.

    Declaration
    public event Action<ArucoObject> PropertyUpdating
    Event Type
    Type Description
    Action<ArucoObject>
    • Improve this Doc
    • View Source
    Back to top Aruco Unity - Erwan Normand