Java Reference
In-Depth Information
Figure 3. Specifying texture coordinates with distortion for a triangular geometry object
Point2f q = new Point2f( 0.5f, 1.3f);
plane.setTextureCoordinate(0, q);
q.set(0.0f, 0.0f);
plane.setTextureCoordinate(1, q);
q.set(1.0f, 0.0f);
plane.setTextureCoordinate(2, q);
Texture image
texture propertIes
The specification of the texture coordinates for the vertices of a 3D object corresponds
to defining the mapping of the loaded 2D texture image to various 2D surfaces of the 3D
object. This is one of the properties that can be changed in applying texture to an object.
The other properties concern how the texture will blend in with the other attributes, say,
the color, of the object.
In general, the application of texture can be specified through changing appropriate
settings in the Texture and TextureAttributes classes. Figure 4 shows the relationship of
these two classes to an appearance object.
Figure 4. Texture, TextureAttributes and Appearance classes
Search WWH ::

Custom Search