Package com.jme3.environment.util
Class CubeMapWrapper
java.lang.Object
com.jme3.environment.util.CubeMapWrapper
Wraps a cube map and allows reading or writing pixels.
 
 It uses the ImageRaster class to tailor the read/write operations.
- 
Constructor SummaryConstructorsConstructorDescriptionCubeMapWrapper(TextureCubeMap cubeMap) Creates a CubeMapWrapper for the given cube map Note that the cube map must be initialized, and the mipmaps sizes should be set if relevant for them to be readable/writable
- 
Method SummaryModifier and TypeMethodDescriptionReads a pixel from the cube map given the 2D coordinates and the face and the mip level to read fromReads a pixel from the cube map given the 2D coordinates and the face to read fromReads a pixel from the cube map given the coordinate vectorReads a pixel from the cube map given the coordinate vectorvoidinitMipMaps(int nbMipMaps) Inits the mip maps of a cube map with the given number of mip mapsvoidWrites a pixel given the 2-D coordinates, the mip level and the colorvoidWrites a pixel given the 2-D coordinates and the colorvoidwrites a pixel given the coordinates vector, the mip level and the color.voidwrites a pixel given the coordinates vector and the color.
- 
Constructor Details- 
CubeMapWrapperCreates a CubeMapWrapper for the given cube map Note that the cube map must be initialized, and the mipmaps sizes should be set if relevant for them to be readable/writable- Parameters:
- cubeMap- the cubemap to wrap.
 
 
- 
- 
Method Details- 
getPixelReads a pixel from the cube map given the coordinate vector- Parameters:
- vector- the direction vector to fetch the texel
- store- the color in which to store the pixel color read.
- Returns:
- the color of the pixel read.
 
- 
getPixelReads a pixel from the cube map given the coordinate vector- Parameters:
- vector- the direction vector to fetch the texel
- mipLevel- the mip level to read from
- store- the color in which to store the pixel color read.
- Returns:
- the color of the pixel read.
 
- 
getPixelReads a pixel from the cube map given the 2D coordinates and the face to read from- Parameters:
- x- the x tex coordinate (from 0 to width)
- y- the y tex coordinate (from 0 to height)
- face- the face to read from
- store- the color where the result is stored.
- Returns:
- the color read.
 
- 
getPixelReads a pixel from the cube map given the 2D coordinates and the face and the mip level to read from- Parameters:
- x- the x tex coordinate (from 0 to width)
- y- the y tex coordinate (from 0 to height)
- face- the face to read from
- mipLevel- the miplevel to read from
- store- the color where the result is stored.
- Returns:
- the color read.
 
- 
setPixelwrites a pixel given the coordinates vector and the color.- Parameters:
- vector- the coordinates where to write the pixel
- color- the color to write
 
- 
setPixelwrites a pixel given the coordinates vector, the mip level and the color.- Parameters:
- vector- the coordinates where to write the pixel
- mipLevel- the miplevel to write to
- color- the color to write
 
- 
setPixelWrites a pixel given the 2-D coordinates and the color- Parameters:
- x- the x tex coord (from 0 to width)
- y- the y tex coord (from 0 to height)
- face- the face to write to
- color- the color to write
 
- 
setPixelWrites a pixel given the 2-D coordinates, the mip level and the color- Parameters:
- x- the x tex coord (from 0 to width)
- y- the y tex coord (from 0 to height)
- face- the face to write to
- mipLevel- the mip level to write to
- color- the color to write
 
- 
initMipMapspublic void initMipMaps(int nbMipMaps) Inits the mip maps of a cube map with the given number of mip maps- Parameters:
- nbMipMaps- the number of mip maps to initialize
 
 
-