2 * PROJECT: NyARToolkit
\r
3 * --------------------------------------------------------------------------------
\r
5 * The NyARToolkit is Java version ARToolkit class library.
\r
6 * Copyright (C)2008 R.Iizuka
\r
8 * This program is free software; you can redistribute it and/or
\r
9 * modify it under the terms of the GNU General Public License
\r
10 * as published by the Free Software Foundation; either version 2
\r
11 * of the License, or (at your option) any later version.
\r
13 * This program is distributed in the hope that it will be useful,
\r
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
16 * GNU General Public License for more details.
\r
18 * You should have received a copy of the GNU General Public License
\r
19 * along with this framework; if not, write to the Free Software
\r
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
22 * For further information please contact.
\r
23 * http://nyatla.jp/nyatoolkit/
\r
24 * <airmail(at)ebony.plala.or.jp>
\r
27 package jp.nyatla.nyartoolkit.core;
\r
29 import jp.nyatla.nyartoolkit.*;
\r
31 * NyARTransMat戻り値専用のNyARMat
\r
34 public class NyARTransMatResult extends NyARMat
\r
36 private boolean has_value=false;
\r
37 public NyARTransMatResult()
\r
45 * @throws NyARException
\r
47 public NyARTransMatResult(int i_row,int i_clm) throws NyARException
\r
57 public void updateMatrixValue(NyARTransRot i_rot,double[] i_off,double[] i_trans)
\r
60 double[] rot=i_rot.getArray();
\r
66 pa[3] = rot[0*3+0]*i_off[0] + rot[0*3+1]*i_off[1] + rot[0*3+2]*i_off[2] + i_trans[0];
\r
72 pa[3] = rot[1*3+0]*i_off[0] + rot[1*3+1]*i_off[1] + rot[1*3+2]*i_off[2] + i_trans[1];
\r
78 pa[3] = rot[2*3+0]*i_off[0] + rot[2*3+1]*i_off[1] + rot[2*3+2]*i_off[2] + i_trans[2];
\r
81 this.has_value=true;
\r
84 public void copyFrom(NyARTransMatResult i_from) throws NyARException
\r
86 super.copyFrom(i_from);
\r
87 this.has_value=i_from.has_value;
\r
89 public boolean hasValue()
\r
91 return this.has_value;
\r