All Packages Class Hierarchy This Package Previous Next Index
Class java.media.j3d.TriangleArray
java.lang.Object
|
+----java.media.j3d.SceneGraphObject
|
+----java.media.j3d.NodeComponent
|
+----java.media.j3d.Geometry
|
+----java.media.j3d.GeometryArray
|
+----java.media.j3d.TriangleArray
- public class TriangleArray
- extends GeometryArray
The TriangleArray object draws the array of vertices as individual
triangles. Each group
of three vertices defines a triangle to be drawn.
-
TriangleArray(int, int)
- Constructs an empty TriangleArray object with the specified
number of vertices, and vertex format.
TriangleArray
public TriangleArray(int vertexCount,
int vertexFormat)
- Constructs an empty TriangleArray object with the specified
number of vertices, and vertex format.
- Parameters:
- vertexCount - the number of vertex elements in this array
- vertexFormat - a mask indicating which components are
present in each vertex. This is specified as one or more
individual flags that are bitwise "OR"ed together to describe
the per-vertex data.
The flags include: COORDINATES, to signal the inclusion of
vertex positions---always present; NORMALS, to signal
the inclusion of per vertex normals; one of COLOR_3,
COLOR_4, to signal the inclusion of per vertex
colors (without or with color information); and one of
TEXTURE_COORDINATE_2 or TEXTURE_COORDINATE_3, to signal the
inclusion of per-vertex texture coordinates 2D or 3D.
- Throws: IllegalArgumentException
- if vertexCount is less than
PRIM_SIZE or vertexCount is NOT multiple of PRIM_SIZE.
(PRIM_SIZE is 1 for point, 2 for line, 3 for triangle, 4 for quad etc)
All Packages Class Hierarchy This Package Previous Next Index