Example of using "Canvas" form "Graphics" library to display 3D graphics.
Dependencies: BSP_DISCO_F746NG Graphics mbed
Revision 3:aca7fe2d44b3, committed 2016-11-11
- Comitter:
- karpent
- Date:
- Fri Nov 11 17:06:53 2016 +0000
- Parent:
- 2:ef3093a7a43e
- Commit message:
- New 3d models added
Changed in this revision
diff -r ef3093a7a43e -r aca7fe2d44b3 Models/Bunny.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Models/Bunny.cpp Fri Nov 11 17:06:53 2016 +0000 @@ -0,0 +1,78 @@ +// +// Bunny.cpp - example of usage graphics commands to create 3D graphics. +// +// This example is based on code written by +// Fabio de Albuquerque Dela Antonio (fabio914 at gmail.com) +// See : https://github.com/fabio914/arduinogl/blob/master/examples +// + +#include "Bunny.h" + +const float model[2781] = { -31.299919f, 3.440121f, 58.979397f, -30.276672f, 23.500671f, 63.612442f, -26.077312f, 3.314625f, 58.745766f, -5.830347f, 13.418790f, 32.039459f, 5.144529f, 8.632340f, 44.210968f, 26.178310f, 6.693906f, 38.376419f, -25.450535f, -18.751888f, 5.121498f, -26.137699f, -14.011304f, 0.025569f, -27.783295f, -17.760992f, 0.000000f, -7.610099f, -23.646099f, 22.867081f, -5.045759f, -25.620146f, 32.780457f, -16.456816f, -24.045126f, 20.629974f, 28.700262f, 3.340350f, 8.161711f, 28.454979f, -8.018473f, 0.000000f, 21.121647f, 0.538283f, 0.000000f, 40.448925f, -11.934055f, 7.735428f, 42.906971f, -10.385098f, 17.294823f, 40.297981f, -15.358830f, 15.910970f, -27.990419f, -29.731901f, 46.000183f, -29.583706f, -28.943542f, 43.251595f, -26.841820f, -21.838554f, 41.450890f, -39.749767f, -3.904016f, 28.691017f, -35.988811f, -2.238290f, 21.400431f, -39.771622f, -13.284890f, 29.976780f, -35.988811f, -2.238290f, 21.400431f, -33.498840f, -15.609370f, 19.937490f, -39.771622f, -13.284890f, 29.976780f, 1.859695f, -27.553539f, 6.211346f, 8.508499f, -30.894899f, 8.787574f, -1.303513f, -26.751310f, 7.801365f, 0.214481f, -31.504070f, 31.225180f, 5.438558f, -25.540171f, 35.995869f, -5.045759f, -25.620146f, 32.780457f, -12.185986f, -23.799351f, 4.158226f, -8.724164f, -28.906160f, 2.682401f, -3.687133f, -29.806290f, 5.555919f, -18.058628f, -18.498764f, 45.300163f, 2.698992f, -19.992714f, 46.533913f, 0.635311f, -12.501760f, 51.880661f, -3.687133f, -29.806290f, 5.555919f, -1.303513f, -26.751310f, 7.801365f, -6.492952f, -21.036688f, 9.738846f, -3.687133f, -29.806290f, 5.555919f, 1.859695f, -27.553539f, 6.211346f, -1.303513f, -26.751310f, 7.801365f, 35.135990f, -18.504459f, 12.305650f, 35.512177f, -11.475349f, 20.552298f, 31.836550f, -17.395786f, 13.776245f, 26.148420f, -13.224380f, 45.869160f, 28.145479f, -2.886640f, 43.865211f, 23.679300f, 0.919657f, 46.416039f, -30.276672f, 23.500671f, 63.612442f, -27.669037f, 25.751465f, 64.773987f, -26.077312f, 3.314625f, 58.745766f, 1.690975f, 5.340637f, 69.904747f, 4.010963f, 10.656677f, 72.274277f, -2.842133f, 6.397278f, 82.654449f, -34.639359f, 21.325560f, 73.892181f, -27.275190f, 31.888050f, 73.913254f, -33.175571f, 1.760880f, 63.421860f, -33.469212f, -19.711430f, 64.389961f, -36.624279f, -12.005930f, 65.568573f, -40.908051f, -9.346874f, 63.523056f, 1.636169f, 14.304581f, 82.272003f, -24.395386f, -1.863571f, 65.736412f, -0.055817f, 10.879913f, 83.930130f, -12.440619f, -24.504108f, 0.000000f, -8.724164f, -28.906160f, 2.682401f, -12.185986f, -23.799351f, 4.158226f, -3.126161f, 18.676510f, 30.678471f, -6.830196f, 19.091152f, 24.559361f, -5.830347f, 13.418790f, 32.039459f, -6.830196f, 19.091152f, 24.559361f, -9.701232f, 12.793750f, 26.338671f, -5.830347f, 13.418790f, 32.039459f, -22.428841f, -1.742679f, 11.923490f, -28.208879f, -9.502583f, 13.587170f, -35.988811f, -2.238290f, 21.400431f, -23.527834f, -3.314713f, 6.854614f, -28.113880f, 2.688568f, 0.000000f, -29.445520f, -4.873160f, 3.325569f, -17.784000f, -5.515220f, 60.217892f, 1.690975f, 5.340637f, 69.904747f, -10.067734f, -3.004570f, 67.753922f, -39.771622f, -13.284890f, 29.976780f, -38.658390f, -11.023480f, 40.435280f, -38.073936f, -4.053628f, 41.000217f, -32.197918f, -21.388474f, 39.593330f, -39.771622f, -13.284890f, 29.976780f, -26.980061f, -25.372000f, 26.931490f, -26.137699f, -14.011304f, 0.025569f, -25.450535f, -18.751888f, 5.121498f, -20.018414f, -17.214727f, 8.042208f, -26.841820f, -21.838554f, 41.450890f, -29.583706f, -28.943542f, 43.251595f, -32.197918f, -21.388474f, 39.593330f, -42.046024f, -24.403416f, 45.981529f, -38.658390f, -11.023480f, 40.435280f, -39.518047f, -26.424160f, 43.627068f, -26.199423f, -24.203747f, 0.000000f, -27.783295f, -17.760992f, 0.000000f, 16.392511f, 11.142336f, 0.000000f, 8.508499f, -30.894899f, 8.787574f, 1.859695f, -27.553539f, 6.211346f, 15.502495f, -25.704920f, 4.651630f, 28.488760f, -18.320761f, 7.561245f, 32.911057f, -18.517305f, 6.684744f, 35.135990f, -18.504459f, 12.305650f, -19.270107f, -0.763908f, 59.855949f, -24.524895f, 0.869640f, 61.666595f, -24.395386f, -1.863571f, 65.736412f, -38.602760f, -27.334780f, 52.692440f, -39.518047f, -26.424160f, 43.627068f, -34.822483f, -30.322845f, 52.483650f, -26.321442f, 32.633255f, 79.565758f, -26.925514f, -0.728798f, 65.176147f, -24.411661f, 33.497742f, 74.600754f, -5.149233f, -30.996933f, 0.000000f, -3.687133f, -29.806290f, 5.555919f, -8.724164f, -28.906160f, 2.682401f, -17.784000f, -5.515220f, 60.217892f, -14.727882f, -9.299896f, 51.637341f, -18.509192f, 0.991539f, 51.946953f, -32.724941f, 2.222364f, 43.660000f, -38.073936f, -4.053628f, 41.000217f, -40.442410f, -4.356767f, 43.460880f, -21.352440f, 2.694791f, 5.306439f, -23.527834f, -3.314713f, 6.854614f, -20.900290f, 4.123918f, 15.746470f, -23.527834f, -3.314713f, 6.854614f, -22.428841f, -1.742679f, 11.923490f, -20.900290f, 4.123918f, 15.746470f, -33.498840f, -15.609370f, 19.937490f, -20.569233f, -14.120283f, 12.630917f, -23.760111f, -23.706110f, 20.866961f, 10.976050f, -13.299090f, 0.000000f, 17.839239f, -2.884055f, 0.000000f, 17.767031f, -2.896475f, 0.006485f, 32.911057f, -18.517305f, 6.684744f, 27.064529f, -16.386480f, 2.888231f, 28.454979f, -8.018473f, 0.000000f, -23.423550f, -5.343891f, 66.720016f, -24.395386f, -1.863571f, 65.736412f, -32.638649f, -1.428459f, 65.848839f, 21.728210f, 13.248790f, 9.642507f, 22.626472f, 9.696480f, 6.282227f, 16.392511f, 11.142336f, 0.000000f, 21.728210f, 13.248790f, 9.642507f, -2.112099f, 14.611610f, 5.704844f, -3.296439f, 20.519051f, 21.099979f, -6.830196f, 19.091152f, 24.559361f, -3.126161f, 18.676510f, 30.678471f, -3.296439f, 20.519051f, 21.099979f, -3.126161f, 18.676510f, 30.678471f, 0.010316f, 20.589991f, 28.137070f, -3.296439f, 20.519051f, 21.099979f, -23.527834f, -3.314713f, 6.854614f, -19.020100f, -9.924356f, 10.665792f, -22.428841f, -1.742679f, 11.923490f, -1.303513f, -26.751310f, 7.801365f, -3.407544f, -31.688227f, 26.238066f, -7.610099f, -23.646099f, 22.867081f, 20.946693f, -18.117416f, 47.492477f, 23.473631f, -26.248779f, 32.202202f, 26.148420f, -13.224380f, 45.869160f, -29.979050f, 30.401947f, 80.458572f, -27.275190f, 31.888050f, 73.913254f, -33.287308f, 27.552383f, 79.134552f, 15.502495f, -25.704920f, 4.651630f, 31.836550f, -17.395786f, 13.776245f, 23.473631f, -26.248779f, 32.202202f, -14.727882f, -9.299896f, 51.637341f, -17.784000f, -5.515220f, 60.217892f, -19.990990f, -7.879860f, 65.449562f, -40.908051f, -9.346874f, 63.523056f, -42.046024f, -24.403416f, 45.981529f, -38.602760f, -27.334780f, 52.692440f, 35.185879f, -3.012737f, 19.541977f, 31.362278f, 6.253376f, 30.462791f, 35.512177f, -11.475349f, 20.552298f, 39.048817f, 0.698063f, 13.619778f, 42.287338f, -3.710408f, 13.667420f, 40.373409f, -3.739577f, 8.107131f, -25.932983f, 31.100044f, 69.189209f, -28.195034f, 29.585236f, 67.225586f, -24.411661f, 33.497742f, 74.600754f, 3.199455f, 15.027573f, 80.818344f, 1.636169f, 14.304581f, 82.272003f, 2.066055f, 13.667435f, 82.265373f, -18.462151f, -21.307961f, 7.585688f, -20.018414f, -17.214727f, 8.042208f, -25.450535f, -18.751888f, 5.121498f, -18.462151f, -21.307961f, 7.585688f, -25.450535f, -18.751888f, 5.121498f, -23.895527f, -24.335186f, 5.106712f, -19.990990f, -7.879860f, 65.449562f, -10.067734f, -3.004570f, 67.753922f, -8.217346f, 1.267334f, 78.235962f, -8.217346f, 1.267334f, 78.235962f, -10.067734f, -3.004570f, 67.753922f, 1.690975f, 5.340637f, 69.904747f, 13.794762f, -4.505839f, 53.623520f, -11.577179f, 5.212082f, 47.301178f, -14.727882f, -9.299896f, 51.637341f, 23.679300f, 0.919657f, 46.416039f, 26.178310f, 6.693906f, 38.376419f, 17.921715f, 5.227356f, 46.453281f, -3.126161f, 18.676510f, 30.678471f, -5.830347f, 13.418790f, 32.039459f, 0.010316f, 20.589991f, 28.137070f, -5.830347f, 13.418790f, 32.039459f, 26.178310f, 6.693906f, 38.376419f, 0.010316f, 20.589991f, 28.137070f, 5.144529f, 8.632340f, 44.210968f, -5.830347f, 13.418790f, 32.039459f, -11.577179f, 5.212082f, 47.301178f, -11.577179f, 5.212082f, 47.301178f, -18.509192f, 0.991539f, 51.946953f, -14.727882f, -9.299896f, 51.637341f, -16.456816f, -24.045126f, 20.629974f, -26.980061f, -25.372000f, 26.931490f, -23.760111f, -23.706110f, 20.866961f, -23.760111f, -23.706110f, 20.866961f, -18.600197f, -20.593567f, 15.715866f, -16.456816f, -24.045126f, 20.629974f, -23.423550f, -5.343891f, 66.720016f, -19.990990f, -7.879860f, 65.449562f, -8.217346f, 1.267334f, 78.235962f, -32.638649f, -1.428459f, 65.848839f, -33.175571f, 1.760880f, 63.421860f, -40.908051f, -9.346874f, 63.523056f, -40.908051f, -9.346874f, 63.523056f, -36.624279f, -12.005930f, 65.568573f, -32.638649f, -1.428459f, 65.848839f, 21.728210f, 13.248790f, 9.642507f, 28.700262f, 3.340350f, 8.161711f, 22.626472f, 9.696480f, 6.282227f, 31.362278f, 6.253376f, 30.462791f, 35.185879f, -3.012737f, 19.541977f, 28.700262f, 3.340350f, 8.161711f, 21.728210f, 13.248790f, 9.642507f, 31.362278f, 6.253376f, 30.462791f, 28.700262f, 3.340350f, 8.161711f, -18.600197f, -20.593567f, 15.715866f, -18.462151f, -21.307961f, 7.585688f, -14.233090f, -22.860769f, 7.229623f, -18.600197f, -20.593567f, 15.715866f, -14.233090f, -22.860769f, 7.229623f, -16.456816f, -24.045126f, 20.629974f, -14.233090f, -22.860769f, 7.229623f, -7.610099f, -23.646099f, 22.867081f, -16.456816f, -24.045126f, 20.629974f, 40.373409f, -3.739577f, 8.107131f, 28.454979f, -8.018473f, 0.000000f, 35.598122f, 1.187963f, 7.043984f, 40.373409f, -3.739577f, 8.107131f, 40.448925f, -11.934055f, 7.735428f, 28.454979f, -8.018473f, 0.000000f, -24.395386f, -1.863571f, 65.736412f, -2.842133f, 6.397278f, 82.654449f, -0.055817f, 10.879913f, 83.930130f, 28.700262f, 3.340350f, 8.161711f, 21.121647f, 0.538283f, 0.000000f, 22.626472f, 9.696480f, 6.282227f, 22.626472f, 9.696480f, 6.282227f, 21.121647f, 0.538283f, 0.000000f, 16.392511f, 11.142336f, 0.000000f, 28.454979f, -8.018473f, 0.000000f, 28.700262f, 3.340350f, 8.161711f, 35.598122f, 1.187963f, 7.043984f, 35.135990f, -18.504459f, 12.305650f, 40.448925f, -11.934055f, 7.735428f, 40.297981f, -15.358830f, 15.910970f, 35.135990f, -18.504459f, 12.305650f, 32.911057f, -18.517305f, 6.684744f, 40.448925f, -11.934055f, 7.735428f, -2.842133f, 6.397278f, 82.654449f, -24.395386f, -1.863571f, 65.736412f, -8.217346f, 1.267334f, 78.235962f, -24.395386f, -1.863571f, 65.736412f, -23.423550f, -5.343891f, 66.720016f, -8.217346f, 1.267334f, 78.235962f, -26.841820f, -21.838554f, 41.450890f, -18.058628f, -18.498764f, 45.300163f, -27.990419f, -29.731901f, 46.000183f, -39.749767f, -3.904016f, 28.691017f, -32.127468f, 7.327313f, 27.020670f, -35.988811f, -2.238290f, 21.400431f, -32.127468f, 7.327313f, 27.020670f, -26.551491f, 7.957172f, 20.799030f, -35.988811f, -2.238290f, 21.400431f, -28.208879f, -9.502583f, 13.587170f, -33.498840f, -15.609370f, 19.937490f, -35.988811f, -2.238290f, 21.400431f, -22.815487f, -18.301781f, 64.880135f, -33.469212f, -19.711430f, 64.389961f, -34.822483f, -30.322845f, 52.483650f, -3.407544f, -31.688227f, 26.238066f, -1.303513f, -26.751310f, 7.801365f, 6.845083f, -33.366192f, 20.570959f, 8.508499f, -30.894899f, 8.787574f, 6.845083f, -33.366192f, 20.570959f, -1.303513f, -26.751310f, 7.801365f, 28.454979f, -8.018473f, 0.000000f, 17.767031f, -2.896475f, 0.006485f, 21.121647f, 0.538283f, 0.000000f, 17.767031f, -2.896475f, 0.006485f, 16.392511f, 11.142336f, 0.000000f, 21.121647f, 0.538283f, 0.000000f, 17.767031f, -2.896475f, 0.006485f, 10.976050f, -13.299090f, 0.000000f, 16.392511f, 11.142336f, 0.000000f, -34.639359f, 21.325560f, 73.892181f, -33.175571f, 1.760880f, 63.421860f, -32.638649f, -1.428459f, 65.848839f, -34.639359f, 21.325560f, 73.892181f, -32.638649f, -1.428459f, 65.848839f, -33.287308f, 27.552383f, 79.134552f, -12.185986f, -23.799351f, 4.158226f, -3.687133f, -29.806290f, 5.555919f, -6.492952f, -21.036688f, 9.738846f, -12.440619f, -24.504108f, 0.000000f, -12.185986f, -23.799351f, 4.158226f, -22.321657f, -27.056860f, 0.000000f, -14.233090f, -22.860769f, 7.229623f, -6.492952f, -21.036688f, 9.738846f, -7.610099f, -23.646099f, 22.867081f, -14.233090f, -22.860769f, 7.229623f, -12.185986f, -23.799351f, 4.158226f, -6.492952f, -21.036688f, 9.738846f, -22.321657f, -27.056860f, 0.000000f, -12.185986f, -23.799351f, 4.158226f, -14.233090f, -22.860769f, 7.229623f, -26.199423f, -24.203747f, 0.000000f, -25.450535f, -18.751888f, 5.121498f, -27.783295f, -17.760992f, 0.000000f, -26.199423f, -24.203747f, 0.000000f, -23.895527f, -24.335186f, 5.106712f, -25.450535f, -18.751888f, 5.121498f, -38.073936f, -4.053628f, 41.000217f, -32.724941f, 2.222364f, 43.660000f, -32.127468f, 7.327313f, 27.020670f, -38.073936f, -4.053628f, 41.000217f, -32.127468f, 7.327313f, 27.020670f, -39.749767f, -3.904016f, 28.691017f, 20.946693f, -18.117416f, 47.492477f, 13.794762f, -4.505839f, 53.623520f, 0.635311f, -12.501760f, 51.880661f, 40.297981f, -15.358830f, 15.910970f, 35.512177f, -11.475349f, 20.552298f, 35.135990f, -18.504459f, 12.305650f, 40.297981f, -15.358830f, 15.910970f, 39.928936f, -10.603863f, 20.661507f, 35.512177f, -11.475349f, 20.552298f, 13.794762f, -4.505839f, 53.623520f, 26.148420f, -13.224380f, 45.869160f, 23.679300f, 0.919657f, 46.416039f, 13.794762f, -4.505839f, 53.623520f, 20.946693f, -18.117416f, 47.492477f, 26.148420f, -13.224380f, 45.869160f, -18.462151f, -21.307961f, 7.585688f, -23.895527f, -24.335186f, 5.106712f, -22.321657f, -27.056860f, 0.000000f, -18.462151f, -21.307961f, 7.585688f, -22.321657f, -27.056860f, 0.000000f, -14.233090f, -22.860769f, 7.229623f, 40.297981f, -15.358830f, 15.910970f, 42.906971f, -10.385098f, 17.294823f, 39.928936f, -10.603863f, 20.661507f, -2.842133f, 6.397278f, 82.654449f, 2.066055f, 13.667435f, 82.265373f, -0.055817f, 10.879913f, 83.930130f, 4.010963f, 10.656677f, 72.274277f, 4.204769f, 15.437621f, 78.351051f, -2.842133f, 6.397278f, 82.654449f, -2.842133f, 6.397278f, 82.654449f, 4.204769f, 15.437621f, 78.351051f, 2.066055f, 13.667435f, 82.265373f, 2.066055f, 13.667435f, 82.265373f, 1.636169f, 14.304581f, 82.272003f, -0.055817f, 10.879913f, 83.930130f, 4.204769f, 15.437621f, 78.351051f, 3.199455f, 15.027573f, 80.818344f, 2.066055f, 13.667435f, 82.265373f, 1.690975f, 5.340637f, 69.904747f, -2.842133f, 6.397278f, 82.654449f, -8.217346f, 1.267334f, 78.235962f, -32.197918f, -21.388474f, 39.593330f, -29.583706f, -28.943542f, 43.251595f, -39.518047f, -26.424160f, 43.627068f, 35.512177f, -11.475349f, 20.552298f, 39.928936f, -10.603863f, 20.661507f, 35.185879f, -3.012737f, 19.541977f, 39.928936f, -10.603863f, 20.661507f, 41.106087f, -3.119934f, 18.274170f, 35.185879f, -3.012737f, 19.541977f, -33.287308f, 27.552383f, 79.134552f, -27.275190f, 31.888050f, 73.913254f, -34.639359f, 21.325560f, 73.892181f, -38.602760f, -27.334780f, 52.692440f, -33.469212f, -19.711430f, 64.389961f, -40.908051f, -9.346874f, 63.523056f, -38.602760f, -27.334780f, 52.692440f, -34.822483f, -30.322845f, 52.483650f, -33.469212f, -19.711430f, 64.389961f, 1.690975f, 5.340637f, 69.904747f, -17.784000f, -5.515220f, 60.217892f, -19.270107f, -0.763908f, 59.855949f, 1.690975f, 5.340637f, 69.904747f, -19.270107f, -0.763908f, 59.855949f, 4.010963f, 10.656677f, 72.274277f, -5.149233f, -30.996933f, 0.000000f, -8.724164f, -28.906160f, 2.682401f, -12.440619f, -24.504108f, 0.000000f, -20.569233f, -14.120283f, 12.630917f, -19.020100f, -9.924356f, 10.665792f, -20.018414f, -17.214727f, 8.042208f, -19.020100f, -9.924356f, 10.665792f, -18.714115f, -9.888160f, 6.312799f, -20.018414f, -17.214727f, 8.042208f, 28.700262f, 3.340350f, 8.161711f, 35.185879f, -3.012737f, 19.541977f, 39.048817f, 0.698063f, 13.619778f, 41.106087f, -3.119934f, 18.274170f, 39.048817f, 0.698063f, 13.619778f, 35.185879f, -3.012737f, 19.541977f, -26.551491f, 7.957172f, 20.799030f, -22.428841f, -1.742679f, 11.923490f, -35.988811f, -2.238290f, 21.400431f, -26.551491f, 7.957172f, 20.799030f, -20.900290f, 4.123918f, 15.746470f, -22.428841f, -1.742679f, 11.923490f, -19.020100f, -9.924356f, 10.665792f, -20.569233f, -14.120283f, 12.630917f, -28.208879f, -9.502583f, 13.587170f, -23.527834f, -3.314713f, 6.854614f, -21.352440f, 2.694791f, 5.306439f, -28.113880f, 2.688568f, 0.000000f, -22.428841f, -1.742679f, 11.923490f, -19.020100f, -9.924356f, 10.665792f, -28.208879f, -9.502583f, 13.587170f, -28.113880f, 2.688568f, 0.000000f, -31.171257f, -4.392757f, 0.000000f, -29.445520f, -4.873160f, 3.325569f, 41.106087f, -3.119934f, 18.274170f, 39.928936f, -10.603863f, 20.661507f, 42.906971f, -10.385098f, 17.294823f, 41.106087f, -3.119934f, 18.274170f, 42.906971f, -10.385098f, 17.294823f, 42.287338f, -3.710408f, 13.667420f, -19.990990f, -7.879860f, 65.449562f, -17.784000f, -5.515220f, 60.217892f, -10.067734f, -3.004570f, 67.753922f, 35.598122f, 1.187963f, 7.043984f, 28.700262f, 3.340350f, 8.161711f, 39.048817f, 0.698063f, 13.619778f, -39.749767f, -3.904016f, 28.691017f, -39.771622f, -13.284890f, 29.976780f, -38.073936f, -4.053628f, 41.000217f, -39.518047f, -26.424160f, 43.627068f, -29.583706f, -28.943542f, 43.251595f, -34.822483f, -30.322845f, 52.483650f, -29.583706f, -28.943542f, 43.251595f, -27.990419f, -29.731901f, 46.000183f, -34.822483f, -30.322845f, 52.483650f, -32.197918f, -21.388474f, 39.593330f, -38.658390f, -11.023480f, 40.435280f, -39.771622f, -13.284890f, 29.976780f, -23.760111f, -23.706110f, 20.866961f, -26.980061f, -25.372000f, 26.931490f, -33.498840f, -15.609370f, 19.937490f, -26.980061f, -25.372000f, 26.931490f, -39.771622f, -13.284890f, 29.976780f, -33.498840f, -15.609370f, 19.937490f, -18.714115f, -9.888160f, 6.312799f, -26.137699f, -14.011304f, 0.025569f, -20.018414f, -17.214727f, 8.042208f, -26.137699f, -14.011304f, 0.025569f, -18.714115f, -9.888160f, 6.312799f, -25.030270f, -12.079759f, 0.000000f, -22.321657f, -27.056860f, 0.000000f, -23.895527f, -24.335186f, 5.106712f, -26.199423f, -24.203747f, 0.000000f, 4.204769f, 15.437621f, 78.351051f, 4.010963f, 10.656677f, 72.274277f, 4.048302f, 13.276505f, 74.013153f, -14.358550f, 5.402464f, 6.462601f, -14.551777f, 14.001165f, 0.000000f, -17.455999f, 5.972135f, 0.000000f, -14.551777f, 14.001165f, 0.000000f, -14.358550f, 5.402464f, 6.462601f, -10.381670f, 14.939910f, 3.783378f, -38.658390f, -11.023480f, 40.435280f, -40.442410f, -4.356767f, 43.460880f, -38.073936f, -4.053628f, 41.000217f, -38.658390f, -11.023480f, 40.435280f, -32.197918f, -21.388474f, 39.593330f, -39.518047f, -26.424160f, 43.627068f, -38.658390f, -11.023480f, 40.435280f, -42.046024f, -24.403416f, 45.981529f, -40.442410f, -4.356767f, 43.460880f, 31.836550f, -17.395786f, 13.776245f, 28.488760f, -18.320761f, 7.561245f, 35.135990f, -18.504459f, 12.305650f, -27.783295f, -17.760992f, 0.000000f, -8.500104f, 16.174938f, 0.000000f, 16.392511f, 11.142336f, 0.000000f, -11.577179f, 5.212082f, 47.301178f, -5.830347f, 13.418790f, 32.039459f, -9.701232f, 12.793750f, 26.338671f, -19.270107f, -0.763908f, 59.855949f, -24.395386f, -1.863571f, 65.736412f, 1.636169f, 14.304581f, 82.272003f, -28.113880f, 2.688568f, 0.000000f, -21.352440f, 2.694791f, 5.306439f, -17.455999f, 5.972135f, 0.000000f, -32.127468f, 7.327313f, 27.020670f, -9.701232f, 12.793750f, 26.338671f, -26.551491f, 7.957172f, 20.799030f, -32.724941f, 2.222364f, 43.660000f, -38.117439f, 0.659461f, 47.124329f, -31.299919f, 3.440121f, 58.979397f, -32.127468f, 7.327313f, 27.020670f, -32.724941f, 2.222364f, 43.660000f, -22.793581f, 9.446844f, 37.439838f, -32.724941f, 2.222364f, 43.660000f, -31.299919f, 3.440121f, 58.979397f, -26.077312f, 3.314625f, 58.745766f, 4.204769f, 15.437621f, 78.351051f, 1.636169f, 14.304581f, 82.272003f, 3.199455f, 15.027573f, 80.818344f, -9.660704f, 6.864013f, 15.130268f, -20.900290f, 4.123918f, 15.746470f, -9.701232f, 12.793750f, 26.338671f, -14.358550f, 5.402464f, 6.462601f, -20.900290f, 4.123918f, 15.746470f, -9.081678f, 5.360139f, 8.181866f, -9.081678f, 5.360139f, 8.181866f, -20.900290f, 4.123918f, 15.746470f, -9.660704f, 6.864013f, 15.130268f, -26.077312f, 3.314625f, 58.745766f, -18.509192f, 0.991539f, 51.946953f, -32.724941f, 2.222364f, 43.660000f, -32.724941f, 2.222364f, 43.660000f, -18.509192f, 0.991539f, 51.946953f, -11.577179f, 5.212082f, 47.301178f, -19.270107f, -0.763908f, 59.855949f, 1.636169f, 14.304581f, 82.272003f, 4.204769f, 15.437621f, 78.351051f, -14.358550f, 5.402464f, 6.462601f, -21.352440f, 2.694791f, 5.306439f, -20.900290f, 4.123918f, 15.746470f, -9.701232f, 12.793750f, 26.338671f, -32.127468f, 7.327313f, 27.020670f, -22.793581f, 9.446844f, 37.439838f, -9.701232f, 12.793750f, 26.338671f, -20.900290f, 4.123918f, 15.746470f, -26.551491f, 7.957172f, 20.799030f, -26.077312f, 3.314625f, 58.745766f, -24.524895f, 0.869640f, 61.666595f, -19.270107f, -0.763908f, 59.855949f, -21.352440f, 2.694791f, 5.306439f, -14.358550f, 5.402464f, 6.462601f, -17.455999f, 5.972135f, 0.000000f, -26.077312f, 3.314625f, 58.745766f, -19.270107f, -0.763908f, 59.855949f, -18.509192f, 0.991539f, 51.946953f, -42.046024f, -24.403416f, 45.981529f, -39.518047f, -26.424160f, 43.627068f, -38.602760f, -27.334780f, 52.692440f, -30.276672f, 23.500671f, 63.612442f, -28.195034f, 29.585236f, 67.225586f, -27.669037f, 25.751465f, 64.773987f, -25.932983f, 31.100044f, 69.189209f, -27.669037f, 25.751465f, 64.773987f, -28.195034f, 29.585236f, 67.225586f, -3.687133f, -29.806290f, 5.555919f, -5.149233f, -30.996933f, 0.000000f, 1.859695f, -27.553539f, 6.211346f, 21.162861f, -23.660191f, 1.776828f, 15.502495f, -25.704920f, 4.651630f, 14.933216f, -25.826469f, 0.000000f, 1.859695f, -27.553539f, 6.211346f, 3.236011f, -28.581669f, 0.000000f, 15.502495f, -25.704920f, 4.651630f, 3.236011f, -28.581669f, 0.000000f, 14.933216f, -25.826469f, 0.000000f, 15.502495f, -25.704920f, 4.651630f, 1.859695f, -27.553539f, 6.211346f, -5.149233f, -30.996933f, 0.000000f, 3.236011f, -28.581669f, 0.000000f, -26.925514f, -0.728798f, 65.176147f, -24.524895f, 0.869640f, 61.666595f, -24.411661f, 33.497742f, 74.600754f, -18.509192f, 0.991539f, 51.946953f, -19.270107f, -0.763908f, 59.855949f, -17.784000f, -5.515220f, 60.217892f, -24.395386f, -1.863571f, 65.736412f, -24.524895f, 0.869640f, 61.666595f, -26.925514f, -0.728798f, 65.176147f, -38.117439f, 0.659461f, 47.124329f, -32.724941f, 2.222364f, 43.660000f, -40.442410f, -4.356767f, 43.460880f, 27.064529f, -16.386480f, 2.888231f, 32.911057f, -18.517305f, 6.684744f, 28.488760f, -18.320761f, 7.561245f, -20.569233f, -14.120283f, 12.630917f, -20.018414f, -17.214727f, 8.042208f, -18.600197f, -20.593567f, 15.715866f, -20.018414f, -17.214727f, 8.042208f, -18.462151f, -21.307961f, 7.585688f, -18.600197f, -20.593567f, 15.715866f, -18.600197f, -20.593567f, 15.715866f, -23.760111f, -23.706110f, 20.866961f, -20.569233f, -14.120283f, 12.630917f, -33.498840f, -15.609370f, 19.937490f, -28.208879f, -9.502583f, 13.587170f, -20.569233f, -14.120283f, 12.630917f, -24.411661f, 33.497742f, 74.600754f, -27.669037f, 25.751465f, 64.773987f, -25.932983f, 31.100044f, 69.189209f, -24.524895f, 0.869640f, 61.666595f, -26.077312f, 3.314625f, 58.745766f, -27.669037f, 25.751465f, 64.773987f, -40.908051f, -9.346874f, 63.523056f, -31.299919f, 3.440121f, 58.979397f, -38.117439f, 0.659461f, 47.124329f, -24.524895f, 0.869640f, 61.666595f, -27.669037f, 25.751465f, 64.773987f, -24.411661f, 33.497742f, 74.600754f, -31.299919f, 3.440121f, 58.979397f, -33.175571f, 1.760880f, 63.421860f, -30.276672f, 23.500671f, 63.612442f, -40.442410f, -4.356767f, 43.460880f, -40.908051f, -9.346874f, 63.523056f, -38.117439f, 0.659461f, 47.124329f, -27.275190f, 31.888050f, 73.913254f, -28.195034f, 29.585236f, 67.225586f, -30.276672f, 23.500671f, 63.612442f, -40.442410f, -4.356767f, 43.460880f, -42.046024f, -24.403416f, 45.981529f, -40.908051f, -9.346874f, 63.523056f, -40.908051f, -9.346874f, 63.523056f, -33.175571f, 1.760880f, 63.421860f, -31.299919f, 3.440121f, 58.979397f, -33.175571f, 1.760880f, 63.421860f, -27.275190f, 31.888050f, 73.913254f, -30.276672f, 23.500671f, 63.612442f, -9.660704f, 6.864013f, 15.130268f, -9.701232f, 12.793750f, 26.338671f, -6.830196f, 19.091152f, 24.559361f, -7.072629f, 11.186079f, 7.622356f, -9.660704f, 6.864013f, 15.130268f, -5.569384f, 13.129258f, 7.116871f, -9.081678f, 5.360139f, 8.181866f, -9.660704f, 6.864013f, 15.130268f, -7.072629f, 11.186079f, 7.622356f, -9.660704f, 6.864013f, 15.130268f, -6.830196f, 19.091152f, 24.559361f, -5.569384f, 13.129258f, 7.116871f, 4.204769f, 15.437621f, 78.351051f, 4.048302f, 13.276505f, 74.013153f, -19.270107f, -0.763908f, 59.855949f, -19.270107f, -0.763908f, 59.855949f, 4.048302f, 13.276505f, 74.013153f, 4.010963f, 10.656677f, 72.274277f, 14.933216f, -25.826469f, 0.000000f, 10.976050f, -13.299090f, 0.000000f, 28.454979f, -8.018473f, 0.000000f, -5.149233f, -30.996933f, 0.000000f, -12.440619f, -24.504108f, 0.000000f, 3.236011f, -28.581669f, 0.000000f, -22.321657f, -27.056860f, 0.000000f, -26.199423f, -24.203747f, 0.000000f, -12.440619f, -24.504108f, 0.000000f, 16.392511f, 11.142336f, 0.000000f, -12.440619f, -24.504108f, 0.000000f, -26.199423f, -24.203747f, 0.000000f, -12.440619f, -24.504108f, 0.000000f, 14.933216f, -25.826469f, 0.000000f, 3.236011f, -28.581669f, 0.000000f, 10.976050f, -13.299090f, 0.000000f, -12.440619f, -24.504108f, 0.000000f, 16.392511f, 11.142336f, 0.000000f, 14.933216f, -25.826469f, 0.000000f, -12.440619f, -24.504108f, 0.000000f, 10.976050f, -13.299090f, 0.000000f, 10.976050f, -13.299090f, 0.000000f, 17.767031f, -2.896475f, 0.006485f, 28.454979f, -8.018473f, 0.000000f, 14.933216f, -25.826469f, 0.000000f, 28.454979f, -8.018473f, 0.000000f, 21.162861f, -23.660191f, 1.776828f, 28.454979f, -8.018473f, 0.000000f, 40.448925f, -11.934055f, 7.735428f, 32.911057f, -18.517305f, 6.684744f, 28.454979f, -8.018473f, 0.000000f, 27.064529f, -16.386480f, 2.888231f, 21.162861f, -23.660191f, 1.776828f, -32.638649f, -1.428459f, 65.848839f, -26.925514f, -0.728798f, 65.176147f, -33.287308f, 27.552383f, 79.134552f, -19.990990f, -7.879860f, 65.449562f, -23.423550f, -5.343891f, 66.720016f, -22.815487f, -18.301781f, 64.880135f, -23.423550f, -5.343891f, 66.720016f, -36.624279f, -12.005930f, 65.568573f, -22.815487f, -18.301781f, 64.880135f, -36.624279f, -12.005930f, 65.568573f, -33.469212f, -19.711430f, 64.389961f, -22.815487f, -18.301781f, 64.880135f, -24.395386f, -1.863571f, 65.736412f, -26.925514f, -0.728798f, 65.176147f, -32.638649f, -1.428459f, 65.848839f, -33.287308f, 27.552383f, 79.134552f, -26.925514f, -0.728798f, 65.176147f, -29.979050f, 30.401947f, 80.458572f, -32.638649f, -1.428459f, 65.848839f, -36.624279f, -12.005930f, 65.568573f, -23.423550f, -5.343891f, 66.720016f, -29.979050f, 30.401947f, 80.458572f, -26.925514f, -0.728798f, 65.176147f, -26.321442f, 32.633255f, 79.565758f, -5.045759f, -25.620146f, 32.780457f, -3.407544f, -31.688227f, 26.238066f, 0.214481f, -31.504070f, 31.225180f, -3.407544f, -31.688227f, 26.238066f, 6.845083f, -33.366192f, 20.570959f, 0.214481f, -31.504070f, 31.225180f, 23.473631f, -26.248779f, 32.202202f, 5.438558f, -25.540171f, 35.995869f, 6.845083f, -33.366192f, 20.570959f, -18.058628f, -18.498764f, 45.300163f, 5.438558f, -25.540171f, 35.995869f, 2.698992f, -19.992714f, 46.533913f, -5.569384f, 13.129258f, 7.116871f, -8.500104f, 16.174938f, 0.000000f, -10.381670f, 14.939910f, 3.783378f, -26.841820f, -21.838554f, 41.450890f, -32.197918f, -21.388474f, 39.593330f, -26.980061f, -25.372000f, 26.931490f, -26.980061f, -25.372000f, 26.931490f, -16.456816f, -24.045126f, 20.629974f, -5.045759f, -25.620146f, 32.780457f, 6.845083f, -33.366192f, 20.570959f, 5.438558f, -25.540171f, 35.995869f, 0.214481f, -31.504070f, 31.225180f, 5.438558f, -25.540171f, 35.995869f, 23.473631f, -26.248779f, 32.202202f, 20.946693f, -18.117416f, 47.492477f, -26.841820f, -21.838554f, 41.450890f, -26.980061f, -25.372000f, 26.931490f, -18.058628f, -18.498764f, 45.300163f, 5.438558f, -25.540171f, 35.995869f, -18.058628f, -18.498764f, 45.300163f, -5.045759f, -25.620146f, 32.780457f, -26.980061f, -25.372000f, 26.931490f, -5.045759f, -25.620146f, 32.780457f, -18.058628f, -18.498764f, 45.300163f, -5.569384f, 13.129258f, 7.116871f, -2.112099f, 14.611610f, 5.704844f, -8.500104f, 16.174938f, 0.000000f, 31.362278f, 6.253376f, 30.462791f, 26.178310f, 6.693906f, 38.376419f, 28.145479f, -2.886640f, 43.865211f, -8.500104f, 16.174938f, 0.000000f, -14.551777f, 14.001165f, 0.000000f, -10.381670f, 14.939910f, 3.783378f, 26.178310f, 6.693906f, 38.376419f, 23.679300f, 0.919657f, 46.416039f, 28.145479f, -2.886640f, 43.865211f, 42.906971f, -10.385098f, 17.294823f, 40.448925f, -11.934055f, 7.735428f, 42.287338f, -3.710408f, 13.667420f, 40.448925f, -11.934055f, 7.735428f, 40.373409f, -3.739577f, 8.107131f, 42.287338f, -3.710408f, 13.667420f, 0.010316f, 20.589991f, 28.137070f, 21.728210f, 13.248790f, 9.642507f, -3.296439f, 20.519051f, 21.099979f, 0.010316f, 20.589991f, 28.137070f, 26.178310f, 6.693906f, 38.376419f, 31.362278f, 6.253376f, 30.462791f, 16.392511f, 11.142336f, 0.000000f, -2.112099f, 14.611610f, 5.704844f, 21.728210f, 13.248790f, 9.642507f, 31.362278f, 6.253376f, 30.462791f, 21.728210f, 13.248790f, 9.642507f, 0.010316f, 20.589991f, 28.137070f, -2.112099f, 14.611610f, 5.704844f, 16.392511f, 11.142336f, 0.000000f, -8.500104f, 16.174938f, 0.000000f, -2.112099f, 14.611610f, 5.704844f, -5.569384f, 13.129258f, 7.116871f, -3.296439f, 20.519051f, 21.099979f, -3.296439f, 20.519051f, 21.099979f, -5.569384f, 13.129258f, 7.116871f, -6.830196f, 19.091152f, 24.559361f, -18.714115f, -9.888160f, 6.312799f, -19.020100f, -9.924356f, 10.665792f, -23.527834f, -3.314713f, 6.854614f, -14.358550f, 5.402464f, 6.462601f, -7.072629f, 11.186079f, 7.622356f, -10.381670f, 14.939910f, 3.783378f, -5.569384f, 13.129258f, 7.116871f, -10.381670f, 14.939910f, 3.783378f, -7.072629f, 11.186079f, 7.622356f, -7.072629f, 11.186079f, 7.622356f, -14.358550f, 5.402464f, 6.462601f, -9.081678f, 5.360139f, 8.181866f, -3.407544f, -31.688227f, 26.238066f, -5.045759f, -25.620146f, 32.780457f, -7.610099f, -23.646099f, 22.867081f, -7.610099f, -23.646099f, 22.867081f, -6.492952f, -21.036688f, 9.738846f, -1.303513f, -26.751310f, 7.801365f, 31.836550f, -17.395786f, 13.776245f, 35.512177f, -11.475349f, 20.552298f, 23.473631f, -26.248779f, 32.202202f, -29.445520f, -4.873160f, 3.325569f, -31.171257f, -4.392757f, 0.000000f, -25.030270f, -12.079759f, 0.000000f, -23.527834f, -3.314713f, 6.854614f, -25.030270f, -12.079759f, 0.000000f, -18.714115f, -9.888160f, 6.312799f, -23.527834f, -3.314713f, 6.854614f, -29.445520f, -4.873160f, 3.325569f, -25.030270f, -12.079759f, 0.000000f, -24.411661f, 33.497742f, 74.600754f, -28.195034f, 29.585236f, 67.225586f, -27.275190f, 31.888050f, 73.913254f, 26.148420f, -13.224380f, 45.869160f, 23.473631f, -26.248779f, 32.202202f, 35.512177f, -11.475349f, 20.552298f, -26.321442f, 32.633255f, 79.565758f, -27.275190f, 31.888050f, 73.913254f, -29.979050f, 30.401947f, 80.458572f, -26.321442f, 32.633255f, 79.565758f, -24.411661f, 33.497742f, 74.600754f, -27.275190f, 31.888050f, 73.913254f, 6.845083f, -33.366192f, 20.570959f, 15.502495f, -25.704920f, 4.651630f, 23.473631f, -26.248779f, 32.202202f, 21.162861f, -23.660191f, 1.776828f, 27.064529f, -16.386480f, 2.888231f, 28.488760f, -18.320761f, 7.561245f, 15.502495f, -25.704920f, 4.651630f, 28.488760f, -18.320761f, 7.561245f, 31.836550f, -17.395786f, 13.776245f, 15.502495f, -25.704920f, 4.651630f, 21.162861f, -23.660191f, 1.776828f, 28.488760f, -18.320761f, 7.561245f, 6.845083f, -33.366192f, 20.570959f, 8.508499f, -30.894899f, 8.787574f, 15.502495f, -25.704920f, 4.651630f, -18.058628f, -18.498764f, 45.300163f, -22.815487f, -18.301781f, 64.880135f, -27.990419f, -29.731901f, 46.000183f, -22.815487f, -18.301781f, 64.880135f, -14.727882f, -9.299896f, 51.637341f, -19.990990f, -7.879860f, 65.449562f, -22.815487f, -18.301781f, 64.880135f, -34.822483f, -30.322845f, 52.483650f, -27.990419f, -29.731901f, 46.000183f, -22.815487f, -18.301781f, 64.880135f, -18.058628f, -18.498764f, 45.300163f, -14.727882f, -9.299896f, 51.637341f, 28.145479f, -2.886640f, 43.865211f, 26.148420f, -13.224380f, 45.869160f, 35.512177f, -11.475349f, 20.552298f, 31.362278f, 6.253376f, 30.462791f, 28.145479f, -2.886640f, 43.865211f, 35.512177f, -11.475349f, 20.552298f, -28.113880f, 2.688568f, 0.000000f, -25.030270f, -12.079759f, 0.000000f, -31.171257f, -4.392757f, 0.000000f, -27.783295f, -17.760992f, 0.000000f, -26.137699f, -14.011304f, 0.025569f, -25.030270f, -12.079759f, 0.000000f, -25.030270f, -12.079759f, 0.000000f, -28.113880f, 2.688568f, 0.000000f, -17.455999f, 5.972135f, 0.000000f, -17.455999f, 5.972135f, 0.000000f, -8.500104f, 16.174938f, 0.000000f, -25.030270f, -12.079759f, 0.000000f, -8.500104f, 16.174938f, 0.000000f, -27.783295f, -17.760992f, 0.000000f, -25.030270f, -12.079759f, 0.000000f, -8.500104f, 16.174938f, 0.000000f, -17.455999f, 5.972135f, 0.000000f, -14.551777f, 14.001165f, 0.000000f, 35.598122f, 1.187963f, 7.043984f, 39.048817f, 0.698063f, 13.619778f, 40.373409f, -3.739577f, 8.107131f, 41.106087f, -3.119934f, 18.274170f, 42.287338f, -3.710408f, 13.667420f, 39.048817f, 0.698063f, 13.619778f, -14.727882f, -9.299896f, 51.637341f, -18.058628f, -18.498764f, 45.300163f, 0.635311f, -12.501760f, 51.880661f, 13.794762f, -4.505839f, 53.623520f, -14.727882f, -9.299896f, 51.637341f, 0.635311f, -12.501760f, 51.880661f, 26.178310f, 6.693906f, 38.376419f, 5.144529f, 8.632340f, 44.210968f, 17.921715f, 5.227356f, 46.453281f, 13.794762f, -4.505839f, 53.623520f, 5.144529f, 8.632340f, 44.210968f, -11.577179f, 5.212082f, 47.301178f, 13.794762f, -4.505839f, 53.623520f, 23.679300f, 0.919657f, 46.416039f, 17.921715f, 5.227356f, 46.453281f, 5.144529f, 8.632340f, 44.210968f, 13.794762f, -4.505839f, 53.623520f, 17.921715f, 5.227356f, 46.453281f, -11.577179f, 5.212082f, 47.301178f, -9.701232f, 12.793750f, 26.338671f, -22.793581f, 9.446844f, 37.439838f, -32.724941f, 2.222364f, 43.660000f, -11.577179f, 5.212082f, 47.301178f, -22.793581f, 9.446844f, 37.439838f, 2.698992f, -19.992714f, 46.533913f, 20.946693f, -18.117416f, 47.492477f, 0.635311f, -12.501760f, 51.880661f, 5.438558f, -25.540171f, 35.995869f, 20.946693f, -18.117416f, 47.492477f, 2.698992f, -19.992714f, 46.533913f }; + +// Constructor +Bunny::Bunny(Display * display) : Model() +{ + glUseCanvas(display); +} + +/** +* @brief Model setup. +* @retval None +*/ +void Bunny::Setup() +{ + SetFixedScaleMode(0.1f); + + glPointSize(4); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + gluPerspective(30.0, 1.7647f, 0.1f, 9999.f); + + glMatrixMode(GL_MODELVIEW); +} + +/** +* @brief Renders a square for given view angle and scale. +* @param None +* @retval None +*/ +void Bunny::Render() +{ + float scale = GetScaleValue(); + + glLoadIdentity(); + gluLookAt(0, 0, -20, 0, 5, 0, 0, 1, 0); + + glScalef(scale, scale, scale); + glRotatef(GetAngleValue(), 0.f, 1.f, 0.f); + glRotatef(-90.f, 1.f, 0.f, 0.f); + + DrawModel(); +} + + +void Bunny::DrawModel(void) +{ + int i; + + for(i = 0; i < 309; i++) { + + glBegin(GL_POLYGON); + glVertexFromMemory(i*3); + glVertexFromMemory(i*3 + 1); + glVertexFromMemory(i*3 + 2); + glEnd(); + } +} + +void Bunny::glVertexFromMemory(int i) +{ + float x = model[i*3 + 0]; + float y = model[i*3 + 1]; + float z = model[i*3 + 2]; + + glVertex3f(x, y, z); +}
diff -r ef3093a7a43e -r aca7fe2d44b3 Models/Bunny.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Models/Bunny.h Fri Nov 11 17:06:53 2016 +0000 @@ -0,0 +1,38 @@ +// +// Bunny.h - example of usage graphics commands to create 3D graphics. +// +// This example is based on code written by +// Fabio de Albuquerque Dela Antonio (fabio914 at gmail.com) +// See : https://github.com/fabio914/arduinogl/blob/master/examples +// + +#pragma once + +#include <ArduinoGL.h> +#include "Model.h" + +/** +* @brief 3D model of the Bunny rabit +*/ +class Bunny : public Model +{ +public: + Bunny(Display * displayy); + + /** + * @brief Model setup. + * @retval None + */ + void virtual Setup(); + + /** + * @brief Renders model for given view angle. + * @param None + * @retval None + */ + void virtual Render(); + +private: + void DrawModel(); + void glVertexFromMemory(int i); +};
diff -r ef3093a7a43e -r aca7fe2d44b3 Models/Cube.cpp --- a/Models/Cube.cpp Fri Nov 11 15:30:07 2016 +0000 +++ b/Models/Cube.cpp Fri Nov 11 17:06:53 2016 +0000 @@ -9,8 +9,7 @@ #include "Cube.h" // Constructor -Cube::Cube(Display * display) - : Angle() +Cube::Cube(Display * display) : Model() { glUseCanvas(display); @@ -23,6 +22,9 @@ */ void Cube::Setup() { + // Make the model a little bigger + SetFixedScaleMode(2.3f); + glPointSize(4); glMatrixMode(GL_PROJECTION); @@ -40,7 +42,7 @@ */ void Cube::Render() { - const float scale = 2.5; + const float scale = GetScaleValue(); // Put the initial matrix at glMatrices[glmatrixMode == GL_PROJECTION] glLoadIdentity(); @@ -48,7 +50,7 @@ // Transform matrix gluLookAt(10, 8, -10, 0, 0, 0, 0, 1, 0); - glRotatef(angle, 0.f, 1.f, 0.f); + glRotatef(GetAngleValue(), 0.f, 1.f, 0.f); glScalef(scale, scale, scale); DrawCube();
diff -r ef3093a7a43e -r aca7fe2d44b3 Models/Cube.h --- a/Models/Cube.h Fri Nov 11 15:30:07 2016 +0000 +++ b/Models/Cube.h Fri Nov 11 17:06:53 2016 +0000 @@ -9,12 +9,12 @@ #pragma once #include <ArduinoGL.h> -#include "Angle.h" +#include "Model.h" /** * @brief 3D model of the cube */ -class Cube : public Angle +class Cube : public Model { public: @@ -24,13 +24,13 @@ * @brief Model setup. * @retval None */ - void Setup(); + void virtual Setup(); /** * @brief Render single frame on the display. * @retval None */ - void Render(); + void virtual Render(); private:
diff -r ef3093a7a43e -r aca7fe2d44b3 Models/Pikachu.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Models/Pikachu.cpp Fri Nov 11 17:06:53 2016 +0000 @@ -0,0 +1,92 @@ +// +// Pikachu.cpp - example of usage graphics commands to create 3D graphics. +// +// This example is based on code written by +// Fabio de Albuquerque Dela Antonio (fabio914 at gmail.com) +// See : https://github.com/fabio914/arduinogl/blob/master/examples +// + +#include "Pikachu.h" + +const float model[3708] = { -5.539738f, -3.768954f, 0.000000f, -4.307949f, -3.812735f, 0.000000f, -1.438539f, -1.200866f, 0.000000f, -1.438539f, -1.200866f, 0.000000f, -4.038570f, -1.214379f, 0.000000f, -5.539738f, -3.768954f, 0.000000f, -4.307949f, -3.812735f, 0.000000f, -4.144053f, -4.801568f, -0.000000f, -1.438539f, -1.200866f, 0.000000f, -4.144053f, -4.801568f, -0.000000f, -3.012833f, -4.785862f, -0.000000f, -1.438539f, -1.200866f, 0.000000f, -3.012833f, -4.785862f, -0.000000f, -2.848938f, -5.774698f, -0.000000f, -0.794038f, -4.081137f, -0.000000f, -0.794038f, -4.081137f, -0.000000f, -1.438539f, -1.200866f, 0.000000f, -3.012833f, -4.785862f, -0.000000f, -4.038570f, -1.214379f, 0.000000f, -1.438539f, -1.200866f, 0.000000f, 0.212833f, 5.974901f, 0.000000f, 0.212833f, 5.974901f, 0.000000f, -1.438539f, -1.200866f, 0.000000f, 2.833840f, -1.001984f, 0.000000f, -1.438539f, -1.200866f, 0.000000f, -0.794038f, -4.081137f, -0.000000f, 2.833840f, -1.001984f, 0.000000f, -4.144053f, -4.801568f, -0.000000f, -4.307949f, -3.812735f, 0.000000f, -3.771819f, -3.505237f, 1.297074f, -3.771819f, -3.505237f, 1.297074f, -2.964740f, -4.217257f, 1.438483f, -4.144053f, -4.801568f, -0.000000f, -3.012833f, -4.785862f, -0.000000f, -4.144053f, -4.801568f, -0.000000f, -2.964740f, -4.217257f, 1.438483f, -2.848938f, -5.774698f, -0.000000f, -3.012833f, -4.785862f, -0.000000f, -2.964740f, -4.217257f, 1.438483f, -2.964740f, -4.217257f, 1.438483f, -2.224502f, -4.870309f, 1.568181f, -2.848938f, -5.774698f, -0.000000f, -4.307949f, -3.812735f, 0.000000f, -5.539738f, -3.768954f, 0.000000f, -3.771819f, -3.505237f, 1.297074f, -3.771819f, -3.505237f, 1.297074f, -5.539738f, -3.768954f, 0.000000f, -4.605422f, -2.769094f, 1.151340f, -0.794038f, -4.081137f, -0.000000f, -2.848938f, -5.774698f, -0.000000f, -2.224502f, -4.870309f, 1.568181f, -2.224502f, -4.870309f, 1.568181f, -0.095399f, -3.493686f, 3.396854f, -0.794038f, -4.081137f, -0.000000f, 2.833840f, -1.001984f, 0.000000f, -0.794038f, -4.081137f, -0.000000f, -0.095399f, -3.493686f, 3.396854f, -4.038570f, -1.214379f, 0.000000f, 0.212833f, 5.974901f, 0.000000f, -2.797724f, -0.015615f, 3.409093f, -4.038570f, -1.214379f, 0.000000f, -2.797724f, -0.015615f, 3.409093f, -4.605422f, -2.769094f, 1.151340f, -4.605422f, -2.769094f, 1.151340f, -5.539738f, -3.768954f, 0.000000f, -4.038570f, -1.214379f, 0.000000f, -2.964740f, -4.217257f, 1.438483f, -3.771819f, -3.505237f, 1.297074f, -2.797724f, -0.015615f, 3.409093f, -2.224502f, -4.870309f, 1.568181f, -2.964740f, -4.217257f, 1.438483f, -2.797724f, -0.015615f, 3.409093f, -3.771819f, -3.505237f, 1.297074f, -4.605422f, -2.769094f, 1.151340f, -2.797724f, -0.015615f, 3.409093f, -0.095399f, -3.493686f, 3.396854f, -2.224502f, -4.870309f, 1.568181f, -2.797724f, -0.015615f, 3.409093f, -0.095399f, -3.493686f, 3.396854f, -2.797724f, -0.015615f, 3.409093f, -4.924707f, -1.414091f, 6.819679f, -4.924707f, -1.414091f, 6.819679f, -1.064041f, -6.094393f, 6.538823f, -0.095399f, -3.493686f, 3.396854f, -2.797724f, -0.015615f, 3.409093f, 0.212833f, 5.974901f, 0.000000f, -2.806269f, 9.701880f, 6.911485f, -2.806269f, 9.701880f, 6.911485f, -4.924707f, -1.414091f, 6.819679f, -2.797724f, -0.015615f, 3.409093f, -0.095399f, -3.493686f, 3.396854f, -1.064041f, -6.094393f, 6.538823f, 7.318575f, -8.181732f, 7.251115f, 7.318575f, -8.181732f, 7.251115f, 7.332893f, -4.468502f, 3.035453f, -0.095399f, -3.493686f, 3.396854f, 7.332893f, -4.468502f, 3.035453f, 2.833840f, -1.001984f, 0.000000f, -0.095399f, -3.493686f, 3.396854f, 2.833840f, -1.001984f, 0.000000f, 7.332893f, -4.468502f, 3.035453f, 7.347628f, -0.345043f, 0.000000f, -2.806269f, 9.701880f, 6.911485f, 0.212833f, 5.974901f, 0.000000f, 4.992514f, 8.669660f, 0.000000f, 4.992514f, 8.669660f, 0.000000f, 7.404200f, 15.154014f, 6.717684f, -2.806269f, 9.701880f, 6.911485f, 7.390337f, 11.355589f, 25.343040f, -1.156504f, 6.769886f, 25.503311f, -2.806269f, 9.701880f, 6.911485f, -2.806269f, 9.701880f, 6.911485f, 7.404200f, 15.154014f, 6.717684f, 7.390337f, 11.355589f, 25.343040f, -1.156504f, 6.769886f, 25.503311f, 7.390337f, 11.355589f, 25.343040f, 7.392986f, 12.969517f, 30.596918f, 7.392986f, 12.969517f, 30.596918f, -2.378038f, 7.609754f, 29.987549f, -1.156504f, 6.769886f, 25.503311f, -2.378038f, 7.609754f, 29.987549f, 7.392986f, 12.969517f, 30.596918f, 7.389394f, 10.209548f, 43.675125f, 7.389394f, 10.209548f, 43.675125f, -1.112535f, 5.337115f, 44.135113f, -2.378038f, 7.609754f, 29.987549f, 4.992514f, 8.669660f, 0.000000f, 6.560344f, 24.639845f, 0.000000f, 5.476238f, 27.080624f, 3.887028f, 5.476238f, 27.080624f, 3.887028f, 4.129376f, 20.061457f, 5.779599f, 4.992514f, 8.669660f, 0.000000f, 4.129376f, 20.061457f, 5.779599f, 5.476238f, 27.080624f, 3.887028f, 6.155193f, 24.991884f, 8.632037f, 6.155193f, 24.991884f, 8.632037f, 4.831220f, 17.723888f, 10.245268f, 4.129376f, 20.061457f, 5.779599f, 4.831220f, 17.723888f, 10.245268f, 6.155193f, 24.991884f, 8.632037f, 5.734873f, 29.086515f, 14.934714f, 5.734873f, 29.086515f, 14.934714f, 4.065323f, 20.013741f, 17.045088f, 4.831220f, 17.723888f, 10.245268f, 4.065323f, 20.013741f, 17.045088f, 5.734873f, 29.086515f, 14.934714f, 6.355259f, 28.509245f, 21.455393f, 6.355259f, 28.509245f, 21.455393f, 4.143809f, 15.594004f, 24.428383f, 4.065323f, 20.013741f, 17.045088f, 4.143809f, 15.594004f, 24.428383f, 6.355259f, 28.509245f, 21.455393f, 6.044722f, 36.033566f, 32.743652f, 6.044722f, 36.033566f, 32.743652f, 3.680145f, 27.997072f, 42.629868f, 4.143809f, 15.594004f, 24.428383f, 7.404200f, 15.154014f, 6.717684f, 4.992514f, 8.669660f, 0.000000f, 7.395069f, 12.652242f, 3.473820f, 4.992514f, 8.669660f, 0.000000f, 4.129376f, 20.061457f, 5.779599f, 7.395069f, 12.652242f, 3.473820f, -1.156504f, 6.769886f, 25.503311f, -3.251845f, -0.057658f, 19.269463f, -4.924707f, -1.414091f, 6.819679f, -4.924707f, -1.414091f, 6.819679f, -2.806269f, 9.701880f, 6.911485f, -1.156504f, 6.769886f, 25.503311f, -1.156504f, 6.769886f, 25.503311f, -2.155961f, 2.247481f, 25.289112f, -3.251845f, -0.057658f, 19.269463f, -3.251845f, -0.057658f, 19.269463f, -2.155961f, 2.247481f, 25.289112f, -4.784894f, -4.558351f, 21.355616f, -4.784894f, -4.558351f, 21.355616f, -4.747807f, -4.044468f, 15.678835f, -3.251845f, -0.057658f, 19.269463f, -4.747807f, -4.044468f, 15.678835f, -4.784894f, -4.558351f, 21.355616f, 1.405830f, -8.681398f, 17.677410f, 1.405830f, -8.681398f, 17.677410f, -0.400345f, -7.063436f, 13.588383f, -4.747807f, -4.044468f, 15.678835f, -0.400345f, -7.063436f, 13.588383f, 1.405830f, -8.681398f, 17.677410f, 4.569384f, -8.806929f, 17.070992f, -0.400345f, -7.063436f, 13.588383f, 4.569384f, -8.806929f, 17.070992f, 4.459775f, -8.170643f, 15.255916f, -0.400345f, -7.063436f, 13.588383f, 4.459775f, -8.170643f, 15.255916f, 4.120597f, -7.750196f, 14.155172f, -0.400345f, -7.063436f, 13.588383f, 4.120597f, -7.750196f, 14.155172f, 3.805834f, -7.357590f, 13.126703f, -1.112535f, 5.337115f, 44.135113f, 7.389394f, 10.209548f, 43.675125f, 7.342481f, -1.755349f, 46.878002f, 7.342481f, -1.755349f, 46.878002f, 0.265503f, -0.751631f, 45.553356f, -1.112535f, 5.337115f, 44.135113f, 1.080373f, -8.575625f, 31.963448f, 7.308156f, -11.159800f, 32.688374f, 7.312078f, -10.085270f, 28.536547f, 7.312078f, -10.085270f, 28.536547f, -0.296664f, -7.294125f, 28.770905f, 1.080373f, -8.575625f, 31.963448f, -0.296664f, -7.294125f, 28.770905f, 7.312078f, -10.085270f, 28.536547f, 7.327550f, -5.846064f, 24.956141f, 7.327550f, -5.846064f, 24.956141f, 1.895971f, -4.169862f, 25.367369f, -0.296664f, -7.294125f, 28.770905f, 1.251503f, -5.247501f, 37.201290f, 3.653726f, -6.376678f, 37.277554f, 3.668271f, -5.650332f, 34.978966f, 3.668271f, -5.650332f, 34.978966f, 1.256280f, -4.414838f, 34.583401f, 1.251503f, -5.247501f, 37.201290f, 4.129376f, 20.061457f, 5.779599f, 4.831220f, 17.723888f, 10.245268f, 7.411455f, 17.763485f, 10.409961f, 7.411455f, 17.763485f, 10.409961f, 7.421850f, 19.989561f, 5.611809f, 4.129376f, 20.061457f, 5.779599f, 7.422492f, 20.165249f, 17.050919f, 7.411455f, 17.763485f, 10.409961f, 4.831220f, 17.723888f, 10.245268f, 4.831220f, 17.723888f, 10.245268f, 4.065323f, 20.013741f, 17.045088f, 7.422492f, 20.165249f, 17.050919f, 4.065323f, 20.013741f, 17.045088f, 4.143809f, 15.594004f, 24.428383f, 7.402476f, 15.512046f, 24.353392f, 7.402476f, 15.512046f, 24.353392f, 7.422492f, 20.165249f, 17.050919f, 4.065323f, 20.013741f, 17.045088f, 4.143809f, 15.594004f, 24.428383f, 3.680145f, 27.997072f, 42.629868f, 7.451022f, 27.981888f, 42.640167f, 7.451022f, 27.981888f, 42.640167f, 7.402476f, 15.512046f, 24.353392f, 4.143809f, 15.594004f, 24.428383f, 4.129376f, 20.061457f, 5.779599f, 7.421850f, 19.989561f, 5.611809f, 7.395069f, 12.652242f, 3.473820f, 4.459775f, -8.170643f, 15.255916f, 4.881968f, -7.958671f, 14.516864f, 4.120597f, -7.750196f, 14.155172f, 4.459775f, -8.170643f, 15.255916f, 4.569384f, -8.806929f, 17.070992f, 5.154751f, -8.509578f, 16.012430f, 4.120597f, -7.750196f, 14.155172f, 4.509461f, -7.648806f, 13.743653f, 3.805834f, -7.357590f, 13.126703f, 1.405830f, -8.681398f, 17.677410f, -4.784894f, -4.558351f, 21.355616f, -0.802266f, -3.523405f, 21.358763f, -0.802266f, -3.523405f, 21.358763f, 1.079479f, -4.688925f, 20.261789f, 1.405830f, -8.681398f, 17.677410f, -4.747807f, -4.044468f, 15.678835f, -0.400345f, -7.063436f, 13.588383f, -0.405376f, -5.446152f, 12.146640f, -0.405376f, -5.446152f, 12.146640f, -2.666151f, -2.447883f, 13.083079f, -4.747807f, -4.044468f, 15.678835f, 4.569384f, -8.806929f, 17.070992f, 1.405830f, -8.681398f, 17.677410f, 1.079479f, -4.688925f, 20.261789f, 1.079479f, -4.688925f, 20.261789f, 4.887557f, -5.936971f, 18.927929f, 4.569384f, -8.806929f, 17.070992f, -0.400345f, -7.063436f, 13.588383f, 3.805834f, -7.357590f, 13.126703f, 3.708996f, -6.551171f, 12.173764f, 3.708996f, -6.551171f, 12.173764f, -0.405376f, -5.446152f, 12.146640f, -0.400345f, -7.063436f, 13.588383f, 5.154751f, -8.509578f, 16.012430f, 4.569384f, -8.806929f, 17.070992f, 4.887557f, -5.936971f, 18.927929f, 4.887557f, -5.936971f, 18.927929f, 5.991712f, -6.647191f, 16.045710f, 5.154751f, -8.509578f, 16.012430f, 3.805834f, -7.357590f, 13.126703f, 4.509461f, -7.648806f, 13.743653f, 5.477915f, -6.819143f, 13.787570f, 5.477915f, -6.819143f, 13.787570f, 3.708996f, -6.551171f, 12.173764f, 3.805834f, -7.357590f, 13.126703f, 4.459775f, -8.170643f, 15.255916f, 5.154751f, -8.509578f, 16.012430f, 5.991712f, -6.647191f, 16.045710f, 5.991712f, -6.647191f, 16.045710f, 5.360450f, -6.560156f, 15.408227f, 4.459775f, -8.170643f, 15.255916f, 4.120597f, -7.750196f, 14.155172f, 4.881968f, -7.958671f, 14.516864f, 5.890128f, -6.807933f, 14.691280f, 5.890128f, -6.807933f, 14.691280f, 5.070531f, -6.644487f, 14.224989f, 4.120597f, -7.750196f, 14.155172f, 4.509461f, -7.648806f, 13.743653f, 4.120597f, -7.750196f, 14.155172f, 5.070531f, -6.644487f, 14.224989f, 5.070531f, -6.644487f, 14.224989f, 5.477915f, -6.819143f, 13.787570f, 4.509461f, -7.648806f, 13.743653f, 4.881968f, -7.958671f, 14.516864f, 4.459775f, -8.170643f, 15.255916f, 5.360450f, -6.560156f, 15.408227f, 5.360450f, -6.560156f, 15.408227f, 5.890128f, -6.807933f, 14.691280f, 4.881968f, -7.958671f, 14.516864f, -4.784894f, -4.558351f, 21.355616f, -2.155961f, 2.247481f, 25.289112f, -0.802266f, -3.523405f, 21.358763f, -4.747807f, -4.044468f, 15.678835f, -2.666151f, -2.447883f, 13.083079f, -3.251845f, -0.057658f, 19.269463f, 5.991712f, -6.647191f, 16.045710f, 4.887557f, -5.936971f, 18.927929f, 7.324408f, -6.706909f, 18.302906f, 7.324408f, -6.706909f, 18.302906f, 7.323162f, -7.048462f, 15.838820f, 5.991712f, -6.647191f, 16.045710f, 3.708996f, -6.551171f, 12.173764f, 5.477915f, -6.819143f, 13.787570f, 7.321928f, -7.386584f, 13.399504f, 7.321928f, -7.386584f, 13.399504f, 7.321089f, -7.616257f, 11.742564f, 3.708996f, -6.551171f, 12.173764f, 5.360450f, -6.560156f, 15.408227f, 5.991712f, -6.647191f, 16.045710f, 7.323162f, -7.048462f, 15.838820f, 7.323162f, -7.048462f, 15.838820f, 7.322854f, -7.132998f, 15.228947f, 5.360450f, -6.560156f, 15.408227f, 5.070531f, -6.644487f, 14.224989f, 5.890128f, -6.807933f, 14.691280f, 7.322489f, -7.232655f, 14.509995f, 7.322489f, -7.232655f, 14.509995f, 7.322289f, -7.287514f, 14.114231f, 5.070531f, -6.644487f, 14.224989f, 5.477915f, -6.819143f, 13.787570f, 5.070531f, -6.644487f, 14.224989f, 7.322289f, -7.287514f, 14.114231f, 7.322289f, -7.287514f, 14.114231f, 7.321928f, -7.386584f, 13.399504f, 5.477915f, -6.819143f, 13.787570f, 5.890128f, -6.807933f, 14.691280f, 5.360450f, -6.560156f, 15.408227f, 7.322854f, -7.132998f, 15.228947f, 7.322854f, -7.132998f, 15.228947f, 7.322489f, -7.232655f, 14.509995f, 5.890128f, -6.807933f, 14.691280f, 3.708996f, -6.551171f, 12.173764f, 7.321089f, -7.616257f, 11.742564f, 7.318575f, -8.181732f, 7.251115f, -1.064041f, -6.094393f, 6.538823f, -0.405376f, -5.446152f, 12.146640f, 3.708996f, -6.551171f, 12.173764f, 3.708996f, -6.551171f, 12.173764f, 7.318575f, -8.181732f, 7.251115f, -1.064041f, -6.094393f, 6.538823f, 4.887557f, -5.936971f, 18.927929f, 1.079479f, -4.688925f, 20.261789f, 1.895971f, -4.169862f, 25.367369f, 7.324408f, -6.706909f, 18.302906f, 4.887557f, -5.936971f, 18.927929f, 1.895971f, -4.169862f, 25.367369f, 1.895971f, -4.169862f, 25.367369f, 7.327550f, -5.846064f, 24.956141f, 7.324408f, -6.706909f, 18.302906f, -2.666151f, -2.447883f, 13.083079f, -0.405376f, -5.446152f, 12.146640f, -1.064041f, -6.094393f, 6.538823f, -1.064041f, -6.094393f, 6.538823f, -4.924707f, -1.414091f, 6.819679f, -2.666151f, -2.447883f, 13.083079f, -3.251845f, -0.057658f, 19.269463f, -2.666151f, -2.447883f, 13.083079f, -4.924707f, -1.414091f, 6.819679f, 1.895971f, -4.169862f, 25.367369f, 1.079479f, -4.688925f, 20.261789f, -0.802266f, -3.523405f, 21.358763f, -0.802266f, -3.523405f, 21.358763f, -2.155961f, 2.247481f, 25.289112f, 1.895971f, -4.169862f, 25.367369f, 7.347628f, -0.345043f, 0.000000f, 4.992514f, 8.669660f, 0.000000f, 0.212833f, 5.974901f, 0.000000f, 0.212833f, 5.974901f, 0.000000f, 2.833840f, -1.001984f, 0.000000f, 7.347628f, -0.345043f, 0.000000f, 5.476238f, 27.080624f, 3.887028f, 6.560344f, 24.639845f, 0.000000f, 7.438875f, 24.654293f, 0.000000f, 7.438875f, 24.654293f, 0.000000f, 7.448072f, 27.173620f, 4.010532f, 5.476238f, 27.080624f, 3.887028f, -1.112535f, 5.337115f, 44.135113f, 0.265503f, -0.751631f, 45.553356f, -2.306926f, 0.087779f, 49.248196f, -2.306926f, 0.087779f, 49.248196f, -2.891684f, 6.301509f, 47.072754f, -1.112535f, 5.337115f, 44.135113f, -5.250957f, 5.681880f, 43.694244f, -5.527353f, -0.421932f, 43.762058f, -2.655676f, -1.320220f, 40.688511f, -2.655676f, -1.320220f, 40.688511f, -1.801986f, 4.293036f, 39.759407f, -5.250957f, 5.681880f, 43.694244f, -1.112535f, 5.337115f, 44.135113f, -2.891684f, 6.301509f, 47.072754f, -5.250957f, 5.681880f, 43.694244f, -5.250957f, 5.681880f, 43.694244f, -1.801986f, 4.293036f, 39.759407f, -1.112535f, 5.337115f, 44.135113f, -5.527353f, -0.421932f, 43.762058f, -2.306926f, 0.087779f, 49.248196f, 0.265503f, -0.751631f, 45.553356f, 0.265503f, -0.751631f, 45.553356f, -2.655676f, -1.320220f, 40.688511f, -5.527353f, -0.421932f, 43.762058f, 1.895971f, -4.169862f, 25.367369f, -2.155961f, 2.247481f, 25.289112f, -4.095365f, -1.711470f, 29.019276f, -4.095365f, -1.711470f, 29.019276f, -0.296664f, -7.294125f, 28.770905f, 1.895971f, -4.169862f, 25.367369f, -3.737267f, -1.586870f, 31.882002f, -2.378038f, 7.609754f, 29.987549f, -1.801986f, 4.293036f, 39.759407f, -1.801986f, 4.293036f, 39.759407f, -2.655676f, -1.320220f, 40.688511f, -3.737267f, -1.586870f, 31.882002f, -1.801986f, 4.293036f, 39.759407f, -2.378038f, 7.609754f, 29.987549f, -1.112535f, 5.337115f, 44.135113f, 0.114188f, -5.271675f, 40.927006f, -2.655676f, -1.320220f, 40.688511f, 0.265503f, -0.751631f, 45.553356f, -2.378038f, 7.609754f, 29.987549f, -4.095365f, -1.711470f, 29.019276f, -2.155961f, 2.247481f, 25.289112f, -2.155961f, 2.247481f, 25.289112f, -1.156504f, 6.769886f, 25.503311f, -2.378038f, 7.609754f, 29.987549f, -4.095365f, -1.711470f, 29.019276f, -2.378038f, 7.609754f, 29.987549f, -3.737267f, -1.586870f, 31.882002f, 0.265503f, -0.751631f, 45.553356f, 7.342481f, -1.755349f, 46.878002f, 7.320009f, -7.912378f, 40.945305f, 7.320009f, -7.912378f, 40.945305f, 0.114188f, -5.271675f, 40.927006f, 0.265503f, -0.751631f, 45.553356f, 7.314791f, -9.341828f, 33.737534f, 7.308156f, -11.159800f, 32.688374f, 1.080373f, -8.575625f, 31.963448f, 1.080373f, -8.575625f, 31.963448f, -0.047018f, -6.856034f, 32.473053f, 7.314791f, -9.341828f, 33.737534f, -2.655676f, -1.320220f, 40.688511f, 0.114188f, -5.271675f, 40.927006f, -0.047018f, -6.856034f, 32.473053f, -0.047018f, -6.856034f, 32.473053f, -3.737267f, -1.586870f, 31.882002f, -2.655676f, -1.320220f, 40.688511f, -2.891684f, 6.301509f, 47.072754f, -2.306926f, 0.087779f, 49.248196f, -5.861135f, 1.639917f, 53.478088f, -5.861135f, 1.639917f, 53.478088f, -6.854596f, 5.761014f, 52.715530f, -2.891684f, 6.301509f, 47.072754f, -5.527353f, -0.421932f, 43.762058f, -5.250957f, 5.681880f, 43.694244f, -8.320417f, 5.422955f, 48.878498f, -8.320417f, 5.422955f, 48.878498f, -8.509175f, 1.068752f, 48.895195f, -5.527353f, -0.421932f, 43.762058f, -2.306926f, 0.087779f, 49.248196f, -5.527353f, -0.421932f, 43.762058f, -8.509175f, 1.068752f, 48.895195f, -8.509175f, 1.068752f, 48.895195f, -5.861135f, 1.639917f, 53.478088f, -2.306926f, 0.087779f, 49.248196f, -5.250957f, 5.681880f, 43.694244f, -2.891684f, 6.301509f, 47.072754f, -6.854596f, 5.761014f, 52.715530f, -6.854596f, 5.761014f, 52.715530f, -8.320417f, 5.422955f, 48.878498f, -5.250957f, 5.681880f, 43.694244f, -5.861135f, 1.639917f, 53.478088f, -8.980489f, 3.165865f, 55.744457f, -9.483842f, 4.570985f, 55.744457f, -9.483842f, 4.570985f, 55.744457f, -6.854596f, 5.761014f, 52.715530f, -5.861135f, 1.639917f, 53.478088f, -8.320417f, 5.422955f, 48.878498f, -10.229669f, 4.314857f, 55.744457f, -10.231610f, 3.514750f, 55.744457f, -10.231610f, 3.514750f, 55.744457f, -8.509175f, 1.068752f, 48.895195f, -8.320417f, 5.422955f, 48.878498f, -8.509175f, 1.068752f, 48.895195f, -10.231610f, 3.514750f, 55.744457f, -8.980489f, 3.165865f, 55.744457f, -8.980489f, 3.165865f, 55.744457f, -5.861135f, 1.639917f, 53.478088f, -8.509175f, 1.068752f, 48.895195f, -6.854596f, 5.761014f, 52.715530f, -9.483842f, 4.570985f, 55.744457f, -10.229669f, 4.314857f, 55.744457f, -10.229669f, 4.314857f, 55.744457f, -8.320417f, 5.422955f, 48.878498f, -6.854596f, 5.761014f, 52.715530f, 0.114188f, -5.271675f, 40.927006f, 0.283189f, -5.667732f, 39.128136f, 0.220241f, -6.632166f, 34.222805f, 0.220241f, -6.632166f, 34.222805f, -0.047018f, -6.856034f, 32.473053f, 0.114188f, -5.271675f, 40.927006f, 7.314791f, -9.341828f, 33.737534f, 4.032390f, -7.922213f, 34.709949f, 3.894432f, -6.999287f, 38.999115f, 3.894432f, -6.999287f, 38.999115f, 7.320009f, -7.912378f, 40.945305f, 7.314791f, -9.341828f, 33.737534f, 0.114188f, -5.271675f, 40.927006f, 7.320009f, -7.912378f, 40.945305f, 3.894432f, -6.999287f, 38.999115f, 3.894432f, -6.999287f, 38.999115f, 0.283189f, -5.667732f, 39.128136f, 0.114188f, -5.271675f, 40.927006f, 7.314791f, -9.341828f, 33.737534f, -0.047018f, -6.856034f, 32.473053f, 0.220241f, -6.632166f, 34.222805f, 0.220241f, -6.632166f, 34.222805f, 4.032390f, -7.922213f, 34.709949f, 7.314791f, -9.341828f, 33.737534f, 0.220241f, -6.632166f, 34.222805f, 0.283189f, -5.667732f, 39.128136f, 1.251503f, -5.247501f, 37.201290f, 1.251503f, -5.247501f, 37.201290f, 1.256280f, -4.414838f, 34.583401f, 0.220241f, -6.632166f, 34.222805f, 0.283189f, -5.667732f, 39.128136f, 3.894432f, -6.999287f, 38.999115f, 3.653726f, -6.376678f, 37.277554f, 3.653726f, -6.376678f, 37.277554f, 1.251503f, -5.247501f, 37.201290f, 0.283189f, -5.667732f, 39.128136f, 3.894432f, -6.999287f, 38.999115f, 4.032390f, -7.922213f, 34.709949f, 3.668271f, -5.650332f, 34.978966f, 3.668271f, -5.650332f, 34.978966f, 3.653726f, -6.376678f, 37.277554f, 3.894432f, -6.999287f, 38.999115f, 4.032390f, -7.922213f, 34.709949f, 0.220241f, -6.632166f, 34.222805f, 1.256280f, -4.414838f, 34.583401f, 1.256280f, -4.414838f, 34.583401f, 3.668271f, -5.650332f, 34.978966f, 4.032390f, -7.922213f, 34.709949f, 5.734873f, 29.086515f, 14.934714f, 6.155193f, 24.991884f, 8.632037f, 7.438042f, 25.047373f, 8.677461f, 7.438042f, 25.047373f, 8.677461f, 7.455090f, 29.096563f, 14.903179f, 5.734873f, 29.086515f, 14.934714f, 6.355259f, 28.509245f, 21.455393f, 5.734873f, 29.086515f, 14.934714f, 7.455090f, 29.096563f, 14.903179f, 7.455090f, 29.096563f, 14.903179f, 7.449881f, 28.499632f, 21.485111f, 6.355259f, 28.509245f, 21.455393f, 6.044722f, 36.033566f, 32.743652f, 6.355259f, 28.509245f, 21.455393f, 7.449881f, 28.499632f, 21.485111f, 7.449881f, 28.499632f, 21.485111f, 7.480425f, 36.037731f, 32.738682f, 6.044722f, 36.033566f, 32.743652f, 7.451022f, 27.981888f, 42.640167f, 3.680145f, 27.997072f, 42.629868f, 6.044722f, 36.033566f, 32.743652f, 6.044722f, 36.033566f, 32.743652f, 7.480425f, 36.037731f, 32.738682f, 7.451022f, 27.981888f, 42.640167f, 6.155193f, 24.991884f, 8.632037f, 5.476238f, 27.080624f, 3.887028f, 7.448072f, 27.173620f, 4.010532f, 7.448072f, 27.173620f, 4.010532f, 7.438042f, 25.047373f, 8.677461f, 6.155193f, 24.991884f, 8.632037f, 7.438875f, 24.654293f, 0.000000f, 6.560344f, 24.639845f, 0.000000f, 4.992514f, 8.669660f, 0.000000f, 4.992514f, 8.669660f, 0.000000f, 7.347628f, -0.345043f, 0.000000f, 7.438875f, 24.654293f, 0.000000f, -0.296664f, -7.294125f, 28.770905f, -4.095365f, -1.711470f, 29.019276f, -0.047018f, -6.856034f, 32.473053f, -0.047018f, -6.856034f, 32.473053f, 1.080373f, -8.575625f, 31.963448f, -0.296664f, -7.294125f, 28.770905f, -3.737267f, -1.586870f, 31.882002f, -0.047018f, -6.856034f, 32.473053f, -4.095365f, -1.711470f, 29.019276f, -10.229669f, 4.314857f, 55.744457f, -9.483842f, 4.570985f, 55.744457f, -8.980489f, 3.165865f, 55.744457f, -8.980489f, 3.165865f, 55.744457f, -10.231610f, 3.514750f, 55.744457f, -10.229669f, 4.314857f, 55.744457f, 20.209656f, -3.862938f, -0.000000f, 18.727179f, -1.297473f, 0.000000f, 16.127314f, -1.264982f, 0.000000f, 16.127314f, -1.264982f, 0.000000f, 18.977581f, -3.897727f, -0.000000f, 20.209656f, -3.862938f, -0.000000f, 18.977581f, -3.897727f, -0.000000f, 16.127314f, -1.264982f, 0.000000f, 18.806473f, -4.885337f, 0.000000f, 18.806473f, -4.885337f, 0.000000f, 16.127314f, -1.264982f, 0.000000f, 17.675398f, -4.861373f, 0.000000f, 17.675398f, -4.861373f, 0.000000f, 16.127314f, -1.264982f, 0.000000f, 15.461807f, -4.140471f, 0.000000f, 15.461807f, -4.140471f, 0.000000f, 17.504288f, -5.848987f, 0.000000f, 17.675398f, -4.861373f, 0.000000f, 18.727179f, -1.297473f, 0.000000f, 14.528370f, 5.922650f, 0.000000f, 16.127314f, -1.264982f, 0.000000f, 14.528370f, 5.922650f, 0.000000f, 11.856124f, -1.032645f, 0.000000f, 16.127314f, -1.264982f, 0.000000f, 16.127314f, -1.264982f, 0.000000f, 11.856124f, -1.032645f, 0.000000f, 15.461807f, -4.140471f, 0.000000f, 18.806473f, -4.885337f, 0.000000f, 17.631454f, -4.292431f, 1.438478f, 18.443754f, -3.586349f, 1.297154f, 18.443754f, -3.586349f, 1.297154f, 18.977581f, -3.897727f, -0.000000f, 18.806473f, -4.885337f, 0.000000f, 17.675398f, -4.861373f, 0.000000f, 17.631454f, -4.292431f, 1.438478f, 18.806473f, -4.885337f, 0.000000f, 17.504288f, -5.848987f, 0.000000f, 16.886425f, -4.940037f, 1.568099f, 17.631454f, -4.292431f, 1.438478f, 17.631454f, -4.292431f, 1.438478f, 17.675398f, -4.861373f, 0.000000f, 17.504288f, -5.848987f, 0.000000f, 18.977581f, -3.897727f, -0.000000f, 18.443754f, -3.586349f, 1.297154f, 20.209656f, -3.862938f, -0.000000f, 18.443754f, -3.586349f, 1.297154f, 19.282759f, -2.856338f, 1.151509f, 20.209656f, -3.862938f, -0.000000f, 15.461807f, -4.140471f, 0.000000f, 14.767524f, -3.547750f, 3.397244f, 16.886425f, -4.940037f, 1.568099f, 16.886425f, -4.940037f, 1.568099f, 17.504288f, -5.848987f, 0.000000f, 15.461807f, -4.140471f, 0.000000f, 11.856124f, -1.032645f, 0.000000f, 14.767524f, -3.547750f, 3.397244f, 15.461807f, -4.140471f, 0.000000f, 18.727179f, -1.297473f, 0.000000f, 17.495457f, -0.090444f, 3.409453f, 14.528370f, 5.922650f, 0.000000f, 18.727179f, -1.297473f, 0.000000f, 20.209656f, -3.862938f, -0.000000f, 19.282759f, -2.856338f, 1.151509f, 19.282759f, -2.856338f, 1.151509f, 17.495457f, -0.090444f, 3.409453f, 18.727179f, -1.297473f, 0.000000f, 17.631454f, -4.292431f, 1.438478f, 17.495457f, -0.090444f, 3.409453f, 18.443754f, -3.586349f, 1.297154f, 16.886425f, -4.940037f, 1.568099f, 17.495457f, -0.090444f, 3.409453f, 17.631454f, -4.292431f, 1.438478f, 18.443754f, -3.586349f, 1.297154f, 17.495457f, -0.090444f, 3.409453f, 19.282759f, -2.856338f, 1.151509f, 14.767524f, -3.547750f, 3.397244f, 17.495457f, -0.090444f, 3.409453f, 16.886425f, -4.940037f, 1.568099f, 14.767524f, -3.547750f, 3.397244f, 15.717390f, -6.157343f, 6.537314f, 19.611834f, -1.503649f, 6.819679f, 19.611834f, -1.503649f, 6.819679f, 17.495457f, -0.090444f, 3.409453f, 14.767524f, -3.547750f, 3.397244f, 17.495457f, -0.090444f, 3.409453f, 19.611834f, -1.503649f, 6.819679f, 17.574598f, 9.627490f, 6.911485f, 17.574598f, 9.627490f, 6.911485f, 14.528370f, 5.922650f, 0.000000f, 17.495457f, -0.090444f, 3.409453f, 14.767524f, -3.547750f, 3.397244f, 7.332893f, -4.468502f, 3.035453f, 7.318575f, -8.181732f, 7.251115f, 7.318575f, -8.181732f, 7.251115f, 15.717390f, -6.157343f, 6.537314f, 14.767524f, -3.547750f, 3.397244f, 7.332893f, -4.468502f, 3.035453f, 14.767524f, -3.547750f, 3.397244f, 11.856124f, -1.032645f, 0.000000f, 11.856124f, -1.032645f, 0.000000f, 7.347628f, -0.345043f, 0.000000f, 7.332893f, -4.468502f, 3.035453f, 17.574598f, 9.627490f, 6.911485f, 7.404200f, 15.154014f, 6.717684f, 9.768484f, 8.652227f, 0.000000f, 9.768484f, 8.652227f, 0.000000f, 14.528370f, 5.922650f, 0.000000f, 17.574598f, 9.627490f, 6.911485f, 7.390337f, 11.355589f, 25.343040f, 7.404200f, 15.154014f, 6.717684f, 17.574598f, 9.627490f, 6.911485f, 17.574598f, 9.627490f, 6.911485f, 15.936548f, 6.715140f, 25.493473f, 7.390337f, 11.355589f, 25.343040f, 15.936548f, 6.715140f, 25.493473f, 17.085196f, 7.535858f, 29.997444f, 7.392986f, 12.969517f, 30.596918f, 7.392986f, 12.969517f, 30.596918f, 7.390337f, 11.355589f, 25.343040f, 15.936548f, 6.715140f, 25.493473f, 17.085196f, 7.535858f, 29.997444f, 15.764883f, 5.300316f, 43.846039f, 7.389394f, 10.209548f, 43.675125f, 7.389394f, 10.209548f, 43.675125f, 7.392986f, 12.969517f, 30.596918f, 17.085196f, 7.535858f, 29.997444f, 9.768484f, 8.652227f, 0.000000f, 10.714760f, 20.037420f, 5.779599f, 9.419173f, 27.066231f, 3.887028f, 9.419173f, 27.066231f, 3.887028f, 8.317277f, 24.633436f, 0.000000f, 9.768484f, 8.652227f, 0.000000f, 10.714760f, 20.037420f, 5.779599f, 9.991334f, 17.705053f, 10.245268f, 8.720451f, 24.982521f, 8.632037f, 8.720451f, 24.982521f, 8.632037f, 9.419173f, 27.066231f, 3.887028f, 10.714760f, 20.037420f, 5.779599f, 9.991334f, 17.705053f, 10.245268f, 10.778464f, 19.989239f, 17.045088f, 9.175188f, 29.073957f, 14.934714f, 9.175188f, 29.073957f, 14.934714f, 8.720451f, 24.982521f, 8.632037f, 9.991334f, 17.705053f, 10.245268f, 10.778464f, 19.989239f, 17.045088f, 10.661654f, 15.570215f, 24.428383f, 8.544544f, 28.501253f, 21.455393f, 8.544544f, 28.501253f, 21.455393f, 9.175188f, 29.073957f, 14.934714f, 10.778464f, 19.989239f, 17.045088f, 10.661654f, 15.570215f, 24.428383f, 11.292462f, 27.969028f, 42.629868f, 8.916059f, 36.023087f, 32.743652f, 8.916059f, 36.023087f, 32.743652f, 8.544544f, 28.501253f, 21.455393f, 10.661654f, 15.570215f, 24.428383f, 7.404200f, 15.154014f, 6.717684f, 7.395069f, 12.652242f, 3.473820f, 9.768484f, 8.652227f, 0.000000f, 9.768484f, 8.652227f, 0.000000f, 7.395069f, 12.652242f, 3.473820f, 10.714760f, 20.037420f, 5.779599f, 15.936548f, 6.715140f, 25.493473f, 17.574598f, 9.627490f, 6.911485f, 19.611834f, -1.503649f, 6.819679f, 19.611834f, -1.503649f, 6.819679f, 17.948919f, -0.135040f, 19.269463f, 15.936548f, 6.715140f, 25.493473f, 15.936548f, 6.715140f, 25.493473f, 17.948919f, -0.135040f, 19.269463f, 16.836815f, 2.170514f, 25.298950f, 17.948919f, -0.135040f, 19.269463f, 19.415737f, -4.132664f, 15.678835f, 19.449072f, -4.646804f, 21.355616f, 19.449072f, -4.646804f, 21.355616f, 16.836815f, 2.170514f, 25.298950f, 17.948919f, -0.135040f, 19.269463f, 19.415737f, -4.132664f, 15.678835f, 15.046353f, -7.119816f, 13.588383f, 13.228415f, -8.724550f, 17.677410f, 13.228415f, -8.724550f, 17.677410f, 19.449072f, -4.646804f, 21.355616f, 19.415737f, -4.132664f, 15.678835f, 15.046353f, -7.119816f, 13.588383f, 10.838140f, -7.383258f, 13.126703f, 10.520519f, -7.773556f, 14.155172f, 15.046353f, -7.119816f, 13.588383f, 10.520519f, -7.773556f, 14.155172f, 10.178280f, -8.191515f, 15.255916f, 15.046353f, -7.119816f, 13.588383f, 10.178280f, -8.191515f, 15.255916f, 10.064029f, -8.826984f, 17.070992f, 15.046353f, -7.119816f, 13.588383f, 10.064029f, -8.826984f, 17.070992f, 13.228415f, -8.724550f, 17.677410f, 15.764883f, 5.300316f, 43.846039f, 14.186281f, -0.591499f, 45.610146f, 7.342481f, -1.755349f, 46.878002f, 7.342481f, -1.755349f, 46.878002f, 7.389394f, 10.209548f, 43.675125f, 15.764883f, 5.300316f, 43.846039f, 13.534257f, -8.606539f, 31.960472f, 14.914590f, -7.331017f, 28.766878f, 7.312078f, -10.085270f, 28.536547f, 7.312078f, -10.085270f, 28.536547f, 7.308156f, -11.159800f, 32.688374f, 13.534257f, -8.606539f, 31.960472f, 14.914590f, -7.331017f, 28.766878f, 12.771220f, -4.209557f, 25.367369f, 7.327550f, -5.846064f, 24.956141f, 7.327550f, -5.846064f, 24.956141f, 7.312078f, -10.085270f, 28.536547f, 14.914590f, -7.331017f, 28.766878f, 13.407806f, -5.291871f, 37.201290f, 13.409106f, -4.459196f, 34.583401f, 10.988160f, -5.677050f, 34.978966f, 10.988160f, -5.677050f, 34.978966f, 10.997403f, -6.403482f, 37.277554f, 13.407806f, -5.291871f, 37.201290f, 10.714760f, 20.037420f, 5.779599f, 7.421850f, 19.989561f, 5.611809f, 7.411455f, 17.763485f, 10.409961f, 7.411455f, 17.763485f, 10.409961f, 9.991334f, 17.705053f, 10.245268f, 10.714760f, 20.037420f, 5.779599f, 7.422492f, 20.165249f, 17.050919f, 10.778464f, 19.989239f, 17.045088f, 9.991334f, 17.705053f, 10.245268f, 9.991334f, 17.705053f, 10.245268f, 7.411455f, 17.763485f, 10.409961f, 7.422492f, 20.165249f, 17.050919f, 10.778464f, 19.989239f, 17.045088f, 7.422492f, 20.165249f, 17.050919f, 7.402476f, 15.512046f, 24.353392f, 7.402476f, 15.512046f, 24.353392f, 10.661654f, 15.570215f, 24.428383f, 10.778464f, 19.989239f, 17.045088f, 10.661654f, 15.570215f, 24.428383f, 7.402476f, 15.512046f, 24.353392f, 7.451022f, 27.981888f, 42.640167f, 7.451022f, 27.981888f, 42.640167f, 11.292462f, 27.969028f, 42.629868f, 10.661654f, 15.570215f, 24.428383f, 10.714760f, 20.037420f, 5.779599f, 7.395069f, 12.652242f, 3.473820f, 7.421850f, 19.989561f, 5.611809f, 10.178280f, -8.191515f, 15.255916f, 10.520519f, -7.773556f, 14.155172f, 9.757647f, -7.976467f, 14.516864f, 10.178280f, -8.191515f, 15.255916f, 9.480849f, -8.525368f, 16.012430f, 10.064029f, -8.826984f, 17.070992f, 10.520519f, -7.773556f, 14.155172f, 10.838140f, -7.383258f, 13.126703f, 10.132405f, -7.669329f, 13.743653f, 13.228415f, -8.724550f, 17.677410f, 13.583903f, -4.734566f, 20.261789f, 15.474106f, -3.582813f, 21.358763f, 15.474106f, -3.582813f, 21.358763f, 19.449072f, -4.646804f, 21.355616f, 13.228415f, -8.724550f, 17.677410f, 19.415737f, -4.132664f, 15.678835f, 17.345793f, -2.520926f, 13.083079f, 15.063190f, -5.502612f, 12.146640f, 15.063190f, -5.502612f, 12.146640f, 15.046353f, -7.119816f, 13.588383f, 19.415737f, -4.132664f, 15.678835f, 10.064029f, -8.826984f, 17.070992f, 9.766815f, -5.954780f, 18.927929f, 13.583903f, -4.734566f, 20.261789f, 13.583903f, -4.734566f, 20.261789f, 13.228415f, -8.724550f, 17.677410f, 10.064029f, -8.826984f, 17.070992f, 15.046353f, -7.119816f, 13.588383f, 15.063190f, -5.502612f, 12.146640f, 10.940862f, -6.577568f, 12.173764f, 10.940862f, -6.577568f, 12.173764f, 10.838140f, -7.383258f, 13.126703f, 15.046353f, -7.119816f, 13.588383f, 9.480849f, -8.525368f, 16.012430f, 8.657505f, -6.656920f, 16.045710f, 9.766815f, -5.954780f, 18.927929f, 9.766815f, -5.954780f, 18.927929f, 10.064029f, -8.826984f, 17.070992f, 9.480849f, -8.525368f, 16.012430f, 10.838140f, -7.383258f, 13.126703f, 10.940862f, -6.577568f, 12.173764f, 9.170033f, -6.832619f, 13.787570f, 9.170033f, -6.832619f, 13.787570f, 10.132405f, -7.669329f, 13.743653f, 10.838140f, -7.383258f, 13.126703f, 10.178280f, -8.191515f, 15.255916f, 9.289386f, -6.574497f, 15.408227f, 8.657505f, -6.656920f, 16.045710f, 8.657505f, -6.656920f, 16.045710f, 9.480849f, -8.525368f, 16.012430f, 10.178280f, -8.191515f, 15.255916f, 10.520519f, -7.773556f, 14.155172f, 9.578681f, -6.660942f, 14.224989f, 8.757914f, -6.818400f, 14.691280f, 8.757914f, -6.818400f, 14.691280f, 9.757647f, -7.976467f, 14.516864f, 10.520519f, -7.773556f, 14.155172f, 10.132405f, -7.669329f, 13.743653f, 9.170033f, -6.832619f, 13.787570f, 9.578681f, -6.660942f, 14.224989f, 9.578681f, -6.660942f, 14.224989f, 10.520519f, -7.773556f, 14.155172f, 10.132405f, -7.669329f, 13.743653f, 9.757647f, -7.976467f, 14.516864f, 8.757914f, -6.818400f, 14.691280f, 9.289386f, -6.574497f, 15.408227f, 9.289386f, -6.574497f, 15.408227f, 10.178280f, -8.191515f, 15.255916f, 9.757647f, -7.976467f, 14.516864f, 19.449072f, -4.646804f, 21.355616f, 15.474106f, -3.582813f, 21.358763f, 16.836815f, 2.170514f, 25.298950f, 19.415737f, -4.132664f, 15.678835f, 17.948919f, -0.135040f, 19.269463f, 17.345793f, -2.520926f, 13.083079f, 8.657505f, -6.656920f, 16.045710f, 7.323162f, -7.048462f, 15.838820f, 7.324408f, -6.706909f, 18.302906f, 7.324408f, -6.706909f, 18.302906f, 9.766815f, -5.954780f, 18.927929f, 8.657505f, -6.656920f, 16.045710f, 10.940862f, -6.577568f, 12.173764f, 7.321089f, -7.616257f, 11.742564f, 7.321928f, -7.386584f, 13.399504f, 7.321928f, -7.386584f, 13.399504f, 9.170033f, -6.832619f, 13.787570f, 10.940862f, -6.577568f, 12.173764f, 9.289386f, -6.574497f, 15.408227f, 7.322854f, -7.132998f, 15.228947f, 7.323162f, -7.048462f, 15.838820f, 7.323162f, -7.048462f, 15.838820f, 8.657505f, -6.656920f, 16.045710f, 9.289386f, -6.574497f, 15.408227f, 9.578681f, -6.660942f, 14.224989f, 7.322289f, -7.287514f, 14.114231f, 7.322489f, -7.232655f, 14.509995f, 7.322489f, -7.232655f, 14.509995f, 8.757914f, -6.818400f, 14.691280f, 9.578681f, -6.660942f, 14.224989f, 9.170033f, -6.832619f, 13.787570f, 7.321928f, -7.386584f, 13.399504f, 7.322289f, -7.287514f, 14.114231f, 7.322289f, -7.287514f, 14.114231f, 9.578681f, -6.660942f, 14.224989f, 9.170033f, -6.832619f, 13.787570f, 8.757914f, -6.818400f, 14.691280f, 7.322489f, -7.232655f, 14.509995f, 7.322854f, -7.132998f, 15.228947f, 7.322854f, -7.132998f, 15.228947f, 9.289386f, -6.574497f, 15.408227f, 8.757914f, -6.818400f, 14.691280f, 10.940862f, -6.577568f, 12.173764f, 7.318575f, -8.181732f, 7.251115f, 7.321089f, -7.616257f, 11.742564f, 15.717390f, -6.157343f, 6.537314f, 7.318575f, -8.181732f, 7.251115f, 10.940862f, -6.577568f, 12.173764f, 10.940862f, -6.577568f, 12.173764f, 15.063190f, -5.502612f, 12.146640f, 15.717390f, -6.157343f, 6.537314f, 9.766815f, -5.954780f, 18.927929f, 12.771220f, -4.209557f, 25.367369f, 13.583903f, -4.734566f, 20.261789f, 7.324408f, -6.706909f, 18.302906f, 7.327550f, -5.846064f, 24.956141f, 12.771220f, -4.209557f, 25.367369f, 12.771220f, -4.209557f, 25.367369f, 9.766815f, -5.954780f, 18.927929f, 7.324408f, -6.706909f, 18.302906f, 17.345793f, -2.520926f, 13.083079f, 19.611834f, -1.503649f, 6.819679f, 15.717390f, -6.157343f, 6.537314f, 15.717390f, -6.157343f, 6.537314f, 15.063190f, -5.502612f, 12.146640f, 17.345793f, -2.520926f, 13.083079f, 17.948919f, -0.135040f, 19.269463f, 19.611834f, -1.503649f, 6.819679f, 17.345793f, -2.520926f, 13.083079f, 12.771220f, -4.209557f, 25.367369f, 16.836815f, 2.170514f, 25.298950f, 15.474106f, -3.582813f, 21.358763f, 15.474106f, -3.582813f, 21.358763f, 13.583903f, -4.734566f, 20.261789f, 12.771220f, -4.209557f, 25.367369f, 7.347628f, -0.345043f, 0.000000f, 11.856124f, -1.032645f, 0.000000f, 14.528370f, 5.922650f, 0.000000f, 14.528370f, 5.922650f, 0.000000f, 9.768484f, 8.652227f, 0.000000f, 7.347628f, -0.345043f, 0.000000f, 9.419173f, 27.066231f, 3.887028f, 7.448072f, 27.173620f, 4.010532f, 7.438875f, 24.654293f, 0.000000f, 7.438875f, 24.654293f, 0.000000f, 8.317277f, 24.633436f, 0.000000f, 9.419173f, 27.066231f, 3.887028f, 15.764883f, 5.300316f, 43.846039f, 15.398161f, 6.227328f, 47.229149f, 13.922662f, -0.086341f, 48.652729f, 13.922662f, -0.086341f, 48.652729f, 14.186281f, -0.591499f, 45.610146f, 15.764883f, 5.300316f, 43.846039f, 18.722847f, 5.664664f, 45.879768f, 16.430836f, 4.127841f, 39.671680f, 17.347752f, -1.501161f, 40.807026f, 17.347752f, -1.501161f, 40.807026f, 19.166872f, -0.439006f, 45.890106f, 18.722847f, 5.664664f, 45.879768f, 15.764883f, 5.300316f, 43.846039f, 16.430836f, 4.127841f, 39.671680f, 18.722847f, 5.664664f, 45.879768f, 18.722847f, 5.664664f, 45.879768f, 15.398161f, 6.227328f, 47.229149f, 15.764883f, 5.300316f, 43.846039f, 19.166872f, -0.439006f, 45.890106f, 17.347752f, -1.501161f, 40.807026f, 14.186281f, -0.591499f, 45.610146f, 14.186281f, -0.591499f, 45.610146f, 13.922662f, -0.086341f, 48.652729f, 19.166872f, -0.439006f, 45.890106f, 12.771220f, -4.209557f, 25.367369f, 14.914590f, -7.331017f, 28.766878f, 18.842646f, -1.809262f, 29.013023f, 18.842646f, -1.809262f, 29.013023f, 16.836815f, 2.170514f, 25.298950f, 12.771220f, -4.209557f, 25.367369f, 18.528133f, -1.663332f, 31.894547f, 17.347752f, -1.501161f, 40.807026f, 16.430836f, 4.127841f, 39.671680f, 16.430836f, 4.127841f, 39.671680f, 17.085196f, 7.535858f, 29.997444f, 18.528133f, -1.663332f, 31.894547f, 16.430836f, 4.127841f, 39.671680f, 15.764883f, 5.300316f, 43.846039f, 17.085196f, 7.535858f, 29.997444f, 14.571514f, -5.343407f, 40.930904f, 14.186281f, -0.591499f, 45.610146f, 17.347752f, -1.501161f, 40.807026f, 17.085196f, 7.535858f, 29.997444f, 15.936548f, 6.715140f, 25.493473f, 16.836815f, 2.170514f, 25.298950f, 16.836815f, 2.170514f, 25.298950f, 18.842646f, -1.809262f, 29.013023f, 17.085196f, 7.535858f, 29.997444f, 18.842646f, -1.809262f, 29.013023f, 18.528133f, -1.663332f, 31.894547f, 17.085196f, 7.535858f, 29.997444f, 14.186281f, -0.591499f, 45.610146f, 14.571514f, -5.343407f, 40.930904f, 7.320009f, -7.912378f, 40.945305f, 7.320009f, -7.912378f, 40.945305f, 7.342481f, -1.755349f, 46.878002f, 14.186281f, -0.591499f, 45.610146f, 7.314791f, -9.341828f, 33.737534f, 14.683560f, -6.901972f, 32.471439f, 13.534257f, -8.606539f, 31.960472f, 13.534257f, -8.606539f, 31.960472f, 7.308156f, -11.159800f, 32.688374f, 7.314791f, -9.341828f, 33.737534f, 17.347752f, -1.501161f, 40.807026f, 18.528133f, -1.663332f, 31.894547f, 14.683560f, -6.901972f, 32.471439f, 14.683560f, -6.901972f, 32.471439f, 14.571514f, -5.343407f, 40.930904f, 17.347752f, -1.501161f, 40.807026f, 15.398161f, 6.227328f, 47.229149f, 16.094458f, 5.721723f, 54.928432f, 15.006015f, 1.519569f, 55.115219f, 15.006015f, 1.519569f, 55.115219f, 13.922662f, -0.086341f, 48.652729f, 15.398161f, 6.227328f, 47.229149f, 19.166872f, -0.439006f, 45.890106f, 19.285433f, 1.019830f, 51.916763f, 19.018568f, 5.331750f, 51.836819f, 19.018568f, 5.331750f, 51.836819f, 18.722847f, 5.664664f, 45.879768f, 19.166872f, -0.439006f, 45.890106f, 13.922662f, -0.086341f, 48.652729f, 15.006015f, 1.519569f, 55.115219f, 19.285433f, 1.019830f, 51.916763f, 19.285433f, 1.019830f, 51.916763f, 19.166872f, -0.439006f, 45.890106f, 13.922662f, -0.086341f, 48.652729f, 18.722847f, 5.664664f, 45.879768f, 19.018568f, 5.331750f, 51.836819f, 16.094458f, 5.721723f, 54.928432f, 16.094458f, 5.721723f, 54.928432f, 15.398161f, 6.227328f, 47.229149f, 18.722847f, 5.664664f, 45.879768f, 15.006015f, 1.519569f, 55.115219f, 16.094458f, 5.721723f, 54.928432f, 17.434431f, 4.480306f, 58.874214f, 17.434431f, 4.480306f, 58.874214f, 17.096628f, 3.139414f, 58.951324f, 15.006015f, 1.519569f, 55.115219f, 19.018568f, 5.331750f, 51.836819f, 19.285433f, 1.019830f, 51.916763f, 18.274830f, 3.296629f, 58.839859f, 18.274830f, 3.296629f, 58.839859f, 18.170647f, 4.230951f, 58.858616f, 19.018568f, 5.331750f, 51.836819f, 19.285433f, 1.019830f, 51.916763f, 15.006015f, 1.519569f, 55.115219f, 17.096628f, 3.139414f, 58.951324f, 17.096628f, 3.139414f, 58.951324f, 18.274830f, 3.296629f, 58.839859f, 19.285433f, 1.019830f, 51.916763f, 16.094458f, 5.721723f, 54.928432f, 19.018568f, 5.331750f, 51.836819f, 18.170647f, 4.230951f, 58.858616f, 18.170647f, 4.230951f, 58.858616f, 17.434431f, 4.480306f, 58.874214f, 16.094458f, 5.721723f, 54.928432f, 14.571514f, -5.343407f, 40.930904f, 14.683560f, -6.901972f, 32.471439f, 14.428933f, -6.684027f, 34.222805f, 14.428933f, -6.684027f, 34.222805f, 14.373026f, -5.719159f, 39.128136f, 14.571514f, -5.343407f, 40.930904f, 7.314791f, -9.341828f, 33.737534f, 7.320009f, -7.912378f, 40.945305f, 10.752159f, -7.024318f, 38.999115f, 10.752159f, -7.024318f, 38.999115f, 10.607469f, -7.946212f, 34.709949f, 7.314791f, -9.341828f, 33.737534f, 14.571514f, -5.343407f, 40.930904f, 14.373026f, -5.719159f, 39.128136f, 10.752159f, -7.024318f, 38.999115f, 10.752159f, -7.024318f, 38.999115f, 7.320009f, -7.912378f, 40.945305f, 14.571514f, -5.343407f, 40.930904f, 7.314791f, -9.341828f, 33.737534f, 10.607469f, -7.946212f, 34.709949f, 14.428933f, -6.684027f, 34.222805f, 14.428933f, -6.684027f, 34.222805f, 14.683560f, -6.901972f, 32.471439f, 7.314791f, -9.341828f, 33.737534f, 14.428933f, -6.684027f, 34.222805f, 13.409106f, -4.459196f, 34.583401f, 13.407806f, -5.291871f, 37.201290f, 13.407806f, -5.291871f, 37.201290f, 14.373026f, -5.719159f, 39.128136f, 14.428933f, -6.684027f, 34.222805f, 14.373026f, -5.719159f, 39.128136f, 13.407806f, -5.291871f, 37.201290f, 10.997403f, -6.403482f, 37.277554f, 10.997403f, -6.403482f, 37.277554f, 10.752159f, -7.024318f, 38.999115f, 14.373026f, -5.719159f, 39.128136f, 10.752159f, -7.024318f, 38.999115f, 10.997403f, -6.403482f, 37.277554f, 10.988160f, -5.677050f, 34.978966f, 10.988160f, -5.677050f, 34.978966f, 10.607469f, -7.946212f, 34.709949f, 10.752159f, -7.024318f, 38.999115f, 10.607469f, -7.946212f, 34.709949f, 10.988160f, -5.677050f, 34.978966f, 13.409106f, -4.459196f, 34.583401f, 13.409106f, -4.459196f, 34.583401f, 14.428933f, -6.684027f, 34.222805f, 10.607469f, -7.946212f, 34.709949f, 9.175188f, 29.073957f, 14.934714f, 7.455090f, 29.096563f, 14.903179f, 7.438042f, 25.047373f, 8.677461f, 7.438042f, 25.047373f, 8.677461f, 8.720451f, 24.982521f, 8.632037f, 9.175188f, 29.073957f, 14.934714f, 8.544544f, 28.501253f, 21.455393f, 7.449881f, 28.499632f, 21.485111f, 7.455090f, 29.096563f, 14.903179f, 7.455090f, 29.096563f, 14.903179f, 9.175188f, 29.073957f, 14.934714f, 8.544544f, 28.501253f, 21.455393f, 8.916059f, 36.023087f, 32.743652f, 7.480425f, 36.037731f, 32.738682f, 7.449881f, 28.499632f, 21.485111f, 7.449881f, 28.499632f, 21.485111f, 8.544544f, 28.501253f, 21.455393f, 8.916059f, 36.023087f, 32.743652f, 7.451022f, 27.981888f, 42.640167f, 7.480425f, 36.037731f, 32.738682f, 8.916059f, 36.023087f, 32.743652f, 8.916059f, 36.023087f, 32.743652f, 11.292462f, 27.969028f, 42.629868f, 7.451022f, 27.981888f, 42.640167f, 8.720451f, 24.982521f, 8.632037f, 7.438042f, 25.047373f, 8.677461f, 7.448072f, 27.173620f, 4.010532f, 7.448072f, 27.173620f, 4.010532f, 9.419173f, 27.066231f, 3.887028f, 8.720451f, 24.982521f, 8.632037f, 7.438875f, 24.654293f, 0.000000f, 7.347628f, -0.345043f, 0.000000f, 9.768484f, 8.652227f, 0.000000f, 9.768484f, 8.652227f, 0.000000f, 8.317277f, 24.633436f, 0.000000f, 7.438875f, 24.654293f, 0.000000f, 14.914590f, -7.331017f, 28.766878f, 13.534257f, -8.606539f, 31.960472f, 14.683560f, -6.901972f, 32.471439f, 14.683560f, -6.901972f, 32.471439f, 18.842646f, -1.809262f, 29.013023f, 14.914590f, -7.331017f, 28.766878f, 18.528133f, -1.663332f, 31.894547f, 18.842646f, -1.809262f, 29.013023f, 14.683560f, -6.901972f, 32.471439f, 18.170647f, 4.230951f, 58.858616f, 18.274830f, 3.296629f, 58.839859f, 17.096628f, 3.139414f, 58.951324f, 17.096628f, 3.139414f, 58.951324f, 17.434431f, 4.480306f, 58.874214f, 18.170647f, 4.230951f, 58.858616f }; + +// Constructor +Pikachu::Pikachu(Display * display) : Model() +{ + glUseCanvas(display); +} + +/** +* @brief Model setup. +* @retval None +*/ +void Pikachu::Setup() +{ + SetFixedScaleMode(0.1f); + + glPointSize(4); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + gluPerspective(30.0, 1.7647f, 0.1f, 9999.f); + + glMatrixMode(GL_MODELVIEW); +} + +/** +* @brief Renders a model for given view angle and scale. +* @param None +* @retval None +*/ +void Pikachu::Render() +{ + float scale = GetScaleValue(); + + glLoadIdentity(); + gluLookAt(0, 0, -15, 0, 3, 0, 0, 1, 0); + + glScalef(scale, scale, scale); + glRotatef(GetAngleValue(), 0.f, 1.f, 0.f); + glRotatef(-90.f, 1.f, 0.f, 0.f); + + DrawModel(); +} + +/* +void Pikachu::DrawModel(void) +{ + int i; + + for(i = 0; i < 412; i++) { + glBegin(GL_POLYGON); + glVertex3f(model[i], model[i+1], model[i+2]); + glVertex3f(model[i+3], model[i+4], model[i+5]); + glVertex3f(model[i+6], model[i+7], model[i+8]); + glEnd(); + } +} +*/ + +void Pikachu::DrawModel(void) +{ + int i; + + for(i = 0; i < 412; i++) { + + glBegin(GL_POLYGON); + glVertexFromMemory(i*3); + glVertexFromMemory(i*3 + 1); + glVertexFromMemory(i*3 + 2); + glEnd(); + } +} + +void Pikachu::glVertexFromMemory(int i) +{ + float x = model[i*3 + 0]; + float y = model[i*3 + 1]; + float z = model[i*3 + 2]; + + glVertex3f(x, y, z); +} \ No newline at end of file
diff -r ef3093a7a43e -r aca7fe2d44b3 Models/Pikachu.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Models/Pikachu.h Fri Nov 11 17:06:53 2016 +0000 @@ -0,0 +1,38 @@ +// +// Pikachu.h - example of usage graphics commands to create 3D graphics. +// +// This example is based on code written by +// Fabio de Albuquerque Dela Antonio (fabio914 at gmail.com) +// See : https://github.com/fabio914/arduinogl/blob/master/examples +// + +#pragma once + +#include <ArduinoGL.h> +#include "Model.h" + +/** +* @brief 3D model of the Pikachu :-) +*/ +class Pikachu : public Model +{ +public: + Pikachu(Display * display); + + /** + * @brief Model setup. + * @retval None + */ + void virtual Setup(); + + /** + * @brief Renders model for given view angle. + * @param None + * @retval None + */ + void virtual Render(); + +private: + void DrawModel(); + void glVertexFromMemory(int i); +}; \ No newline at end of file
diff -r ef3093a7a43e -r aca7fe2d44b3 Models/Pyramid.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Models/Pyramid.cpp Fri Nov 11 17:06:53 2016 +0000 @@ -0,0 +1,73 @@ +// +// Pyramid.cpp - example of usage graphics commands to create 3D graphics. +// +// This example is based on code written by +// Fabio de Albuquerque Dela Antonio (fabio914 at gmail.com) +// See : https://github.com/fabio914/arduinogl/blob/master/examples +// + +#include "Pyramid.h" + +// Constructor +Pyramid::Pyramid(Display * display) : Model() +{ + glUseCanvas(display); +} + +/** +* @brief Model setup. +* @retval None +*/ +void Pyramid::Setup() +{ + SetFixedScaleMode(2.5); + + glPointSize(4); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + gluPerspective(30.0, 1.7647f, 0.1f, 9999.f); + + glMatrixMode(GL_MODELVIEW); +} + +/** +* @brief Renders a model for given view angle and scale. +* @param None +* @retval None +*/ +void Pyramid::Render() +{ + float scale = GetScaleValue(); + + glLoadIdentity(); + gluLookAt(10, 8, -10, 0, 0, 0, 0, 1, 0); + + glRotatef(GetAngleValue(), 0.f, 1.f, 0.f); + glScalef(scale, scale, scale); + + DrawModel(); +} + + + +void Pyramid::DrawModel() +{ + + /* 3 triangles instead of 4 */ + glBegin(GL_TRIANGLE_STRIP); + glVertex3f(-1, -1, -1); + glVertex3f(1, -1, -1); + glVertex3f(0, 1, 0); + glVertex3f(1, -1, 1); + glVertex3f(-1, -1, 1); + glEnd(); + + glBegin(GL_POLYGON); + glVertex3f(-1, -1, 1); + glVertex3f(1, -1, 1); + glVertex3f(1, -1, -1); + glVertex3f(-1, -1, -1); + glEnd(); +} \ No newline at end of file
diff -r ef3093a7a43e -r aca7fe2d44b3 Models/Pyramid.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Models/Pyramid.h Fri Nov 11 17:06:53 2016 +0000 @@ -0,0 +1,36 @@ +// +// Pyramid.h - example of usage graphics commands to create 3D graphics. +// +// This example is based on code written by +// Fabio de Albuquerque Dela Antonio (fabio914 at gmail.com) +// See : https://github.com/fabio914/arduinogl/blob/master/examples +// +#pragma once + +#include <ArduinoGL.h> +#include "Model.h" + +/** +* @brief 3D model of the pyramid +*/ +class Pyramid : public Model +{ +public: + Pyramid(Display * display); + + /** + * @brief Model setup. + * @retval None + */ + void virtual Setup(); + + /** + * @brief Renders model for given view angle. + * @param None + * @retval None + */ + void virtual Render(); + +private: + void DrawModel(); +};
diff -r ef3093a7a43e -r aca7fe2d44b3 Models/Sphere.h --- a/Models/Sphere.h Fri Nov 11 15:30:07 2016 +0000 +++ b/Models/Sphere.h Fri Nov 11 17:06:53 2016 +0000 @@ -6,8 +6,7 @@ // See : https://github.com/fabio914/arduinogl/blob/master/examples // -#ifndef _SPHERE_H -#define _SPHERE_H +#pragma once #include <ArduinoGL.h> #include "Model.h" @@ -39,5 +38,3 @@ float _perspectiveAspect; }; - -#endif \ No newline at end of file
diff -r ef3093a7a43e -r aca7fe2d44b3 Models/Square.cpp --- a/Models/Square.cpp Fri Nov 11 15:30:07 2016 +0000 +++ b/Models/Square.cpp Fri Nov 11 17:06:53 2016 +0000 @@ -9,7 +9,7 @@ #include "Square.h" // Constructor -Square::Square(Display* display) : Angle() +Square::Square(Display* display) : Model() { glUseCanvas(display); } @@ -17,6 +17,10 @@ void Square::Setup() { + // Let model size change in the range 2 .. 8. + // Set 3 as initial size + SetShamScaleMode(3.f, 2.f, 8.f, 0.4f); + glPointSize(4); glMatrixMode(GL_PROJECTION); @@ -29,14 +33,10 @@ void Square::Render() { - // TODO : Use Scale() class - static float scale = 3.0; - static float scaleInc = 0.4; - const float maxScale = 8.0; - const float minScale = 2.0; + float scale = GetScaleValue(); glLoadIdentity(); - glRotatef(angle, 0.f, 0.f, 1.f); + glRotatef(GetAngleValue(), 0.f, 0.f, 1.f); glScalef(scale, scale, 0.f); glTranslatef(-0.5f, -0.5f, 0.f); @@ -46,12 +46,4 @@ glVertex3f(1.f, 0.f, 0.f); glVertex3f(1.f, 1.f, 0.f); glEnd(); - - scale += scaleInc; - - if(scale > maxScale) - scaleInc *= -1.f; - - if(scale < minScale) - scaleInc *= -1.f; } \ No newline at end of file
diff -r ef3093a7a43e -r aca7fe2d44b3 Models/Square.h --- a/Models/Square.h Fri Nov 11 15:30:07 2016 +0000 +++ b/Models/Square.h Fri Nov 11 17:06:53 2016 +0000 @@ -8,12 +8,12 @@ #pragma once #include <ArduinoGL.h> -#include "Angle.h" +#include "Model.h" /** * @brief 3D model of the square */ -class Square : public Angle +class Square : public Model { public: @@ -23,7 +23,7 @@ * @brief Model setup. * @retval None */ - void Setup(); + void virtual Setup(); /** * @brief Renders a square for given view angle. @@ -32,5 +32,5 @@ * @param None * @retval None */ - void Render(); + void virtual Render(); };
diff -r ef3093a7a43e -r aca7fe2d44b3 main.cpp --- a/main.cpp Fri Nov 11 15:30:07 2016 +0000 +++ b/main.cpp Fri Nov 11 17:06:53 2016 +0000 @@ -10,25 +10,25 @@ #include "Square.h" #include "Cube.h" #include "Sphere.h" +#include "Pyramid.h" +#include "Pikachu.h" +#include "Bunny.h" RK043FN48H display; +void SetTitle(char *name); + int main() { - // Draw text in the background - display.SetActiveLayer(Background); - display.DrawText(150, 20, "Sphere 3D demo."); - display.SetActiveLayer(Foreground); - + SetTitle("Pikachu 3D demo."); + // Initialize canvas Canvas canvas(display.DisplayWidth(), display.DisplayHeight()); - canvas.SetClearColor(0, 0, 0x55, 0); canvas.SetDrawColor(0xFF, 0x55, 0x55, 0xFF); // Initialize 3D model - Sphere model(&canvas); + Pikachu model(&canvas); model.Setup(); - //model.SetShamAngleMode(); while(true) { canvas.Clear(); @@ -37,4 +37,15 @@ wait(0.06f); } +} + + + + +void SetTitle(char *name) +{ + // Draw text in the background + display.SetActiveLayer(Background); + display.DrawText(150, 8, name); + display.SetActiveLayer(Foreground); } \ No newline at end of file