TextureCubeMap is a subclass of Texture class. It defines a special kind of texture mapping which is composed of a set of six 2D images representating the six faces of a cube. The texture coordinate (s,t,r) is used as a 3D direction vector emanating from the center of a cube to select a particular face of the cube based on the largest magnitude coordinate (the major axis). A new 2D texture coordinate (s,t) is then determined by dividing the other two coordinates (the minor axes) by the major axis value. The new coordinate is then used for texel lookup from the selected texture image of this cube map. The TextureCubeMap image is defined by specifying the images for each face of the cube. The cube map texture can be thought of as centered at the orgin of and aligned to an XYZ coordinate system. The names of the cube faces are:
- POSITIVE_X
- NEGATIVE_X
- POSITIVE_Y
- NEGATIVE_Y
- POSITIVE_Z
- NEGATIVE_Z
Note that as of Java 3D 1.5, the texture width and height are no longer required to be an exact power of two. However, not all graphics devices supports non-power-of-two textures. If non-power-of-two texture mapping is unsupported on a particular Canvas3D, textures with a width or height that are not an exact power of two are ignored for that canvas.
@see Canvas3D#queryProperties
@since Java 3D 1.3