Specifications
Developers guidelines | 3D graphics with Java ME
44 June 2010
int INDICES[] = {2, 3, 0, 1, // Front Face
4, 5, 2, 3, // Left Face
6, 7, 4, 5, // Back Face
0, 1, 6, 7, // Right Face
4, 2, 6, 0, // Top Face
3, 5, 1, 7};// Bottom Face
int[] LENGTHS = new int[] {4, 4, 4, 4, 4, 4};
POSITIONS_ARRAY = new VertexArray(8, 3, 2);
POSITIONS_ARRAY.set(0, 8, POINTS);
INDEX_BUFFER = new TriangleStripArray(INDICES, LENGTHS);
To specify the texture and normal coordinates we must use four points for each face of
the cube:
short []POINTS = new short[] {-1, -1, 1, 1, -1, 1, 1, 1,
1, -1, 1, 1, // Front
1, -1,-1, -1, -1,-1, -1, 1,-
1, 1, 1,-1, // Back
-1, -1,-1, -1, -1, 1, -1, 1,
1, -1, 1,-1, // Left
1, -1, 1, 1, -1,-1, 1, 1,-
1, 1, 1, 1, // Right
-1, 1, 1, 1, 1, 1, 1, 1,-
1, -1, 1,-1, // Top
-1, -1,-1, 1, -1,-1, 1,-1,
1, -1,-1, 1};// Bottom
short []TEXTCOORDINATES = new short[] {0, 1, 1, 1, 1,
0, 0, 0,
0, 1, 1, 1, 1,
0, 0, 0,
0, 1, 1, 1, 1,
0, 0, 0,
0, 1, 1, 1, 1,
0, 0, 0,
0, 1, 1, 1, 1,
0, 0, 0,
0, 1, 1, 1, 1,
0, 0, 0};
Q: Camera alignment does not update for a given Node.
A: The node must be rendered for camera alignment to take place
Q: Why are some polygons in my scene flickering?
A: Micro3D uses the Z-sort method for each individual polygon. As a result,
overlapping polygons may flicker when rendered. We recommend models that avoid
overlapping as much as possible.