Class ArucoObjectDisplayer
Namespace: ArucoUnity.Objects.Displayers
Assembly: Assembly-CSharp.dll
Syntax
public class ArucoObjectDisplayer : MonoBehaviour
Fields
| Improve this Doc View SourceimagePlaneMaterial
Declaration
protected Material imagePlaneMaterial
Field Value
Type | Description |
---|---|
Material |
lastArucoObjectOnValidate
Declaration
protected ArucoObject lastArucoObjectOnValidate
Field Value
Type | Description |
---|---|
ArucoObject |
Properties
| Improve this Doc View SourceArucoObject
Get or sets the ArUco object to display.
Declaration
protected ArucoObject ArucoObject { get; set; }
Property Value
Type | Description |
---|---|
ArucoObject |
DisplayInPlayMode
Gets or sets if ImagePlane is displayed in play mode.
Declaration
protected bool DisplayInPlayMode { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Image
Gets the image of the ArucoObject to display.
Declaration
public Cv.Mat Image { get; protected set; }
Property Value
Type | Description |
---|---|
Cv.Mat |
ImagePlane
Gets the plane that display ImageTexture.
Declaration
public GameObject ImagePlane { get; protected set; }
Property Value
Type | Description |
---|---|
GameObject |
ImagePlanePrefab
Gets or sets the prefab of ImagePlane. If null, default will be loaded:
Prefabs/Resources/ArucoCreatorImagePlane.prefab
.
Declaration
public GameObject ImagePlanePrefab { get; set; }
Property Value
Type | Description |
---|---|
GameObject |
ImageTexture
Gets the texture that contains Image.
Declaration
public Texture2D ImageTexture { get; protected set; }
Property Value
Type | Description |
---|---|
Texture2D |
Methods
| Improve this Doc View SourceArucoObject_PropertyUpdated(ArucoObject)
Calls UpdateImage().
Declaration
protected virtual void ArucoObject_PropertyUpdated(ArucoObject arucoObject)
Parameters
Type | Name | Description |
---|---|---|
ArucoObject | arucoObject |
CreateImage()
Creates Image and ImageTexture from ArucoObject.
Declaration
public virtual void CreateImage()
DisplayImage()
Updates ImagePlane with ImageTexture.
Declaration
public virtual void DisplayImage()
InitializeImagePlane()
Initializes ImagePlane.
Declaration
protected virtual void InitializeImagePlane()
OnDestroy()
Unsubscribes from the PropertyUpdated event.
Declaration
protected virtual void OnDestroy()
PlaceImagePlane()
Places, rotates and scales the image plane.
Declaration
protected virtual void PlaceImagePlane()
ResetImage()
Resets Image, ImageTexture and ImagePlane.
Declaration
public virtual void ResetImage()
SetArucoObject(ArucoObject)
Subscribes to the PropertyUpdated event, and unsubscribes from the previous ArucoObject.
Declaration
protected virtual void SetArucoObject(ArucoObject arucoObject)
Parameters
Type | Name | Description |
---|---|---|
ArucoObject | arucoObject |
Start()
Calls SetArucoObject(ArucoObject) to display the ArucoObject only in play mode.
Declaration
protected virtual void Start()
Update()
Updates the display in the editor if ArucoObject has been changed.
Declaration
protected virtual void Update()
UpdateImage()
Calls CreateImage() then DisplayImage() if Image has been created or ResetImage().
Declaration
protected virtual void UpdateImage()