OSDN Git Service

[Backup]NyARToolkit for Java
[nyartoolkit-and/nyartoolkit-and.git] / src / jp / nyatla / nyartoolkit / nyidmarker / data / NyIdMarkerData_RawBit.java
1 /* \r
2  * PROJECT: NyARToolkit(Extension)\r
3  * --------------------------------------------------------------------------------\r
4  * The NyARToolkit is Java edition ARToolKit class library.\r
5  * Copyright (C)2008-2009 Ryo Iizuka\r
6  *\r
7  * This program is free software: you can redistribute it and/or modify\r
8  * it under the terms of the GNU General Public License as published by\r
9  * the Free Software Foundation, either version 3 of the License, or\r
10  * (at your option) any later version.\r
11  * \r
12  * This program is distributed in the hope that it will be useful,\r
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
15  * GNU General Public License for more details.\r
16  *\r
17  * You should have received a copy of the GNU General Public License\r
18  * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
19  * \r
20  * For further information please contact.\r
21  *      http://nyatla.jp/nyatoolkit/\r
22  *      <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>\r
23  * \r
24  */\r
25 package jp.nyatla.nyartoolkit.nyidmarker.data;\r
26 \r
27 /**\r
28  * [[Strage class]]\r
29  *\r
30  */\r
31 public class NyIdMarkerData_RawBit implements INyIdMarkerData\r
32 {\r
33         public final int[] packet=new int[22];\r
34         public int length;\r
35         public boolean isEqual(INyIdMarkerData i_target)\r
36         {\r
37                 NyIdMarkerData_RawBit s=(NyIdMarkerData_RawBit)i_target;\r
38                 if(s.length!=this.length){\r
39                         return false;\r
40                 }\r
41                 for(int i=s.length-1;i>=0;i--){\r
42                         if(s.packet[i]!=s.packet[i]){\r
43                                 return false;\r
44                         }\r
45                 }\r
46                 return true;\r
47         }\r
48         public void copyFrom(INyIdMarkerData i_source)\r
49         {\r
50                 final NyIdMarkerData_RawBit s=(NyIdMarkerData_RawBit)i_source;\r
51                 System.arraycopy(s.packet,0,this.packet,0,s.length);\r
52                 this.length=s.length;\r
53                 return;\r
54         }\r
55 }\r