Class ArucoObject
Describes the shared properties of all the ArUco objects. Trackers, Creators and Calibrators use this interface.
Namespace: ArucoUnity.Objects
Assembly: Assembly-CSharp.dll
Syntax
public abstract class ArucoObject : MonoBehaviour
Fields
| Improve this Doc View SourcemetersToPixels300ppp
Declaration
protected const float metersToPixels300ppp = 11811.0234F
Field Value
Type | Description |
---|---|
Single |
Properties
| Improve this Doc View SourceArucoHashCode
Declaration
public int ArucoHashCode { get; protected set; }
Property Value
Type | Description |
---|---|
Int32 |
Dictionary
Gets or sets the dictionary to use.
Declaration
public Aruco.Dictionary Dictionary { get; set; }
Property Value
Type | Description |
---|---|
Aruco.Dictionary |
DisplayInEditor
Declaration
public bool DisplayInEditor { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
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 |
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 SourceAwake()
Calls UpdateProperties().
Declaration
protected virtual void Awake()
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. |
GenerateName()
Returns a generated name depending on the value of the properties.
Declaration
public abstract string GenerateName()
Returns
Type | Description |
---|---|
String |
GetGameObjectScale()
Gets the scale to MarkerSideLength length.
Declaration
public abstract Vector3 GetGameObjectScale()
Returns
Type | Description |
---|---|
Vector3 |
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 |
OnPropertyUpdated()
Calls UpdateProperties() and the PropertyUpdated event.
Declaration
protected void OnPropertyUpdated()
OnPropertyUpdating()
Calls the event PropertyUpdating.
Declaration
protected void OnPropertyUpdating()
OnValidate()
Calls OnPropertyUpdated() in editor mode.
Declaration
protected virtual void OnValidate()
UpdateArucoHashCode()
Updates the ArUco hash code of the object.
Declaration
protected abstract void UpdateArucoHashCode()
UpdateProperties()
Initializes the properties and calls the UpdateArucoHashCode() method.
Declaration
protected virtual void UpdateProperties()
Events
| Improve this Doc View SourcePropertyUpdated
Executed after a property has been updated.
Declaration
public event Action<ArucoObject> PropertyUpdated
Event Type
Type | Description |
---|---|
Action<ArucoObject> |
PropertyUpdating
Executed before a property is going to be updated.
Declaration
public event Action<ArucoObject> PropertyUpdating
Event Type
Type | Description |
---|---|
Action<ArucoObject> |