Back to project page DropIT.
The source code is released under:
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUC...
If you think the Android project DropIT listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package nu.danielsundberg.droid.dropit.rendering.object; // ww w . ja va 2 s . c o m public class RedBox extends MyRenderableObject { public RedBox(float x1, float y1, float rotation) { /** The initial vertex definition */ vertices = new float[]{ // Vertices according to faces -1f, -1f, 1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, 0.0f, 1.0f, 1f, -1f, 1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, 0.0f, 1.0f, -1f, 1f, 1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, 0.0f, 1.0f, 1f, 1f, 1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, 0.0f, 1.0f, 1f, -1f, 1f, 0.725f, 0.098f, 0.113f, 1f, 1.0f, 0.0f, 0.0f, 1f, -1f, -1f, 0.725f, 0.098f, 0.113f, 1f, 1.0f, 0.0f, 0.0f, 1f, 1f, 1f, 0.725f, 0.098f, 0.113f, 1f, 1.0f, 0.0f, 0.0f, 1f, 1f, -1f, 0.725f, 0.098f, 0.113f, 1f, 1.0f, 0.0f, 0.0f, 1f, -1f, -1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, 0.0f, -1.0f, -1f, -1f, -1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, 0.0f, -1.0f, 1f, 1f, -1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, 0.0f, -1.0f, -1f, 1f, -1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, 0.0f, -1.0f, -1f, -1f, -1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, 0.0f, -1.0f, -1f, -1f, 1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, 0.0f, -1.0f, -1f, 1f, -1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, 0.0f, -1.0f, -1f, 1f, 1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, 0.0f, -1.0f, -1f, 1f, -1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, -1.0f, 0.0f, 1f, 1f, -1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, -1.0f, 0.0f, -1f, 1f, 1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, -1.0f, 0.0f, 1f, 1f, 1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, -1.0f, 0.0f, -1f, 1f, 1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, 1.0f, 0.0f, 1f, 1f, 1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, 1.0f, 0.0f, -1f, 1f, -1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, 1.0f, 0.0f, 1f, 1f, -1f, 0.725f, 0.098f, 0.113f, 1f, 0.0f, 1.0f, 0.0f, }; /** The initial indices definition */ indices = new short[]{ // Faces definition 0, 1, 3, 0, 3, 2, // Face front 4, 5, 7, 4, 7, 6, // Face right 8, 9, 11, 8, 11, 10, // ... 12, 13, 15, 12, 15, 14, 16, 17, 19, 16, 19, 18, 20, 21, 23, 20, 23, 22, }; } }