チェンジセット 3560

差分発生行の前後
無視リスト:
コミット日時:
2010/03/16 00:28:50 (3 年前)
コミッタ:
rokubou
ログメッセージ:

認識中のIDを表示するように修正

ファイル:

凡例:

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

    r3443 r3560  
    4646        import org.papervision3d.render.LazyRenderEngine; 
    4747        import org.papervision3d.view.Viewport3D; 
     48        import org.papervision3d.objects.DisplayObject3D; 
     49        import org.papervision3d.typography.Font3D; 
     50        import org.papervision3d.materials.special.Letter3DMaterial; 
     51        import org.papervision3d.typography.Text3D; 
     52        import org.papervision3d.typography.fonts.HelveticaBold; 
    4853 
    4954        import org.libspark.flartoolkit.core.FLARCode; 
     
    110115                 
    111116                private var _plane:Plane; 
     117                private var _textdata:Text3D; 
     118                private var _container:DisplayObject3D 
    112119                 
    113120                /** 
     
    204211                        _markerNode = _scene.addChild(new FLARBaseNode()) as FLARBaseNode; 
    205212                         
     213                        // モデル格納用のコンテナ作成 
     214                        _container = new DisplayObject3D(); 
     215                         
    206216                        // Create Plane with same size of the marker with wireframe. 
    207217                        // ワイヤーフレームで,マーカーと同じサイズを Plane を作ってみる。 
     
    209219                        _plane = new Plane(wmat, 80, 80); // 80mm x 80mm。 
    210220                        _plane.rotationX = 180; 
     221                         
     222                        _container.addChild(_plane); 
     223                         
     224                        // 
     225                        // ID表示用のデータを作成する。 
     226                        var textFormat:Letter3DMaterial = new Letter3DMaterial(0x000000, 0.9); 
     227                        _textdata = new Text3D("aaa", new HelveticaBold(), textFormat, "textdata") 
     228                        _textdata.rotationX = 180; 
     229                        _textdata.rotationZ = 90; 
     230                        _textdata.scale = 0.5; 
     231                         
     232                        _container.addChild(_textdata); 
     233                                                 
    211234                        // attach to _markerNode to follow the marker. 
    212235                        // _markerNode に addChild するとマーカーに追従する。 
    213                         _markerNode.addChild(_plane); 
     236                        _markerNode.addChild(_container); 
    214237                         
    215238                        // Place the light at upper front. 
     
    259282                        } 
    260283                        trace("[add] : ID = " + this.current_id); 
     284                         
     285                        // IDを表示する。 
     286                        _textdata.text = this.current_id; 
     287         
    261288                        this._markerNode.visible = true; 
    262289                }