OSDN Git Service

初期インポート。
[nyartoolkit-and/nyartoolkit-android-0.9.git] / src / jp / nyatla / nyartoolkit / core / raster / NyARRaster_Blank.java
diff --git a/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster_Blank.java b/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster_Blank.java
new file mode 100644 (file)
index 0000000..1bea194
--- /dev/null
@@ -0,0 +1,81 @@
+/* \r
+ * PROJECT: NyARToolkit\r
+ * --------------------------------------------------------------------------------\r
+ * This work is based on the original ARToolKit developed by\r
+ *   Hirokazu Kato\r
+ *   Mark Billinghurst\r
+ *   HITLab, University of Washington, Seattle\r
+ * http://www.hitl.washington.edu/artoolkit/\r
+ *\r
+ * The NyARToolkit is Java version ARToolkit class library.\r
+ * Copyright (C)2008 R.Iizuka\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ * \r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ * \r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this framework; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+ * \r
+ * For further information please contact.\r
+ *     http://nyatla.jp/nyatoolkit/\r
+ *     <airmail(at)ebony.plala.or.jp>\r
+ * \r
+ */\r
+package jp.nyatla.nyartoolkit.core.raster;\r
+\r
+\r
+/*\r
+ * 真っ黒の矩形を定義する。\r
+ *\r
+ */\r
+public class NyARRaster_Blank implements NyARRaster\r
+{\r
+    private int width;\r
+    private int height;\r
+    public NyARRaster_Blank(int i_width,int i_height)\r
+    {\r
+        width  =i_width;\r
+        height =i_height;\r
+    }\r
+    //RGBの合計値を返す\r
+    public int getPixelTotal(int i_x,int i_y)\r
+    {\r
+       return 0;\r
+    }\r
+    public void getPixelTotalRowLine(int i_row,int[] o_line)\r
+    {\r
+        for(int i=this.width-1;i>=0;i--){\r
+           o_line[i]=0;\r
+       }\r
+    }    \r
+    public int getWidth()\r
+    {\r
+       return width;\r
+    }\r
+    public int getHeight()\r
+    {\r
+       return height;\r
+    }\r
+    public void getPixel(int i_x,int i_y,int[] i_rgb)\r
+    {\r
+        i_rgb[0]=0;\r
+        i_rgb[1]=0;\r
+        i_rgb[2]=0;\r
+    }\r
+    public void getPixelSet(int[] i_x,int i_y[],int i_num,int[] o_rgb)\r
+    {\r
+       for(int i=i_num-1;i>=0;i--){\r
+           o_rgb[i*3+0]=0;//R\r
+           o_rgb[i*3+1]=0;//G\r
+           o_rgb[i*3+2]=0;//B\r
+       }       \r
+    }    \r
+}\r