OSDN Git Service

[tag]NyARToolkit/2.5.1
[nyartoolkit-and/nyartoolkit-and.git] / tags / 2.5.1 / src / jp / nyatla / nyartoolkit / core / raster / NyARRaster_BasicClass.java
diff --git a/tags/2.5.1/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster_BasicClass.java b/tags/2.5.1/src/jp/nyatla/nyartoolkit/core/raster/NyARRaster_BasicClass.java
new file mode 100644 (file)
index 0000000..56397d4
--- /dev/null
@@ -0,0 +1,67 @@
+/* \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 edition ARToolKit class library.\r
+ * Copyright (C)2008-2009 Ryo Iizuka\r
+ *\r
+ * This program is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (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 program.  If not, see <http://www.gnu.org/licenses/>.\r
+ * \r
+ * For further information please contact.\r
+ *     http://nyatla.jp/nyatoolkit/\r
+ *     <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>\r
+ * \r
+ */\r
+package jp.nyatla.nyartoolkit.core.raster;\r
+\r
+import jp.nyatla.nyartoolkit.core.types.*;\r
+\r
+public abstract class NyARRaster_BasicClass implements INyARRaster\r
+{\r
+       protected NyARIntSize _size;\r
+       private int _buffer_type;\r
+       protected NyARRaster_BasicClass(final NyARIntSize i_size,int i_buffer_type)\r
+       {\r
+               this._size= i_size;\r
+               this._buffer_type=i_buffer_type;\r
+       }\r
+\r
+       final public int getWidth()\r
+       {\r
+               return this._size.w;\r
+       }\r
+\r
+       final public int getHeight()\r
+       {\r
+               return this._size.h;\r
+       }\r
+\r
+       final public NyARIntSize getSize()\r
+       {\r
+               return this._size;\r
+       }\r
+       final public int getBufferType()\r
+       {\r
+               return _buffer_type;\r
+       }\r
+       final public boolean isEqualBufferType(int i_type_value)\r
+       {\r
+               return this._buffer_type==i_type_value;\r
+       }\r
+}\r