NyARToolKit for Android の仮作業所。サンプルなどの作成作業部屋。
Révision | 5b9a057d1abde0a056630218a06c197dace70615 (tree) |
---|---|
l'heure | 2012-03-11 19:41:46 |
Auteur | rokubou <rokubou@user...> |
Commiter | rokubou |
初期コミット
@@ -0,0 +1,9 @@ | ||
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<classpath> | |
3 | + <classpathentry kind="src" path="src"/> | |
4 | + <classpathentry kind="src" path="NyARTK_Base_src"/> | |
5 | + <classpathentry kind="src" path="gen"/> | |
6 | + <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> | |
7 | + <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/> | |
8 | + <classpathentry kind="output" path="bin/classes"/> | |
9 | +</classpath> |
@@ -0,0 +1,3 @@ | ||
1 | +/NyARTK_Base_src | |
2 | +/bin | |
3 | +/gen |
@@ -0,0 +1,40 @@ | ||
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<projectDescription> | |
3 | + <name>NyARToolKit for Android - SimpleMarkerSystem</name> | |
4 | + <comment></comment> | |
5 | + <projects> | |
6 | + </projects> | |
7 | + <buildSpec> | |
8 | + <buildCommand> | |
9 | + <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name> | |
10 | + <arguments> | |
11 | + </arguments> | |
12 | + </buildCommand> | |
13 | + <buildCommand> | |
14 | + <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name> | |
15 | + <arguments> | |
16 | + </arguments> | |
17 | + </buildCommand> | |
18 | + <buildCommand> | |
19 | + <name>org.eclipse.jdt.core.javabuilder</name> | |
20 | + <arguments> | |
21 | + </arguments> | |
22 | + </buildCommand> | |
23 | + <buildCommand> | |
24 | + <name>com.android.ide.eclipse.adt.ApkBuilder</name> | |
25 | + <arguments> | |
26 | + </arguments> | |
27 | + </buildCommand> | |
28 | + </buildSpec> | |
29 | + <natures> | |
30 | + <nature>com.android.ide.eclipse.adt.AndroidNature</nature> | |
31 | + <nature>org.eclipse.jdt.core.javanature</nature> | |
32 | + </natures> | |
33 | + <linkedResources> | |
34 | + <link> | |
35 | + <name>NyARTK_Base_src</name> | |
36 | + <type>2</type> | |
37 | + <location>C:/cygwin/home/Sixwish/personalsf/nyartk4android/NyARToolKit for Android - Base/src</location> | |
38 | + </link> | |
39 | + </linkedResources> | |
40 | +</projectDescription> |
@@ -0,0 +1,26 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
3 | + package="jp.androidgroup.nyartoolkit.markersystem.simple" | |
4 | + android:versionCode="1" | |
5 | + android:versionName="1.0" > | |
6 | + | |
7 | + <uses-sdk android:minSdkVersion="8" /> | |
8 | + <uses-feature android:name="android.hardware.camera"/> | |
9 | + <uses-feature android:name="android.hardware.camera.autofocus"/> | |
10 | + <uses-permission android:name="android.permission.CAMERA"/> | |
11 | + | |
12 | + <application | |
13 | + android:icon="@drawable/ic_launcher" | |
14 | + android:label="@string/app_name" android:debuggable="true"> | |
15 | + <activity | |
16 | + android:name=".MSSimpleActivity" | |
17 | + android:label="@string/app_name" > | |
18 | + <intent-filter> | |
19 | + <action android:name="android.intent.action.MAIN" /> | |
20 | + | |
21 | + <category android:name="android.intent.category.LAUNCHER" /> | |
22 | + </intent-filter> | |
23 | + </activity> | |
24 | + </application> | |
25 | + | |
26 | +</manifest> | |
\ No newline at end of file |
@@ -0,0 +1,196 @@ | ||
1 | + 234 235 240 233 240 234 240 235 240 237 240 238 240 240 240 232 | |
2 | + 229 240 240 240 240 240 240 240 240 240 240 240 240 240 240 228 | |
3 | + 227 240 240 240 240 240 240 240 240 240 240 240 240 240 240 239 | |
4 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
5 | + 236 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
6 | + 234 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
7 | + 236 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
8 | + 231 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
9 | + 229 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
10 | + 225 149 240 240 186 216 225 174 240 240 240 237 238 240 240 240 | |
11 | + 150 107 238 231 75 208 115 147 238 228 223 226 237 180 226 240 | |
12 | + 150 62 181 213 62 187 113 169 197 72 29 237 120 50 53 207 | |
13 | + 149 63 47 78 53 184 113 101 142 5 150 150 45 217 186 83 | |
14 | + 121 84 220 222 58 180 121 92 128 109 237 124 155 232 161 64 | |
15 | + 149 71 240 240 76 210 98 109 122 108 240 129 51 119 161 155 | |
16 | + 149 186 240 240 98 219 135 152 207 191 236 227 152 77 175 209 | |
17 | + 235 235 240 233 240 234 240 235 240 236 240 238 240 240 240 240 | |
18 | + 229 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
19 | + 227 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
20 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
21 | + 236 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
22 | + 234 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
23 | + 236 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
24 | + 232 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
25 | + 229 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
26 | + 225 156 240 240 186 216 225 186 240 240 240 240 240 240 240 240 | |
27 | + 150 117 240 231 72 206 115 162 240 232 223 237 240 180 226 240 | |
28 | + 150 74 187 213 51 184 103 168 197 78 29 237 120 50 53 216 | |
29 | + 144 77 51 74 61 184 106 101 142 5 150 152 52 217 186 85 | |
30 | + 117 89 219 219 65 184 121 92 128 100 236 125 156 240 170 73 | |
31 | + 148 71 240 240 76 210 109 109 121 99 240 137 51 120 166 164 | |
32 | + 140 186 240 240 98 220 150 156 207 192 236 230 152 77 176 212 | |
33 | + 234 235 240 233 240 234 240 235 240 236 240 238 240 240 240 233 | |
34 | + 229 240 240 240 240 240 240 240 240 240 240 240 240 240 240 239 | |
35 | + 227 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
36 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
37 | + 234 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
38 | + 232 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
39 | + 235 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
40 | + 232 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
41 | + 228 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
42 | + 225 156 240 240 182 212 225 180 240 240 240 240 240 240 240 240 | |
43 | + 150 116 238 228 66 205 115 151 238 236 225 240 240 180 226 240 | |
44 | + 156 84 186 211 47 184 109 170 200 92 30 240 120 50 53 216 | |
45 | + 147 83 51 73 50 184 106 110 148 17 151 150 45 217 186 85 | |
46 | + 127 98 219 219 58 179 109 101 128 107 237 125 155 240 163 72 | |
47 | + 155 86 240 240 76 201 85 108 121 95 232 137 51 118 153 155 | |
48 | + 149 189 240 240 98 220 141 154 206 178 235 230 152 77 175 209 | |
49 | + | |
50 | + 232 228 239 240 240 240 240 240 240 240 240 207 83 64 155 209 | |
51 | + 240 240 240 240 240 240 240 240 240 240 226 53 186 161 161 175 | |
52 | + 240 240 240 240 240 240 240 240 240 240 180 50 217 232 119 77 | |
53 | + 240 240 240 240 240 240 240 240 240 238 237 120 45 155 51 152 | |
54 | + 238 240 240 240 240 240 240 240 240 237 226 237 150 124 129 227 | |
55 | + 240 240 240 240 240 240 240 240 240 240 223 29 150 237 240 236 | |
56 | + 237 240 240 240 240 240 240 240 240 240 228 72 5 109 108 191 | |
57 | + 240 240 240 240 240 240 240 240 240 240 238 197 142 128 122 207 | |
58 | + 235 240 240 240 240 240 240 240 240 174 147 169 101 92 109 152 | |
59 | + 240 240 240 240 240 240 240 240 240 225 115 113 113 121 98 135 | |
60 | + 234 240 240 240 240 240 240 240 240 216 208 187 184 180 210 219 | |
61 | + 240 240 240 240 240 240 240 240 240 186 75 62 53 58 76 98 | |
62 | + 233 240 240 240 240 240 240 240 240 240 231 213 78 222 240 240 | |
63 | + 240 240 240 240 240 240 240 240 240 240 238 181 47 220 240 240 | |
64 | + 235 240 240 240 240 240 240 240 240 149 107 62 63 84 71 186 | |
65 | + 234 229 227 240 236 234 236 231 229 225 150 150 149 121 149 149 | |
66 | + 240 240 240 240 240 240 240 240 240 240 240 216 85 73 164 212 | |
67 | + 240 240 240 240 240 240 240 240 240 240 226 53 186 170 166 176 | |
68 | + 240 240 240 240 240 240 240 240 240 240 180 50 217 240 120 77 | |
69 | + 240 240 240 240 240 240 240 240 240 240 240 120 52 156 51 152 | |
70 | + 238 240 240 240 240 240 240 240 240 240 237 237 152 125 137 230 | |
71 | + 240 240 240 240 240 240 240 240 240 240 223 29 150 236 240 236 | |
72 | + 236 240 240 240 240 240 240 240 240 240 232 78 5 100 99 192 | |
73 | + 240 240 240 240 240 240 240 240 240 240 240 197 142 128 121 207 | |
74 | + 235 240 240 240 240 240 240 240 240 186 162 168 101 92 109 156 | |
75 | + 240 240 240 240 240 240 240 240 240 225 115 103 106 121 109 150 | |
76 | + 234 240 240 240 240 240 240 240 240 216 206 184 184 184 210 220 | |
77 | + 240 240 240 240 240 240 240 240 240 186 72 51 61 65 76 98 | |
78 | + 233 240 240 240 240 240 240 240 240 240 231 213 74 219 240 240 | |
79 | + 240 240 240 240 240 240 240 240 240 240 240 187 51 219 240 240 | |
80 | + 235 240 240 240 240 240 240 240 240 156 117 74 77 89 71 186 | |
81 | + 235 229 227 240 236 234 236 232 229 225 150 150 144 117 148 140 | |
82 | + 233 239 240 240 240 240 240 240 240 240 240 216 85 72 155 209 | |
83 | + 240 240 240 240 240 240 240 240 240 240 226 53 186 163 153 175 | |
84 | + 240 240 240 240 240 240 240 240 240 240 180 50 217 240 118 77 | |
85 | + 240 240 240 240 240 240 240 240 240 240 240 120 45 155 51 152 | |
86 | + 238 240 240 240 240 240 240 240 240 240 240 240 150 125 137 230 | |
87 | + 240 240 240 240 240 240 240 240 240 240 225 30 151 237 232 235 | |
88 | + 236 240 240 240 240 240 240 240 240 240 236 92 17 107 95 178 | |
89 | + 240 240 240 240 240 240 240 240 240 240 238 200 148 128 121 206 | |
90 | + 235 240 240 240 240 240 240 240 240 180 151 170 110 101 108 154 | |
91 | + 240 240 240 240 240 240 240 240 240 225 115 109 106 109 85 141 | |
92 | + 234 240 240 240 240 240 240 240 240 212 205 184 184 179 201 220 | |
93 | + 240 240 240 240 240 240 240 240 240 182 66 47 50 58 76 98 | |
94 | + 233 240 240 240 240 240 240 240 240 240 228 211 73 219 240 240 | |
95 | + 240 240 240 240 240 240 240 240 240 240 238 186 51 219 240 240 | |
96 | + 235 240 240 240 240 240 240 240 240 156 116 84 83 98 86 189 | |
97 | + 234 229 227 240 234 232 235 232 228 225 150 156 147 127 155 149 | |
98 | + | |
99 | + 209 175 77 152 227 236 191 207 152 135 219 98 240 240 186 149 | |
100 | + 155 161 119 51 129 240 108 122 109 98 210 76 240 240 71 149 | |
101 | + 64 161 232 155 124 237 109 128 92 121 180 58 222 220 84 121 | |
102 | + 83 186 217 45 150 150 5 142 101 113 184 53 78 47 63 149 | |
103 | + 207 53 50 120 237 29 72 197 169 113 187 62 213 181 62 150 | |
104 | + 240 226 180 237 226 223 228 238 147 115 208 75 231 238 107 150 | |
105 | + 240 240 240 238 237 240 240 240 174 225 216 186 240 240 149 225 | |
106 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 229 | |
107 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 231 | |
108 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 236 | |
109 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 234 | |
110 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 236 | |
111 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
112 | + 239 240 240 240 240 240 240 240 240 240 240 240 240 240 240 227 | |
113 | + 228 240 240 240 240 240 240 240 240 240 240 240 240 240 240 229 | |
114 | + 232 240 240 240 238 240 237 240 235 240 234 240 233 240 235 234 | |
115 | + 212 176 77 152 230 236 192 207 156 150 220 98 240 240 186 140 | |
116 | + 164 166 120 51 137 240 99 121 109 109 210 76 240 240 71 148 | |
117 | + 73 170 240 156 125 236 100 128 92 121 184 65 219 219 89 117 | |
118 | + 85 186 217 52 152 150 5 142 101 106 184 61 74 51 77 144 | |
119 | + 216 53 50 120 237 29 78 197 168 103 184 51 213 187 74 150 | |
120 | + 240 226 180 240 237 223 232 240 162 115 206 72 231 240 117 150 | |
121 | + 240 240 240 240 240 240 240 240 186 225 216 186 240 240 156 225 | |
122 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 229 | |
123 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 232 | |
124 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 236 | |
125 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 234 | |
126 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 236 | |
127 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
128 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 227 | |
129 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 229 | |
130 | + 240 240 240 240 238 240 236 240 235 240 234 240 233 240 235 235 | |
131 | + 209 175 77 152 230 235 178 206 154 141 220 98 240 240 189 149 | |
132 | + 155 153 118 51 137 232 95 121 108 85 201 76 240 240 86 155 | |
133 | + 72 163 240 155 125 237 107 128 101 109 179 58 219 219 98 127 | |
134 | + 85 186 217 45 150 151 17 148 110 106 184 50 73 51 83 147 | |
135 | + 216 53 50 120 240 30 92 200 170 109 184 47 211 186 84 156 | |
136 | + 240 226 180 240 240 225 236 238 151 115 205 66 228 238 116 150 | |
137 | + 240 240 240 240 240 240 240 240 180 225 212 182 240 240 156 225 | |
138 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 228 | |
139 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 232 | |
140 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 235 | |
141 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 232 | |
142 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 234 | |
143 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 | |
144 | + 240 240 240 240 240 240 240 240 240 240 240 240 240 240 240 227 | |
145 | + 239 240 240 240 240 240 240 240 240 240 240 240 240 240 240 229 | |
146 | + 233 240 240 240 238 240 236 240 235 240 234 240 233 240 235 234 | |
147 | + | |
148 | + 149 149 121 149 150 150 225 229 231 236 234 236 240 227 229 234 | |
149 | + 186 71 84 63 62 107 149 240 240 240 240 240 240 240 240 235 | |
150 | + 240 240 220 47 181 238 240 240 240 240 240 240 240 240 240 240 | |
151 | + 240 240 222 78 213 231 240 240 240 240 240 240 240 240 240 233 | |
152 | + 98 76 58 53 62 75 186 240 240 240 240 240 240 240 240 240 | |
153 | + 219 210 180 184 187 208 216 240 240 240 240 240 240 240 240 234 | |
154 | + 135 98 121 113 113 115 225 240 240 240 240 240 240 240 240 240 | |
155 | + 152 109 92 101 169 147 174 240 240 240 240 240 240 240 240 235 | |
156 | + 207 122 128 142 197 238 240 240 240 240 240 240 240 240 240 240 | |
157 | + 191 108 109 5 72 228 240 240 240 240 240 240 240 240 240 237 | |
158 | + 236 240 237 150 29 223 240 240 240 240 240 240 240 240 240 240 | |
159 | + 227 129 124 150 237 226 237 240 240 240 240 240 240 240 240 238 | |
160 | + 152 51 155 45 120 237 238 240 240 240 240 240 240 240 240 240 | |
161 | + 77 119 232 217 50 180 240 240 240 240 240 240 240 240 240 240 | |
162 | + 175 161 161 186 53 226 240 240 240 240 240 240 240 240 240 240 | |
163 | + 209 155 64 83 207 240 240 240 240 240 240 240 240 239 228 232 | |
164 | + 140 148 117 144 150 150 225 229 232 236 234 236 240 227 229 235 | |
165 | + 186 71 89 77 74 117 156 240 240 240 240 240 240 240 240 235 | |
166 | + 240 240 219 51 187 240 240 240 240 240 240 240 240 240 240 240 | |
167 | + 240 240 219 74 213 231 240 240 240 240 240 240 240 240 240 233 | |
168 | + 98 76 65 61 51 72 186 240 240 240 240 240 240 240 240 240 | |
169 | + 220 210 184 184 184 206 216 240 240 240 240 240 240 240 240 234 | |
170 | + 150 109 121 106 103 115 225 240 240 240 240 240 240 240 240 240 | |
171 | + 156 109 92 101 168 162 186 240 240 240 240 240 240 240 240 235 | |
172 | + 207 121 128 142 197 240 240 240 240 240 240 240 240 240 240 240 | |
173 | + 192 99 100 5 78 232 240 240 240 240 240 240 240 240 240 236 | |
174 | + 236 240 236 150 29 223 240 240 240 240 240 240 240 240 240 240 | |
175 | + 230 137 125 152 237 237 240 240 240 240 240 240 240 240 240 238 | |
176 | + 152 51 156 52 120 240 240 240 240 240 240 240 240 240 240 240 | |
177 | + 77 120 240 217 50 180 240 240 240 240 240 240 240 240 240 240 | |
178 | + 176 166 170 186 53 226 240 240 240 240 240 240 240 240 240 240 | |
179 | + 212 164 73 85 216 240 240 240 240 240 240 240 240 240 240 240 | |
180 | + 149 155 127 147 156 150 225 228 232 235 232 234 240 227 229 234 | |
181 | + 189 86 98 83 84 116 156 240 240 240 240 240 240 240 240 235 | |
182 | + 240 240 219 51 186 238 240 240 240 240 240 240 240 240 240 240 | |
183 | + 240 240 219 73 211 228 240 240 240 240 240 240 240 240 240 233 | |
184 | + 98 76 58 50 47 66 182 240 240 240 240 240 240 240 240 240 | |
185 | + 220 201 179 184 184 205 212 240 240 240 240 240 240 240 240 234 | |
186 | + 141 85 109 106 109 115 225 240 240 240 240 240 240 240 240 240 | |
187 | + 154 108 101 110 170 151 180 240 240 240 240 240 240 240 240 235 | |
188 | + 206 121 128 148 200 238 240 240 240 240 240 240 240 240 240 240 | |
189 | + 178 95 107 17 92 236 240 240 240 240 240 240 240 240 240 236 | |
190 | + 235 232 237 151 30 225 240 240 240 240 240 240 240 240 240 240 | |
191 | + 230 137 125 150 240 240 240 240 240 240 240 240 240 240 240 238 | |
192 | + 152 51 155 45 120 240 240 240 240 240 240 240 240 240 240 240 | |
193 | + 77 118 240 217 50 180 240 240 240 240 240 240 240 240 240 240 | |
194 | + 175 153 163 186 53 226 240 240 240 240 240 240 240 240 240 240 | |
195 | + 209 155 72 85 216 240 240 240 240 240 240 240 240 240 239 233 | |
196 | + |
@@ -0,0 +1,196 @@ | ||
1 | + 214 225 240 225 214 240 216 204 214 227 181 192 198 192 181 192 | |
2 | + 240 240 240 240 240 240 225 232 240 240 240 240 240 240 240 236 | |
3 | + 240 240 240 240 240 240 75 128 220 240 240 240 240 240 240 240 | |
4 | + 240 240 240 240 240 240 106 53 240 240 240 240 240 240 240 237 | |
5 | + 240 240 240 240 240 238 118 31 240 240 240 240 240 240 240 234 | |
6 | + 240 240 240 240 240 240 74 49 207 240 240 240 240 240 240 240 | |
7 | + 240 240 240 240 240 240 53 54 177 240 240 240 240 240 240 240 | |
8 | + 240 240 240 240 240 240 64 31 130 240 240 240 240 240 240 219 | |
9 | + 240 240 240 240 240 180 37 57 78 228 240 240 240 240 240 240 | |
10 | + 240 240 240 240 240 118 62 157 36 185 240 240 240 240 240 231 | |
11 | + 240 240 240 240 240 82 65 225 67 80 230 240 240 240 240 217 | |
12 | + 240 240 240 225 53 76 225 240 156 62 158 240 240 240 240 226 | |
13 | + 240 240 199 61 9 111 235 240 240 104 58 174 228 240 240 240 | |
14 | + 240 142 64 26 92 227 240 240 240 229 93 64 170 226 238 216 | |
15 | + 90 26 12 156 240 240 240 240 240 240 204 95 30 117 192 200 | |
16 | + 156 16 195 233 235 240 236 240 238 239 240 186 93 53 120 237 | |
17 | + 214 226 240 225 212 240 216 204 212 226 181 192 198 192 185 194 | |
18 | + 240 240 240 240 240 240 227 232 240 240 240 240 240 240 240 238 | |
19 | + 240 240 240 240 240 240 95 138 225 240 240 240 240 240 240 240 | |
20 | + 240 240 240 240 240 240 108 59 240 240 240 240 240 240 240 237 | |
21 | + 240 240 240 240 240 238 118 31 240 240 240 240 240 240 240 234 | |
22 | + 240 240 240 240 240 240 83 47 207 240 240 240 240 240 240 240 | |
23 | + 240 240 240 240 240 240 56 49 177 240 240 240 240 240 240 240 | |
24 | + 240 240 240 240 240 240 73 41 130 240 240 240 240 240 240 222 | |
25 | + 240 240 240 240 240 185 46 49 86 230 240 240 240 240 240 240 | |
26 | + 240 240 240 240 240 118 58 165 45 192 240 240 240 240 240 234 | |
27 | + 240 240 240 240 240 91 63 222 74 82 240 240 240 240 240 222 | |
28 | + 240 240 240 226 66 86 225 240 158 63 162 240 240 240 240 228 | |
29 | + 240 240 202 76 11 103 235 240 234 91 49 174 228 240 240 240 | |
30 | + 240 142 68 16 91 226 240 240 240 228 96 74 178 233 239 222 | |
31 | + 90 26 4 150 240 240 240 240 240 240 213 109 46 133 204 213 | |
32 | + 156 14 195 234 236 240 237 240 239 240 240 192 106 57 125 238 | |
33 | + 214 226 240 225 212 240 216 204 214 227 181 192 198 192 184 192 | |
34 | + 240 240 240 240 240 240 226 232 240 240 240 240 240 240 240 236 | |
35 | + 240 240 240 240 240 240 85 134 220 240 240 240 240 240 240 240 | |
36 | + 240 240 240 240 240 240 107 58 240 240 240 240 240 240 240 237 | |
37 | + 240 240 240 240 240 238 118 32 240 240 240 240 240 240 240 234 | |
38 | + 240 240 240 240 240 240 87 60 210 240 240 240 240 240 240 240 | |
39 | + 240 240 240 240 240 240 58 58 178 240 240 240 240 240 240 240 | |
40 | + 240 240 240 240 240 240 73 31 130 240 240 240 240 240 240 219 | |
41 | + 240 240 240 240 240 185 46 59 86 228 240 240 240 240 240 240 | |
42 | + 240 240 240 240 240 118 62 168 41 186 240 240 240 240 240 231 | |
43 | + 240 240 240 240 240 90 65 225 60 92 235 240 240 240 240 219 | |
44 | + 240 240 240 225 53 82 225 240 146 63 163 240 240 240 240 228 | |
45 | + 240 240 198 61 5 103 235 240 234 102 58 175 232 240 240 240 | |
46 | + 240 134 54 13 91 226 240 240 240 229 96 68 188 238 239 222 | |
47 | + 90 15 3 150 240 240 240 240 240 240 213 105 48 134 204 213 | |
48 | + 156 14 195 233 236 240 237 240 239 239 240 192 106 57 125 238 | |
49 | + | |
50 | + 192 236 240 237 234 240 240 219 240 231 217 226 240 216 200 237 | |
51 | + 181 240 240 240 240 240 240 240 240 240 240 240 240 238 192 120 | |
52 | + 192 240 240 240 240 240 240 240 240 240 240 240 240 226 117 53 | |
53 | + 198 240 240 240 240 240 240 240 240 240 240 240 228 170 30 93 | |
54 | + 192 240 240 240 240 240 240 240 240 240 240 240 174 64 95 186 | |
55 | + 181 240 240 240 240 240 240 240 240 240 230 158 58 93 204 240 | |
56 | + 227 240 240 240 240 240 240 240 228 185 80 62 104 229 240 239 | |
57 | + 214 240 220 240 240 207 177 130 78 36 67 156 240 240 240 238 | |
58 | + 204 232 128 53 31 49 54 31 57 157 225 240 240 240 240 240 | |
59 | + 216 225 75 106 118 74 53 64 37 62 65 225 235 240 240 236 | |
60 | + 240 240 240 240 238 240 240 240 180 118 82 76 111 227 240 240 | |
61 | + 214 240 240 240 240 240 240 240 240 240 240 53 9 92 240 235 | |
62 | + 225 240 240 240 240 240 240 240 240 240 240 225 61 26 156 233 | |
63 | + 240 240 240 240 240 240 240 240 240 240 240 240 199 64 12 195 | |
64 | + 225 240 240 240 240 240 240 240 240 240 240 240 240 142 26 16 | |
65 | + 214 240 240 240 240 240 240 240 240 240 240 240 240 240 90 156 | |
66 | + 194 238 240 237 234 240 240 222 240 234 222 228 240 222 213 238 | |
67 | + 185 240 240 240 240 240 240 240 240 240 240 240 240 239 204 125 | |
68 | + 192 240 240 240 240 240 240 240 240 240 240 240 240 233 133 57 | |
69 | + 198 240 240 240 240 240 240 240 240 240 240 240 228 178 46 106 | |
70 | + 192 240 240 240 240 240 240 240 240 240 240 240 174 74 109 192 | |
71 | + 181 240 240 240 240 240 240 240 240 240 240 162 49 96 213 240 | |
72 | + 226 240 240 240 240 240 240 240 230 192 82 63 91 228 240 240 | |
73 | + 212 240 225 240 240 207 177 130 86 45 74 158 234 240 240 239 | |
74 | + 204 232 138 59 31 47 49 41 49 165 222 240 240 240 240 240 | |
75 | + 216 227 95 108 118 83 56 73 46 58 63 225 235 240 240 237 | |
76 | + 240 240 240 240 238 240 240 240 185 118 91 86 103 226 240 240 | |
77 | + 212 240 240 240 240 240 240 240 240 240 240 66 11 91 240 236 | |
78 | + 225 240 240 240 240 240 240 240 240 240 240 226 76 16 150 234 | |
79 | + 240 240 240 240 240 240 240 240 240 240 240 240 202 68 4 195 | |
80 | + 226 240 240 240 240 240 240 240 240 240 240 240 240 142 26 14 | |
81 | + 214 240 240 240 240 240 240 240 240 240 240 240 240 240 90 156 | |
82 | + 192 236 240 237 234 240 240 219 240 231 219 228 240 222 213 238 | |
83 | + 184 240 240 240 240 240 240 240 240 240 240 240 240 239 204 125 | |
84 | + 192 240 240 240 240 240 240 240 240 240 240 240 240 238 134 57 | |
85 | + 198 240 240 240 240 240 240 240 240 240 240 240 232 188 48 106 | |
86 | + 192 240 240 240 240 240 240 240 240 240 240 240 175 68 105 192 | |
87 | + 181 240 240 240 240 240 240 240 240 240 235 163 58 96 213 240 | |
88 | + 227 240 240 240 240 240 240 240 228 186 92 63 102 229 240 239 | |
89 | + 214 240 220 240 240 210 178 130 86 41 60 146 234 240 240 239 | |
90 | + 204 232 134 58 32 60 58 31 59 168 225 240 240 240 240 240 | |
91 | + 216 226 85 107 118 87 58 73 46 62 65 225 235 240 240 237 | |
92 | + 240 240 240 240 238 240 240 240 185 118 90 82 103 226 240 240 | |
93 | + 212 240 240 240 240 240 240 240 240 240 240 53 5 91 240 236 | |
94 | + 225 240 240 240 240 240 240 240 240 240 240 225 61 13 150 233 | |
95 | + 240 240 240 240 240 240 240 240 240 240 240 240 198 54 3 195 | |
96 | + 226 240 240 240 240 240 240 240 240 240 240 240 240 134 15 14 | |
97 | + 214 240 240 240 240 240 240 240 240 240 240 240 240 240 90 156 | |
98 | + | |
99 | + 237 120 53 93 186 240 239 238 240 236 240 235 233 195 16 156 | |
100 | + 200 192 117 30 95 204 240 240 240 240 240 240 156 12 26 90 | |
101 | + 216 238 226 170 64 93 229 240 240 240 227 92 26 64 142 240 | |
102 | + 240 240 240 228 174 58 104 240 240 235 111 9 61 199 240 240 | |
103 | + 226 240 240 240 240 158 62 156 240 225 76 53 225 240 240 240 | |
104 | + 217 240 240 240 240 230 80 67 225 65 82 240 240 240 240 240 | |
105 | + 231 240 240 240 240 240 185 36 157 62 118 240 240 240 240 240 | |
106 | + 240 240 240 240 240 240 228 78 57 37 180 240 240 240 240 240 | |
107 | + 219 240 240 240 240 240 240 130 31 64 240 240 240 240 240 240 | |
108 | + 240 240 240 240 240 240 240 177 54 53 240 240 240 240 240 240 | |
109 | + 240 240 240 240 240 240 240 207 49 74 240 240 240 240 240 240 | |
110 | + 234 240 240 240 240 240 240 240 31 118 238 240 240 240 240 240 | |
111 | + 237 240 240 240 240 240 240 240 53 106 240 240 240 240 240 240 | |
112 | + 240 240 240 240 240 240 240 220 128 75 240 240 240 240 240 240 | |
113 | + 236 240 240 240 240 240 240 240 232 225 240 240 240 240 240 240 | |
114 | + 192 181 192 198 192 181 227 214 204 216 240 214 225 240 225 214 | |
115 | + 238 125 57 106 192 240 240 239 240 237 240 236 234 195 14 156 | |
116 | + 213 204 133 46 109 213 240 240 240 240 240 240 150 4 26 90 | |
117 | + 222 239 233 178 74 96 228 240 240 240 226 91 16 68 142 240 | |
118 | + 240 240 240 228 174 49 91 234 240 235 103 11 76 202 240 240 | |
119 | + 228 240 240 240 240 162 63 158 240 225 86 66 226 240 240 240 | |
120 | + 222 240 240 240 240 240 82 74 222 63 91 240 240 240 240 240 | |
121 | + 234 240 240 240 240 240 192 45 165 58 118 240 240 240 240 240 | |
122 | + 240 240 240 240 240 240 230 86 49 46 185 240 240 240 240 240 | |
123 | + 222 240 240 240 240 240 240 130 41 73 240 240 240 240 240 240 | |
124 | + 240 240 240 240 240 240 240 177 49 56 240 240 240 240 240 240 | |
125 | + 240 240 240 240 240 240 240 207 47 83 240 240 240 240 240 240 | |
126 | + 234 240 240 240 240 240 240 240 31 118 238 240 240 240 240 240 | |
127 | + 237 240 240 240 240 240 240 240 59 108 240 240 240 240 240 240 | |
128 | + 240 240 240 240 240 240 240 225 138 95 240 240 240 240 240 240 | |
129 | + 238 240 240 240 240 240 240 240 232 227 240 240 240 240 240 240 | |
130 | + 194 185 192 198 192 181 226 212 204 216 240 212 225 240 226 214 | |
131 | + 238 125 57 106 192 240 239 239 240 237 240 236 233 195 14 156 | |
132 | + 213 204 134 48 105 213 240 240 240 240 240 240 150 3 15 90 | |
133 | + 222 239 238 188 68 96 229 240 240 240 226 91 13 54 134 240 | |
134 | + 240 240 240 232 175 58 102 234 240 235 103 5 61 198 240 240 | |
135 | + 228 240 240 240 240 163 63 146 240 225 82 53 225 240 240 240 | |
136 | + 219 240 240 240 240 235 92 60 225 65 90 240 240 240 240 240 | |
137 | + 231 240 240 240 240 240 186 41 168 62 118 240 240 240 240 240 | |
138 | + 240 240 240 240 240 240 228 86 59 46 185 240 240 240 240 240 | |
139 | + 219 240 240 240 240 240 240 130 31 73 240 240 240 240 240 240 | |
140 | + 240 240 240 240 240 240 240 178 58 58 240 240 240 240 240 240 | |
141 | + 240 240 240 240 240 240 240 210 60 87 240 240 240 240 240 240 | |
142 | + 234 240 240 240 240 240 240 240 32 118 238 240 240 240 240 240 | |
143 | + 237 240 240 240 240 240 240 240 58 107 240 240 240 240 240 240 | |
144 | + 240 240 240 240 240 240 240 220 134 85 240 240 240 240 240 240 | |
145 | + 236 240 240 240 240 240 240 240 232 226 240 240 240 240 240 240 | |
146 | + 192 184 192 198 192 181 227 214 204 216 240 212 225 240 226 214 | |
147 | + | |
148 | + 156 90 240 240 240 240 240 240 240 240 240 240 240 240 240 214 | |
149 | + 16 26 142 240 240 240 240 240 240 240 240 240 240 240 240 225 | |
150 | + 195 12 64 199 240 240 240 240 240 240 240 240 240 240 240 240 | |
151 | + 233 156 26 61 225 240 240 240 240 240 240 240 240 240 240 225 | |
152 | + 235 240 92 9 53 240 240 240 240 240 240 240 240 240 240 214 | |
153 | + 240 240 227 111 76 82 118 180 240 240 240 238 240 240 240 240 | |
154 | + 236 240 240 235 225 65 62 37 64 53 74 118 106 75 225 216 | |
155 | + 240 240 240 240 240 225 157 57 31 54 49 31 53 128 232 204 | |
156 | + 238 240 240 240 156 67 36 78 130 177 207 240 240 220 240 214 | |
157 | + 239 240 229 104 62 80 185 228 240 240 240 240 240 240 240 227 | |
158 | + 240 204 93 58 158 230 240 240 240 240 240 240 240 240 240 181 | |
159 | + 186 95 64 174 240 240 240 240 240 240 240 240 240 240 240 192 | |
160 | + 93 30 170 228 240 240 240 240 240 240 240 240 240 240 240 198 | |
161 | + 53 117 226 240 240 240 240 240 240 240 240 240 240 240 240 192 | |
162 | + 120 192 238 240 240 240 240 240 240 240 240 240 240 240 240 181 | |
163 | + 237 200 216 240 226 217 231 240 219 240 240 234 237 240 236 192 | |
164 | + 156 90 240 240 240 240 240 240 240 240 240 240 240 240 240 214 | |
165 | + 14 26 142 240 240 240 240 240 240 240 240 240 240 240 240 226 | |
166 | + 195 4 68 202 240 240 240 240 240 240 240 240 240 240 240 240 | |
167 | + 234 150 16 76 226 240 240 240 240 240 240 240 240 240 240 225 | |
168 | + 236 240 91 11 66 240 240 240 240 240 240 240 240 240 240 212 | |
169 | + 240 240 226 103 86 91 118 185 240 240 240 238 240 240 240 240 | |
170 | + 237 240 240 235 225 63 58 46 73 56 83 118 108 95 227 216 | |
171 | + 240 240 240 240 240 222 165 49 41 49 47 31 59 138 232 204 | |
172 | + 239 240 240 234 158 74 45 86 130 177 207 240 240 225 240 212 | |
173 | + 240 240 228 91 63 82 192 230 240 240 240 240 240 240 240 226 | |
174 | + 240 213 96 49 162 240 240 240 240 240 240 240 240 240 240 181 | |
175 | + 192 109 74 174 240 240 240 240 240 240 240 240 240 240 240 192 | |
176 | + 106 46 178 228 240 240 240 240 240 240 240 240 240 240 240 198 | |
177 | + 57 133 233 240 240 240 240 240 240 240 240 240 240 240 240 192 | |
178 | + 125 204 239 240 240 240 240 240 240 240 240 240 240 240 240 185 | |
179 | + 238 213 222 240 228 222 234 240 222 240 240 234 237 240 238 194 | |
180 | + 156 90 240 240 240 240 240 240 240 240 240 240 240 240 240 214 | |
181 | + 14 15 134 240 240 240 240 240 240 240 240 240 240 240 240 226 | |
182 | + 195 3 54 198 240 240 240 240 240 240 240 240 240 240 240 240 | |
183 | + 233 150 13 61 225 240 240 240 240 240 240 240 240 240 240 225 | |
184 | + 236 240 91 5 53 240 240 240 240 240 240 240 240 240 240 212 | |
185 | + 240 240 226 103 82 90 118 185 240 240 240 238 240 240 240 240 | |
186 | + 237 240 240 235 225 65 62 46 73 58 87 118 107 85 226 216 | |
187 | + 240 240 240 240 240 225 168 59 31 58 60 32 58 134 232 204 | |
188 | + 239 240 240 234 146 60 41 86 130 178 210 240 240 220 240 214 | |
189 | + 239 240 229 102 63 92 186 228 240 240 240 240 240 240 240 227 | |
190 | + 240 213 96 58 163 235 240 240 240 240 240 240 240 240 240 181 | |
191 | + 192 105 68 175 240 240 240 240 240 240 240 240 240 240 240 192 | |
192 | + 106 48 188 232 240 240 240 240 240 240 240 240 240 240 240 198 | |
193 | + 57 134 238 240 240 240 240 240 240 240 240 240 240 240 240 192 | |
194 | + 125 204 239 240 240 240 240 240 240 240 240 240 240 240 240 184 | |
195 | + 238 213 222 240 228 219 231 240 219 240 240 234 237 240 236 192 | |
196 | + |
@@ -0,0 +1,40 @@ | ||
1 | +-optimizationpasses 5 | |
2 | +-dontusemixedcaseclassnames | |
3 | +-dontskipnonpubliclibraryclasses | |
4 | +-dontpreverify | |
5 | +-verbose | |
6 | +-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* | |
7 | + | |
8 | +-keep public class * extends android.app.Activity | |
9 | +-keep public class * extends android.app.Application | |
10 | +-keep public class * extends android.app.Service | |
11 | +-keep public class * extends android.content.BroadcastReceiver | |
12 | +-keep public class * extends android.content.ContentProvider | |
13 | +-keep public class * extends android.app.backup.BackupAgentHelper | |
14 | +-keep public class * extends android.preference.Preference | |
15 | +-keep public class com.android.vending.licensing.ILicensingService | |
16 | + | |
17 | +-keepclasseswithmembernames class * { | |
18 | + native <methods>; | |
19 | +} | |
20 | + | |
21 | +-keepclasseswithmembers class * { | |
22 | + public <init>(android.content.Context, android.util.AttributeSet); | |
23 | +} | |
24 | + | |
25 | +-keepclasseswithmembers class * { | |
26 | + public <init>(android.content.Context, android.util.AttributeSet, int); | |
27 | +} | |
28 | + | |
29 | +-keepclassmembers class * extends android.app.Activity { | |
30 | + public void *(android.view.View); | |
31 | +} | |
32 | + | |
33 | +-keepclassmembers enum * { | |
34 | + public static **[] values(); | |
35 | + public static ** valueOf(java.lang.String); | |
36 | +} | |
37 | + | |
38 | +-keep class * implements android.os.Parcelable { | |
39 | + public static final android.os.Parcelable$Creator *; | |
40 | +} |
@@ -0,0 +1,11 @@ | ||
1 | +# This file is automatically generated by Android Tools. | |
2 | +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! | |
3 | +# | |
4 | +# This file must be checked in Version Control Systems. | |
5 | +# | |
6 | +# To customize properties used by the Ant build system use, | |
7 | +# "ant.properties", and override values to adapt the script to your | |
8 | +# project structure. | |
9 | + | |
10 | +# Project target. | |
11 | +target=android-8 |
@@ -0,0 +1,12 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
3 | + android:id="@+id/topLayout" | |
4 | + android:layout_width="wrap_content" | |
5 | + android:layout_height="fill_parent" | |
6 | + android:orientation="horizontal" > | |
7 | + <FrameLayout | |
8 | + android:id="@+id/mainLayout" | |
9 | + android:layout_width="640px" | |
10 | + android:layout_height="480px" | |
11 | + android:orientation="vertical" /> | |
12 | +</LinearLayout> | |
\ No newline at end of file |
@@ -0,0 +1,7 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<resources> | |
3 | + | |
4 | + <string name="hello">Hello World, MSSimpleActivity!</string> | |
5 | + <string name="app_name">NyARToolKit for Android - MarkerSystem.Simple</string> | |
6 | + | |
7 | +</resources> | |
\ No newline at end of file |
@@ -0,0 +1,259 @@ | ||
1 | +/** | |
2 | + * NyARToolkit for Android SDK | |
3 | + * Copyright (C)2010 NyARToolkit for Android team | |
4 | + * Copyright (C)2010 R.Iizuka(nyatla) | |
5 | + * | |
6 | + * This program is free software: you can redistribute it and/or modify | |
7 | + * it under the terms of the GNU General Public License as published by | |
8 | + * the Free Software Foundation, either version 3 of the License, or | |
9 | + * (at your option) any later version. | |
10 | + * | |
11 | + * This program is distributed in the hope that it will be useful, | |
12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | + * GNU General Public License for more details. | |
15 | + * | |
16 | + * You should have received a copy of the GNU General Public License | |
17 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | + * | |
19 | + * For further information please contact. | |
20 | + * http://sourceforge.jp/projects/nyartoolkit-and/ | |
21 | + * | |
22 | + * This work is based on the original ARToolKit developed by | |
23 | + * Hirokazu Kato | |
24 | + * Mark Billinghurst | |
25 | + * HITLab, University of Washington, Seattle | |
26 | + * http://www.hitl.washington.edu/artoolkit/ | |
27 | + * Ryo Iizuka(nyatla) | |
28 | + * http://nyatla.jp/nyatoolkit/ | |
29 | + * | |
30 | + * Contributor(s) | |
31 | + * Atsuo Igarashi | |
32 | + * Yasuhide Matsumoto | |
33 | + * Fuu Rokubou | |
34 | + */ | |
35 | +package jp.androidgroup.nyartoolkit.markersystem.simple; | |
36 | + | |
37 | +import java.io.IOException; | |
38 | +import java.io.InputStream; | |
39 | +import java.nio.ByteBuffer; | |
40 | +import java.nio.ByteOrder; | |
41 | +import java.nio.FloatBuffer; | |
42 | + | |
43 | +import javax.microedition.khronos.opengles.GL10; | |
44 | + | |
45 | +import jp.androidgroup.nyartoolkit.markersystem.android.NyARAndroidMarkerSystem; | |
46 | +import jp.androidgroup.nyartoolkit.markersystem.android.NyARAndroidMarkerSystemFactory; | |
47 | +import jp.androidgroup.nyartoolkit.markersystem.renderer.MarkerSystemAbstractRenderer; | |
48 | +import jp.androidgroup.nyartoolkit.wrapper.NyARToolKitWrapper; | |
49 | +import jp.nyatla.nyartoolkit.core.NyARException; | |
50 | + | |
51 | +import android.content.res.AssetManager; | |
52 | +import android.util.Log; | |
53 | + | |
54 | +/** | |
55 | + * シンプルな箱を書くだけのRenderer | |
56 | + * | |
57 | + */ | |
58 | +/** | |
59 | + * @author Sixwish | |
60 | + * | |
61 | + */ | |
62 | +public class CubeRenderer extends MarkerSystemAbstractRenderer | |
63 | +{ | |
64 | + | |
65 | + /** | |
66 | + * Logging Tag | |
67 | + */ | |
68 | + protected final static String TAG = "NyARTK4And.Simple.Renderer"; | |
69 | + | |
70 | + private double markerWidth = 80.0; | |
71 | + | |
72 | + /** | |
73 | + * 頂点バッファ | |
74 | + */ | |
75 | + private FloatBuffer vertexBuffer; | |
76 | + | |
77 | + /** | |
78 | + * 色のバッファ | |
79 | + */ | |
80 | + private FloatBuffer colorBuffer; | |
81 | + | |
82 | + /** | |
83 | + * 法線 | |
84 | + */ | |
85 | + private ByteBuffer indexBuffer; | |
86 | + | |
87 | + /** | |
88 | + * マーカーパターンを管理する | |
89 | + * 識別結果などはこの配列に登録されたIDを使ってアクセスする。 | |
90 | + */ | |
91 | + private int[] markerIds; | |
92 | + | |
93 | + /** | |
94 | + * 表示オブジェクトの初期化を行う | |
95 | + * | |
96 | + */ | |
97 | + public CubeRenderer() | |
98 | + { | |
99 | + // マーカーパターン読み込みはここに設置することも可能。 | |
100 | + // その場合はクラス変数も追加してください | |
101 | + // 動的に変える場合は、別途メソッドを追加したほうが無難です。 | |
102 | + | |
103 | + // 表示オブジェクト初期化 | |
104 | + float length = (float)markerWidth/2.0f; | |
105 | + // 左下から周回。Zのみ、マーカーの半分を上に上げるために加算 | |
106 | + float[] square = { | |
107 | + -length, -length, -length+length, // 0(bottom) | |
108 | + length, -length, -length+length, // | |
109 | + length, length, -length+length, // | |
110 | + -length, length, -length+length, // 3 | |
111 | + -length, -length, length+length, // 4(top) | |
112 | + length, -length, length+length, // | |
113 | + length, length, length+length, // | |
114 | + -length, length, length+length | |
115 | + }; | |
116 | + vertexBuffer = buildFloatBuffer(square); | |
117 | + | |
118 | + // 色設定 | |
119 | + float colors[] = { | |
120 | + 0.0f, 0.0f, 0.0f, 1.0f, | |
121 | + 1.0f, 0.0f, 0.0f, 1.0f, | |
122 | + 1.0f, 1.0f, 0.0f, 1.0f, | |
123 | + 0.0f, 1.0f, 0.0f, 1.0f, | |
124 | + 0.0f, 0.0f, 1.0f, 1.0f, | |
125 | + 1.0f, 0.0f, 1.0f, 1.0f, | |
126 | + 1.0f, 1.0f, 1.0f, 1.0f, | |
127 | + 0.0f, 1.0f, 1.0f, 1.0f | |
128 | + }; | |
129 | + colorBuffer = buildFloatBuffer(colors); | |
130 | + | |
131 | + // 面設定 | |
132 | + byte indices[] = { | |
133 | + 0, 4, 5, 0, 5, 1, | |
134 | + 1, 5, 6, 1, 6, 2, | |
135 | + 2, 6, 7, 2, 7, 3, | |
136 | + 3, 7, 4, 3, 4, 0, | |
137 | + 4, 7, 6, 4, 6, 5, | |
138 | + 3, 0, 1, 3, 1, 2 | |
139 | + }; | |
140 | + indexBuffer = buildByteBuffer(indices); | |
141 | + } | |
142 | + | |
143 | + /** | |
144 | + * OpenGL ES で使用する方式に変更する | |
145 | + * | |
146 | + * @param arr | |
147 | + * @return | |
148 | + */ | |
149 | + public FloatBuffer buildFloatBuffer(float[] arr) { | |
150 | + ByteBuffer bb = ByteBuffer.allocateDirect(arr.length * 4); | |
151 | + bb.order(ByteOrder.nativeOrder()); | |
152 | + FloatBuffer fb = bb.asFloatBuffer(); | |
153 | + fb.put(arr); | |
154 | + fb.position(0); | |
155 | + return fb; | |
156 | + } | |
157 | + | |
158 | + /** | |
159 | + * OpenGL ES で使用する方式に変更する | |
160 | + * | |
161 | + * @param arr | |
162 | + * @return | |
163 | + */ | |
164 | + public ByteBuffer buildByteBuffer(byte[] arr) { | |
165 | + ByteBuffer bb = ByteBuffer.allocateDirect(arr.length); | |
166 | + bb.put(arr); | |
167 | + bb.position(0); | |
168 | + return bb; | |
169 | + } | |
170 | + | |
171 | + /* (non-Javadoc) | |
172 | + * @see jp.androidgroup.nyartoolkit.markersystem.renderer.MarkerSystemAbstractRenderer#configureARScene() | |
173 | + * | |
174 | + * ここでマーカーのパターンを登録します。 | |
175 | + * | |
176 | + */ | |
177 | + @Override | |
178 | + public boolean configureARScene(AssetManager assetMng) | |
179 | + { | |
180 | + // MarkerSystem の インスタンス取得 | |
181 | + NyARAndroidMarkerSystem _nyARMS = NyARAndroidMarkerSystemFactory.getInstance().getMarkerSystem(); | |
182 | + | |
183 | + // パターンファイル名定義 | |
184 | + String[] _marker = {"AR/Marker/hiro.pat", "AR/Marker/kanji.pat"}; | |
185 | + | |
186 | + // マーカーID管理用領域作成 | |
187 | + // このIDを用いて、検出結果などを取得する | |
188 | + markerIds = new int[_marker.length]; | |
189 | + | |
190 | + // パターンファイル読み込み | |
191 | + try { | |
192 | + for (int i=0; i<_marker.length; i++) { | |
193 | + InputStream _markerIS = assetMng.open(_marker[i]); | |
194 | + markerIds[i] = _nyARMS.addARMarker(_markerIS, 16, 25, 80); | |
195 | + _markerIS = null; | |
196 | + } | |
197 | + | |
198 | + return true; | |
199 | + } catch (IOException e) { | |
200 | + Log.d(TAG, "ARToolKit marker file is not found."); | |
201 | + } catch (NyARException e) { | |
202 | + Log.d(TAG, "Add Marker pattern error."); | |
203 | + } | |
204 | + | |
205 | + return false; | |
206 | + } | |
207 | + | |
208 | + public void _drawModel(GL10 gl) | |
209 | + { | |
210 | + gl.glColorPointer( 4, GL10.GL_FLOAT, 0, colorBuffer); | |
211 | + gl.glVertexPointer( 3, GL10.GL_FLOAT, 0, vertexBuffer); | |
212 | + | |
213 | + gl.glEnableClientState(GL10.GL_COLOR_ARRAY); | |
214 | + gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); | |
215 | + | |
216 | + gl.glDrawElements(GL10.GL_TRIANGLES, 36, GL10.GL_UNSIGNED_BYTE, indexBuffer); | |
217 | + | |
218 | + gl.glDisableClientState(GL10.GL_COLOR_ARRAY); | |
219 | + gl.glDisableClientState(GL10.GL_VERTEX_ARRAY); | |
220 | + } | |
221 | + | |
222 | + /* (non-Javadoc) | |
223 | + * @see jp.nyatla.nyartoolkit.android.renderer.DefaultRenderer#draw(javax.microedition.khronos.opengles.GL10) | |
224 | + */ | |
225 | + @Override | |
226 | + public void draw(GL10 gl) | |
227 | + { | |
228 | + Log.d(TAG, "draw"); | |
229 | + gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); | |
230 | + | |
231 | + gl.glMatrixMode(GL10.GL_PROJECTION); | |
232 | +// gl.glLoadIdentity(); | |
233 | + gl.glLoadMatrixf(NyARAndroidMarkerSystemFactory.getInstance().getMarkerSystem().getGlProjectionMatrixf(), 0); | |
234 | + | |
235 | + gl.glEnable(GL10.GL_CULL_FACE); | |
236 | + gl.glShadeModel(GL10.GL_SMOOTH); | |
237 | + gl.glEnable(GL10.GL_DEPTH_TEST); | |
238 | + gl.glFrontFace(GL10.GL_CW); | |
239 | + | |
240 | + // 識別したマーカー上にオブジェクトを描く処理 | |
241 | + // markerIds の数だけ回して、識別していたら描画するという処理 | |
242 | + for (int i=0; i<markerIds.length; i++) { | |
243 | + if (NyARAndroidMarkerSystemFactory.getInstance().getMarkerSystem().isExistMarker(markerIds[i])) { | |
244 | + Log.d(TAG, "draw visible"); | |
245 | + gl.glMatrixMode(GL10.GL_MODELVIEW); | |
246 | + gl.glLoadIdentity(); | |
247 | + gl.glPushMatrix(); | |
248 | + gl.glLoadMatrixf(NyARAndroidMarkerSystemFactory.getInstance().getMarkerSystem().getGlMarkerMatrixf(markerIds[i]), 0); | |
249 | + | |
250 | + Log.d(TAG, "draw model"); | |
251 | + _drawModel(gl); | |
252 | + | |
253 | + gl.glPopMatrix(); | |
254 | + } | |
255 | + } | |
256 | + } | |
257 | + | |
258 | + | |
259 | +} |
@@ -0,0 +1,80 @@ | ||
1 | +/** | |
2 | + * NyARToolkit for Android SDK | |
3 | + * Copyright (C)2012 NyARToolkit for Android team | |
4 | + * Copyright (C)2012 R.Iizuka(nyatla) | |
5 | + * | |
6 | + * This program is free software: you can redistribute it and/or modify | |
7 | + * it under the terms of the GNU General Public License as published by | |
8 | + * the Free Software Foundation, either version 3 of the License, or | |
9 | + * (at your option) any later version. | |
10 | + * | |
11 | + * This program is distributed in the hope that it will be useful, | |
12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | + * GNU General Public License for more details. | |
15 | + * | |
16 | + * You should have received a copy of the GNU General Public License | |
17 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | + * | |
19 | + * For further information please contact. | |
20 | + * http://sourceforge.jp/projects/nyartoolkit-and/ | |
21 | + * | |
22 | + * This work is based on the original ARToolKit developed by | |
23 | + * Hirokazu Kato | |
24 | + * Mark Billinghurst | |
25 | + * HITLab, University of Washington, Seattle | |
26 | + * http://www.hitl.washington.edu/artoolkit/ | |
27 | + * Ryo Iizuka(nyatla) | |
28 | + * http://nyatla.jp/nyatoolkit/ | |
29 | + * | |
30 | + * Contributor(s) | |
31 | + * Fuu Rokubou | |
32 | + */ | |
33 | +package jp.androidgroup.nyartoolkit.markersystem.simple; | |
34 | + | |
35 | + | |
36 | +import jp.androidgroup.nyartoolkit.markersystem.AbstractMarkerSystemActivity; | |
37 | +import jp.androidgroup.nyartoolkit.markersystem.renderer.MarkerSystemAbstractRenderer; | |
38 | +import jp.androidgroup.nyartoolkit.markersystem.simple.R; | |
39 | +import jp.nyatla.nyartoolkit.markersystem.INyARMarkerSystemConfig; | |
40 | +import jp.nyatla.nyartoolkit.markersystem.NyARMarkerSystemConfig; | |
41 | +import android.content.res.AssetManager; | |
42 | +import android.os.Bundle; | |
43 | +import android.widget.FrameLayout; | |
44 | + | |
45 | +public class MSSimpleActivity extends AbstractMarkerSystemActivity | |
46 | +{ | |
47 | + /** Called when the activity is first created. */ | |
48 | + @Override | |
49 | + public void onCreate(Bundle savedInstanceState) { | |
50 | + super.onCreate(savedInstanceState); | |
51 | + setContentView(R.layout.main); | |
52 | + } | |
53 | + | |
54 | + @Override | |
55 | + protected FrameLayout supplyFrameLayout() { | |
56 | + return (FrameLayout)this.findViewById(R.id.mainLayout); | |
57 | + } | |
58 | + | |
59 | + @Override | |
60 | + protected MarkerSystemAbstractRenderer supplyRenderer() { | |
61 | + return new CubeRenderer(); | |
62 | + } | |
63 | + | |
64 | + @Override | |
65 | + protected INyARMarkerSystemConfig supplyMarkerSystemConfig( | |
66 | + int _caputureWidth, int _caputureHeight) { | |
67 | + // | |
68 | + NyARMarkerSystemConfig config = null; | |
69 | + // サイズに合わせてカメラパラメータを切り替える | |
70 | + // この実装では上記コメントの実装まで行なっていないので注意してください | |
71 | + try { | |
72 | + AssetManager assetMng = getResources().getAssets(); | |
73 | + config = new NyARMarkerSystemConfig(assetMng.open("AR/CameraParam/camera_param_640x480.dat"), _caputureWidth, _caputureHeight); | |
74 | + } catch (Exception e) { | |
75 | + finish(); | |
76 | + } | |
77 | + | |
78 | + return config; | |
79 | + } | |
80 | +} | |
\ No newline at end of file |