チェンジセット 470
- コミット日時:
- 2008/05/22 01:13:52 (4 年前)
- ファイル:
-
- as3/FLARToolKit/trunk/samples/FLARToolKitTest2.as (更新) (7 diffs)
- as3/FLARToolKit/trunk/samples/FLARToolKitTest2.swf (更新) (変更前)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/base (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/core/NyARColorPatt_O1.java (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/core/NyARColorPatt_O2.java (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/core/NyARLabeling.java (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/core/NyARTransMat_O1.java (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/core/NyARTransRot.java (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/core/match/NyARMatchPatt_Color_WITH_PCA.java (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/core/raster/NyARRaster_BGRA.java (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/core/raster/NyARRaster_Blank.java (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/core/raster/NyARRaster_RGB.java (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/sample (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/scene (追加)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/scene/FLARCamera3D.as (追加)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/util/BytePointer.java (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/util/DoublePointer.java (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/util/IntPointer.java (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/util/IntValue.java (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/util/ShortPointer.java (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/util/StringPointer.java (削除)
- as3/FLARToolKit/trunk/src/com/libspark/flartoolkit/util/StringValue.java (削除)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/FLARToolKit/trunk/samples/FLARToolKitTest2.as
r407 r470 1 1 package { 2 2 3 import caurina.transitions.Equations; 4 import caurina.transitions.Tweener; 5 3 6 import com.libspark.flartoolkit.core.FLARTransMatResult; 7 import com.libspark.flartoolkit.core.raster.FLARBitmapData; 8 import com.libspark.flartoolkit.scene.FLARCamera3D; 4 9 10 import flash.display.BitmapData; 5 11 import flash.display.StageQuality; 6 12 import flash.display.StageScaleMode; 7 13 import flash.events.Event; 8 14 15 import mx.core.BitmapAsset; 16 17 import org.papervision3d.cameras.Camera3D; 9 18 import org.papervision3d.cameras.FrustumCamera3D; 19 import org.papervision3d.core.geom.renderables.Vertex3D; 20 import org.papervision3d.core.geom.renderables.Vertex3DInstance; 10 21 import org.papervision3d.core.math.Matrix3D; 22 import org.papervision3d.core.proto.CameraObject3D; 11 23 import org.papervision3d.core.proto.MaterialObject3D; 12 24 import org.papervision3d.lights.PointLight3D; … … 22 34 23 35 24 [SWF(width= 320,height=240,frameRate=60,backgroundColor=0x0)]36 [SWF(width=640,height=480,frameRate=60,backgroundColor=0x0)] 25 37 26 38 public class FLARToolKitTest2 extends ARAppBase { … … 30 42 31 43 private var _scene:Scene3D;; 32 private var _camera3d:F rustumCamera3D;44 private var _camera3d:FLARCamera3D; 33 45 private var _viewport:Viewport3D; 34 46 private var _renderer:LazyRenderEngine; … … 39 51 40 52 private var _resultMat:FLARTransMatResult = new FLARTransMatResult(); 53 41 54 42 55 public function FLARToolKitTest2() { … … 51 64 this.removeEventListener(Event.INIT, this._onInit); 52 65 66 this._capture.width = 640; 67 this._capture.height = 480; 68 this._capture.scaleX *= -1; 69 this._capture.x = 640; 53 70 this.addChild(this._capture); 54 71 55 this._viewport = this.addChild(new Viewport3D(320, 240)) as Viewport3D; 56 this._camera3d = new FrustumCamera3D(this._viewport, 37.5, 10, 10000); 57 this._camera3d.z = 0; 72 this._viewport = this.addChild(new Viewport3D(320, 240, false, false, false, false)) as Viewport3D; 73 this._viewport.scaleX = -2; 74 this._viewport.scaleY = 2; 75 this._viewport.x = 644; // +4pix ??? 76 77 this._camera3d = new FLARCamera3D(this._viewport, this._param); 58 78 59 79 this._scene = new Scene3D(); 60 80 this._transGrp = this._scene.addChild(new DisplayObject3D()) as DisplayObject3D; 61 this._basePlane = new Plane(new WireframeMaterial(0xff0000, 1, 2), 80, 80); 81 var wmat:WireframeMaterial = new WireframeMaterial(0xff0000, 1, 2); 82 wmat.doubleSided = true; 83 this._basePlane = new Plane(wmat, 80, 80); 62 84 this._transGrp.addChild(this._basePlane); 63 85 var light:PointLight3D = new PointLight3D(); 64 86 light.z = -1000; 65 var fmat:FlatShadeMaterial = new FlatShadeMaterial(light, 0xff cc66, 0x0);87 var fmat:FlatShadeMaterial = new FlatShadeMaterial(light, 0xff22aa, 0x0); 66 88 fmat.opposite = true; 67 var wmat:WireframeMaterial = new WireframeMaterial(0xffcc66, 1, 3);68 89 this._cube = new Cube(new MaterialsList({ all: fmat }), 40, 40, 40); 69 90 this._cube.z += 20; … … 73 94 74 95 this.addEventListener(Event.ENTER_FRAME, this._onEnterFrame); 96 this._onEnterFrame(); 75 97 76 98 this.addChild(new FPSMeter()); … … 86 108 mtx.n21 = -a[1][0]; mtx.n22 = -a[1][1]; mtx.n23 = -a[1][2]; mtx.n24 = -a[1][3]; 87 109 mtx.n31 = a[2][0]; mtx.n32 = a[2][1]; mtx.n33 = a[2][2]; mtx.n34 = a[2][3]; 110 this._renderer.render(); 88 111 } 89 this._renderer.render();90 112 } 91 113

