チェンジセット 1787

差分発生行の前後
無視リスト:
コミット日時:
2008/11/04 02:33:35 (2 ヶ月前)
コミッタ:
tarotarorg
ログメッセージ:

--

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/detector/CubeMarkerMatchResultTemporaryHolder.as

    r1774 r1787  
    7575                { 
    7676                        trace("top:", topConf, "front:", frontConf, "back:", backConf, "left:", leftConf, "right:", rightConf); 
    77                         _currentMaxConfidenceMarkerDirection = CubeMarkerDirection.TOP; 
     77                        _currentMaxConfidenceMarkerDirection = CubeFace.TOP; 
    7878                        _currentMaxConfidence = topConf; 
    7979                        _currentMaxConfidenceDirection = topDir; 
     
    8181                         
    8282                        if (bottomConf > _currentMaxConfidence) { 
    83                                 _currentMaxConfidenceMarkerDirection = CubeMarkerDirection.BOTTOM; 
     83                                _currentMaxConfidenceMarkerDirection = CubeFace.BOTTOM; 
    8484                                _currentMaxConfidence = bottomConf; 
    8585                                _currentMaxConfidenceDirection = bottomDir; 
     
    8787                        } 
    8888                        if (frontConf > _currentMaxConfidence) { 
    89                                 _currentMaxConfidenceMarkerDirection = CubeMarkerDirection.FRONT; 
     89                                _currentMaxConfidenceMarkerDirection = CubeFace.FRONT; 
    9090                                _currentMaxConfidence = frontConf; 
    9191                                _currentMaxConfidenceDirection = frontDir; 
     
    9393                        } 
    9494                        if (backConf > _currentMaxConfidence) { 
    95                                 _currentMaxConfidenceMarkerDirection = CubeMarkerDirection.BACK; 
     95                                _currentMaxConfidenceMarkerDirection = CubeFace.BACK; 
    9696                                _currentMaxConfidence = backConf; 
    9797                                _currentMaxConfidenceDirection = backDir; 
     
    9999                        } 
    100100                        if (leftConf > _currentMaxConfidence) { 
    101                                 _currentMaxConfidenceMarkerDirection = CubeMarkerDirection.LEFT; 
     101                                _currentMaxConfidenceMarkerDirection = CubeFace.LEFT; 
    102102                                _currentMaxConfidence = leftConf; 
    103103                                _currentMaxConfidenceDirection = leftDir; 
     
    105105                        } 
    106106                        if (rightConf > _currentMaxConfidence) { 
    107                                 _currentMaxConfidenceMarkerDirection = CubeMarkerDirection.RIGHT; 
     107                                _currentMaxConfidenceMarkerDirection = CubeFace.RIGHT; 
    108108                                _currentMaxConfidence = rightConf; 
    109109                                _currentMaxConfidenceDirection = rightDir; 
  • as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/detector/FLARCubeMarkerDetector.as

    r1774 r1787  
    130130                                                                                                immidateEndConfidence:Number = 0.9,endConfidence:Number = 0.8) { 
    131131                         
    132                         DETECT_FLAGS[CubeMarkerDirection.TOP] = 1; 
    133                         DETECT_FLAGS[CubeMarkerDirection.BOTTOM] = 2; 
    134                         DETECT_FLAGS[CubeMarkerDirection.FRONT] = 4; 
    135                         DETECT_FLAGS[CubeMarkerDirection.BACK] = 8; 
    136                         DETECT_FLAGS[CubeMarkerDirection.LEFT] = 16; 
    137                         DETECT_FLAGS[CubeMarkerDirection.RIGHT] = 32; 
     132                        DETECT_FLAGS[CubeFace.TOP] = 1; 
     133                        DETECT_FLAGS[CubeFace.BOTTOM] = 2; 
     134                        DETECT_FLAGS[CubeFace.FRONT] = 4; 
     135                        DETECT_FLAGS[CubeFace.BACK] = 8; 
     136                        DETECT_FLAGS[CubeFace.LEFT] = 16; 
     137                        DETECT_FLAGS[CubeFace.RIGHT] = 32; 
    138138 
    139139                        //閾値を設定 
     
    172172                        this._detectFlag = 0; 
    173173                        if (this._marker == null) return; 
    174                         this._detectFlag |= this._marker.top == null ? 0 : DETECT_FLAGS[CubeMarkerDirection.TOP]; 
    175                         this._detectFlag |= this._marker.bottom == null ? 0 : DETECT_FLAGS[CubeMarkerDirection.BOTTOM]; 
    176                         this._detectFlag |= this._marker.front == null ? 0 : DETECT_FLAGS[CubeMarkerDirection.FRONT]; 
    177                         this._detectFlag |= this._marker.back == null ? 0 : DETECT_FLAGS[CubeMarkerDirection.BACK]; 
    178                         this._detectFlag |= this._marker.left == null ? 0 : DETECT_FLAGS[CubeMarkerDirection.LEFT]; 
    179                         this._detectFlag |= this._marker.right == null ? 0 : DETECT_FLAGS[CubeMarkerDirection.RIGHT]; 
     174                        this._detectFlag |= this._marker.top == null ? 0 : DETECT_FLAGS[CubeFace.TOP]; 
     175                        this._detectFlag |= this._marker.bottom == null ? 0 : DETECT_FLAGS[CubeFace.BOTTOM]; 
     176                        this._detectFlag |= this._marker.front == null ? 0 : DETECT_FLAGS[CubeFace.FRONT]; 
     177                        this._detectFlag |= this._marker.back == null ? 0 : DETECT_FLAGS[CubeFace.BACK]; 
     178                        this._detectFlag |= this._marker.left == null ? 0 : DETECT_FLAGS[CubeFace.LEFT]; 
     179                        this._detectFlag |= this._marker.right == null ? 0 : DETECT_FLAGS[CubeFace.RIGHT]; 
    180180                } 
    181181 
     
    275275 
    276276                                //1.まずはTOPから 
    277                                 if (detectFlagTemp & DETECT_FLAGS[CubeMarkerDirection.TOP]) { 
     277                                if (detectFlagTemp & DETECT_FLAGS[CubeFace.TOP]) { 
    278278                                        _match_patt.evaluate(this._marker.top); 
    279279                                        result.topConf = _match_patt.getConfidence(); 
     
    283283                                                //即時終了条件1に一致 
    284284                                                return this.createDetectedResult 
    285                                                         (result.topConf, result.topDir, square, CubeMarkerDirection.TOP); 
     285                                                        (result.topConf, result.topDir, square, CubeFace.TOP); 
    286286                                        } 
    287287                                } 
    288288                                 
    289289                                //2.次はFRONT 
    290                                 if (detectFlagTemp & DETECT_FLAGS[CubeMarkerDirection.FRONT]) { 
     290                                if (detectFlagTemp & DETECT_FLAGS[CubeFace.FRONT]) { 
    291291                                        _match_patt.evaluate(this._marker.front); 
    292292                                        result.frontConf = _match_patt.getConfidence(); 
     
    296296                                                //即時終了条件1に一致 
    297297                                                return this.createDetectedResult 
    298                                                         (result.frontConf, result.frontDir, square, CubeMarkerDirection.FRONT); 
     298                                                        (result.frontConf, result.frontDir, square, CubeFace.FRONT); 
    299299                                        } 
    300300                                } 
    301301                                 
    302302                                //3.次はBACK 
    303                                 if (detectFlagTemp & DETECT_FLAGS[CubeMarkerDirection.BACK]) { 
     303                                if (detectFlagTemp & DETECT_FLAGS[CubeFace.BACK]) { 
    304304                                        _match_patt.evaluate(this._marker.back); 
    305305                                        result.backConf = _match_patt.getConfidence(); 
     
    309309                                                //即時終了条件1に一致 
    310310                                                return this.createDetectedResult 
    311                                                         (result.backConf, result.backDir, square, CubeMarkerDirection.BACK); 
     311                                                        (result.backConf, result.backDir, square, CubeFace.BACK); 
    312312                                        } 
    313313                                } 
    314314 
    315315                                //4.次はLEFT 
    316                                 if (detectFlagTemp & DETECT_FLAGS[CubeMarkerDirection.LEFT]) { 
     316                                if (detectFlagTemp & DETECT_FLAGS[CubeFace.LEFT]) { 
    317317                                        _match_patt.evaluate(this._marker.left); 
    318318                                        result.leftConf = _match_patt.getConfidence(); 
     
    322322                                                //即時終了条件1に一致 
    323323                                                return this.createDetectedResult 
    324                                                         (result.leftConf, result.leftDir, square, CubeMarkerDirection.LEFT); 
     324                                                        (result.leftConf, result.leftDir, square, CubeFace.LEFT); 
    325325                                        } 
    326326                                } 
    327327 
    328328                                //5.次はRIGHT 
    329                                 if (detectFlagTemp & DETECT_FLAGS[CubeMarkerDirection.RIGHT]) { 
     329                                if (detectFlagTemp & DETECT_FLAGS[CubeFace.RIGHT]) { 
    330330                                        _match_patt.evaluate(this._marker.right); 
    331331                                        result.rightConf = _match_patt.getConfidence(); 
     
    335335                                                //即時終了条件1に一致 
    336336                                                return this.createDetectedResult 
    337                                                         (result.rightConf, result.rightDir, square, CubeMarkerDirection.RIGHT); 
     337                                                        (result.rightConf, result.rightDir, square, CubeFace.RIGHT); 
    338338                                        } 
    339339                                } 
    340340 
    341341                                //6.最後はBOTTOM 
    342                                 if (detectFlagTemp & DETECT_FLAGS[CubeMarkerDirection.BOTTOM]) { 
     342                                if (detectFlagTemp & DETECT_FLAGS[CubeFace.BOTTOM]) { 
    343343                                        _match_patt.evaluate(this._marker.bottom); 
    344344                                        result.bottomConf = _match_patt.getConfidence(); 
     
    348348                                                //即時終了条件1に一致 
    349349                                                return this.createDetectedResult 
    350                                                         (result.bottomConf, result.bottomDir, square, CubeMarkerDirection.BOTTOM); 
     350                                                        (result.bottomConf, result.bottomDir, square, CubeFace.BOTTOM); 
    351351                                        } 
    352352                                } 
  • as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/layers/FLARCubeMarkerLayer.as

    r1774 r1787  
    5050        import org.tarotaro.flash.ar.detector.CubeMarker; 
    5151        import org.tarotaro.flash.ar.detector.CubeMarkerDetectedResult; 
    52         import org.tarotaro.flash.ar.detector.CubeMarkerDirection
     52        import org.tarotaro.flash.ar.detector.CubeFace
    5353        import org.tarotaro.flash.ar.detector.FLARCubeMarkerDetector; 
    5454         
     
    114114                        if (r != null && r.confidence > this._confidence) { 
    115115                                        trace(r.markerDirection, r.confidence); 
    116                                         if (r.markerDirection == CubeMarkerDirection.FRONT) { 
     116                                        if (r.markerDirection == CubeFace.FRONT) { 
    117117                                                this._detector.getTransmationMatrix(r, this._resultMat); 
    118118                                                this._baseNode.setTransformMatrix(this._resultMat);