OSDN Git Service

git-svn-id: http://svn.sourceforge.jp/svnroot/nyartoolkit/NyARToolkit/trunk@768 7cac0...
[nyartoolkit-and/nyartoolkit-and.git] / lib / src / jp / nyatla / nyartoolkit / core / types / NyARBufferType.java
diff --git a/lib/src/jp/nyatla/nyartoolkit/core/types/NyARBufferType.java b/lib/src/jp/nyatla/nyartoolkit/core/types/NyARBufferType.java
new file mode 100644 (file)
index 0000000..e013f8e
--- /dev/null
@@ -0,0 +1,144 @@
+/* \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-2010 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.types;\r
+\r
+public class NyARBufferType\r
+{\r
+       private static final int T_BYTE1D =0x00010000;\r
+       private static final int T_INT2D  =0x00020000;\r
+       private static final int T_SHORT1D=0x00030000;\r
+       private static final int T_INT1D  =0x00040000;\r
+       private static final int T_OBJECT =0x00100000;\r
+       private static final int T_USER   =0x00FF0000;\r
+       //  24-31(8)予約\r
+       //  16-27(8)型ID\r
+       //      00:無効/01:byte[]/02:int[][]/03:short[]\r
+       //  08-15(8)ビットフォーマットID\r
+       //      00:24bit/01:32bit/02:16bit\r
+       //  00-07(8)型番号\r
+       //\r
+       /**\r
+        * RGB24フォーマットで、全ての画素が0\r
+        */\r
+       public static final int NULL_ALLZERO = 0x00000001;\r
+       /**\r
+        * USER - USER+0xFFFFはユーザー定義型。実験用に。\r
+        */\r
+       public static final int USER_DEFINE  = T_USER;\r
+\r
+       /**\r
+        * byte[]で、R8G8B8の24ビットで画素が格納されている。\r
+        */\r
+       public static final int BYTE1D_R8G8B8_24   = T_BYTE1D|0x0001;\r
+       /**\r
+        * byte[]で、B8G8R8の24ビットで画素が格納されている。\r
+        */\r
+       public static final int BYTE1D_B8G8R8_24   = T_BYTE1D|0x0002;\r
+       /**\r
+        * byte[]で、R8G8B8X8の32ビットで画素が格納されている。\r
+        */\r
+       public static final int BYTE1D_B8G8R8X8_32 = T_BYTE1D|0x0101;\r
+       /**\r
+        * byte[]で、X8R8G8B8の32ビットで画素が格納されている。\r
+        */\r
+       public static final int BYTE1D_X8R8G8B8_32 = T_BYTE1D|0x0102;\r
+\r
+       /**\r
+        * byte[]で、RGB565の16ビット(little/big endian)で画素が格納されている。\r
+        */\r
+       public static final int BYTE1D_R5G6B5_16LE = T_BYTE1D|0x0201;\r
+    public static final int BYTE1D_R5G6B5_16BE = T_BYTE1D|0x0202;\r
+       /**\r
+        * short[]で、RGB565の16ビット(little/big endian)で画素が格納されている。\r
+        */     \r
+    public static final int WORD1D_R5G6B5_16LE = T_SHORT1D|0x0201;\r
+    public static final int WORD1D_R5G6B5_16BE = T_SHORT1D|0x0202;\r
+\r
+       \r
+       /**\r
+        * int[][]で特に値範囲を定めない\r
+        */\r
+       public static final int INT2D        = T_INT2D|0x0000;\r
+       /**\r
+        * int[][]で0-255のグレイスケール画像\r
+        */\r
+       public static final int INT2D_GRAY_8 = T_INT2D|0x0001;\r
+       /**\r
+        * int[][]で0/1の2値画像\r
+        * これは、階調値1bitのBUFFERFORMAT_INT2D_GRAY_1と同じです。\r
+        */\r
+       public static final int INT2D_BIN_8  = T_INT2D|0x0002;\r
+\r
+       /**\r
+        * int[]で特に値範囲を定めない\r
+        */\r
+       public static final int INT1D        = T_INT1D|0x0000;\r
+       /**\r
+        * int[]で0-255のグレイスケール画像\r
+        */\r
+       public static final int INT1D_GRAY_8 = T_INT1D|0x0001;\r
+       /**\r
+        * int[]で0/1の2値画像\r
+        * これは、階調1bitのINT1D_GRAY_1と同じです。\r
+        */\r
+       public static final int INT1D_BIN_8  = T_INT1D|0x0002;\r
+       \r
+       \r
+       /**\r
+        * int[]で、XRGB32の32ビットで画素が格納されている。\r
+        */     \r
+    public static final int INT1D_X8R8G8B8_32=T_INT1D|0x0102;\r
+\r
+       /**\r
+        * H:9bit(0-359),S:8bit(0-255),V(0-255)\r
+        */\r
+       public static final int INT1D_X7H9S8V8_32=T_INT1D|0x0103;\r
+    \r
+\r
+    /**\r
+     * プラットフォーム固有オブジェクト\r
+     */\r
+       public static final int OBJECT_Java= T_OBJECT|0x0100;\r
+       public static final int OBJECT_CS  = T_OBJECT|0x0200;\r
+       public static final int OBJECT_AS3 = T_OBJECT|0x0300;\r
+       \r
+       /**\r
+        * JavaのBufferedImageを格納するラスタ\r
+        */\r
+       public static final int OBJECT_Java_BufferedImage= OBJECT_Java|0x01;\r
+       \r
+       \r
+       /**\r
+        * ActionScript3のBitmapDataを格納するラスタ\r
+        */\r
+       public static final int OBJECT_AS3_BitmapData= OBJECT_AS3|0x01;\r
+\r
+}\r