public enum EnvMap extends Enum<EnvMap>
Environment maps define a mapping from 3D directions to 2D pixel space locations. Environment maps are typically used in 3D rendering, for effects such as quickly approximating how shiny surfaces reflect their environment.
Environment maps can be stored in scanline-based or in tiled
OpenEXR files. The fact that an image is an environment map
is indicated by the presence of an EnvMapAttribute
whose name
is "envmap". (Convenience functions to access this attribute
are defined in @StandardAttributes
.)
The attribute's value defines the mapping from 3D directions
to 2D pixel space locations.
Enum Constant and Description |
---|
CUBE
Cube map.
|
LATLONG
Latitude-longitude environment map.
|
Modifier and Type | Method and Description |
---|---|
static EnvMap |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EnvMap[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EnvMap LATLONG
The environment is projected onto the image using polar coordinates
(latitude and longitude). A pixel's x coordinate corresponds to
its longitude, and the y coordinate corresponds to its latitude.
Pixel (dataWindow.min.x, dataWindow.min.y)
has latitude
+pi/2
and longitude +pi
;
pixel (dataWindow.max.x, dataWindow.max.y)
has
latitude -pi/2
and longitude -pi
.
In 3D space, latitudes -pi/2
and +pi/2
correspond to
the negative and positive y direction. Latitude 0, longitude 0 points
into positive z direction; and latitude 0, longitude pi/2
points
into positive x direction.
The size of the data window should be 2*N
by N
pixels
(width by height), where N
can be any integer greater
than 0.
public static final EnvMap CUBE
The environment is projected onto the six faces of an axis-aligned cube. The cube's faces are then arranged in a 2D image as shown below.
2-----------3 / /| / / | Y / / | | 6-----------7 | | | | | | | | | | | 0 | 1 *------- X | | / / | | / / | |/ / 4-----------5 Z dataWindow.min / / +-----------+ |3 Y 7| | | | | | | | ---+---Z | +X face | | | | | | |1 5| +-----------+ |6 Y 2| | | | | | | | Z---+--- | -X face | | | | | | |4 0| +-----------+ |6 Z 7| | | | | | | | ---+---X | +Y face | | | | | | |2 3| +-----------+ |0 1| | | | | | | | ---+---X | -Y face | | | | | | |4 Z 5| +-----------+ |7 Y 6| | | | | | | | X---+--- | +Z face | | | | | | |5 4| +-----------+ |2 Y 3| | | | | | | | ---+---X | -Z face | | | | | | |0 1| +-----------+ / / dataWindow.max
The size of the data window should be N
by 6*N
pixels
(width by height), where N
can be any integer greater
than 0.
public static EnvMap[] values()
for (EnvMap c : EnvMap.values()) System.out.println(c);
public static EnvMap valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is null