チェンジセット 1685
- コミット日時:
- 2008/10/22 08:53:09 (3 ヶ月前)
- ファイル:
-
- as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/FLARAnotherWorldWindow.as (更新) (1 diff)
- as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/FLARAnotherWorldWindowLayer.as (削除)
- as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/FLARPanoramaSphere.as (更新) (1 diff)
- as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/FLARPanoramaSphereLayer.as (削除)
- as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/FLARSquareMarkerSample.as (追加)
- as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/layers/FLARAnotherWorldWindowLayer.as (追加)
- as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/layers/FLARLayer.as (更新) (2 diffs)
- as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/layers/FLARPanoramaSphereLayer.as (追加)
- as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/layers/FLARSquareLayer.as (更新) (6 diffs)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/FLARAnotherWorldWindow.as
r1636 r1685 42 42 import org.papervision3d.objects.primitives.Cube; 43 43 import org.papervision3d.objects.primitives.Sphere; 44 import org.tarotaro.flash.ar.layers.FLARAnotherWorldWindowLayer; 44 45 45 46 /** as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/FLARPanoramaSphere.as
r1636 r1685 28 28 import org.libspark.flartoolkit.core.raster.rgb.FLARRgbRaster_BitmapData; 29 29 import org.libspark.flartoolkit.core.raster.rgb.IFLARRgbRaster; 30 import org.tarotaro.flash.ar.layers.FLARPanoramaSphereLayer; 30 31 31 32 /** as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/layers/FLARLayer.as
r1636 r1685 18 18 import flash.display.Sprite; 19 19 import org.libspark.flartoolkit.core.raster.IFLARRaster; 20 import org.libspark.flartoolkit.core.raster.rgb.IFLARRgbRaster; 20 21 21 22 /** … … 25 26 public class FLARLayer extends Sprite 26 27 { 27 protected var _source:IFLARR aster;28 protected var _source:IFLARRgbRaster; 28 29 protected var _thresh:int; 29 30 30 public function FLARLayer(src:IFLARR aster,thresh:int)31 public function FLARLayer(src:IFLARRgbRaster,thresh:int) 31 32 { 32 33 this._source = src; as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/layers/FLARSquareLayer.as
r1330 r1685 16 16 package org.tarotaro.flash.ar.layers 17 17 { 18 import com.libspark.flartoolkit.core.FLARParam;19 import com.libspark.flartoolkit.core.FLARSquare;20 import com.libspark.flartoolkit.core.FLARSquareDetector;21 import com.libspark.flartoolkit.core.FLARSquareList;22 import com.libspark.flartoolkit.core.raster.FLARBitmapData;23 18 import flash.display.Bitmap; 24 19 import flash.display.BitmapData; … … 29 24 import flash.display.PixelSnapping; 30 25 import flash.display.Shape; 26 import org.libspark.flartoolkit.core.FLARSquare; 27 import org.libspark.flartoolkit.core.FLARSquareDetector; 28 import org.libspark.flartoolkit.core.FLARSquareStack; 29 import org.libspark.flartoolkit.core.param.FLARParam; 30 import org.libspark.flartoolkit.core.raster.FLARRaster_BitmapData; 31 import org.libspark.flartoolkit.core.raster.IFLARRaster; 32 import org.libspark.flartoolkit.core.raster.rgb.IFLARRgbRaster; 33 import org.libspark.flartoolkit.core.rasterfilter.rgb2bin.FLARRasterFilter_BitmapDataThreshold; 34 import org.libspark.flartoolkit.core.types.FLARIntSize; 31 35 32 36 /** … … 37 41 { 38 42 private var _detector:FLARSquareDetector; 39 private var _s quareList:FLARSquareList;43 private var _stack:FLARSquareStack; 40 44 41 45 private var _thickness:Number=NaN; … … 47 51 private var _joints:String=null; 48 52 private var _miterLimit:Number = 3; 53 private var _monoSrc:IFLARRaster; 54 private var _filter:FLARRasterFilter_BitmapDataThreshold; 49 55 50 public function FLARSquareLayer(src:FLARBitmapData, param:FLARParam, thresh:int=100) 56 /** 57 * 58 * @param src 59 * @param param 60 * @param thresh 61 */ 62 public function FLARSquareLayer(src:IFLARRgbRaster, param:FLARParam, thresh:int=100) 51 63 { 52 64 super(src,thresh); 53 this._squareList = new FLARSquareList(10); 54 this._detector = new FLARSquareDetector(param); 65 this._stack = new FLARSquareStack(10); 66 this._detector = new FLARSquareDetector(param.getDistortionFactor(), param.getScreenSize()); 67 this._filter = new FLARRasterFilter_BitmapDataThreshold(thresh); 68 this._monoSrc = new FLARRaster_BitmapData(src.getWidth(), src.getHeight()); 55 69 } 56 70 … … 60 74 override public function update():void 61 75 { 62 this._detector.detectSquare(this._source, this._thresh, this._squareList); 76 this._filter.doFilter(this._source, this._monoSrc); 77 this._detector.detectMarker(this._monoSrc, this._stack); 63 78 this.graphics.clear(); 64 var squareNum:int = this._s quareList.getSquareNum();79 var squareNum:int = this._stack.getLength(); 65 80 var square:FLARSquare; 66 81 var v:Array; 67 82 68 83 for (var i:int = 0; i < squareNum; i++) { 69 square = this._squareList.getSquare(i); 84 square = this._stack.getItem(i) as FLARSquare; 85 if (square == null) { 86 trace(square, i,"nullです"); 87 continue; 88 } 70 89 v = square.sqvertex; 71 90 this.graphics.lineStyle(this._thickness, … … 77 96 this._joints, 78 97 this._miterLimit); 79 this.graphics.moveTo(v[3] [0], v[3][1]);98 this.graphics.moveTo(v[3].x, v[3].y); 80 99 for (var vi:int = 0; vi < v.length; vi++) { 81 this.graphics.lineTo(v[vi] [0], v[vi][1]);100 this.graphics.lineTo(v[vi].x, v[vi].y); 82 101 } 83 102 }
