| Package | metaio.tracking |
| Class | public class Tracking |
| Inheritance | Tracking flash.events.EventDispatcher |
| Method | Defined By | ||
|---|---|---|---|
Tracking(cameraWidth:int, cameraHeight:int, trackingDataPath:String)
Constructor
| Tracking | ||
getNumberOfDefinedCOSes():int
Retrieve the number of defined coordinate systems defined by the loaded tracking data. | Tracking | ||
getTrackingPose(cosID:uint, mirrored:Boolean):Matrix3D
Retrieve tracking values for a particular coordinate system. | Tracking | ||
getTrackingValues(cosID:uint):Array
Retrieve tracking values for a particular coordinate system. | Tracking | ||
initTracking(raiseEvent:Boolean = false):void
Initialize tracking for a loaded tracking data. | Tracking | ||
isEnabled():Boolean
Get the state of the tracking. | Tracking | ||
isInitialized():Boolean
Get the initialization state of the tracking. | Tracking | ||
loadAndInitTracking():void | Tracking | ||
loadTrackingData(trackingDataURL:String):void
Loading tracking data from an given URL
| Tracking | ||
setEnable(enable:Boolean):void
Enable / disable tracking. | Tracking | ||
trackFrame(frameBuffer:ByteArray, frameWidth:int = -1, frameHeight:int = -1, channels:int = 4):int
Track one single frame. | Tracking | ||
| Tracking | () | Constructor |
public function Tracking(cameraWidth:int, cameraHeight:int, trackingDataPath:String)Constructor
ParameterscameraWidth:int — width of the tracking video stream
| |
cameraHeight:int — height of the tracking video stream
| |
trackingDataPath:String — path to tracking data file
|
| getNumberOfDefinedCOSes | () | method |
public function getNumberOfDefinedCOSes():intRetrieve the number of defined coordinate systems defined by the loaded tracking data.
Returnsint — Number of defined coordinate systems
|
| getTrackingPose | () | method |
public function getTrackingPose(cosID:uint, mirrored:Boolean):Matrix3DRetrieve tracking values for a particular coordinate system.
Parameters
cosID:uint — is the id of a defined coordinate system.
| |
mirrored:Boolean — returned pose is mirrored
|
Matrix3D — Tracking values as values of a column major 4x4 matrix.
|
| getTrackingValues | () | method |
public function getTrackingValues(cosID:uint):ArrayRetrieve tracking values for a particular coordinate system.
Parameters
cosID:uint — is the id of a defined coordinate system.
|
Array — Tracking values as values of a row driven 4x4 matrix.
|
| initTracking | () | method |
public function initTracking(raiseEvent:Boolean = false):voidInitialize tracking for a loaded tracking data. This function is called when downloading of tracking data is completed.
Parameters
raiseEvent:Boolean (default = false) — Event
|
| isEnabled | () | method |
public function isEnabled():BooleanGet the state of the tracking.
ReturnsBoolean — True if the tracking is enabled, otherwise false.
|
| isInitialized | () | method |
public function isInitialized():BooleanGet the initialization state of the tracking.
ReturnsBoolean — true if tracking is initialized, otherwise false
|
| loadAndInitTracking | () | method |
public function loadAndInitTracking():void| loadTrackingData | () | method |
public function loadTrackingData(trackingDataURL:String):voidLoading tracking data from an given URL
Parameters
trackingDataURL:String — is the url to a tracking data
|
| setEnable | () | method |
public function setEnable(enable:Boolean):voidEnable / disable tracking.
Parameters
enable:Boolean — is true for enable the tracking, otherwise false.
|
| trackFrame | () | method |
public function trackFrame(frameBuffer:ByteArray, frameWidth:int = -1, frameHeight:int = -1, channels:int = 4):intTrack one single frame. Clears frameBuffer after tracking.
Parameters
frameBuffer:ByteArray — is the frameBuffer which should be processed
| |
frameWidth:int (default = -1) — is the width of the frame in pixels. If not set the default value given in the constuctor is used.
| |
frameHeight:int (default = -1) — is the heigth of the frame in pixels. If not set the default value given in the constuctor is used.
| |
channels:int (default = 4) — is the number of color channels. If not set, it is asumed that the image type is RGBA.
|
int — 1 if tracking successfull otherwise 0
|