Java Reference
In-Depth Information
Figure 5. Geometry subclasses
Vertex 0
Vertex 2
Vertex 4
Vertex 0
Vertex 4
Vertex 2
Vertex 1
Vertex 3
Vertex 5
Vertex 5
Vertex 1
Vertex 3
PointArray
LineArray
Vertex 0
Vertex 2
Vertex 0
Vertex 2
Vertex 4
Vertex 1
Vertex 3
Vertex 5
Vertex 1
TriangleArray
Vertex 3
QuadArray
Figure 6. Specifying vertices of Shape3D objects
XArray myArray = new XArray(vertexCount, vertexFormat);
// Constructs and initializes an object with number of vertices given by vertexCount and
// type of components present in the vertex is given by vertexFormat.
// There are 4 types of flags that correspond to the mask in vertexFormat. They are
// coordinates, normals, one of color_3 or color_4 (without or with //color information);
// and one of texture_coordinate_2, texture_coordinate_3 or //texture_coordinate_4 (2D, // // 3D or 4D).
XArray myArray = new XArray(vertexCount1, vertexFormat2,
texCoordSetCount, texCoordSetMap);
// Constructs and initializes an object with number of vertices given by vertexCount1 and
// type of components present in vertex is given by vertexFormat. The number of texture // coordinate is given by the texCoordSetCount
and an array that maps texture coordinate // sets to texture units is given by texCoordSetMap.
Figure 7. Right hand coordinate system
+Y
+X
+Z
 
Search WWH ::




Custom Search