TrackingTarget Class
An abstract class that represents a trackable target (i.e. an image target, or magnetic sensing target)
Constructor
TrackingTarget
()
Item Index
Methods
addTrackedObject
-
arObject
adds a TrackedObject to the target. The transforms of TrackedObjects added using this method are automatically updated whenever the TrackingTarget receives new data.
Parameters:
-
arObject
TrackedObjecta TrackedObject instance
onUpdateTransform
-
inTransform
callback executed in response to the trackables transform being updated
Parameters:
-
inTransform
Transform3Dthe new transform
removeTrackedObject
-
arObject
removes a TrackedObject from this TrackingTarget. Once this method is called, the TrackedObject will no longer be updated.
Parameters:
-
arObject
TrackedObjecta TrackedObject instance
setTrackableId
-
trackableId
sets the trackable id associated with this target
Parameters:
-
trackableId
Stringa string used to uniquely identify the target
updateTrackedObjects
()
private
Updates all TrackedObjects associated with this TrackingTarget.
Properties
_lastVisible
Boolean
private
Private flag indicating whether the TrackedObject was visible during the last frame
_numFramesNotVisible
Number
private
Internal state variable to keep track of the number of frames the TrackedObjects target is not visible
_visible
Boolean
private
Private flag indicating whether the TrackedObject is visible during the current frame