root/as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/core/transmat/FLARTransMatResult.as

リビジョン 4718, 2.5 kB (コミッタ: rokubou, コミット時期: 4 日 前)

FLARToolKit v4 core

Line 
1 /*
2  * PROJECT: FLARToolKit
3  * --------------------------------------------------------------------------------
4  * This work is based on the FLARToolKit developed by
5  *   R.Iizuka (nyatla)
6  * http://nyatla.jp/nyatoolkit/
7  *
8  * The FLARToolKit is ActionScript 3.0 version ARToolkit class library.
9  * Copyright (C)2008 Saqoosha
10  *
11  * This program is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23  *
24  * For further information please contact.
25  *      http://www.libspark.org/wiki/saqoosha/FLARToolKit
26  *      <saq(at)saqoosha.net>
27  *
28  */
29 package org.libspark.flartoolkit.core.transmat
30 {
31         import org.libspark.flartoolkit.core.types.*;
32         import org.libspark.flartoolkit.core.types.matrix.*;
33         public class FLARTransMatResult extends FLARDoubleMatrix44
34         {
35                 /**
36                  * 観測値とのずれを示すエラーレート値です。SetValueにより更新されます。
37                  * {@link #has_value}がtrueの時に使用可能です。
38                  */
39                 public var last_error:Number;
40
41                 /**
42                  * この行列に1度でも行列をセットしたかを返します。
43                  */
44                 public var has_value:Boolean = false;
45                 /**
46                  * コンストラクタです。
47                  */
48                 public function FLARTransMatResult()
49                 {
50                         this.m30=this.m31=this.m32=0;
51                         this.m33=1.0;
52                 }
53                 /**
54                  * 平行移動量と回転行列をセットします。この関数は、IFLARTransmatインタフェイスのクラスが結果を保存するために使います。
55                  * @param i_rot
56                  * @param i_trans
57                  */
58                 public function setValue_3(i_rot:FLARDoubleMatrix33,i_trans:FLARDoublePoint3d ,i_error:Number):void
59                 {
60                         this.m00=i_rot.m00;
61                         this.m01=i_rot.m01;
62                         this.m02=i_rot.m02;
63                         this.m03=i_trans.x;
64
65                         this.m10 =i_rot.m10;
66                         this.m11 =i_rot.m11;
67                         this.m12 =i_rot.m12;
68                         this.m13 =i_trans.y;
69
70                         this.m20 = i_rot.m20;
71                         this.m21 = i_rot.m21;
72                         this.m22 = i_rot.m22;
73                         this.m23 = i_trans.z;
74
75                         this.m30=this.m31=this.m32=0;
76                         this.m33=1.0;           
77                         this.has_value = true;
78                         this.last_error=i_error;
79                         return;
80                 }
81         }
82
83 }
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。