Use JSR 184 to create a 3D menu
|
Mobile Java Download MIDlet and source code>>
To use different textures on the cube we must have an appearance for each side of the cube.
Appearance []appearance = new Appearance[6];
for(int i=0; i<appearance.length; i++){ appearance[i] = new Appearance(); appearance[i].setPolygonMode(polygonMode); mesh.setAppearance(i, appearance[i]); } So, to change the texture we can do something like this:
Appearance f,t,b;
f = appearance1; // front
t = appearance3; // top b = appearance4; // bottom f.setTexture(0, texMenu[front]); t.setTexture(0, texMenu[top]); b.setTexture(0, texMenu[bottom]); | |||

3D graphics can be used for more than gaming. Here is an example of how a 3D menu can be created using JSR 184.
Technorati
