Packagecom.transmote.flar.source
Classpublic class FLARLoaderSource
InheritanceFLARLoaderSource Inheritance flash.display.Sprite
ImplementsIFLARSource

use the contents of a Loader as a source image for FLARToolkit marker detection. FLARLoaderSource samples the contents of a Loader against a white background, to provide maximum contrast for marker detection. this class can be used for testing marker detection without a camera, for example with a swf or jpeg with valid patterns within.



Public Properties
 PropertyDefined by
  inited : Boolean
[read-only] returns true if initialization is complete.
FLARLoaderSource
  mirrored : Boolean
FLARLoaderSource cannot be mirrored; method is here only for compliance with IFLARSource.
FLARLoaderSource
  resultsToDisplayRatio : Number
[read-only] ratio of area of reported results to display size.
FLARLoaderSource
  source : BitmapData
[read-only] retrieve the BitmapData source used for analysis.
FLARLoaderSource
  sourceSize : Rectangle
[read-only] size of BitmapData source used for analysis.
FLARLoaderSource
Public Methods
 MethodDefined by
  
FLARLoaderSource(contentPath:String, displayWidth:Number, displayHeight:Number, downsampleRatio:Number = 0.5)
constructor.
FLARLoaderSource
  
update():void
update the BitmapData source used for analysis.
FLARLoaderSource
Property detail
initedproperty
inited:Boolean  [read-only]

returns true if initialization is complete. FLARLoaderSource is inited automatically in constructor.

Implementation
    public function get inited():Boolean
mirroredproperty 
mirrored:Boolean  [read-write]

FLARLoaderSource cannot be mirrored; method is here only for compliance with IFLARSource.

Implementation
    public function get mirrored():Boolean
    public function set mirrored(value:Boolean):void
resultsToDisplayRatioproperty 
resultsToDisplayRatio:Number  [read-only]

ratio of area of reported results to display size. used to scale results of FLARToolkit analysis to correctly fit display area.

Implementation
    public function get resultsToDisplayRatio():Number
sourceproperty 
source:BitmapData  [read-only]

retrieve the BitmapData source used for analysis. NOTE: returns the actual BitmapData object, not a clone.

Implementation
    public function get source():BitmapData
sourceSizeproperty 
sourceSize:Rectangle  [read-only]

size of BitmapData source used for analysis.

Implementation
    public function get sourceSize():Rectangle
Constructor detail
FLARLoaderSource()constructor
public function FLARLoaderSource(contentPath:String, displayWidth:Number, displayHeight:Number, downsampleRatio:Number = 0.5)

constructor.

Parameters
contentPath:String — filename to load.
 
displayWidth:Number — width of source file.
 
displayHeight:Number — height of source file.
 
downsampleRatio:Number (default = 0.5) — amount to downsample camera input. adjust to balance between image quality and marker tracking performance. a value of 1.0 results in no downsampling; a value of 0.5 (the default) downsamples the camera input by half.
Method detail
update()method
public function update():void

update the BitmapData source used for analysis.