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
  downsampleRatio : Number
[read-only] amount by which the BitmapData source is downsampled before being sent to FLARToolkit.
FLARLoaderSource
  mirrored : Boolean
FLARLoaderSource cannot be mirrored; method is here only for compliance with IFLARSource.
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, width:Number, height:Number, downsampleRatio:Number = 0.5)
constructor.
FLARLoaderSource
  
update():void
update the BitmapData source used for analysis.
FLARLoaderSource
Property detail
downsampleRatioproperty
downsampleRatio:Number  [read-only]

amount by which the BitmapData source is downsampled before being sent to FLARToolkit.

Implementation
    public function get downsampleRatio():Number
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
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, width:Number, height:Number, downsampleRatio:Number = 0.5)

constructor.

Parameters
contentPath:String — filename to load.
 
width:Number — width of file.
 
height:Number — height of 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.