チェンジセット 3901: as3/FLARToolKit

差分発生行の前後
無視リスト:
コミット日時:
2010/05/15 01:41:23 (3 年前)
コミッタ:
rokubou
ログメッセージ:

作成途中

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • as3/FLARToolKit/trunk/src/examples/FLARTK_Example_Single_SimpleCube_Away3DLite.as

    r3747 r3901  
    311311                        this.scene3d = new Scene3D(); 
    312312                         
     313                        // 3Dモデル表示時の視点を設定 
     314                        var _viewportToSourceWidthRatio:Number = this.canvasWidth/this.captureWidth; 
     315                        trace("viewRatio :"+_viewportToSourceWidthRatio+"/width"+this.captureWidth); 
     316                        this.camera3d = new FLARCamera3D(this.cameraParam, _viewportToSourceWidthRatio); 
     317                         
     318                         
    313319                        // PV3DのViewport3Dと似たようなもの 
    314                         this.view3d = new View3D(this.scene3d, camera3d); 
     320                        this.view3d = new View3D(this.scene3d, this.camera3d); 
    315321                         
    316322                        // 微調整 
    317                         this.view3d.x = this.captureWidth; 
    318                         this.view3d.y = this.captureHeight; 
     323                        this.view3d.scaleX = this.canvasWidth; 
     324                        this.view3d.scaleY = this.canvasHeight; 
     325//                      this.view3d.x = this.canvasWidth/_viewportToSourceWidthRatio ; 
     326//                      this.view3d.y = this.canvasHeight/_viewportToSourceWidthRatio; 
     327                        this.view3d.z = 0; 
     328                         
    319329                        this.addChild(this.view3d); 
    320                          
    321                         // 3Dモデル表示時の視点を設定 
    322                         this.camera3d = new FLARCamera3D(this.cameraParam, this.view3d.width/this.captureWidth); 
    323330                         
    324331                        this.markerNode = new FLARBaseNode(); 
     
    340347                        _plane.height = 80; 
    341348                        _plane.material = wmat; 
    342                         _plane.rotationX = 90; 
    343349                         
    344350                        // Cube 
    345351                        var mat:WireColorMaterial = new WireColorMaterial(0xFF1919, 1, 0x730000); 
    346352                        var _cube:Cube6 = new Cube6( mat, 40, 40, 40); 
    347                         _cube.z =
     353                        _cube.y = -2
    348354                         
    349355                        // _container に 追加 
     
    361367                        // モデル格納用のコンテナ作成 
    362368                        this.container = new ObjectContainer3D(); 
     369                         
    363370                        // 3Dオブジェクト生成 
    364371                        this.createObject(); 
     
    387394                        this.detector.getTransformMatrix(this.resultMat); 
    388395                        this.markerNode.setTransformMatrix(this.resultMat); 
    389                         this.markerNode.visible = true; 
     396                        this.view3d.visible = true; 
    390397                } 
    391398                 
     
    404411                public function onMarkerRemoved(e:Event=null):void 
    405412                { 
    406                         this.markerNode.visible = false; 
     413                        this.view3d.visible = false; 
    407414                } 
    408415                 
  • as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/support/away3d_lite/FLARBaseNode.as

    r3747 r3901  
    5050                 
    5151                public function setTransformMatrix(r:FLARTransMatResult):void { 
    52                         var m:Matrix3D = new Matrix3D (Vector.<Number>([ 
     52//                      var m:Matrix3D = new Matrix3D(Vector.<Number>([ 
     53//                                       r.m00,  r.m10,  r.m20, 0, 
     54//                                      -r.m01, -r.m11, -r.m21, 0, 
     55//                                      -r.m02, -r.m12, -r.m22, 0, 
     56//                                       r.m03,  r.m13,  r.m23, 1 
     57//                                      ])); 
     58                        var m:Matrix3D = new Matrix3D(Vector.<Number>([ 
    5359                                         r.m00,  r.m10,  r.m20, 0, 
    54                                         -r.m01, -r.m11, -r.m21, 0, 
    5560                                        -r.m02, -r.m12, -r.m22, 0, 
     61                                         r.m01,  r.m11,  r.m21, 0, 
    5662                                         r.m03,  r.m13,  r.m23, 1 
    5763                                        ])); 
  • as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/support/away3d_lite/FLARCamera3D.as

    r3748 r3901  
    5858                public function FLARCamera3D (flarParams:FLARParam, viewportToSourceWidthRatio:Number) :void { 
    5959                        super(); 
    60                          
    6160                        this.x = 0; 
    6261                        this.y = 0; 
     
    7170                                ])); 
    7271                         
    73                         // TODO: once Away3DLite main branch is using lenses, uncomment this and remove projectionMatrix3D() override. 
    74 //                      lens = new FLARLens(this.flarProjectionMatrix); 
    7572                } 
    7673                 
    7774                /** 
    78                  * TODO: once Away3DLite main branch is using lenses, remove this override and use FLARLens above instead. 
    79                  *  
    8075                 * Returns the 3d matrix representing the camera projection for the view. 
    81                  *  
    8276                 * @see away3dlite.containers.View3D#render() 
    8377                 */