Packagecom.transmote.flar.marker
Classpublic class FLARMarker
InheritanceFLARMarker Inheritance Object
Subclasses FlareMarker, FLARToolkitMarker

Container for information about a detected marker, including:

See also

com.transmote.flar.marker.FLARMarkerEvent


Public Properties
 PropertyDefined By
  centerpoint : Point
[read-only] The centerpoint of the marker outline in the 2D space of the screen, calculated as the average of the outline's four corner points.
FLARMarker
  _centerpoint2D : Point = null
FLARMarker
  _centerpoint3D : Point = null
FLARMarker
  centerpoint3D : Point
[read-only] Centerpoint of marker outline extracted from the tracker transformation matrix.
FLARMarker
  corners : Vector.<Point>
[read-only] A Vector of four Points that describe the four points of the detected marker's outline.
FLARMarker
  _flarSource : IFLARSource
FLARMarker
  matrix2D : Matrix
[read-only] Return the transformation matrix of this FLARMarker as a Flash Matrix object, for applying 2D transformations to Flash DisplayObject instances.
FLARMarker
  matrix3D : Matrix3D
[read-only] Return this.transformMatrix, adjusted for application directly to a DisplayObject (by setting displayObject.transform.matrix3D = flarMarker.matrix3D).
FLARMarker
  motionDirection2D : Number
[read-only] The direction (in degrees) of the marker's (x,y) motion between the previous and current frames.
FLARMarker
  motionSpeed2D : Number
[read-only] The length of the marker's (x,y) motion vector between the previous and current frames.
FLARMarker
  _patternId : int
FLARMarker
  patternId : int
[read-only] ID of this FLARMarker's pattern.
FLARMarker
  position : Vector3D
[read-only] A Vector3D instance that describes x, y, and z coordinates, as well as rotationZ (stored as position.w).
FLARMarker
  rotationSpeedX : Number
[read-only] The amount of change (in degrees) in the marker's rotation along the x-axis between the previous and current frames.
FLARMarker
  rotationSpeedY : Number
[read-only] The amount of change (in degrees) in the marker's rotation along the y-axis between the previous and current frames.
FLARMarker
  rotationSpeedZ : Number
[read-only] The amount of change (in degrees) in the marker's rotation along the z-axis between the previous and current frames.
FLARMarker
  rotationX : Number
[read-only] The rotation of the marker along X axis.
FLARMarker
  rotationY : Number
[read-only] The rotation of the marker along Y axis.
FLARMarker
  rotationZ : Number
[read-only] The rotation of the marker along Z axis.
FLARMarker
  scale2D : Number
[read-only] The scale of the marker for use in 2D applications.
FLARMarker
  _sessionId : int = -1
FLARMarker
  sessionId : uint
[read-only] ID unique to this FLARMarker in this session.
FLARMarker
  targetCenterpoint3D : Point
[read-only] The centerpoint at the location toward which this FLARMarker is moving (target location at end of smoothing animation).
FLARMarker
  targetPosition : Vector3D
[read-only] The position toward which this FLARMarker is moving (target position at end of smoothing animation).
FLARMarker
  _transformMatrix : Matrix3D
FLARMarker
  transformMatrix : Matrix3D
[read-only] A Matrix3D object that describes the orientation of the detected marker relative to the viewer.
FLARMarker
  _vector3D : Vector3D = null
FLARMarker
  velocity : Vector3D
[read-only] A Vector3D instance that describes change between the previous and current frames in x, y, and z coordinates, as well as change in rotationZ (stored as velocity.w).
FLARMarker
  x : Number
[read-only] The 2D X coordinate of the marker.
FLARMarker
  y : Number
[read-only] The 2D Y coordinate of the marker.
FLARMarker
  z : Number
[read-only] The Z coordinate of the marker.
FLARMarker
Protected Properties
 PropertyDefined By
  _corners : Vector.<Point>
FLARMarker
Public Methods
 MethodDefined By
  
FLARMarker(patternId:int, transformMatrix:Matrix3D, flarSource:IFLARSource)
Constructor.
FLARMarker
  
copy(otherMarker:FLARMarker):void
Copy the properties of a FLARMarker into this FLARMarker.
FLARMarker
  
dispose():void
Free this FLARMarker instance for garbage collection.
FLARMarker
  
toString():String
FLARMarker
Protected Methods
 MethodDefined By
  
mirror():void
FLARMarker
  
FLARMarker
Public Constants
 ConstantDefined By
  DEFAULT_UNSCALED_MARKER_WIDTH : Number = 80
[static]
FLARMarker
Property Detail
_centerpoint2Dproperty
public var _centerpoint2D:Point = null

_centerpoint3Dproperty 
public var _centerpoint3D:Point = null

_cornersproperty 
protected var _corners:Vector.<Point>

_flarSourceproperty 
public var _flarSource:IFLARSource

_patternIdproperty 
public var _patternId:int

_sessionIdproperty 
public var _sessionId:int = -1

_transformMatrixproperty 
public var _transformMatrix:Matrix3D

_vector3Dproperty 
public var _vector3D:Vector3D = null

centerpointproperty 
centerpoint:Point  [read-only]

The centerpoint of the marker outline in the 2D space of the screen, calculated as the average of the outline's four corner points. To access the centerpoint reported by the tracker in three dimensions, use FLARMarker.centerpoint3D.


Implementation
    public function get centerpoint():Point
centerpoint3Dproperty 
centerpoint3D:Point  [read-only]

Centerpoint of marker outline extracted from the tracker transformation matrix. This centerpoint is determined based on the 3D location of the detected marker, and is used by FLARManager in 3D calculations. To avoid having to correct for Z location, use centerpoint2D. TODO: return a Vector3D with (x,y,z) coords. update accordingly in FLARManager.


Implementation
    public function get centerpoint3D():Point
cornersproperty 
corners:Vector.<Point>  [read-only]

A Vector of four Points that describe the four points of the detected marker's outline.


Implementation
    public function get corners():Vector.<Point>
matrix2Dproperty 
matrix2D:Matrix  [read-only]

Return the transformation matrix of this FLARMarker as a Flash Matrix object, for applying 2D transformations to Flash DisplayObject instances. To apply to a DisplayObject, set displayObject.transform.matrix = flarMarker.matrix2D.


Implementation
    public function get matrix2D():Matrix
matrix3Dproperty 
matrix3D:Matrix3D  [read-only]

Return this.transformMatrix, adjusted for application directly to a DisplayObject (by setting displayObject.transform.matrix3D = flarMarker.matrix3D).


Implementation
    public function get matrix3D():Matrix3D
motionDirection2Dproperty 
motionDirection2D:Number  [read-only]

The direction (in degrees) of the marker's (x,y) motion between the previous and current frames.


Implementation
    public function get motionDirection2D():Number
motionSpeed2Dproperty 
motionSpeed2D:Number  [read-only]

The length of the marker's (x,y) motion vector between the previous and current frames.


Implementation
    public function get motionSpeed2D():Number
patternIdproperty 
patternId:int  [read-only]

ID of this FLARMarker's pattern.


Implementation
    public function get patternId():int
positionproperty 
position:Vector3D  [read-only]

A Vector3D instance that describes x, y, and z coordinates, as well as rotationZ (stored as position.w).


Implementation
    public function get position():Vector3D
rotationSpeedXproperty 
rotationSpeedX:Number  [read-only]

The amount of change (in degrees) in the marker's rotation along the x-axis between the previous and current frames.


Implementation
    public function get rotationSpeedX():Number
rotationSpeedYproperty 
rotationSpeedY:Number  [read-only]

The amount of change (in degrees) in the marker's rotation along the y-axis between the previous and current frames.


Implementation
    public function get rotationSpeedY():Number
rotationSpeedZproperty 
rotationSpeedZ:Number  [read-only]

The amount of change (in degrees) in the marker's rotation along the z-axis between the previous and current frames.


Implementation
    public function get rotationSpeedZ():Number
rotationXproperty 
rotationX:Number  [read-only]

The rotation of the marker along X axis.


Implementation
    public function get rotationX():Number
rotationYproperty 
rotationY:Number  [read-only]

The rotation of the marker along Y axis.


Implementation
    public function get rotationY():Number
rotationZproperty 
rotationZ:Number  [read-only]

The rotation of the marker along Z axis.


Implementation
    public function get rotationZ():Number
scale2Dproperty 
scale2D:Number  [read-only]

The scale of the marker for use in 2D applications.


Implementation
    public function get scale2D():Number
sessionIdproperty 
sessionId:uint  [read-only]

ID unique to this FLARMarker in this session. No two FLARMarker in a session share the same sessionId.


Implementation
    public function get sessionId():uint
targetCenterpoint3Dproperty 
targetCenterpoint3D:Point  [read-only]

The centerpoint at the location toward which this FLARMarker is moving (target location at end of smoothing animation). TODO: return a Vector3D with (x,y,z) coords. update accordingly in FLARManager.


Implementation
    public function get targetCenterpoint3D():Point
targetPositionproperty 
targetPosition:Vector3D  [read-only]

The position toward which this FLARMarker is moving (target position at end of smoothing animation).


Implementation
    public function get targetPosition():Vector3D
transformMatrixproperty 
transformMatrix:Matrix3D  [read-only]

A Matrix3D object that describes the orientation of the detected marker relative to the viewer. Apply this Matrix3D to a 3D model to make it appear tethered to the marker.


Implementation
    public function get transformMatrix():Matrix3D
velocityproperty 
velocity:Vector3D  [read-only]

A Vector3D instance that describes change between the previous and current frames in x, y, and z coordinates, as well as change in rotationZ (stored as velocity.w).


Implementation
    public function get velocity():Vector3D
xproperty 
x:Number  [read-only]

The 2D X coordinate of the marker.


Implementation
    public function get x():Number
yproperty 
y:Number  [read-only]

The 2D Y coordinate of the marker.


Implementation
    public function get y():Number
zproperty 
z:Number  [read-only]

The Z coordinate of the marker.


Implementation
    public function get z():Number
Constructor Detail
FLARMarker()Constructor
public function FLARMarker(patternId:int, transformMatrix:Matrix3D, flarSource:IFLARSource)

Constructor.

Parameters
patternId:int — ID of the pattern of the detected marker.
 
transformMatrix:Matrix3D — A Matrix3D object that describes the orientation of the detected marker relative to the viewer. Apply this Matrix3D to a 3D model to make it appear tethered to the marker.
 
flarSource:IFLARSource — The IFLARSource from which the marker's image was extracted by the current tracker.
Method Detail
ageAfterRemoval()method
flarManagerInternal function ageAfterRemoval():uint

Returns
uint
applySmoothing()method 
flarManagerInternal function applySmoothing(smoother:IFLARMatrixSmoother, numFrames:int, adaptiveSmoothingCenter:Number):void

apply smoothing algorithm over a number of frames. called by FLARManager as part of marker tracking/maintenance process.

Parameters

smoother:IFLARMatrixSmoother — IFLARMatrixSmoother to use
 
numFrames:int — number of frames over which to smooth
 
adaptiveSmoothingCenter:Number — adaptiveSmoothingCenter

See also

copy()method 
public function copy(otherMarker:FLARMarker):void

Copy the properties of a FLARMarker into this FLARMarker. FLARMarkers are updated across frames by copying the properties of newly-detected markers.

Parameters

otherMarker:FLARMarker

dispose()method 
public function dispose():void

Free this FLARMarker instance for garbage collection.

mirror()method 
protected function mirror():void

resetAllCalculations()method 
protected function resetAllCalculations():void

resetRemovalAge()method 
flarManagerInternal function resetRemovalAge():void

setSessionId()method 
flarManagerInternal function setSessionId():void

toString()method 
public function toString():String

Returns
String
Constant Detail
DEFAULT_UNSCALED_MARKER_WIDTHConstant
public static const DEFAULT_UNSCALED_MARKER_WIDTH:Number = 80