Packagecom.transmote.flar.marker
Classpublic class FLARMarker

Container for information about a detected marker, including:

See also

../marker/FLARMarkerEvent.html


Public Properties
 PropertyDefined by
  centerpoint : Point
[read-only] centerpoint of 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 FLARToolkit transformation matrix.
FLARMarker
  _confidence : Number
FLARMarker
  confidence : Number
[read-only] 'confidence' is a value assigned by FLARToolkit to each detected marker, that describes the algorithm's perceived accuracy of the pattern match.
FLARMarker
  corners : Vector
[read-only] a Vector of four Points that describe the four points of the detected marker's outline.
FLARMarker
  _direction : int
FLARMarker
  direction : int
[read-only] closest orthographic orientation of detected marker.
FLARMarker
  _flarPattern : FLARPattern
FLARMarker
  _flarSource : IFLARSource
FLARMarker
  _flarSquare : FLARSquare
FLARMarker
  flarSquare : FLARSquare
[read-only] FLARSquare instance used to create this FLARMarker instance.
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 the transformation matrix of this FLARMarker as a Flash Matrix3D object, for applying 3D transformations to Flash DisplayObject instances.
FLARMarker
  _patternId : int
FLARMarker
  patternId : int
[read-only] ID of this marker's pattern.
FLARMarker
  rotation2D : Number
[read-only] returns the rotation of the marker in 2D.
FLARMarker
  _rotationX : Number = NaN
FLARMarker
  rotationX : Number
[read-only] rotation of marker along X axis.
FLARMarker
  _rotationY : Number = NaN
FLARMarker
  rotationY : Number
[read-only] rotation of marker along Y axis.
FLARMarker
  _rotationZ : Number = NaN
FLARMarker
  rotationZ : Number
[read-only] rotation of marker along Z axis.
FLARMarker
  scale2D : Number
[read-only] returns the scale of the marker for use in 2D applications.
FLARMarker
  _sessionId : int = -1
FLARMarker
  sessionId : uint
[read-only] ID unique to this marker in this session.
FLARMarker
  targetCenterpoint3D : Point
[read-only] returns centerpoint at location toward which this FLARMarker is moving (target location at end of smoothing animation).
FLARMarker
  _transformMatrix : FLARDoubleMatrix34
FLARMarker
  transformMatrix : FLARDoubleMatrix34
[read-only] FLARDoubleMatrix34 matrix that describes transformation of marker relative to the camera.
FLARMarker
  _vector3D : Vector3D = null
FLARMarker
  vector3D : Vector3D
[read-only] Vector3D instance that describes x, y, and z coordinates, as well as rotationZ (stored as vector3D.w).
FLARMarker
  x : Number
[read-only] return x coordinate of marker.
FLARMarker
  y : Number
[read-only] return y coordinate of marker.
FLARMarker
  z : Number
[read-only] return z coordinate of marker.
FLARMarker
Public Methods
 MethodDefined by
  
FLARMarker(detectorResult:FLARMultiMarkerDetectorResult, transformMatrix:FLARDoubleMatrix34, flarSource:IFLARSource, flarPattern:FLARPattern)
constructor.
FLARMarker
  
applySmoothing(smoother:IFLARMatrixSmoother, numFrames:int):void
apply smoothing algorithm over a number of frames.
FLARMarker
  
copy(otherMarker:FLARMarker):void
copy the properties of a FLARMarker into this FLARMarker.
FLARMarker
  
dispose():void
free this FLARMarker instance up for garbage collection.
FLARMarker
  
increment removal age by one.
FLARMarker
  
reset removal age to zero.
FLARMarker
  
setSessionId():void
called only by FLARManager, when a new FLARMarker is detected.
FLARMarker
  
toString():String
FLARMarker
Property detail
centerpointproperty
centerpoint:Point  [read-only]

centerpoint of 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 FLARToolkit in three dimensions, use FLARMarker.centerpoint.

Implementation
    public function get centerpoint():Point
_centerpoint2Dproperty 
public var _centerpoint2D:Point = null
_centerpoint3Dproperty 
public var _centerpoint3D:Point = null
centerpoint3Dproperty 
centerpoint3D:Point  [read-only]

centerpoint of marker outline extracted from FLARToolkit 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.

Implementation
    public function get centerpoint3D():Point
_confidenceproperty 
public var _confidence:Number
confidenceproperty 
confidence:Number  [read-only]

'confidence' is a value assigned by FLARToolkit to each detected marker, that describes the algorithm's perceived accuracy of the pattern match.

Implementation
    public function get confidence():Number
cornersproperty 
corners:Vector  [read-only]

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

Implementation
    public function get corners():Vector
_directionproperty 
public var _direction:int
directionproperty 
direction:int  [read-only]

closest orthographic orientation of detected marker. value between 0 and 3, inclusive: 0: up 1: left 2: down 3: right

Implementation
    public function get direction():int
_flarPatternproperty 
public var _flarPattern:FLARPattern
_flarSourceproperty 
public var _flarSource:IFLARSource
_flarSquareproperty 
public var _flarSquare:FLARSquare
flarSquareproperty 
flarSquare:FLARSquare  [read-only]

FLARSquare instance used to create this FLARMarker instance. can be accessed if direct access to FLARToolkit output is desired; no downsampling correction is applied.

Implementation
    public function get flarSquare():FLARSquare
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 the transformation matrix of this FLARMarker as a Flash Matrix3D object, for applying 3D transformations to Flash DisplayObject instances. to apply to a DisplayObject, set displayObject.transform.matrix3D = flarMarker.matrix3D.

Implementation
    public function get matrix3D():Matrix3D
_patternIdproperty 
public var _patternId:int
patternIdproperty 
patternId:int  [read-only]

ID of this marker's pattern. pattern IDs are zero-indexed, and are assigned to patterns in the order they were initially loaded.

Implementation
    public function get patternId():int
rotation2Dproperty 
rotation2D:Number  [read-only]

returns the rotation of the marker in 2D. this method is equivalent to rotationZ.

Implementation
    public function get rotation2D():Number
_rotationXproperty 
public var _rotationX:Number = NaN
rotationXproperty 
rotationX:Number  [read-only]

rotation of marker along X axis.

Implementation
    public function get rotationX():Number
_rotationYproperty 
public var _rotationY:Number = NaN
rotationYproperty 
rotationY:Number  [read-only]

rotation of marker along Y axis.

Implementation
    public function get rotationY():Number
_rotationZproperty 
public var _rotationZ:Number = NaN
rotationZproperty 
rotationZ:Number  [read-only]

rotation of marker along Z axis.

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

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

Implementation
    public function get scale2D():Number
_sessionIdproperty 
public var _sessionId:int = -1
sessionIdproperty 
sessionId:uint  [read-only]

ID unique to this marker in this session. no two markers in a session share the same sessionId.

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

returns centerpoint at location toward which this FLARMarker is moving (target location at end of smoothing animation).

Implementation
    public function get targetCenterpoint3D():Point
_transformMatrixproperty 
public var _transformMatrix:FLARDoubleMatrix34
transformMatrixproperty 
transformMatrix:FLARDoubleMatrix34  [read-only]

FLARDoubleMatrix34 matrix that describes transformation of marker relative to the camera. apply to FLARBaseNodes that should appear 'tethered' to the marker.

Implementation
    public function get transformMatrix():FLARDoubleMatrix34
_vector3Dproperty 
public var _vector3D:Vector3D = null
vector3Dproperty 
vector3D:Vector3D  [read-only]

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

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

return x coordinate of marker.

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

return y coordinate of marker.

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

return z coordinate of marker.

Implementation
    public function get z():Number
Constructor detail
FLARMarker()constructor
public function FLARMarker(detectorResult:FLARMultiMarkerDetectorResult, transformMatrix:FLARDoubleMatrix34, flarSource:IFLARSource, flarPattern:FLARPattern)

constructor.

Parameters
detectorResult:FLARMultiMarkerDetectorResult
 
transformMatrix:FLARDoubleMatrix34
 
flarSource:IFLARSource
 
flarPattern:FLARPattern
Method detail
applySmoothing()method
public function applySmoothing(smoother:IFLARMatrixSmoother, numFrames:int):void

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

Parameters
smoother:IFLARMatrixSmoother
 
numFrames:int
copy()method 
public function copy(otherMarker:FLARMarker):void

copy the properties of a FLARMarker into this FLARMarker.

Parameters
otherMarker:FLARMarker
dispose()method 
public function dispose():void

free this FLARMarker instance up for garbage collection.

incrementRemovalAge()method 
public function incrementRemovalAge():uint

increment removal age by one. removal age is the number of frames that have elapsed since this FLARMarker was last detected by FLARToolkit. this method is used by FLARManager, and should generally not be called by developers.

Returns
uint
resetRemovalAge()method 
public function resetRemovalAge():void

reset removal age to zero. removal age is the number of frames that have elapsed since this FLARMarker was last detected by FLARToolkit. this method is used by FLARManager, and should generally not be called by developers.

setSessionId()method 
public function setSessionId():void

called only by FLARManager, when a new FLARMarker is detected. this method should not be called by developers. (poor OOP, i know....sorry.)

toString()method 
public function toString():String

Returns
String