Packagecom.transmote.flar.utils
Classpublic class FLARProxy
InheritanceFLARProxy Inheritance flash.events.EventDispatcher
ImplementsIFLARSource

FLARProxy provides a way to test FLARToolkit applications with a mouse and keyboard. to use, instantiate a FLARProxy instance and call FLARProxy.activate(). set up handlers for FLARMarkerEvents in the same manner as with FLARManager. clicking the mouse sends a MARKER_ADDED event, dragging the mouse sends a MARKER_UPDATED event, and releasing the mouse sends a MARKER_REMOVED event. these events can be handled exactly as if they were dispatched by FLARManager. press keys 0-9 to specify a patternId. FLARProxy only supports patternIds 0 through 9.



Public Properties
 PropertyDefined by
  cameraParams : FLARParam
[read-only] FLARParam used by this FLARProxy, for use with Papervision.
FLARProxy
  downsampleRatio : Number
[read-only] amount by which the BitmapData source is downsampled before being sent to FLARToolkit.
FLARProxy
  mirrored : Boolean
FLARProxy cannot be mirrored; method is here only for compliance with IFLARSource.
FLARProxy
  source : BitmapData
[read-only] FLARProxy has no BitmapData source; method is here only for compliance with IFLARSource.
FLARProxy
  sourceSize : Rectangle
[read-only] size of BitmapData source used for analysis.
FLARProxy
Public Methods
 MethodDefined by
  
FLARProxy(downsampleRatio:Number = 0.5, cameraParamsPath:String = "")
constructor.
FLARProxy
  
activate(stage:Stage):void
begin marker simulation.
FLARProxy
  
deactivate():void
stop marker simulation.
FLARProxy
  
loadCameraParams(cameraParamsPath:String):void
load camera params file; needed to generate transform matrices.
FLARProxy
  
update():void
FLARProxy updates on mouse interaction; method is here only for compliance with IFLARSource.
FLARProxy
Property detail
cameraParamsproperty
cameraParams:FLARParam  [read-only]

FLARParam used by this FLARProxy, for use with Papervision.

Implementation
    public function get cameraParams():FLARParam
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]

FLARProxy 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]

FLARProxy has no BitmapData source; method is here only for compliance with IFLARSource.

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
FLARProxy()constructor
public function FLARProxy(downsampleRatio:Number = 0.5, cameraParamsPath:String = "")

constructor.

Parameters
downsampleRatio:Number (default = 0.5) — similar to IFLARSource, downsampleRatio is the ratio of the screen size as reported to FLARToolkit to the actual screen size. defaults to 0.5, to match FLARCameraSource and FLARLoaderSource.
 
cameraParamsPath:String (default = "")
Method detail
activate()method
public function activate(stage:Stage):void

begin marker simulation.

Parameters
stage:Stage — a reference to the application Stage.
deactivate()method 
public function deactivate():void

stop marker simulation.

loadCameraParams()method 
public function loadCameraParams(cameraParamsPath:String):void

load camera params file; needed to generate transform matrices. called automatically if cameraParamsPath passed into constructor.

Parameters
cameraParamsPath:String — path to camera parameters binary.
update()method 
public function update():void

FLARProxy updates on mouse interaction; method is here only for compliance with IFLARSource.