OSDN Git Service

[リリース]NyARToolkit 1.0.0
[nyartoolkit-and/nyartoolkit-and.git] / trunk / src / jp / nyatla / nyartoolkit / core / raster / NyARRaster_Blank.java
1 /* \r
2  * PROJECT: NyARToolkit\r
3  * --------------------------------------------------------------------------------\r
4  * This work is based on the original ARToolKit developed by\r
5  *   Hirokazu Kato\r
6  *   Mark Billinghurst\r
7  *   HITLab, University of Washington, Seattle\r
8  * http://www.hitl.washington.edu/artoolkit/\r
9  *\r
10  * The NyARToolkit is Java version ARToolkit class library.\r
11  * Copyright (C)2008 R.Iizuka\r
12  *\r
13  * This program is free software; you can redistribute it and/or\r
14  * modify it under the terms of the GNU General Public License\r
15  * as published by the Free Software Foundation; either version 2\r
16  * of the License, or (at your option) any later version.\r
17  * \r
18  * This program is distributed in the hope that it will be useful,\r
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
21  * GNU General Public License for more details.\r
22  * \r
23  * You should have received a copy of the GNU General Public License\r
24  * along with this framework; if not, write to the Free Software\r
25  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
26  * \r
27  * For further information please contact.\r
28  *      http://nyatla.jp/nyatoolkit/\r
29  *      <airmail(at)ebony.plala.or.jp>\r
30  * \r
31  */\r
32 package jp.nyatla.nyartoolkit.core.raster;\r
33 \r
34 \r
35 /*\r
36  * 真っ黒の矩形を定義する。\r
37  *\r
38  */\r
39 public class NyARRaster_Blank implements NyARRaster\r
40 {\r
41     private int width;\r
42     private int height;\r
43     public NyARRaster_Blank(int i_width,int i_height)\r
44     {\r
45         width  =i_width;\r
46         height =i_height;\r
47     }\r
48     //RGBの合計値を返す\r
49     public int getPixelTotal(int i_x,int i_y)\r
50     {\r
51         return 0;\r
52     }\r
53     public void getPixelTotalRowLine(int i_row,int[] o_line)\r
54     {\r
55         for(int i=this.width-1;i>=0;i--){\r
56             o_line[i]=0;\r
57         }\r
58     }    \r
59     public int getWidth()\r
60     {\r
61         return width;\r
62     }\r
63     public int getHeight()\r
64     {\r
65         return height;\r
66     }\r
67     public void getPixel(int i_x,int i_y,int[] i_rgb)\r
68     {\r
69         i_rgb[0]=0;\r
70         i_rgb[1]=0;\r
71         i_rgb[2]=0;\r
72     }\r
73     public void getPixelSet(int[] i_x,int i_y[],int i_num,int[] o_rgb)\r
74     {\r
75         for(int i=i_num-1;i>=0;i--){\r
76             o_rgb[i*3+0]=0;//R\r
77             o_rgb[i*3+1]=0;//G\r
78             o_rgb[i*3+2]=0;//B\r
79         }       \r
80     }    \r
81 }\r