2 * PROJECT: NyARToolkit
\r
3 * --------------------------------------------------------------------------------
\r
4 * This work is based on the original ARToolKit developed by
\r
7 * HITLab, University of Washington, Seattle
\r
8 * http://www.hitl.washington.edu/artoolkit/
\r
10 * The NyARToolkit is Java edition ARToolKit class library.
\r
11 * Copyright (C)2008-2010 Ryo Iizuka
\r
13 * This program is free software: you can redistribute it and/or modify
\r
14 * it under the terms of the GNU General Public License as published by
\r
15 * the Free Software Foundation, either version 3 of the License, or
\r
16 * (at your option) any later version.
\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
23 * You should have received a copy of the GNU General Public License
\r
24 * along with this program. If not, see <http://www.gnu.org/licenses/>.
\r
26 * For further information please contact.
\r
27 * http://nyatla.jp/nyatoolkit/
\r
28 * <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>
\r
31 package jp.nyatla.nyartoolkit.core.types;
\r
33 import jp.nyatla.nyartoolkit.core.raster.*;
\r
35 * このクラスは、バッファの形式を表す定数を定義します。
\r
36 * 定数は、主に{@link INyARRaster}で使用する画素形式として使います。
\r
37 * バッファ形式定数は32bitの値で、フィールドの組合せで定義しています。
\r
38 * ユーザは、定数からバッファの構造を知ることができます。
\r
41 * <tr><td>ビットイールド(ビット幅)</td><td>カテゴリ</td><td>備考</td></tr>
\r
42 * <tr><td>24-31(8)</td><td>予約</td><td></td></tr>
\r
43 * <tr><td>16-27(8)</td><td>型ID</td><td>00:無効/01:byte[]/02:int[][]/03:short[]</td></tr>
\r
44 * <tr><td>08-15(8)</td><td>ビットフォーマットID</td><td>00:24bit/01:32bit/02:16bit</td></tr>
\r
45 * <tr><td>00-07(8)</td><td>型番号</td><td></td></tr>
\r
49 public class NyARBufferType
\r
51 private static final int T_BYTE1D =0x00010000;
\r
52 private static final int T_INT2D =0x00020000;
\r
53 private static final int T_SHORT1D=0x00030000;
\r
54 private static final int T_INT1D =0x00040000;
\r
55 private static final int T_OBJECT =0x00100000;
\r
56 private static final int T_USER =0x00FF0000;
\r
63 /** 全ての画素が0。バッファオブジェクトは常にNULL。
\r
65 public static final int NULL_ALLZERO = 0x00000001;
\r
67 /** ユーザ定義のバッファ型。USER_DEFINE + (0x0000~0xFFFF)
\r
70 public static final int USER_DEFINE = T_USER;
\r
76 /** RGB形式。byte[3]で、R8G8B8の24ビットで画素が格納されている。
\r
78 public static final int BYTE1D_R8G8B8_24 = T_BYTE1D|0x0001;
\r
79 /** RGB形式。 byte[3]で、B8G8R8の24ビットの画素形式。
\r
81 public static final int BYTE1D_B8G8R8_24 = T_BYTE1D|0x0002;
\r
82 /** RGB形式。byte[4]で、R8G8B8X8の32ビットの画素形式。
\r
84 public static final int BYTE1D_B8G8R8X8_32 = T_BYTE1D|0x0101;
\r
85 /** RGB形式。byte[4]で、X8R8G8B8の32ビットの画素形式。
\r
87 public static final int BYTE1D_X8R8G8B8_32 = T_BYTE1D|0x0102;
\r
89 /** RGB形式。byte[2]で、RGB565の16ビット(little endian)の画素形式。
\r
91 public static final int BYTE1D_R5G6B5_16LE = T_BYTE1D|0x0201;
\r
92 /** RGB形式。byte[2]で、RGB565の16ビット(big endian)の画素形式。
\r
94 public static final int BYTE1D_R5G6B5_16BE = T_BYTE1D|0x0202;
\r
95 /** RGB形式。short[1]で、RGB565の16ビット(little endian)の画素形式。
\r
97 public static final int WORD1D_R5G6B5_16LE = T_SHORT1D|0x0201;
\r
98 /** RGB形式。short[1]で、RGB565の16ビット(big endian)の画素形式。
\r
100 public static final int WORD1D_R5G6B5_16BE = T_SHORT1D|0x0202;
\r
106 /** int値形式。int[1][1]で、1pixel=1画素のフォーマット。
\r
108 public static final int INT2D = T_INT2D|0x0000;
\r
109 /** フレースケール形式。int[1][1]で8itの(0-255)のグレイスケール画像
\r
111 public static final int INT2D_GRAY_8 = T_INT2D|0x0001;
\r
112 /** 二値形式。int[1][1]で、0 or 1の2値画像
\r
114 public static final int INT2D_BIN_8 = T_INT2D|0x0002;
\r
120 /** int値形式。int[1]で、1pixel=1画素のフォーマット。
\r
122 public static final int INT1D = T_INT1D|0x0000;
\r
123 /** フレースケール形式。int[1]で8itの(0-255)のグレイスケール画像
\r
125 public static final int INT1D_GRAY_8 = T_INT1D|0x0001;
\r
126 /** 二値形式。int[1]で、0 or 1の2値画像
\r
128 public static final int INT1D_BIN_8 = T_INT1D|0x0002;
\r
130 /** RGB形式。int[1]で、XRGB32の32ビットの画素形式。
\r
131 * (エンディアンはプラットフォーム依存。)
\r
133 public static final int INT1D_X8R8G8B8_32=T_INT1D|0x0102;
\r
135 /** HSV形式。int[1]で、H:9bit(0-359),S:8bit(0-255),V(0-255)の画素形式
\r
137 public static final int INT1D_X7H9S8V8_32=T_INT1D|0x0103;
\r
143 /** Javaプラットフォーム固有オブジェクトのドメインです。*/
\r
144 public static final int OBJECT_Java= T_OBJECT|0x0100;
\r
145 /** C#プラットフォーム固有オブジェクトのドメインです。*/
\r
146 public static final int OBJECT_CS = T_OBJECT|0x0200;
\r
147 /** AS3プラットフォーム固有オブジェクトのドメインです。*/
\r
148 public static final int OBJECT_AS3 = T_OBJECT|0x0300;
\r
151 * RGB形式。バッファは、JavaのBufferedImage型オブジェクト
\r
153 public static final int OBJECT_Java_BufferedImage= OBJECT_Java|0x01;
\r
157 * RGB形式。バッファは、ActionScript3のBitmapData型オブジェクト
\r
159 public static final int OBJECT_AS3_BitmapData= OBJECT_AS3|0x01;
\r