OpenCV for Unity 3.0.0
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.12.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.UnityUtils.Helper.ARHelper Class Reference

The ARHelper class manages ARCamera and ARGameObjects, automating the calculation of ARMatrix and updating the Transform of the specified UpdateTarget. More...

Public Types

enum  ARUpdateTarget {
  ARGameObject ,
  ARCamera
}
 The type of target to update. More...
 

Public Member Functions

virtual void CalculateARMatrix ()
 Calculates the ARMatrix for ARGameObjects based on the settings of the registered ARCamera and ARGameObjects.
 
virtual void Dispose ()
 Disposes the ARGameObject.
 
virtual void Initialize ()
 Initializes resources and sets the initial values.
 
virtual void ResetARGameObjectsImagePointsAndObjectPoints ()
 Resets the ImagePoints and ObjectPoints of ARGameObjects.
 
virtual void UpdateTransform ()
 Updates the Transform of the specified UpdateTarget using the ARMatrix of ARGameObjects.
 

Protected Member Functions

virtual void LateUpdate ()
 Calls CalculateARMatrix() and UpdateTransform() in LateUpdate().
 

Protected Attributes

ARCamera _arCamera
 
List< ARGameObject_arGameObjects
 
bool _calculateARMatrixInLateUpdate = true
 
bool _hasInitDone = false
 Indicates whether this instance has been initialized.
 
ARUpdateTarget _updateTarget
 
bool _updateTransformInLateUpdate = true
 

Properties

virtual ARCamera ARCamera [get, set]
 Registered AR camera.
 
virtual List< ARGameObjectARGameObjects [get, set]
 Registered AR game objects.
 
virtual bool CalculateARMatrixInLateUpdate [get, set]
 If true, the CalculateARMatrix() method is automatically called in LateUpdate(). If false, it must be called manually.
 
virtual ARUpdateTarget UpdateTarget [get, set]
 Specifies the GameObject whose Transform will be updated by the UpdateTransform() method.
 
virtual bool UpdateTransformInLateUpdate [get, set]
 If true, the UpdateTransform() method is automatically called in LateUpdate(). If false, it must be called manually.
 

Detailed Description

The ARHelper class manages ARCamera and ARGameObjects, automating the calculation of ARMatrix and updating the Transform of the specified UpdateTarget.

  • Calculates the ARMatrix of registered ARGameObjects based on the settings of ARCamera and ARGameObjects.
  • Updates the Transform of the specified UpdateTarget (ARCamera or ARGameObject) using the calculated ARMatrix.
  • Allows control over automatic execution in LateUpdate() via boolean values.
  • Provides functionality to reset ImagePoints and ObjectPoints.

Member Enumeration Documentation

◆ ARUpdateTarget

The type of target to update.

Enumerator
ARGameObject 
ARCamera 

Member Function Documentation

◆ CalculateARMatrix()

virtual void OpenCVForUnity.UnityUtils.Helper.ARHelper.CalculateARMatrix ( )
virtual

Calculates the ARMatrix for ARGameObjects based on the settings of the registered ARCamera and ARGameObjects.

◆ Dispose()

virtual void OpenCVForUnity.UnityUtils.Helper.ARHelper.Dispose ( )
virtual

Disposes the ARGameObject.

◆ Initialize()

virtual void OpenCVForUnity.UnityUtils.Helper.ARHelper.Initialize ( )
virtual

Initializes resources and sets the initial values.

◆ LateUpdate()

virtual void OpenCVForUnity.UnityUtils.Helper.ARHelper.LateUpdate ( )
protectedvirtual

◆ ResetARGameObjectsImagePointsAndObjectPoints()

virtual void OpenCVForUnity.UnityUtils.Helper.ARHelper.ResetARGameObjectsImagePointsAndObjectPoints ( )
virtual

Resets the ImagePoints and ObjectPoints of ARGameObjects.

◆ UpdateTransform()

virtual void OpenCVForUnity.UnityUtils.Helper.ARHelper.UpdateTransform ( )
virtual

Updates the Transform of the specified UpdateTarget using the ARMatrix of ARGameObjects.

Member Data Documentation

◆ _arCamera

ARCamera OpenCVForUnity.UnityUtils.Helper.ARHelper._arCamera
protected

◆ _arGameObjects

List<ARGameObject> OpenCVForUnity.UnityUtils.Helper.ARHelper._arGameObjects
protected

◆ _calculateARMatrixInLateUpdate

bool OpenCVForUnity.UnityUtils.Helper.ARHelper._calculateARMatrixInLateUpdate = true
protected

◆ _hasInitDone

bool OpenCVForUnity.UnityUtils.Helper.ARHelper._hasInitDone = false
protected

Indicates whether this instance has been initialized.

◆ _updateTarget

ARUpdateTarget OpenCVForUnity.UnityUtils.Helper.ARHelper._updateTarget
protected

◆ _updateTransformInLateUpdate

bool OpenCVForUnity.UnityUtils.Helper.ARHelper._updateTransformInLateUpdate = true
protected

Property Documentation

◆ ARCamera

virtual ARCamera OpenCVForUnity.UnityUtils.Helper.ARHelper.ARCamera
getset

Registered AR camera.

◆ ARGameObjects

virtual List<ARGameObject> OpenCVForUnity.UnityUtils.Helper.ARHelper.ARGameObjects
getset

Registered AR game objects.

◆ CalculateARMatrixInLateUpdate

virtual bool OpenCVForUnity.UnityUtils.Helper.ARHelper.CalculateARMatrixInLateUpdate
getset

If true, the CalculateARMatrix() method is automatically called in LateUpdate(). If false, it must be called manually.

◆ UpdateTarget

virtual ARUpdateTarget OpenCVForUnity.UnityUtils.Helper.ARHelper.UpdateTarget
getset

Specifies the GameObject whose Transform will be updated by the UpdateTransform() method.

◆ UpdateTransformInLateUpdate

virtual bool OpenCVForUnity.UnityUtils.Helper.ARHelper.UpdateTransformInLateUpdate
getset

If true, the UpdateTransform() method is automatically called in LateUpdate(). If false, it must be called manually.


The documentation for this class was generated from the following file: