public class TextureCubeMap extends Texture
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.
Canvas3D.queryProperties()
Modifier and Type | Field and Description |
---|---|
static int |
NEGATIVE_X
Specifies the face of the cube that is pierced by the negative x axis
|
static int |
NEGATIVE_Y
Specifies the face of the cube that is pierced by the negative y axis
|
static int |
NEGATIVE_Z
Specifies the face of the cube that is pierced by the negative z axis
|
static int |
POSITIVE_X
Specifies the face of the cube that is pierced by the positive x axis
|
static int |
POSITIVE_Y
Specifies the face of the cube that is pierced by the positive y axis
|
static int |
POSITIVE_Z
Specifies the face of the cube that is pierced by the positive z axis
|
ALLOW_ANISOTROPIC_FILTER_READ, ALLOW_BOUNDARY_COLOR_READ, ALLOW_BOUNDARY_MODE_READ, ALLOW_ENABLE_READ, ALLOW_ENABLE_WRITE, ALLOW_FILTER_READ, ALLOW_FILTER4_READ, ALLOW_FORMAT_READ, ALLOW_IMAGE_READ, ALLOW_IMAGE_WRITE, ALLOW_LOD_RANGE_READ, ALLOW_LOD_RANGE_WRITE, ALLOW_MIPMAP_MODE_READ, ALLOW_SHARPEN_TEXTURE_READ, ALLOW_SIZE_READ, ALPHA, ANISOTROPIC_NONE, ANISOTROPIC_SINGLE_VALUE, BASE_LEVEL, BASE_LEVEL_LINEAR, BASE_LEVEL_POINT, CLAMP, CLAMP_TO_BOUNDARY, CLAMP_TO_EDGE, FASTEST, FILTER4, INTENSITY, LINEAR_SHARPEN, LINEAR_SHARPEN_ALPHA, LINEAR_SHARPEN_RGB, LUMINANCE, LUMINANCE_ALPHA, MULTI_LEVEL_LINEAR, MULTI_LEVEL_MIPMAP, MULTI_LEVEL_POINT, NICEST, RGB, RGBA, WRAP
Constructor and Description |
---|
TextureCubeMap()
Constructs a texture object using default values.
|
TextureCubeMap(int mipmapMode,
int format,
int width)
Constructs an empty TextureCubeMap object with specified mipmapMode
format, and width.
|
TextureCubeMap(int mipmapMode,
int format,
int width,
int boundaryWidth)
Constructs an empty TextureCubeMap object with specified mipmapMode
format, width, and boundary width.
|
Modifier and Type | Method and Description |
---|---|
void |
duplicateNodeComponent(NodeComponent originalNodeComponent)
Deprecated.
replaced with duplicateNodeComponent(
NodeComponent originalNodeComponent, boolean forceDuplicate)
|
ImageComponent |
getImage(int level)
This method is not supported for TextureCubeMap.
|
ImageComponent |
getImage(int level,
int face)
Retrieves the image for a specified mipmap level of a particular
face of the cube map.
|
ImageComponent[] |
getImages()
This method is not supported for TextureCubeMap.
|
ImageComponent[] |
getImages(int face)
Retrieves the array of images for all mipmap level of a particular
face of the cube map.
|
void |
setImage(int level,
ImageComponent image)
This method is not supported for TextureCubeMap.
|
void |
setImage(int level,
int face,
ImageComponent2D image)
Sets the image for a specified mipmap level of a specified face
of the cube map
|
void |
setImages(ImageComponent[] images)
This method is not supported for TextureCubeMap.
|
void |
setImages(int face,
ImageComponent2D[] images)
Sets the array of images for mipmap levels from base level through
max level for a specified face of the cube map
|
getAnisotropicFilterDegree, getAnisotropicFilterMode, getBaseLevel, getBoundaryColor, getBoundaryModeS, getBoundaryModeT, getBoundaryWidth, getEnable, getFilter4Func, getFilter4FuncPointsCount, getFormat, getHeight, getLodOffset, getMagFilter, getMaximumLevel, getMaximumLOD, getMinFilter, getMinimumLOD, getMipMapMode, getSharpenTextureFunc, getSharpenTextureFunc, getSharpenTextureFuncPointsCount, getWidth, numMipMapLevels, setAnisotropicFilterDegree, setAnisotropicFilterMode, setBaseLevel, setBoundaryColor, setBoundaryColor, setBoundaryModeS, setBoundaryModeT, setEnable, setFilter4Func, setLodOffset, setLodOffset, setMagFilter, setMaximumLevel, setMaximumLOD, setMinFilter, setMinimumLOD, setMipMapMode, setSharpenTextureFunc, setSharpenTextureFunc
cloneNodeComponent, cloneNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree
clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferences
public static final int POSITIVE_X
public static final int NEGATIVE_X
public static final int POSITIVE_Y
public static final int NEGATIVE_Y
public static final int POSITIVE_Z
public static final int NEGATIVE_Z
public TextureCubeMap()
public TextureCubeMap(int mipmapMode, int format, int width)
mipmapMode
- type of mipmap for this Texture: One of
BASE_LEVEL, MULTI_LEVEL_MIPMAP.format
- data format of Textures saved in this object.
One of INTENSITY, LUMINANCE, ALPHA, LUMINANCE_ALPHA, RGB, RGBA.width
- width (and height) of image at level 0.java.lang.IllegalArgumentException
- if width is not greater
than 0 OR invalid format/mipmapMode is specified.public TextureCubeMap(int mipmapMode, int format, int width, int boundaryWidth)
mipmapMode
- type of mipmap for this Texture: One of
BASE_LEVEL, MULTI_LEVEL_MIPMAP.format
- data format of Textures saved in this object.
One of INTENSITY, LUMINANCE, ALPHA, LUMINANCE_ALPHA, RGB, RGBA.width
- width (and height) of image at level 0. This
does not include the width of the boundary.boundaryWidth
- width of the boundary, which must be 0 or 1.java.lang.IllegalArgumentException
- if width is not
greater than 0 OR invalid format/mipmapMode is specified.public void setImage(int level, int face, ImageComponent2D image)
level
- mipmap levelface
- face of the cube map. One of:
POSITIVE_X
, NEGATIVE_X
,
POSITIVE_Y
, NEGATIVE_Y
,
POSITIVE_Z
or NEGATIVE_Z
.image
- ImageComponent2D object containing the imagejava.lang.IllegalArgumentException
- if
face
has a value other
than POSITIVE_X
, NEGATIVE_X
,
POSITIVE_Y
, NEGATIVE_Y
,
POSITIVE_Z
or NEGATIVE_Z
.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphIllegalSharingException
- if this TextureCubeMap is live and
the specified image is being used by a Canvas3D as an off-screen buffer.IllegalSharingException
- if this TextureCubeMap is
being used by an immediate mode context and
the specified image is being used by a Canvas3D as an off-screen buffer.public void setImages(int face, ImageComponent2D[] images)
face
- face of the cube map. One of:
POSITIVE_X
, NEGATIVE_X
,
POSITIVE_Y
, NEGATIVE_Y
,
POSITIVE_Z
or NEGATIVE_Z
.images
- array of ImageComponent2D objects containing the imagesjava.lang.IllegalArgumentException
- if
face
has a value other
than POSITIVE_X
, NEGATIVE_X
,
POSITIVE_Y
, NEGATIVE_Y
,
POSITIVE_Z
or NEGATIVE_Z
.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphIllegalSharingException
- if this TextureCubeMap is live and
any of the specified images are being used by a Canvas3D as an
off-screen buffer.IllegalSharingException
- if this TextureCubeMap is
being used by an immediate mode context and
any of the specified images are being used by a Canvas3D as an
off-screen buffer.public ImageComponent getImage(int level, int face)
level
- mipmap level to get.face
- face of the cube map. One of:
POSITIVE_X
, NEGATIVE_X
,
POSITIVE_Y
, NEGATIVE_Y
,
POSITIVE_Z
or NEGATIVE_Z
.java.lang.IllegalArgumentException
- if
face
has a value other
than POSITIVE_X
, NEGATIVE_X
,
POSITIVE_Y
, NEGATIVE_Y
,
POSITIVE_Z
or NEGATIVE_Z
.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic ImageComponent[] getImages(int face)
face
- face of the cube map. One of:
POSITIVE_X
, NEGATIVE_X
,
POSITIVE_Y
, NEGATIVE_Y
,
POSITIVE_Z
or NEGATIVE_Z
.java.lang.IllegalArgumentException
- if
face
has a value other
than POSITIVE_X
, NEGATIVE_X
,
POSITIVE_Y
, NEGATIVE_Y
,
POSITIVE_Z
or NEGATIVE_Z
.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setImage(int level, ImageComponent image)
public void setImages(ImageComponent[] images)
public ImageComponent getImage(int level)
public ImageComponent[] getImages()
public void duplicateNodeComponent(NodeComponent originalNodeComponent)
duplicateNodeComponent
in class NodeComponent