randomSequence;
52 | private int startTime;
53 |
54 | private float missedShotX;
55 | private float missedShotY;
56 | private float missedShotRadius;
57 |
58 | private Bitmap spiderBitmap;
59 | private Bitmap upsideDownSpiderBitmap;
60 | private Bitmap crosshairBitmap;
61 |
62 | private float fallingAcceleration;
63 |
64 | public LaserCanvasView(Context context) {
65 | this(context, null, 0);
66 | }
67 |
68 | public LaserCanvasView(Context context, AttributeSet attrs) {
69 | this(context, attrs, 0);
70 | }
71 |
72 | public LaserCanvasView(Context context, AttributeSet attrs, int defStyleAttr) {
73 | super(context, attrs, defStyleAttr);
74 | setWillNotDraw(false);
75 |
76 | mFillPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
77 | mFillPaint.setStyle(Paint.Style.FILL);
78 | mFillPaint.setColor(Color.BLACK);
79 | mFillPaint.setStrokeWidth(3);
80 |
81 | greyPaint = new Paint(mFillPaint);
82 | greyPaint.setColor(Color.GRAY);
83 |
84 | Drawable d1 = ContextCompat.getDrawable(context, R.drawable.spider);
85 | Drawable d2 = ContextCompat.getDrawable(context, R.drawable.spider_tilted);
86 | Drawable d3 = ContextCompat.getDrawable(context, R.drawable.crosshair);
87 |
88 | spiderBitmap = MatchCanvasView.drawableToBitmap(d1);
89 | upsideDownSpiderBitmap = MatchCanvasView.drawableToBitmap(d2);
90 | crosshairBitmap = MatchCanvasView.drawableToBitmap(d3);
91 | //TODO move the convert utility method outside of matchCanvasView
92 |
93 | mTargetPaint = new Paint(mFillPaint);
94 | mTargetPaint.setColor(ContextCompat.getColor(context, R.color.red_500));
95 |
96 | mFallingTargetPaint = new Paint(mFillPaint);
97 | mFallingTargetPaint.setColor(ContextCompat.getColor(context, R.color.grey_800));
98 |
99 | mTargetRadius = 40;
100 | targetRadiusSquared = mTargetRadius * mTargetRadius;
101 |
102 | mWidth = 1;
103 | mHeight = 1;
104 |
105 | targets = new float[12][5];
106 | fallingTargets = new ArrayList<>();
107 | randomSequence = new ArrayList<>();
108 |
109 | missedShotRadius = 5;
110 | }
111 |
112 | @Override
113 | protected void onSizeChanged(int w, int h, int oldw, int oldh) {
114 |
115 | super.onSizeChanged(w, h, oldw, oldh);
116 | mWidth = w;
117 | mHeight = h;
118 | laserX = w / 2;
119 | laserY = h / 2;
120 |
121 | // falls 1 screen height in the first second
122 | fallingAcceleration = mHeight;
123 |
124 | generateTargets();
125 | }
126 |
127 |
128 | @Override
129 | protected void onDraw(Canvas canvas) {
130 | super.onDraw(canvas);
131 |
132 | time += 0.016;
133 |
134 | // draw the missed shot
135 | canvas.drawCircle(missedShotX, missedShotY, missedShotRadius, greyPaint);
136 |
137 | // draw targets
138 | for (int i = 0; i < targets.length; i++) {
139 |
140 | float timePassed = time - targets[i][START_TIME];
141 |
142 | if (timePassed > 0) {
143 |
144 | float x = targets[i][POSITION_X];
145 | float y = (targets[i][DURATION] * timePassed - timePassed * timePassed) * targets[i][SCALE];
146 |
147 | canvas.drawLine(x, y, x, 0, mFillPaint);
148 | canvas.drawBitmap(spiderBitmap, x - spiderBitmap.getWidth() / 2, y - spiderBitmap
149 | .getHeight() / 2, mFillPaint);
150 | }
151 |
152 | if (timePassed > targets[i][DURATION]) {
153 |
154 | updateTarget(i);
155 | }
156 |
157 | }
158 |
159 |
160 | // draw falling targets
161 | for (int i = 0; i < fallingTargets.size(); i++) {
162 |
163 | float timePassed = time - fallingTargets.get(i)[2];
164 | float yPosition = fallingTargets.get(i)[1] + timePassed * timePassed * fallingAcceleration;
165 |
166 | //canvas.drawCircle(fallingTargets.get(i)[0], yPosition, mTargetRadius,mFallingTargetPaint);
167 | canvas.drawBitmap(
168 | upsideDownSpiderBitmap,
169 | fallingTargets.get(i)[0] - upsideDownSpiderBitmap.getWidth() / 2,
170 | yPosition - upsideDownSpiderBitmap.getHeight() / 2, mFillPaint
171 | );
172 |
173 | // if it falls beyond the bottom of the screen
174 | if (yPosition > mHeight + mTargetRadius) {
175 |
176 | fallingTargets.remove(i);
177 | i--;
178 | }
179 | }
180 |
181 | // draw the laser pointer
182 | canvas.drawBitmap(
183 | crosshairBitmap,
184 | laserX - crosshairBitmap.getWidth() / 2,
185 | laserY - crosshairBitmap.getHeight() / 2, mFillPaint
186 | );
187 |
188 |
189 | }
190 |
191 | @Override
192 | public void onOrientationChanged(int newOrientation) {
193 | //do nothing
194 | }
195 |
196 | public boolean shoot() {
197 |
198 | for (int i = 0; i < targets.length; i++) {
199 |
200 | float timePassed = time - targets[i][START_TIME];
201 |
202 | // you can't shoot targets that haven't been drawn yet
203 | if (timePassed > 0) {
204 |
205 | float x = targets[i][POSITION_X];
206 | float y = (targets[i][DURATION] * timePassed - timePassed * timePassed) *
207 | targets[i][SCALE];
208 |
209 | // if you shoot close enough to a target
210 | if (Math.pow((laserX - x), 2) + Math.pow((laserY - y), 2) < targetRadiusSquared) {
211 |
212 | fallingTargets.add(createFallingTarget(x, y));
213 |
214 | // set a new target in its place
215 | updateTarget(i);
216 |
217 | //if you hit, hide the last missed shot
218 | missedShotX = -10;
219 | missedShotY = -10;
220 |
221 | return true;
222 | } else {
223 |
224 | // if you miss, show the position of the missed shot
225 | missedShotX = laserX;
226 | missedShotY = laserY;
227 | }
228 | }
229 | }
230 | return false;
231 | }
232 |
233 | @Override
234 | public void onLaserPointChanged(float[] point) {
235 |
236 | OrientationDetector.scaleLaserPoint(point, mWidth, mHeight);
237 | laserX = point[0];
238 | laserY = point[1];
239 | }
240 |
241 |
242 | public void generateTargets() {
243 |
244 | time = 0;
245 | startTime = 0;
246 | generateRandomSequence();
247 |
248 | for (int i = 0; i < targets.length; i++) {
249 |
250 | updateTarget(randomSequence.get(i));
251 | }
252 |
253 | missedShotX = -10;
254 | missedShotX = -10;
255 | }
256 |
257 |
258 | // generates a new random target
259 | private void updateTarget(int i) {
260 |
261 | startTime += 1.2;
262 |
263 | targets[i][POSITION_X] = (i + 0.5f) * mWidth / targets.length;
264 |
265 | targets[i][START_TIME] = startTime;
266 | targets[i][DURATION] = 3.5f + (float) Math.random();
267 | targets[i][MAX_HEIGHT] = mHeight / 5 * (2 * (float) Math.random() + 2);
268 |
269 | targets[i][SCALE] = targets[i][MAX_HEIGHT] * 4 / (targets[i][DURATION] * targets[i][DURATION]);
270 | }
271 |
272 |
273 | private float[] createFallingTarget(float x, float y) {
274 |
275 | float[] fallingTarget = new float[3];
276 |
277 | fallingTarget[0] = x;
278 |
279 | // start falling from
280 | fallingTarget[1] = y;
281 |
282 | fallingTarget[2] = time;
283 |
284 | return fallingTarget;
285 | }
286 |
287 |
288 | private void generateRandomSequence(){
289 |
290 | randomSequence.clear();
291 |
292 | for (int i = 0; i < targets.length; i++) {
293 |
294 | randomSequence.add(i);
295 | }
296 |
297 | Collections.shuffle(randomSequence);
298 | }
299 | }
300 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #FFEBEE
5 | #FFCDD2
6 | #EF9A9A
7 | #E57373
8 | #EF5350
9 | #F44336
10 | #E53935
11 | #D32F2F
12 | #C62828
13 | #B71C1C
14 | #FF8A80
15 | #FF5252
16 | #FF1744
17 | #D50000
18 |
19 |
20 | #FCE4EC
21 | #F8BBD0
22 | #F48FB1
23 | #F06292
24 | #EC407A
25 | #E91E63
26 | #D81B60
27 | #C2185B
28 | #AD1457
29 | #880E4F
30 | #FF80AB
31 | #FF4081
32 | #F50057
33 | #C51162
34 |
35 |
36 | #F3E5F5
37 | #E1BEE7
38 | #CE93D8
39 | #BA68C8
40 | #AB47BC
41 | #9C27B0
42 | #8E24AA
43 | #7B1FA2
44 | #6A1B9A
45 | #4A148C
46 | #EA80FC
47 | #E040FB
48 | #D500F9
49 | #AA00FF
50 |
51 |
52 | #EDE7F6
53 | #D1C4E9
54 | #B39DDB
55 | #9575CD
56 | #7E57C2
57 | #673AB7
58 | #5E35B1
59 | #512DA8
60 | #4527A0
61 | #311B92
62 | #B388FF
63 | #7C4DFF
64 | #651FFF
65 | #6200EA
66 |
67 |
68 | #E8EAF6
69 | #C5CAE9
70 | #9FA8DA
71 | #7986CB
72 | #5C6BC0
73 | #3F51B5
74 | #3949AB
75 | #303F9F
76 | #283593
77 | #1A237E
78 | #8C9EFF
79 | #536DFE
80 | #3D5AFE
81 | #304FFE
82 |
83 |
84 | #E3F2FD
85 | #BBDEFB
86 | #90CAF9
87 | #64B5F6
88 | #42A5F5
89 | #2196F3
90 | #1E88E5
91 | #1976D2
92 | #1565C0
93 | #0D47A1
94 | #82B1FF
95 | #448AFF
96 | #2979FF
97 | #2962FF
98 |
99 |
100 | #E1F5FE
101 | #B3E5FC
102 | #81D4fA
103 | #4fC3F7
104 | #29B6FC
105 | #03A9F4
106 | #039BE5
107 | #0288D1
108 | #0277BD
109 | #01579B
110 | #80D8FF
111 | #40C4FF
112 | #00B0FF
113 | #0091EA
114 |
115 |
116 | #E0F7FA
117 | #B2EBF2
118 | #80DEEA
119 | #4DD0E1
120 | #26C6DA
121 | #00BCD4
122 | #00ACC1
123 | #0097A7
124 | #00838F
125 | #006064
126 | #84FFFF
127 | #18FFFF
128 | #00E5FF
129 | #00B8D4
130 |
131 |
132 | #E0F2F1
133 | #B2DFDB
134 | #80CBC4
135 | #4DB6AC
136 | #26A69A
137 | #009688
138 | #00897B
139 | #00796B
140 | #00695C
141 | #004D40
142 | #A7FFEB
143 | #64FFDA
144 | #1DE9B6
145 | #00BFA5
146 |
147 |
148 | #E8F5E9
149 | #C8E6C9
150 | #A5D6A7
151 | #81C784
152 | #66BB6A
153 | #4CAF50
154 | #43A047
155 | #388E3C
156 | #2E7D32
157 | #1B5E20
158 | #B9F6CA
159 | #69F0AE
160 | #00E676
161 | #00C853
162 |
163 |
164 | #F1F8E9
165 | #DCEDC8
166 | #C5E1A5
167 | #AED581
168 | #9CCC65
169 | #8BC34A
170 | #7CB342
171 | #689F38
172 | #558B2F
173 | #33691E
174 | #CCFF90
175 | #B2FF59
176 | #76FF03
177 | #64DD17
178 |
179 |
180 | #F9FBE7
181 | #F0F4C3
182 | #E6EE9C
183 | #DCE775
184 | #D4E157
185 | #CDDC39
186 | #C0CA33
187 | #A4B42B
188 | #9E9D24
189 | #827717
190 | #F4FF81
191 | #EEFF41
192 | #C6FF00
193 | #AEEA00
194 |
195 |
196 | #FFFDE7
197 | #FFF9C4
198 | #FFF590
199 | #FFF176
200 | #FFEE58
201 | #FFEB3B
202 | #FDD835
203 | #FBC02D
204 | #F9A825
205 | #F57F17
206 | #FFFF82
207 | #FFFF00
208 | #FFEA00
209 | #FFD600
210 |
211 |
212 | #FFF8E1
213 | #FFECB3
214 | #FFE082
215 | #FFD54F
216 | #FFCA28
217 | #FFC107
218 | #FFB300
219 | #FFA000
220 | #FF8F00
221 | #FF6F00
222 | #FFE57F
223 | #FFD740
224 | #FFC400
225 | #FFAB00
226 |
227 |
228 | #FFF3E0
229 | #FFE0B2
230 | #FFCC80
231 | #FFB74D
232 | #FFA726
233 | #FF9800
234 | #FB8C00
235 | #F57C00
236 | #EF6C00
237 | #E65100
238 | #FFD180
239 | #FFAB40
240 | #FF9100
241 | #FF6D00
242 |
243 |
244 | #FBE9A7
245 | #FFCCBC
246 | #FFAB91
247 | #FF8A65
248 | #FF7043
249 | #FF5722
250 | #F4511E
251 | #E64A19
252 | #D84315
253 | #BF360C
254 | #FF9E80
255 | #FF6E40
256 | #FF3D00
257 | #DD2600
258 |
259 |
260 | #EFEBE9
261 | #D7CCC8
262 | #BCAAA4
263 | #A1887F
264 | #8D6E63
265 | #795548
266 | #6D4C41
267 | #5D4037
268 | #4E342E
269 | #3E2723
270 |
271 |
272 | #FAFAFA
273 | #F5F5F5
274 | #EEEEEE
275 | #E0E0E0
276 | #BDBDBD
277 | #9E9E9E
278 | #757575
279 | #616161
280 | #424242
281 | #212121
282 | #000000
283 | #ffffff
284 |
285 |
286 | #ECEFF1
287 | #CFD8DC
288 | #B0BBC5
289 | #90A4AE
290 | #78909C
291 | #607D8B
292 | #546E7A
293 | #455A64
294 | #37474F
295 | #263238
296 |
297 | @color/pink_500
298 | @color/grey_200
299 | @color/white_1000
300 | @color/green_500
301 |
302 | #000000
303 |
304 |
305 | @color/red_500
306 | @color/yellow_600
307 | @color/grey_300
308 | @color/red_500
309 |
310 | @color/blue_grey_500
311 | @color/blue_grey_700
312 | @color/red_A200
313 | #FFFFFF
314 |
315 | #89000000
316 | #99000000
317 |
318 |
319 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/controller/cast/CastRemoteDisplayActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.controller.cast;
18 |
19 | import android.app.PendingIntent;
20 | import android.content.Context;
21 | import android.content.Intent;
22 | import android.media.AudioManager;
23 | import android.os.Bundle;
24 | import android.support.v4.view.MenuItemCompat;
25 | import android.support.v7.app.AppCompatActivity;
26 | import android.support.v7.app.MediaRouteActionProvider;
27 | import android.support.v7.media.MediaRouteSelector;
28 | import android.support.v7.media.MediaRouter;
29 | import android.support.v7.media.MediaRouter.RouteInfo;
30 | import android.support.v7.widget.Toolbar;
31 | import android.util.Log;
32 | import android.view.Menu;
33 | import android.view.MenuItem;
34 | import android.view.View;
35 | import android.view.ViewGroup;
36 | import android.widget.BaseAdapter;
37 | import android.widget.Button;
38 | import android.widget.ImageView;
39 | import android.widget.ListView;
40 | import android.widget.TextView;
41 | import android.widget.Toast;
42 |
43 | import com.bumptech.glide.Glide;
44 | import com.example.controller.R;
45 | import com.example.controller.ui.MainActivity;
46 | import com.google.android.gms.cast.CastDevice;
47 | import com.google.android.gms.cast.CastMediaControlIntent;
48 | import com.google.android.gms.cast.CastRemoteDisplayLocalService;
49 | import com.google.android.gms.common.api.Status;
50 |
51 | import java.util.Locale;
52 |
53 | /**
54 | * CastRemoteDisplayActivity
55 | *
56 | * This code shows how to create an activity that renders some content on a
57 | * Cast device using a {@link com.google.android.gms.cast.CastPresentation}.
58 | *
59 | *
60 | * The activity uses the {@link MediaRouter} API to select a cast route
61 | * using a menu item.
62 | * When a presentation display is available, we stop
63 | * showing content in the main activity and instead start a {@link CastRemoteDisplayLocalService}
64 | * that will create a {@link com.google.android.gms.cast.CastPresentation} to render content on the
65 | * cast remote display. When the cast remote display is removed, we revert to showing content in
66 | * the main activity. We also write information about displays and display-related events
67 | * to the Android log which you can read using adb logcat.
68 | *
69 | */
70 | public class CastRemoteDisplayActivity extends AppCompatActivity {
71 |
72 | private int experiment;
73 |
74 | public static final String EXTRA_EXPERIMENT = "experiment";
75 |
76 | private final String TAG = "CastRDisplayActivity";
77 | //TODO pass intent to this activity to show different callibirate screen
78 |
79 | // Second screen
80 | private Toolbar mToolbar;
81 |
82 | // MediaRouter
83 | private MediaRouter mMediaRouter;
84 | private MediaRouteSelector mMediaRouteSelector;
85 |
86 | private CastDevice mCastDevice;
87 | private ListView listView;
88 |
89 | /**
90 | * Initialization of the Activity after it is first created. Must at least
91 | * call {@link android.app.Activity#setContentView setContentView()} to
92 | * describe what is to be displayed in the screen.
93 | */
94 | @Override
95 | protected void onCreate(Bundle savedInstanceState) {
96 | super.onCreate(savedInstanceState);
97 |
98 | // Set the hardware buttons to control the music
99 | this.setVolumeControlStream(AudioManager.STREAM_MUSIC);
100 |
101 | setContentView(R.layout.acitivity_cast_remote_display);
102 | setFullScreen();
103 | setupActionBar();
104 |
105 | Bundle extras = getIntent().getExtras();
106 | listView = (ListView) findViewById(R.id.list_view);
107 | final Button button = (Button) findViewById(R.id.start_button);
108 | final ImageView imageView = (ImageView) findViewById(R.id.image_view);
109 |
110 | String[] steps = null;
111 | int drawableResId = R.drawable.hold_up;
112 |
113 | if (extras != null) {
114 | experiment = extras.getInt(EXTRA_EXPERIMENT);
115 | }
116 |
117 | if (experiment == 0 && isRemoteDisplaying()) {
118 | experiment = getCurrentService().getCurrentPresentationMode();
119 | }
120 |
121 | switch (experiment) {
122 | case CastServiceController.MODE_3D_VIEWER:
123 | button.setText(R.string.start);
124 | steps = getResources().getStringArray(R.array.steps_3d_viewer);
125 | break;
126 | case CastServiceController.MODE_MATCH_GAME:
127 | steps = getResources().getStringArray(R.array.steps_match);
128 | break;
129 | case CastServiceController.MODE_LASER_GAME:
130 | drawableResId = R.drawable.hold_remotes;
131 | steps = getResources().getStringArray(R.array.steps_laser);
132 | break;
133 | }
134 |
135 | listView.setAdapter(new StepsAdapter(this, steps));
136 | Glide.with(this)
137 | .load(drawableResId)
138 | .placeholder(R.drawable.hero_placeholder)
139 | .fitCenter()
140 | .crossFade().into(imageView);
141 |
142 |
143 | // Local UI
144 | final View overlay = findViewById(R.id.overlay);
145 | button.setOnClickListener(new View.OnClickListener() {
146 | @Override
147 | public void onClick(View v) {
148 | // Change the remote display animation color when the button is clicked
149 | CastServiceController presentationService = getCurrentService();
150 | if (presentationService != null) {
151 | presentationService.startPresentation();
152 | }
153 | }
154 | });
155 |
156 | overlay.setOnClickListener(new View.OnClickListener() {
157 | @Override
158 | public void onClick(View v) {
159 | // Change the remote display animation color when the button is clicked
160 | CastServiceController presentationService = getCurrentService();
161 | if (presentationService != null) {
162 | presentationService.onSecondaryButton();
163 | }
164 | }
165 | });
166 |
167 |
168 | mMediaRouter = MediaRouter.getInstance(getApplicationContext());
169 | mMediaRouteSelector = new MediaRouteSelector.Builder()
170 | .addControlCategory(
171 | CastMediaControlIntent.categoryForCast(getString(R.string.app_id)))
172 | .build();
173 |
174 |
175 | if (isRemoteDisplaying()) {
176 | // The Activity has been recreated and we have an active remote display session,
177 | // so we need to set the selected device instance
178 | CastDevice castDevice = CastDevice
179 | .getFromBundle(mMediaRouter.getSelectedRoute().getExtras());
180 | mCastDevice = castDevice;
181 | } else {
182 | if (extras != null) {
183 | mCastDevice = extras.getParcelable(MainActivity.INTENT_EXTRA_CAST_DEVICE);
184 | }
185 | }
186 |
187 | }
188 |
189 | private CastServiceController getCurrentService() {
190 | return ((CastServiceController) CastRemoteDisplayLocalService.getInstance());
191 | }
192 |
193 | private class StepsAdapter extends BaseAdapter {
194 | private String[] array;
195 | private Context ctx;
196 |
197 | public StepsAdapter(Context ctx, String[] steps) {
198 | this.ctx = ctx;
199 | this.array = steps;
200 | }
201 |
202 | @Override
203 | public int getCount() {
204 | return array.length;
205 | }
206 |
207 | @Override
208 | public Object getItem(int position) {
209 | return array[position];
210 | }
211 |
212 | @Override
213 | public long getItemId(int position) {
214 | return position;
215 | }
216 |
217 | @Override
218 | public View getView(int position, View convertView, ViewGroup parent) {
219 | View newView;
220 |
221 | if (convertView == null) {
222 | newView = View.inflate(ctx, R.layout.item_step, null);
223 | } else {
224 | newView = convertView;
225 | }
226 |
227 | String txt = (String) getItem(position);
228 |
229 | ((TextView) newView.findViewById(R.id.step_num)).setText(String.format(Locale.US, "%d", position + 1));
230 | ((TextView) newView.findViewById(R.id.step_text)).setText(txt);
231 |
232 | return newView;
233 | }
234 |
235 | }
236 |
237 | private void setupActionBar() {
238 | mToolbar = (Toolbar) findViewById(R.id.toolbar);
239 | mToolbar.setTitle("");
240 | setSupportActionBar(mToolbar);
241 | }
242 |
243 | private void setFullScreen() {
244 | View decorView = getWindow().getDecorView();
245 | decorView.setSystemUiVisibility(
246 | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY |
247 | View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
248 | View.SYSTEM_UI_FLAG_FULLSCREEN |
249 | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
250 | }
251 |
252 | /**
253 | * Create the toolbar menu with the cast button.
254 | */
255 | @Override
256 | public boolean onCreateOptionsMenu(Menu menu) {
257 | super.onCreateOptionsMenu(menu);
258 | getMenuInflater().inflate(R.menu.menu_cast, menu);
259 | MenuItem mediaRouteMenuItem = menu.findItem(R.id.media_route_menu_item);
260 | MediaRouteActionProvider mediaRouteActionProvider =
261 | (MediaRouteActionProvider) MenuItemCompat.getActionProvider(mediaRouteMenuItem);
262 | mediaRouteActionProvider.setRouteSelector(mMediaRouteSelector);
263 | // Return true to show the menu.
264 | return true;
265 | }
266 |
267 | @Override
268 | protected void onResume() {
269 | super.onResume();
270 | mMediaRouter.addCallback(mMediaRouteSelector, mMediaRouterCallback,
271 | MediaRouter.CALLBACK_FLAG_REQUEST_DISCOVERY);
272 |
273 | if (!isRemoteDisplaying()) {
274 | if (mCastDevice != null) {
275 | startCastService(mCastDevice);
276 | }
277 | } else {
278 | createPresentation(getCurrentService());
279 | }
280 | }
281 |
282 |
283 | @Override
284 | protected void onPause() {
285 | super.onPause();
286 | if (isRemoteDisplaying()
287 | && getCurrentService().getCurrentPresentationMode()
288 | == CastServiceController.MODE_LASER_GAME) { // game can't be played with screen of
289 | getCurrentService().pause();
290 | }
291 | }
292 |
293 | @Override
294 | protected void onDestroy() {
295 | super.onDestroy();
296 | if (isRemoteDisplaying()
297 | && getCurrentService().getCurrentPresentationMode()
298 | == CastServiceController.MODE_MATCH_GAME) {
299 | getCurrentService().pause();
300 | }
301 | mMediaRouter.removeCallback(mMediaRouterCallback);
302 | }
303 |
304 | private boolean isRemoteDisplaying() {
305 | return CastRemoteDisplayLocalService.getInstance() != null;
306 | }
307 |
308 |
309 | private void initError() {
310 | Toast toast = Toast.makeText(
311 | getApplicationContext(), R.string.init_error, Toast.LENGTH_SHORT);
312 | mMediaRouter.selectRoute(mMediaRouter.getDefaultRoute());
313 | toast.show();
314 | }
315 |
316 | /**
317 | * Utility method to identify if the route information corresponds to the currently
318 | * selected device.
319 | *
320 | * @param info The route information
321 | * @return Whether the route information corresponds to the currently selected device.
322 | */
323 | private boolean isCurrentDevice(RouteInfo info) {
324 | if (mCastDevice == null) {
325 | // No device selected
326 | return false;
327 | }
328 | CastDevice device = CastDevice.getFromBundle(info.getExtras());
329 | if (!device.getDeviceId().equals(mCastDevice.getDeviceId())) {
330 | // The callback is for a different device
331 | return false;
332 | }
333 | return true;
334 | }
335 |
336 | private final MediaRouter.Callback mMediaRouterCallback =
337 | new MediaRouter.Callback() {
338 | @Override
339 | public void onRouteSelected(MediaRouter router, RouteInfo info) {
340 | // Should not happen since this activity will be closed if there
341 | // is no selected route
342 | }
343 |
344 | @Override
345 | public void onRouteUnselected(MediaRouter router, RouteInfo info) {
346 | Log.d(TAG, "called onRouteUnselected");
347 | if (isRemoteDisplaying()) {
348 | CastRemoteDisplayLocalService.stopService();
349 | }
350 | mCastDevice = null;
351 | CastRemoteDisplayActivity.this.finish();
352 | }
353 | };
354 |
355 | private void startCastService(CastDevice castDevice) {
356 | Intent intent = new Intent(CastRemoteDisplayActivity.this,
357 | CastRemoteDisplayActivity.class);
358 | intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
359 | PendingIntent notificationPendingIntent = PendingIntent.getActivity(
360 | CastRemoteDisplayActivity.this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
361 |
362 | CastRemoteDisplayLocalService.NotificationSettings settings =
363 | new CastRemoteDisplayLocalService.NotificationSettings.Builder()
364 | .setNotificationPendingIntent(notificationPendingIntent).build();
365 |
366 | CastRemoteDisplayLocalService.Callbacks callbacks = new CastRemoteDisplayLocalService.Callbacks() {
367 | @Override
368 | public void onServiceCreated(
369 | CastRemoteDisplayLocalService service) {
370 | //TODO start a certain presentation here
371 |
372 | Log.d(TAG, "onServiceCreated");
373 | }
374 |
375 | @Override
376 | public void onRemoteDisplaySessionStarted(
377 | CastRemoteDisplayLocalService service) {
378 | createPresentation((CastServiceController) service);
379 | Log.d(TAG, "onServiceStarted");
380 | }
381 |
382 | @Override
383 | public void onRemoteDisplaySessionError(Status errorReason) {
384 | int code = errorReason.getStatusCode();
385 | Log.d(TAG, "onServiceError: " + errorReason.getStatusCode());
386 | initError();
387 |
388 | mCastDevice = null;
389 | CastRemoteDisplayActivity.this.finish();
390 | }
391 | };
392 |
393 | CastRemoteDisplayLocalService.startService(CastRemoteDisplayActivity.this,
394 | RemoteDisplayService.class, getString(R.string.app_id),
395 | castDevice, settings, callbacks);
396 | }
397 |
398 | private void createPresentation(CastServiceController service) {
399 | if (service != null) {
400 | service.createPresentation(experiment);
401 | }
402 | }
403 |
404 | }
405 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/controller/ui/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.controller.ui;
2 |
3 | import android.animation.ArgbEvaluator;
4 | import android.content.DialogInterface;
5 | import android.content.Intent;
6 | import android.content.SharedPreferences;
7 | import android.graphics.Typeface;
8 | import android.os.Build;
9 | import android.os.Bundle;
10 | import android.preference.PreferenceManager;
11 | import android.support.design.widget.TabLayout;
12 | import android.support.v4.app.Fragment;
13 | import android.support.v4.app.FragmentManager;
14 | import android.support.v4.app.FragmentPagerAdapter;
15 | import android.support.v4.content.ContextCompat;
16 | import android.support.v4.view.MenuItemCompat;
17 | import android.support.v4.view.ViewPager;
18 | import android.support.v7.app.AlertDialog;
19 | import android.support.v7.app.AppCompatActivity;
20 | import android.support.v7.app.MediaRouteActionProvider;
21 | import android.support.v7.app.MediaRouteButton;
22 | import android.support.v7.media.MediaRouteSelector;
23 | import android.support.v7.media.MediaRouter;
24 | import android.support.v7.widget.Toolbar;
25 | import android.util.Log;
26 | import android.view.LayoutInflater;
27 | import android.view.Menu;
28 | import android.view.MenuItem;
29 | import android.view.View;
30 | import android.view.ViewGroup;
31 | import android.view.Window;
32 | import android.view.WindowManager;
33 | import android.widget.Button;
34 | import android.widget.ImageView;
35 | import android.widget.TextView;
36 | import android.widget.Toast;
37 |
38 | import com.bumptech.glide.Glide;
39 | import com.example.controller.R;
40 | import com.example.controller.cast.CastRemoteDisplayActivity;
41 | import com.example.controller.cast.CastServiceController;
42 | import com.google.android.gms.cast.CastDevice;
43 | import com.google.android.gms.cast.CastMediaControlIntent;
44 | import com.google.android.gms.common.ConnectionResult;
45 | import com.google.android.gms.common.GoogleApiAvailability;
46 |
47 | public class MainActivity extends AppCompatActivity {
48 |
49 | /**
50 | * The {@link android.support.v4.view.PagerAdapter} that will provide
51 | * fragments for each of the sections. We use a
52 | * {@link FragmentPagerAdapter} derivative, which will keep every
53 | * loaded fragment in memory. If this becomes too memory intensive, it
54 | * may be best to switch to a
55 | * {@link android.support.v4.app.FragmentStatePagerAdapter}.
56 | */
57 | private SectionsPagerAdapter mSectionsPagerAdapter;
58 |
59 | /**
60 | * The {@link ViewPager} that will host the section contents.
61 | */
62 | private ViewPager mViewPager;
63 | private int[] colors = new int[3];
64 | private ArgbEvaluator argbEvaluator;
65 |
66 | public static final String INTENT_EXTRA_CAST_DEVICE = "CastDevice";
67 | private static final String TAG = "MainActivity";
68 |
69 | public static final String FIRST_TIME_USER_PREF = "first_time_user";
70 |
71 | private MediaRouter mMediaRouter;
72 | private MediaRouteSelector mMediaRouteSelector;
73 | private MediaRouteButton mMediaRouteButton;
74 | private int mRouteCount = 0;
75 | private TabLayout tabLayout;
76 | private int[] heroDrawablesRes;
77 | private ImageView mHeroImageView;
78 | private boolean connectedToCast;
79 | private CastDevice mCastDevice;
80 | private boolean discoveredDevice;
81 | private MediaRouteActionProvider mMediaRouteActionProvider;
82 |
83 | @Override
84 | protected void onCreate(Bundle savedInstanceState) {
85 | super.onCreate(savedInstanceState);
86 | checkGooglePlayServices();
87 |
88 | setContentView(R.layout.activity_ui);
89 |
90 | argbEvaluator = new ArgbEvaluator();
91 | colors[0] = ContextCompat.getColor(this, R.color.page1);
92 | colors[1] = ContextCompat.getColor(this, R.color.page2Primary);
93 | colors[2] = ContextCompat.getColor(this, R.color.page3);
94 |
95 | heroDrawablesRes = new int[]{R.drawable.rotation_hero_cropped, R.drawable.match_hero_cropped, R.drawable.laser_hero_cropped};
96 | mHeroImageView = (ImageView) findViewById(R.id.hero_image);
97 |
98 |
99 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
100 | setSupportActionBar(toolbar);
101 | getSupportActionBar().setTitle("");
102 | //
103 | // Create the adapter that will return a fragment for each of the three
104 | // primary sections of the activity.
105 | mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
106 |
107 | // Set up the ViewPager with the sections adapter.
108 | mViewPager = (ViewPager) findViewById(R.id.container);
109 | mViewPager.setAdapter(mSectionsPagerAdapter);
110 |
111 | tabLayout = (TabLayout) findViewById(R.id.tab_layout);
112 | tabLayout.setupWithViewPager(mViewPager);
113 |
114 | // tabLayout.getTabAt(0).setIcon(R.drawable.ic_3d_rotation_white_24dp);
115 | // tabLayout.getTabAt(1).setIcon(R.drawable.ic_screen_rotation_white_24dp);
116 | // tabLayout.getTabAt(2).setIcon(R.drawable.ic_laser_phone_white_24dp);
117 |
118 | Glide.with(MainActivity.this)
119 | .load(heroDrawablesRes[0])
120 | .fitCenter()
121 | .crossFade().into(mHeroImageView);
122 |
123 | mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
124 | @Override
125 | public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
126 |
127 | }
128 |
129 | @Override
130 | public void onPageSelected(int position) {
131 | Glide.with(MainActivity.this)
132 | .load(heroDrawablesRes[position])
133 | .placeholder(R.drawable.hero_placeholder)
134 | .fitCenter()
135 | .crossFade().into(mHeroImageView);
136 |
137 | }
138 |
139 | @Override
140 | public void onPageScrollStateChanged(int state) {
141 |
142 | }
143 | });
144 |
145 | mMediaRouteSelector = new MediaRouteSelector.Builder()
146 | .addControlCategory(
147 | CastMediaControlIntent.categoryForCast(getString(R.string.app_id)))
148 | .build();
149 | mMediaRouter = MediaRouter.getInstance(getApplicationContext());
150 |
151 | SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
152 | boolean firstTimeUser = prefs.getBoolean(FIRST_TIME_USER_PREF, true);
153 | if (firstTimeUser) {
154 | SharedPreferences.Editor editor = prefs.edit();
155 | editor.putBoolean(FIRST_TIME_USER_PREF, false);
156 | editor.commit();
157 | showAboutDialog();
158 | }
159 |
160 | }
161 |
162 | private void changeStatusBarColor(int color) {
163 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
164 | Window window = getWindow();
165 | window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
166 | window.setStatusBarColor(color);
167 | }
168 | }
169 |
170 | @Override
171 | protected void onStart() {
172 | super.onStart();
173 | mMediaRouter.addCallback(mMediaRouteSelector, mMediaRouterCallback,
174 | MediaRouter.CALLBACK_FLAG_REQUEST_DISCOVERY);
175 | }
176 |
177 | @Override
178 | protected void onResume() {
179 | super.onResume();
180 | }
181 |
182 | @Override
183 | protected void onStop() {
184 | super.onStop();
185 | mMediaRouter.removeCallback(mMediaRouterCallback);
186 | }
187 |
188 |
189 | @Override
190 | public boolean onCreateOptionsMenu(Menu menu) {
191 | // Inflate the menu; this adds items to the action bar if it is present.
192 | super.onCreateOptionsMenu(menu);
193 | getMenuInflater().inflate(R.menu.menu_main, menu);
194 | MenuItem mediaRouteMenuItem = menu.findItem(R.id.media_route_menu_item);
195 | mMediaRouteActionProvider =
196 | (MediaRouteActionProvider) MenuItemCompat.getActionProvider(mediaRouteMenuItem);
197 | mMediaRouteActionProvider.setRouteSelector(mMediaRouteSelector);
198 | // Return true to show the menu.
199 | return true;
200 | }
201 |
202 | @Override
203 | public boolean onOptionsItemSelected(MenuItem item) {
204 | // Handle action bar item clicks here. The action bar will
205 | // automatically handle clicks on the Home/Up button, so long
206 | // as you specify a parent activity in AndroidManifest.xml.
207 | int id = item.getItemId();
208 |
209 | //noinspection SimplifiableIfStatement
210 | if (id == R.id.action_about) {
211 | showAboutDialog();
212 | return true;
213 | }
214 |
215 | return super.onOptionsItemSelected(item);
216 | }
217 |
218 | /**
219 | * A placeholder fragment containing a simple view.
220 | */
221 | public static class PlaceholderFragment extends Fragment {
222 | /**
223 | * The fragment argument representing the section number for this
224 | * fragment.
225 | */
226 | private static final String ARG_SECTION_NUMBER = "section_number";
227 | private int sectionNumber;
228 |
229 | public PlaceholderFragment() {
230 | }
231 |
232 | /**
233 | * Returns a new instance of this fragment for the given section
234 | * number.
235 | */
236 | public static PlaceholderFragment newInstance(int sectionNumber) {
237 | PlaceholderFragment fragment = new PlaceholderFragment();
238 | Bundle args = new Bundle();
239 | args.putInt(ARG_SECTION_NUMBER, sectionNumber);
240 | fragment.setArguments(args);
241 | return fragment;
242 | }
243 |
244 | @Override
245 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
246 | Bundle savedInstanceState) {
247 | sectionNumber = getArguments().getInt(ARG_SECTION_NUMBER);
248 | View rootView = inflater.inflate(R.layout.fragment_demo_info, container, false);
249 | TextView descriptionTextView = (TextView) rootView.findViewById(R.id.description);
250 | Button button = (Button) rootView.findViewById(R.id.start_experiment_button);
251 | int descriptionRes;
252 | int buttonRes;
253 | switch (sectionNumber) {
254 | case 1:
255 | descriptionRes = R.string.match_description;
256 | buttonRes = R.string.start_match_button;
257 | break;
258 | case 2:
259 | descriptionRes = R.string.laser_description;
260 | buttonRes = R.string.start_laser_button;
261 | break;
262 | default:
263 | descriptionRes = R.string.rotate_description;
264 | buttonRes = R.string.start_3d_button;
265 | break;
266 | }
267 |
268 | Typeface typeface = Typeface.createFromAsset(getActivity().getAssets(), "fonts/Roboto-Light.ttf");
269 | descriptionTextView.setTypeface(typeface);
270 |
271 | descriptionTextView.setText(descriptionRes);
272 | button.setText(buttonRes);
273 | button.setOnClickListener(new View.OnClickListener() {
274 | @Override
275 | public void onClick(View v) {
276 | ((MainActivity) getActivity()).onStartButtonClicked();
277 | }
278 | });
279 | return rootView;
280 | }
281 | }
282 |
283 |
284 | private void onStartButtonClicked() {
285 | mMediaRouteButton = mMediaRouteActionProvider.getMediaRouteButton();
286 | if (mMediaRouteButton != null) {
287 | mCastDevice = getCastDevice(mMediaRouter.getSelectedRoute());
288 | if (mCastDevice != null) {
289 | Log.d(TAG, "called start cast activity");
290 | startCastActivity();
291 | } else {
292 | mMediaRouteButton.performClick();
293 | }
294 | } else {
295 | //TODO ask to retry
296 | Toast.makeText(MainActivity.this, "Unable to detect Google Cast device", Toast.LENGTH_SHORT).show();
297 | }
298 | }
299 |
300 | private void showAboutDialog() {
301 | AlertDialog.Builder builder =
302 | new AlertDialog.Builder(this);
303 | builder.setTitle("About");
304 | builder.setMessage(getString(R.string.about_content));
305 | builder.setPositiveButton("OK", null);
306 | builder.show();
307 | }
308 |
309 | private CastDevice getCastDevice(MediaRouter.RouteInfo info) {
310 | return CastDevice.getFromBundle(info.getExtras());
311 | }
312 |
313 |
314 | /**
315 | * A {@link FragmentPagerAdapter} that returns a fragment corresponding to
316 | * one of the sections/tabs/pages.
317 | */
318 | public class SectionsPagerAdapter extends FragmentPagerAdapter {
319 |
320 | public SectionsPagerAdapter(FragmentManager fm) {
321 | super(fm);
322 | }
323 |
324 | @Override
325 | public Fragment getItem(int position) {
326 | // getItem is called to instantiate the fragment for the given page.
327 | // Return a PlaceholderFragment (defined as a static inner class below).
328 | return PlaceholderFragment.newInstance(position);
329 | }
330 |
331 | @Override
332 | public int getCount() {
333 | // Show 3 total pages.
334 | return 3;
335 | }
336 |
337 | @Override
338 | public CharSequence getPageTitle(int position) {
339 | switch (position) {
340 | case 0:
341 | return "3D VIEWER";
342 | case 1:
343 | return "DETECTOR";
344 | case 2:
345 | return "POINTER";
346 | }
347 | return null;
348 | }
349 | }
350 |
351 |
352 | private final MediaRouter.Callback mMediaRouterCallback =
353 | new MediaRouter.Callback() {
354 | @Override
355 | public void onRouteAdded(MediaRouter router, MediaRouter.RouteInfo route) {
356 | if (++mRouteCount == 1) {
357 | // Show the button when a device is discovered.
358 | mMediaRouteButton = mMediaRouteActionProvider.getMediaRouteButton();
359 | Log.d(TAG, "mMediaRouteButton: " + mMediaRouteButton);
360 | }
361 | }
362 |
363 | @Override
364 | public void onRouteRemoved(MediaRouter router, MediaRouter.RouteInfo route) {
365 | if (--mRouteCount == 0) {
366 | // Hide the button if there are no devices discovered.
367 | mMediaRouteButton = null;
368 | }
369 | }
370 |
371 | @Override
372 | public void onRouteSelected(MediaRouter router, MediaRouter.RouteInfo info) {
373 | Log.d(TAG, "onRouteSelected");
374 | mCastDevice = getCastDevice(info);
375 | startCastActivity();
376 | }
377 |
378 | @Override
379 | public void onRouteUnselected(MediaRouter router, MediaRouter.RouteInfo info) {
380 | mCastDevice = null;
381 | }
382 | };
383 |
384 | /*
385 | * when clicking button if no case device found show snackbar to try and find
386 | * if cast device found but not connected connect to cast then start experiment
387 | * if cast device found and connected start experiment*/
388 |
389 | private void startCastActivity() {
390 | if (mCastDevice != null) {
391 | Intent intent = null;
392 | switch (mViewPager.getCurrentItem()) {
393 | case 0:
394 | intent = new Intent(MainActivity.this, CastRemoteDisplayActivity.class);
395 | intent.putExtra(CastRemoteDisplayActivity.EXTRA_EXPERIMENT,
396 | CastServiceController.MODE_3D_VIEWER);
397 | break;
398 | case 1:
399 | intent = new Intent(MainActivity.this, CastRemoteDisplayActivity.class);
400 | intent.putExtra(CastRemoteDisplayActivity.EXTRA_EXPERIMENT,
401 | CastServiceController.MODE_MATCH_GAME);
402 | break;
403 | case 2:
404 | intent = new Intent(MainActivity.this, CastRemoteDisplayActivity.class);
405 | intent.putExtra(CastRemoteDisplayActivity.EXTRA_EXPERIMENT,
406 | CastServiceController.MODE_LASER_GAME);
407 | break;
408 | }
409 |
410 | //TODO start game of current item activity
411 | if (intent != null) {
412 | intent.putExtra(INTENT_EXTRA_CAST_DEVICE, mCastDevice);
413 | startActivity(intent);
414 | }
415 | }
416 | }
417 |
418 | /**
419 | * A utility method to validate that the appropriate version of the Google Play Services is
420 | * available on the device. If not, it will open a dialog to address the issue. The dialog
421 | * displays a localized message about the error and upon user confirmation (by tapping on
422 | * dialog) will direct them to the Play Store if Google Play services is out of date or
423 | * missing, or to system settings if Google Play services is disabled on the device.
424 | */
425 | private boolean checkGooglePlayServices() {
426 | int googlePlayServicesCheck = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this);
427 | if (googlePlayServicesCheck == ConnectionResult.SUCCESS) {
428 | return true;
429 | }
430 | GoogleApiAvailability.getInstance()
431 | .showErrorDialogFragment(this, googlePlayServicesCheck, 0, new DialogInterface.OnCancelListener() {
432 | @Override
433 | public void onCancel(DialogInterface dialogInterface) {
434 | finish();
435 | }
436 | });
437 | return false;
438 | }
439 |
440 | }
441 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/controller/gl/ModelData.java:
--------------------------------------------------------------------------------
1 | package com.example.controller.gl;
2 |
3 |
4 | public class ModelData {
5 |
6 | public static final float chairFancyVerts [] = {
7 |
8 |
9 | 0.229099156660549f, 0.0899075599044797f, 0.167055220721953f,
10 | -0.142188864253659f, 0.0899075599044797f, -0.204232800192255f,
11 | -0.229099156660549f, 0.0899075599044797f, -0.117322507785364f,
12 |
13 | 0.152732771107033f, 0.000813443425377407f, 0.279420974980015f,
14 | -0.152732771107033f, 0.0771798289788937f, 0.279420974980015f,
15 | -0.152732771107033f, 0.000813443425377407f, 0.279420974980015f,
16 |
17 | 0.152732771107033f, -0.381018484342204f, 0.279420974980015f,
18 | 0.254554618511721f, 0.000813443425377407f, 0.177599127575327f,
19 | 0.152732771107033f, 0.000813443425377407f, 0.279420974980015f,
20 |
21 | 0.254554618511721f, 0.000813443425377407f, -0.127866414638738f,
22 | 0.254554618511721f, 0.0771798289788937f, 0.177599127575327f,
23 | 0.254554618511721f, 0.000813443425377407f, 0.177599127575327f,
24 |
25 | -0.254554618511721f, 0.000813443425377407f, 0.177599127575327f,
26 | -0.254554618511721f, 0.0771798289788937f, -0.127866414638738f,
27 | -0.254554618511721f, 0.000813443425377407f, -0.127866414638738f,
28 |
29 | -0.121100795992292f, 0.000813443425377407f, -0.153321876489911f,
30 | 0.121100795992292f, 0.000813443425377407f, -0.153321876489911f,
31 | 0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
32 |
33 | -0.229099156660549f, 0.0899075599044797f, -0.117322507785364f,
34 | -0.254554618511721f, 0.0771798289788937f, 0.177599127575327f,
35 | -0.229099156660549f, 0.0899075599044797f, 0.167055220721953f,
36 |
37 | 0.142188864253659f, 0.0899075599044797f, -0.204232800192255f,
38 | -0.142188864253659f, 0.618981515657796f, -0.24107550834793f,
39 | -0.142188864253659f, 0.0899075599044797f, -0.204232800192255f,
40 |
41 | 0.229099156660549f, 0.0899075599044797f, 0.167055220721953f,
42 | 0.254554618511721f, 0.0771798289788937f, -0.127866414638738f,
43 | 0.229099156660549f, 0.0899075599044797f, -0.117322507785364f,
44 |
45 | -0.142188864253659f, 0.0899075599044797f, 0.253965513128843f,
46 | 0.152732771107033f, 0.0771798289788937f, 0.279420974980015f,
47 | 0.142188864253659f, 0.0899075599044797f, 0.253965513128843f,
48 |
49 | -0.229099156660549f, 0.0899075599044797f, 0.167055220721953f,
50 | -0.152732771107033f, 0.0771798289788937f, 0.279420974980015f,
51 | -0.142188864253659f, 0.0899075599044797f, 0.253965513128843f,
52 |
53 | -0.152732771107033f, 0.60625378473221f, -0.266530970199102f,
54 | 0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
55 | -0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
56 |
57 | 0.229099156660549f, 0.0899075599044797f, -0.117322507785364f,
58 | 0.254554618511721f, 0.60625378473221f, -0.164709122794414f,
59 | 0.229099156660549f, 0.618981515657796f, -0.15416521594104f,
60 |
61 | 0.142188864253659f, 0.0899075599044797f, 0.253965513128843f,
62 | 0.254554618511721f, 0.0771798289788937f, 0.177599127575327f,
63 | 0.229099156660549f, 0.0899075599044797f, 0.167055220721953f,
64 |
65 | 0.142188864253659f, 0.618981515657796f, -0.24107550834793f,
66 | -0.152732771107033f, 0.60625378473221f, -0.266530970199102f,
67 | -0.142188864253659f, 0.618981515657796f, -0.24107550834793f,
68 |
69 | -0.142188864253659f, 0.618981515657796f, -0.24107550834793f,
70 | -0.254554618511721f, 0.60625378473221f, -0.164709122794414f,
71 | -0.229099156660549f, 0.618981515657796f, -0.15416521594104f,
72 |
73 | 0.229099156660549f, 0.618981515657796f, -0.15416521594104f,
74 | 0.152732771107033f, 0.60625378473221f, -0.266530970199102f,
75 | 0.142188864253659f, 0.618981515657796f, -0.24107550834793f,
76 |
77 | 0.142188864253659f, 0.0899075599044797f, -0.204232800192255f,
78 | 0.229099156660549f, 0.618981515657796f, -0.15416521594104f,
79 | 0.142188864253659f, 0.618981515657796f, -0.24107550834793f,
80 |
81 | 0.254554618511721f, 0.000813443425377407f, -0.127866414638738f,
82 | 0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
83 | 0.254554618511721f, 0.0771798289788937f, -0.127866414638738f,
84 |
85 | -0.229099156660549f, 0.0899075599044797f, -0.117322507785364f,
86 | -0.254554618511721f, 0.60625378473221f, -0.164709122794414f,
87 | -0.254554618511721f, 0.0771798289788937f, -0.127866414638738f,
88 |
89 | -0.142188864253659f, 0.0899075599044797f, -0.204232800192255f,
90 | -0.229099156660549f, 0.618981515657796f, -0.15416521594104f,
91 | -0.229099156660549f, 0.0899075599044797f, -0.117322507785364f,
92 |
93 | -0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
94 | -0.254554618511721f, 0.0771798289788937f, -0.127866414638738f,
95 | -0.152732771107033f, 0.60625378473221f, -0.266530970199102f,
96 |
97 | -0.254554618511721f, -0.381018484342204f, 0.177599127575327f,
98 | -0.152732771107033f, 0.000813443425377407f, 0.279420974980015f,
99 | -0.254554618511721f, 0.000813443425377407f, 0.177599127575327f,
100 |
101 | -0.152732771107033f, 0.000813443425377407f, 0.279420974980015f,
102 | -0.121100795992292f, -0.381018484342204f, 0.203054589426499f,
103 | -0.121100795992292f, 0.000813443425377407f, 0.203054589426499f,
104 |
105 | 0.121100795992292f, 0.000813443425377407f, -0.153321876489911f,
106 | 0.178188232958205f, -0.381018484342204f, -0.0962344395239979f,
107 | 0.178188232958205f, 0.000813443425377407f, -0.0962344395239979f,
108 |
109 | 0.178188232958205f, 0.000813443425377407f, -0.0962344395239979f,
110 | 0.254554618511721f, -0.381018484342204f, -0.127866414638738f,
111 | 0.254554618511721f, 0.000813443425377407f, -0.127866414638738f,
112 |
113 | -0.178188232958205f, 0.000813443425377407f, -0.0962344395239979f,
114 | -0.121100795992292f, -0.381018484342204f, -0.153321876489911f,
115 | -0.121100795992292f, 0.000813443425377407f, -0.153321876489911f,
116 |
117 | -0.121100795992292f, -0.381018484342204f, 0.203054589426499f,
118 | -0.254554618511721f, -0.381018484342204f, 0.177599127575327f,
119 | -0.178188232958205f, -0.381018484342204f, 0.145967152460586f,
120 |
121 | -0.178188232958205f, -0.381018484342204f, -0.0962344395239979f,
122 | -0.152732771107033f, -0.381018484342204f, -0.229688262043427f,
123 | -0.121100795992292f, -0.381018484342204f, -0.153321876489911f,
124 |
125 | 0.121100795992292f, -0.381018484342204f, -0.153321876489911f,
126 | 0.254554618511721f, -0.381018484342204f, -0.127866414638738f,
127 | 0.178188232958205f, -0.381018484342204f, -0.0962344395239979f,
128 |
129 | 0.178188232958205f, -0.381018484342204f, 0.145967152460586f,
130 | 0.152732771107033f, -0.381018484342204f, 0.279420974980015f,
131 | 0.121100795992292f, -0.381018484342204f, 0.203054589426499f,
132 |
133 | 0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
134 | 0.121100795992292f, -0.381018484342204f, 0.203054589426499f,
135 | 0.121100795992292f, 0.000813443425377407f, 0.203054589426499f,
136 |
137 | 0.121100795992292f, 0.000813443425377407f, 0.203054589426499f,
138 | 0.152732771107033f, -0.381018484342204f, 0.279420974980015f,
139 | 0.152732771107033f, 0.000813443425377407f, 0.279420974980015f,
140 |
141 | -0.254554618511721f, 0.000813443425377407f, -0.127866414638738f,
142 | -0.178188232958205f, -0.381018484342204f, -0.0962344395239979f,
143 | -0.178188232958205f, 0.000813443425377407f, -0.0962344395239979f,
144 |
145 | -0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
146 | -0.254554618511721f, -0.381018484342204f, 0.177599127575327f,
147 | -0.254554618511721f, 0.000813443425377407f, 0.177599127575327f,
148 |
149 | 0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
150 | 0.121100795992292f, -0.381018484342204f, -0.153321876489911f,
151 | 0.121100795992292f, 0.000813443425377407f, -0.153321876489911f,
152 |
153 | -0.121100795992292f, 0.000813443425377407f, -0.153321876489911f,
154 | -0.152732771107033f, -0.381018484342204f, -0.229688262043427f,
155 | -0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
156 |
157 | -0.121100795992292f, 0.000813443425377407f, 0.203054589426499f,
158 | -0.178188232958205f, -0.381018484342204f, 0.145967152460586f,
159 | -0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
160 |
161 | 0.254554618511721f, 0.000813443425377407f, 0.177599127575327f,
162 | 0.178188232958205f, -0.381018484342204f, 0.145967152460586f,
163 | 0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
164 |
165 | -0.229099156660549f, 0.0899075599044797f, -0.117322507785364f,
166 | -0.229099156660549f, 0.0899075599044797f, 0.167055220721953f,
167 | -0.142188864253659f, 0.0899075599044797f, 0.253965513128843f,
168 |
169 | -0.142188864253659f, 0.0899075599044797f, 0.253965513128843f,
170 | 0.142188864253659f, 0.0899075599044797f, 0.253965513128843f,
171 | -0.229099156660549f, 0.0899075599044797f, -0.117322507785364f,
172 |
173 | 0.229099156660549f, 0.0899075599044797f, 0.167055220721953f,
174 | 0.229099156660549f, 0.0899075599044797f, -0.117322507785364f,
175 | 0.142188864253659f, 0.0899075599044797f, -0.204232800192255f,
176 |
177 | 0.142188864253659f, 0.0899075599044797f, -0.204232800192255f,
178 | -0.142188864253659f, 0.0899075599044797f, -0.204232800192255f,
179 | 0.229099156660549f, 0.0899075599044797f, 0.167055220721953f,
180 |
181 | -0.229099156660549f, 0.0899075599044797f, -0.117322507785364f,
182 | 0.142188864253659f, 0.0899075599044797f, 0.253965513128843f,
183 | 0.229099156660549f, 0.0899075599044797f, 0.167055220721953f,
184 |
185 | 0.152732771107033f, 0.000813443425377407f, 0.279420974980015f,
186 | 0.152732771107033f, 0.0771798289788937f, 0.279420974980015f,
187 | -0.152732771107033f, 0.0771798289788937f, 0.279420974980015f,
188 |
189 | 0.152732771107033f, 0.0771798289788937f, 0.279420974980015f,
190 | 0.152732771107033f, 0.000813443425377407f, 0.279420974980015f,
191 | 0.254554618511721f, 0.000813443425377407f, 0.177599127575327f,
192 |
193 | 0.152732771107033f, -0.381018484342204f, 0.279420974980015f,
194 | 0.254554618511721f, -0.381018484342204f, 0.177599127575327f,
195 | 0.254554618511721f, 0.000813443425377407f, 0.177599127575327f,
196 |
197 | 0.254554618511721f, 0.000813443425377407f, 0.177599127575327f,
198 | 0.254554618511721f, 0.0771798289788937f, 0.177599127575327f,
199 | 0.152732771107033f, 0.0771798289788937f, 0.279420974980015f,
200 |
201 | 0.254554618511721f, 0.000813443425377407f, -0.127866414638738f,
202 | 0.254554618511721f, 0.0771798289788937f, -0.127866414638738f,
203 | 0.254554618511721f, 0.0771798289788937f, 0.177599127575327f,
204 |
205 | -0.254554618511721f, 0.000813443425377407f, 0.177599127575327f,
206 | -0.254554618511721f, 0.0771798289788937f, 0.177599127575327f,
207 | -0.254554618511721f, 0.0771798289788937f, -0.127866414638738f,
208 |
209 | 0.121100795992292f, 0.000813443425377407f, 0.203054589426499f,
210 | 0.152732771107033f, 0.000813443425377407f, 0.279420974980015f,
211 | -0.152732771107033f, 0.000813443425377407f, 0.279420974980015f,
212 |
213 | 0.121100795992292f, 0.000813443425377407f, 0.203054589426499f,
214 | -0.152732771107033f, 0.000813443425377407f, 0.279420974980015f,
215 | -0.121100795992292f, 0.000813443425377407f, 0.203054589426499f,
216 |
217 | 0.254554618511721f, 0.000813443425377407f, -0.127866414638738f,
218 | 0.254554618511721f, 0.000813443425377407f, 0.177599127575327f,
219 | 0.178188232958205f, 0.000813443425377407f, -0.0962344395239979f,
220 |
221 | 0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
222 | 0.121100795992292f, 0.000813443425377407f, 0.203054589426499f,
223 | -0.121100795992292f, 0.000813443425377407f, 0.203054589426499f,
224 |
225 | -0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
226 | -0.254554618511721f, 0.000813443425377407f, 0.177599127575327f,
227 | -0.254554618511721f, 0.000813443425377407f, -0.127866414638738f,
228 |
229 | 0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
230 | -0.121100795992292f, 0.000813443425377407f, 0.203054589426499f,
231 | -0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
232 |
233 | 0.178188232958205f, 0.000813443425377407f, -0.0962344395239979f,
234 | 0.254554618511721f, 0.000813443425377407f, 0.177599127575327f,
235 | 0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
236 |
237 | -0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
238 | 0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
239 | 0.121100795992292f, 0.000813443425377407f, -0.153321876489911f,
240 |
241 | 0.121100795992292f, 0.000813443425377407f, -0.153321876489911f,
242 | 0.178188232958205f, 0.000813443425377407f, -0.0962344395239979f,
243 | 0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
244 |
245 | 0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
246 | -0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
247 | -0.178188232958205f, 0.000813443425377407f, -0.0962344395239979f,
248 |
249 | -0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
250 | -0.254554618511721f, 0.000813443425377407f, -0.127866414638738f,
251 | -0.178188232958205f, 0.000813443425377407f, -0.0962344395239979f,
252 |
253 | -0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
254 | 0.121100795992292f, 0.000813443425377407f, -0.153321876489911f,
255 | -0.121100795992292f, 0.000813443425377407f, -0.153321876489911f,
256 |
257 | 0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
258 | -0.178188232958205f, 0.000813443425377407f, -0.0962344395239979f,
259 | -0.121100795992292f, 0.000813443425377407f, -0.153321876489911f,
260 |
261 | -0.229099156660549f, 0.0899075599044797f, -0.117322507785364f,
262 | -0.254554618511721f, 0.0771798289788937f, -0.127866414638738f,
263 | -0.254554618511721f, 0.0771798289788937f, 0.177599127575327f,
264 |
265 | 0.142188864253659f, 0.0899075599044797f, -0.204232800192255f,
266 | 0.142188864253659f, 0.618981515657796f, -0.24107550834793f,
267 | -0.142188864253659f, 0.618981515657796f, -0.24107550834793f,
268 |
269 | 0.229099156660549f, 0.0899075599044797f, 0.167055220721953f,
270 | 0.254554618511721f, 0.0771798289788937f, 0.177599127575327f,
271 | 0.254554618511721f, 0.0771798289788937f, -0.127866414638738f,
272 |
273 | -0.142188864253659f, 0.0899075599044797f, 0.253965513128843f,
274 | -0.152732771107033f, 0.0771798289788937f, 0.279420974980015f,
275 | 0.152732771107033f, 0.0771798289788937f, 0.279420974980015f,
276 |
277 | -0.229099156660549f, 0.0899075599044797f, 0.167055220721953f,
278 | -0.254554618511721f, 0.0771798289788937f, 0.177599127575327f,
279 | -0.152732771107033f, 0.0771798289788937f, 0.279420974980015f,
280 |
281 | -0.152732771107033f, 0.60625378473221f, -0.266530970199102f,
282 | 0.152732771107033f, 0.60625378473221f, -0.266530970199102f,
283 | 0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
284 |
285 | 0.229099156660549f, 0.0899075599044797f, -0.117322507785364f,
286 | 0.254554618511721f, 0.0771798289788937f, -0.127866414638738f,
287 | 0.254554618511721f, 0.60625378473221f, -0.164709122794414f,
288 |
289 | 0.142188864253659f, 0.0899075599044797f, 0.253965513128843f,
290 | 0.152732771107033f, 0.0771798289788937f, 0.279420974980015f,
291 | 0.254554618511721f, 0.0771798289788937f, 0.177599127575327f,
292 |
293 | 0.142188864253659f, 0.618981515657796f, -0.24107550834793f,
294 | 0.152732771107033f, 0.60625378473221f, -0.266530970199102f,
295 | -0.152732771107033f, 0.60625378473221f, -0.266530970199102f,
296 |
297 | -0.142188864253659f, 0.618981515657796f, -0.24107550834793f,
298 | -0.152732771107033f, 0.60625378473221f, -0.266530970199102f,
299 | -0.254554618511721f, 0.60625378473221f, -0.164709122794414f,
300 |
301 | 0.229099156660549f, 0.618981515657796f, -0.15416521594104f,
302 | 0.254554618511721f, 0.60625378473221f, -0.164709122794414f,
303 | 0.152732771107033f, 0.60625378473221f, -0.266530970199102f,
304 |
305 | 0.142188864253659f, 0.0899075599044797f, -0.204232800192255f,
306 | 0.229099156660549f, 0.0899075599044797f, -0.117322507785364f,
307 | 0.229099156660549f, 0.618981515657796f, -0.15416521594104f,
308 |
309 | 0.254554618511721f, 0.000813443425377407f, -0.127866414638738f,
310 | 0.254554618511721f, -0.381018484342204f, -0.127866414638738f,
311 | 0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
312 |
313 | 0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
314 | 0.152732771107033f, 0.60625378473221f, -0.266530970199102f,
315 | 0.254554618511721f, 0.0771798289788937f, -0.127866414638738f,
316 |
317 | 0.254554618511721f, -0.381018484342204f, -0.127866414638738f,
318 | 0.152732771107033f, -0.381018484342204f, -0.229688262043427f,
319 | 0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
320 |
321 | 0.254554618511721f, 0.60625378473221f, -0.164709122794414f,
322 | 0.254554618511721f, 0.0771798289788937f, -0.127866414638738f,
323 | 0.152732771107033f, 0.60625378473221f, -0.266530970199102f,
324 |
325 | -0.229099156660549f, 0.0899075599044797f, -0.117322507785364f,
326 | -0.229099156660549f, 0.618981515657796f, -0.15416521594104f,
327 | -0.254554618511721f, 0.60625378473221f, -0.164709122794414f,
328 |
329 | -0.142188864253659f, 0.0899075599044797f, -0.204232800192255f,
330 | -0.142188864253659f, 0.618981515657796f, -0.24107550834793f,
331 | -0.229099156660549f, 0.618981515657796f, -0.15416521594104f,
332 |
333 | -0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
334 | -0.152732771107033f, -0.381018484342204f, -0.229688262043427f,
335 | -0.254554618511721f, -0.381018484342204f, -0.127866414638738f,
336 |
337 | -0.254554618511721f, 0.000813443425377407f, -0.127866414638738f,
338 | -0.254554618511721f, 0.0771798289788937f, -0.127866414638738f,
339 | -0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
340 |
341 | -0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
342 | -0.254554618511721f, -0.381018484342204f, -0.127866414638738f,
343 | -0.254554618511721f, 0.000813443425377407f, -0.127866414638738f,
344 |
345 | -0.254554618511721f, 0.60625378473221f, -0.164709122794414f,
346 | -0.152732771107033f, 0.60625378473221f, -0.266530970199102f,
347 | -0.254554618511721f, 0.0771798289788937f, -0.127866414638738f,
348 |
349 | -0.254554618511721f, 0.0771798289788937f, 0.177599127575327f,
350 | -0.254554618511721f, 0.000813443425377407f, 0.177599127575327f,
351 | -0.152732771107033f, 0.000813443425377407f, 0.279420974980015f,
352 |
353 | -0.254554618511721f, -0.381018484342204f, 0.177599127575327f,
354 | -0.152732771107033f, -0.381018484342204f, 0.279420974980015f,
355 | -0.152732771107033f, 0.000813443425377407f, 0.279420974980015f,
356 |
357 | -0.152732771107033f, 0.000813443425377407f, 0.279420974980015f,
358 | -0.152732771107033f, 0.0771798289788937f, 0.279420974980015f,
359 | -0.254554618511721f, 0.0771798289788937f, 0.177599127575327f,
360 |
361 | -0.152732771107033f, 0.000813443425377407f, 0.279420974980015f,
362 | -0.152732771107033f, -0.381018484342204f, 0.279420974980015f,
363 | -0.121100795992292f, -0.381018484342204f, 0.203054589426499f,
364 |
365 | 0.121100795992292f, 0.000813443425377407f, -0.153321876489911f,
366 | 0.121100795992292f, -0.381018484342204f, -0.153321876489911f,
367 | 0.178188232958205f, -0.381018484342204f, -0.0962344395239979f,
368 |
369 | 0.178188232958205f, 0.000813443425377407f, -0.0962344395239979f,
370 | 0.178188232958205f, -0.381018484342204f, -0.0962344395239979f,
371 | 0.254554618511721f, -0.381018484342204f, -0.127866414638738f,
372 |
373 | -0.178188232958205f, 0.000813443425377407f, -0.0962344395239979f,
374 | -0.178188232958205f, -0.381018484342204f, -0.0962344395239979f,
375 | -0.121100795992292f, -0.381018484342204f, -0.153321876489911f,
376 |
377 | -0.121100795992292f, -0.381018484342204f, 0.203054589426499f,
378 | -0.152732771107033f, -0.381018484342204f, 0.279420974980015f,
379 | -0.254554618511721f, -0.381018484342204f, 0.177599127575327f,
380 |
381 | -0.178188232958205f, -0.381018484342204f, -0.0962344395239979f,
382 | -0.254554618511721f, -0.381018484342204f, -0.127866414638738f,
383 | -0.152732771107033f, -0.381018484342204f, -0.229688262043427f,
384 |
385 | 0.121100795992292f, -0.381018484342204f, -0.153321876489911f,
386 | 0.152732771107033f, -0.381018484342204f, -0.229688262043427f,
387 | 0.254554618511721f, -0.381018484342204f, -0.127866414638738f,
388 |
389 | 0.178188232958205f, -0.381018484342204f, 0.145967152460586f,
390 | 0.254554618511721f, -0.381018484342204f, 0.177599127575327f,
391 | 0.152732771107033f, -0.381018484342204f, 0.279420974980015f,
392 |
393 | 0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
394 | 0.178188232958205f, -0.381018484342204f, 0.145967152460586f,
395 | 0.121100795992292f, -0.381018484342204f, 0.203054589426499f,
396 |
397 | 0.121100795992292f, 0.000813443425377407f, 0.203054589426499f,
398 | 0.121100795992292f, -0.381018484342204f, 0.203054589426499f,
399 | 0.152732771107033f, -0.381018484342204f, 0.279420974980015f,
400 |
401 | -0.254554618511721f, 0.000813443425377407f, -0.127866414638738f,
402 | -0.254554618511721f, -0.381018484342204f, -0.127866414638738f,
403 | -0.178188232958205f, -0.381018484342204f, -0.0962344395239979f,
404 |
405 | -0.178188232958205f, 0.000813443425377407f, 0.145967152460586f,
406 | -0.178188232958205f, -0.381018484342204f, 0.145967152460586f,
407 | -0.254554618511721f, -0.381018484342204f, 0.177599127575327f,
408 |
409 | 0.152732771107033f, 0.000813443425377407f, -0.229688262043427f,
410 | 0.152732771107033f, -0.381018484342204f, -0.229688262043427f,
411 | 0.121100795992292f, -0.381018484342204f, -0.153321876489911f,
412 |
413 | -0.121100795992292f, 0.000813443425377407f, -0.153321876489911f,
414 | -0.121100795992292f, -0.381018484342204f, -0.153321876489911f,
415 | -0.152732771107033f, -0.381018484342204f, -0.229688262043427f,
416 |
417 | -0.121100795992292f, 0.000813443425377407f, 0.203054589426499f,
418 | -0.121100795992292f, -0.381018484342204f, 0.203054589426499f,
419 | -0.178188232958205f, -0.381018484342204f, 0.145967152460586f,
420 |
421 | 0.254554618511721f, 0.000813443425377407f, 0.177599127575327f,
422 | 0.254554618511721f, -0.381018484342204f, 0.177599127575327f,
423 | 0.178188232958205f, -0.381018484342204f, 0.145967152460586f
424 | };
425 |
426 |
427 | public static final float[] chairFancyNormals = {
428 |
429 | 0f, 1f, 0f,
430 | 0f, 1f, 0f,
431 | 0f, 1f, 0f,
432 |
433 | 0f, 0f, 1f,
434 | 0f, 0f, 1f,
435 | 0f, 0f, 1f,
436 |
437 | 0.707106781186548f, 0f, 0.707106781186548f,
438 | 0.707106781186548f, 0f, 0.707106781186548f,
439 | 0.707106781186548f, 0f, 0.707106781186548f,
440 |
441 | 1f, 0f, 0f,
442 | 1f, 0f, 0f,
443 | 1f, 0f, 0f,
444 |
445 | -1f, 0f, 0f,
446 | -1f, 0f, 0f,
447 | -1f, 0f, 0f,
448 |
449 | 0f, -1f, 0f,
450 | 0f, -1f, 0f,
451 | 0f, -1f, 0f,
452 |
453 | -0.447213595499958f, 0.894427190999916f, 0f,
454 | -0.447213595499958f, 0.894427190999916f, 0f,
455 | -0.447213595499958f, 0.894427190999916f, 0f,
456 |
457 | 0f, 0.0694987486862948f, 0.997582038697088f,
458 | 0f, 0.0694987486862948f, 0.997582038697088f,
459 | 0f, 0.0694987486862948f, 0.997582038697088f,
460 |
461 | 0.447213595499958f, 0.894427190999916f, 0f,
462 | 0.447213595499958f, 0.894427190999916f, 0f,
463 | 0.447213595499958f, 0.894427190999916f, 0f,
464 |
465 | 0f, 0.894427190999916f, 0.447213595499958f,
466 | 0f, 0.894427190999916f, 0.447213595499958f,
467 | 0f, 0.894427190999916f, 0.447213595499958f,
468 |
469 | -0.316213243287949f, 0.894437459825243f, 0.316213243287949f,
470 | -0.316213243287949f, 0.894437459825243f, 0.316213243287949f,
471 | -0.316213243287949f, 0.894437459825243f, 0.316213243287949f,
472 |
473 | 0f, -0.06069733756968f, -0.998156216837802f,
474 | 0f, -0.06069733756968f, -0.998156216837802f,
475 | 0f, -0.06069733756968f, -0.998156216837802f,
476 |
477 | 0.408807121482085f, 0.0634011044568595f, 0.910415859582412f,
478 | 0.408807121482085f, 0.0634011044568595f, 0.910415859582412f,
479 | 0.408807121482085f, 0.0634011044568595f, 0.910415859582412f,
480 |
481 | 0.316213243287949f, 0.894437459825243f, 0.316213243287949f,
482 | 0.316213243287949f, 0.894437459825243f, 0.316213243287949f,
483 | 0.316213243287949f, 0.894437459825243f, 0.316213243287949f,
484 |
485 | 0f, 0.894427190999916f, -0.447213595499958f,
486 | 0f, 0.894427190999916f, -0.447213595499958f,
487 | 0f, 0.894427190999916f, -0.447213595499958f,
488 |
489 | -0.316213243287949f, 0.894437459825243f, -0.316213243287949f,
490 | -0.316213243287949f, 0.894437459825243f, -0.316213243287949f,
491 | -0.316213243287949f, 0.894437459825243f, -0.316213243287949f,
492 |
493 | 0.316213243287949f, 0.894437459825243f, -0.316213243287949f,
494 | 0.316213243287949f, 0.894437459825243f, -0.316213243287949f,
495 | 0.316213243287949f, 0.894437459825243f, -0.316213243287949f,
496 |
497 | -0.706250557129182f, 0.0491965558696811f, 0.706250557129182f,
498 | -0.706250557129182f, 0.0491965558696811f, 0.706250557129182f,
499 | -0.706250557129182f, 0.0491965558696811f, 0.706250557129182f,
500 |
501 | 0.707106781186548f, 0f, -0.707106781186548f,
502 | 0.707106781186548f, 0f, -0.707106781186548f,
503 | 0.707106781186548f, 0f, -0.707106781186548f,
504 |
505 | -0.408807121482085f, 0.0634011044568595f, 0.910415859582412f,
506 | -0.408807121482085f, 0.0634011044568595f, 0.910415859582412f,
507 | -0.408807121482085f, 0.0634011044568595f, 0.910415859582412f,
508 |
509 | 0.706250557129182f, 0.0491965558696811f, 0.706250557129182f,
510 | 0.706250557129182f, 0.0491965558696811f, 0.706250557129182f,
511 | 0.706250557129182f, 0.0491965558696811f, 0.706250557129182f,
512 |
513 | -0.72210626068842f, -0.0420003641447357f, -0.690505986712857f,
514 | -0.72210626068842f, -0.0420003641447357f, -0.690505986712857f,
515 | -0.72210626068842f, -0.0420003641447357f, -0.690505986712857f,
516 |
517 | -0.707106781186548f, 0f, 0.707106781186548f,
518 | -0.707106781186548f, 0f, 0.707106781186548f,
519 | -0.707106781186548f, 0f, 0.707106781186548f,
520 |
521 | 0.923876672408529f, 0f, 0.382690337190977f,
522 | 0.923876672408529f, 0f, 0.382690337190977f,
523 | 0.923876672408529f, 0f, 0.382690337190977f,
524 |
525 | -0.707106781186548f, 0f, 0.707106781186548f,
526 | -0.707106781186548f, 0f, 0.707106781186548f,
527 | -0.707106781186548f, 0f, 0.707106781186548f,
528 |
529 | 0.382690337190977f, 0f, 0.923876672408529f,
530 | 0.382690337190977f, 0f, 0.923876672408529f,
531 | 0.382690337190977f, 0f, 0.923876672408529f,
532 |
533 | 0.707106781186548f, 0f, 0.707106781186548f,
534 | 0.707106781186548f, 0f, 0.707106781186548f,
535 | 0.707106781186548f, 0f, 0.707106781186548f,
536 |
537 | 0f, -1f, 0f,
538 | 0f, -1f, 0f,
539 | 0f, -1f, 0f,
540 |
541 | 0f, -1f, 0f,
542 | 0f, -1f, 0f,
543 | 0f, -1f, 0f,
544 |
545 | 0f, -1f, 0f,
546 | 0f, -1f, 0f,
547 | 0f, -1f, 0f,
548 |
549 | 0f, -1f, 0f,
550 | 0f, -1f, 0f,
551 | 0f, -1f, 0f,
552 |
553 | -0.707106781186548f, 0f, -0.707106781186548f,
554 | -0.707106781186548f, 0f, -0.707106781186548f,
555 | -0.707106781186548f, 0f, -0.707106781186548f,
556 |
557 | -0.923876672408529f, 0f, 0.382690337190977f,
558 | -0.923876672408529f, 0f, 0.382690337190977f,
559 | -0.923876672408529f, 0f, 0.382690337190977f,
560 |
561 | -0.382690337190977f, 0f, 0.923876672408529f,
562 | -0.382690337190977f, 0f, 0.923876672408529f,
563 | -0.382690337190977f, 0f, 0.923876672408529f,
564 |
565 | -0.382690337190977f, 0f, -0.923876672408529f,
566 | -0.382690337190977f, 0f, -0.923876672408529f,
567 | -0.382690337190977f, 0f, -0.923876672408529f,
568 |
569 | -0.923876672408529f, 0f, -0.382690337190977f,
570 | -0.923876672408529f, 0f, -0.382690337190977f,
571 | -0.923876672408529f, 0f, -0.382690337190977f,
572 |
573 | 0.923876672408529f, 0f, -0.382690337190977f,
574 | 0.923876672408529f, 0f, -0.382690337190977f,
575 | 0.923876672408529f, 0f, -0.382690337190977f,
576 |
577 | 0.707106781186548f, 0f, -0.707106781186548f,
578 | 0.707106781186548f, 0f, -0.707106781186548f,
579 | 0.707106781186548f, 0f, -0.707106781186548f,
580 |
581 | 0.382690337190977f, 0f, -0.923876672408529f,
582 | 0.382690337190977f, 0f, -0.923876672408529f,
583 | 0.382690337190977f, 0f, -0.923876672408529f,
584 |
585 | 0f, 1f, 0f,
586 | 0f, 1f, 0f,
587 | 0f, 1f, 0f,
588 |
589 | 0f, 1f, 0f,
590 | 0f, 1f, 0f,
591 | 0f, 1f, 0f,
592 |
593 | 0f, 1f, 0f,
594 | 0f, 1f, 0f,
595 | 0f, 1f, 0f,
596 |
597 | 0f, 1f, 0f,
598 | 0f, 1f, 0f,
599 | 0f, 1f, 0f,
600 |
601 | 0f, 1f, 0f,
602 | 0f, 1f, 0f,
603 | 0f, 1f, 0f,
604 |
605 | 0f, 0f, 1f,
606 | 0f, 0f, 1f,
607 | 0f, 0f, 1f,
608 |
609 | 0.707106781186548f, 0f, 0.707106781186548f,
610 | 0.707106781186548f, 0f, 0.707106781186548f,
611 | 0.707106781186548f, 0f, 0.707106781186548f,
612 |
613 | 0.707106781186548f, 0f, 0.707106781186548f,
614 | 0.707106781186548f, 0f, 0.707106781186548f,
615 | 0.707106781186548f, 0f, 0.707106781186548f,
616 |
617 | 0.707106781186548f, 0f, 0.707106781186548f,
618 | 0.707106781186548f, 0f, 0.707106781186548f,
619 | 0.707106781186548f, 0f, 0.707106781186548f,
620 |
621 | 1f, 0f, 0f,
622 | 1f, 0f, 0f,
623 | 1f, 0f, 0f,
624 |
625 | -1f, 0f, 0f,
626 | -1f, 0f, 0f,
627 | -1f, 0f, 0f,
628 |
629 | 0f, -1f, 0f,
630 | 0f, -1f, 0f,
631 | 0f, -1f, 0f,
632 |
633 | 0f, -1f, 0f,
634 | 0f, -1f, 0f,
635 | 0f, -1f, 0f,
636 |
637 | 0f, -1f, 0f,
638 | 0f, -1f, 0f,
639 | 0f, -1f, 0f,
640 |
641 | 0f, -1f, 0f,
642 | 0f, -1f, 0f,
643 | 0f, -1f, 0f,
644 |
645 | 0f, -1f, 0f,
646 | 0f, -1f, 0f,
647 | 0f, -1f, 0f,
648 |
649 | 0f, -1f, 0f,
650 | 0f, -1f, 0f,
651 | 0f, -1f, 0f,
652 |
653 | 0f, -1f, 0f,
654 | 0f, -1f, 0f,
655 | 0f, -1f, 0f,
656 |
657 | 0f, -1f, 0f,
658 | 0f, -1f, 0f,
659 | 0f, -1f, 0f,
660 |
661 | 0f, -1f, 0f,
662 | 0f, -1f, 0f,
663 | 0f, -1f, 0f,
664 |
665 | 0f, -1f, 0f,
666 | 0f, -1f, 0f,
667 | 0f, -1f, 0f,
668 |
669 | 0f, -1f, 0f,
670 | 0f, -1f, 0f,
671 | 0f, -1f, 0f,
672 |
673 | 0f, -1f, 0f,
674 | 0f, -1f, 0f,
675 | 0f, -1f, 0f,
676 |
677 | 0f, -1f, 0f,
678 | 0f, -1f, 0f,
679 | 0f, -1f, 0f,
680 |
681 | -0.447213595499958f, 0.894427190999916f, 0f,
682 | -0.447213595499958f, 0.894427190999916f, 0f,
683 | -0.447213595499958f, 0.894427190999916f, 0f,
684 |
685 | 0f, 0.0694987486862948f, 0.997582038697088f,
686 | 0f, 0.0694987486862948f, 0.997582038697088f,
687 | 0f, 0.0694987486862948f, 0.997582038697088f,
688 |
689 | 0.447213595499958f, 0.894427190999916f, 0f,
690 | 0.447213595499958f, 0.894427190999916f, 0f,
691 | 0.447213595499958f, 0.894427190999916f, 0f,
692 |
693 | 0f, 0.894427190999916f, 0.447213595499958f,
694 | 0f, 0.894427190999916f, 0.447213595499958f,
695 | 0f, 0.894427190999916f, 0.447213595499958f,
696 |
697 | -0.316213243287949f, 0.894437459825243f, 0.316213243287949f,
698 | -0.316213243287949f, 0.894437459825243f, 0.316213243287949f,
699 | -0.316213243287949f, 0.894437459825243f, 0.316213243287949f,
700 |
701 | 0f, -0.06069733756968f, -0.998156216837802f,
702 | 0f, -0.06069733756968f, -0.998156216837802f,
703 | 0f, -0.06069733756968f, -0.998156216837802f,
704 |
705 | 0.408807121482085f, 0.0634011044568595f, 0.910415859582412f,
706 | 0.408807121482085f, 0.0634011044568595f, 0.910415859582412f,
707 | 0.408807121482085f, 0.0634011044568595f, 0.910415859582412f,
708 |
709 | 0.316213243287949f, 0.894437459825243f, 0.316213243287949f,
710 | 0.316213243287949f, 0.894437459825243f, 0.316213243287949f,
711 | 0.316213243287949f, 0.894437459825243f, 0.316213243287949f,
712 |
713 | 0f, 0.894427190999916f, -0.447213595499958f,
714 | 0f, 0.894427190999916f, -0.447213595499958f,
715 | 0f, 0.894427190999916f, -0.447213595499958f,
716 |
717 | -0.316213243287949f, 0.894437459825243f, -0.316213243287949f,
718 | -0.316213243287949f, 0.894437459825243f, -0.316213243287949f,
719 | -0.316213243287949f, 0.894437459825243f, -0.316213243287949f,
720 |
721 | 0.316213243287949f, 0.894437459825243f, -0.316213243287949f,
722 | 0.316213243287949f, 0.894437459825243f, -0.316213243287949f,
723 | 0.316213243287949f, 0.894437459825243f, -0.316213243287949f,
724 |
725 | -0.706250557129182f, 0.0491965558696811f, 0.706250557129182f,
726 | -0.706250557129182f, 0.0491965558696811f, 0.706250557129182f,
727 | -0.706250557129182f, 0.0491965558696811f, 0.706250557129182f,
728 |
729 | 0.707106781186548f, 0f, -0.707106781186548f,
730 | 0.707106781186548f, 0f, -0.707106781186548f,
731 | 0.707106781186548f, 0f, -0.707106781186548f,
732 |
733 | 0.72210626068842f, -0.0420003641447357f, -0.690505986712857f,
734 | 0.72210626068842f, -0.0420003641447357f, -0.690505986712857f,
735 | 0.72210626068842f, -0.0420003641447357f, -0.690505986712857f,
736 |
737 | 0.707106781186548f, 0f, -0.707106781186548f,
738 | 0.707106781186548f, 0f, -0.707106781186548f,
739 | 0.707106781186548f, 0f, -0.707106781186548f,
740 |
741 | 0.706250557129182f, -0.0491965558696811f, -0.706250557129182f,
742 | 0.706250557129182f, -0.0491965558696811f, -0.706250557129182f,
743 | 0.706250557129182f, -0.0491965558696811f, -0.706250557129182f,
744 |
745 | -0.408807121482085f, 0.0634011044568595f, 0.910415859582412f,
746 | -0.408807121482085f, 0.0634011044568595f, 0.910415859582412f,
747 | -0.408807121482085f, 0.0634011044568595f, 0.910415859582412f,
748 |
749 | 0.706250557129182f, 0.0491965558696811f, 0.706250557129182f,
750 | 0.706250557129182f, 0.0491965558696811f, 0.706250557129182f,
751 | 0.706250557129182f, 0.0491965558696811f, 0.706250557129182f,
752 |
753 | -0.707106781186548f, 0f, -0.707106781186548f,
754 | -0.707106781186548f, 0f, -0.707106781186548f,
755 | -0.707106781186548f, 0f, -0.707106781186548f,
756 |
757 | -0.707106781186548f, 0f, -0.707106781186548f,
758 | -0.707106781186548f, 0f, -0.707106781186548f,
759 | -0.707106781186548f, 0f, -0.707106781186548f,
760 |
761 | -0.707106781186548f, 0f, -0.707106781186548f,
762 | -0.707106781186548f, 0f, -0.707106781186548f,
763 | -0.707106781186548f, 0f, -0.707106781186548f,
764 |
765 | -0.706250557129182f, -0.0491965558696811f, -0.706250557129182f,
766 | -0.706250557129182f, -0.0491965558696811f, -0.706250557129182f,
767 | -0.706250557129182f, -0.0491965558696811f, -0.706250557129182f,
768 |
769 | -0.707106781186548f, 0f, 0.707106781186548f,
770 | -0.707106781186548f, 0f, 0.707106781186548f,
771 | -0.707106781186548f, 0f, 0.707106781186548f,
772 |
773 | -0.707106781186548f, 0f, 0.707106781186548f,
774 | -0.707106781186548f, 0f, 0.707106781186548f,
775 | -0.707106781186548f, 0f, 0.707106781186548f,
776 |
777 | -0.707106781186548f, 0f, 0.707106781186548f,
778 | -0.707106781186548f, 0f, 0.707106781186548f,
779 | -0.707106781186548f, 0f, 0.707106781186548f,
780 |
781 | 0.923876672408529f, 0f, 0.382690337190977f,
782 | 0.923876672408529f, 0f, 0.382690337190977f,
783 | 0.923876672408529f, 0f, 0.382690337190977f,
784 |
785 | -0.707106781186548f, 0f, 0.707106781186548f,
786 | -0.707106781186548f, 0f, 0.707106781186548f,
787 | -0.707106781186548f, 0f, 0.707106781186548f,
788 |
789 | 0.382690337190977f, 0f, 0.923876672408529f,
790 | 0.382690337190977f, 0f, 0.923876672408529f,
791 | 0.382690337190977f, 0f, 0.923876672408529f,
792 |
793 | 0.707106781186548f, 0f, 0.707106781186548f,
794 | 0.707106781186548f, 0f, 0.707106781186548f,
795 | 0.707106781186548f, 0f, 0.707106781186548f,
796 |
797 | 0f, -1f, 0f,
798 | 0f, -1f, 0f,
799 | 0f, -1f, 0f,
800 |
801 | 0f, -1f, 0f,
802 | 0f, -1f, 0f,
803 | 0f, -1f, 0f,
804 |
805 | 0f, -1f, 0f,
806 | 0f, -1f, 0f,
807 | 0f, -1f, 0f,
808 |
809 | 0f, -1f, 0f,
810 | 0f, -1f, 0f,
811 | 0f, -1f, 0f,
812 |
813 | -0.707106781186548f, 0f, -0.707106781186548f,
814 | -0.707106781186548f, 0f, -0.707106781186548f,
815 | -0.707106781186548f, 0f, -0.707106781186548f,
816 |
817 | -0.923876672408529f, 0f, 0.382690337190977f,
818 | -0.923876672408529f, 0f, 0.382690337190977f,
819 | -0.923876672408529f, 0f, 0.382690337190977f,
820 |
821 | -0.382690337190977f, 0f, 0.923876672408529f,
822 | -0.382690337190977f, 0f, 0.923876672408529f,
823 | -0.382690337190977f, 0f, 0.923876672408529f,
824 |
825 | -0.382690337190977f, 0f, -0.923876672408529f,
826 | -0.382690337190977f, 0f, -0.923876672408529f,
827 | -0.382690337190977f, 0f, -0.923876672408529f,
828 |
829 | -0.923876672408529f, 0f, -0.382690337190977f,
830 | -0.923876672408529f, 0f, -0.382690337190977f,
831 | -0.923876672408529f, 0f, -0.382690337190977f,
832 |
833 | 0.923876672408529f, 0f, -0.382690337190977f,
834 | 0.923876672408529f, 0f, -0.382690337190977f,
835 | 0.923876672408529f, 0f, -0.382690337190977f,
836 |
837 | 0.707106781186548f, 0f, -0.707106781186548f,
838 | 0.707106781186548f, 0f, -0.707106781186548f,
839 | 0.707106781186548f, 0f, -0.707106781186548f,
840 |
841 | 0.382690337190977f, 0f, -0.923876672408529f,
842 | 0.382690337190977f, 0f, -0.923876672408529f,
843 | 0.382690337190977f, 0f, -0.923876672408529f,
844 | };
845 |
846 |
847 | private ModelData() {
848 | }
849 | }
850 |
--------------------------------------------------------------------------------