public class CubeMapWrapper
extends java.lang.Object
| Constructor and Description |
|---|
CubeMapWrapper(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
|
| Modifier and Type | Method and Description |
|---|---|
ColorRGBA |
getPixel(int x,
int y,
int face,
ColorRGBA store)
Reads a pixel from the cube map given the 2D coordinates and the face to read from
|
ColorRGBA |
getPixel(int x,
int y,
int face,
int mipLevel,
ColorRGBA store)
Reads a pixel from the cube map given the 2D coordinates and the face and
the mip level to read from
|
ColorRGBA |
getPixel(Vector3f vector,
ColorRGBA store)
Reads a pixel from the cube map given the coordinate vector
|
ColorRGBA |
getPixel(Vector3f vector,
float mipLevel,
ColorRGBA store)
Reads a pixel from the cube map given the coordinate vector
|
void |
initMipMaps(int nbMipMaps)
Inits the mip maps of a cube map with the given number of mip maps
|
void |
setPixel(int x,
int y,
int face,
ColorRGBA color)
Writes a pixel given the 2D cordinates and the color
|
void |
setPixel(int x,
int y,
int face,
int mipLevel,
ColorRGBA color)
Writes a pixel given the 2D cordinates, the mip level and the color
|
void |
setPixel(Vector3f vector,
ColorRGBA color)
writes a pixel given the coordinates vector and the color.
|
void |
setPixel(Vector3f vector,
int mipLevel,
ColorRGBA color)
writes a pixel given the coordinates vector, the mip level and the color.
|
public CubeMapWrapper(TextureCubeMap cubeMap)
cubeMap - the cubemap to wrap.public ColorRGBA getPixel(Vector3f vector, ColorRGBA store)
vector - the direction vector to fetch the texelstore - the color in which to store the pixel color read.public ColorRGBA getPixel(Vector3f vector, float mipLevel, ColorRGBA store)
vector - the direction vector to fetch the texelmipLevel - the mip level to read fromstore - the color in which to store the pixel color read.public ColorRGBA getPixel(int x, int y, int face, ColorRGBA store)
x - the x tex coordinate (from 0 to width)y - the y tex coordinate (from 0 to height)face - the face to read fromstore - the color where the result is stored.public ColorRGBA getPixel(int x, int y, int face, int mipLevel, ColorRGBA store)
x - the x tex coordinate (from 0 to width)y - the y tex coordinate (from 0 to height)face - the face to read frommipLevel - the miplevel to read fromstore - the color where the result is stored.public void setPixel(Vector3f vector, ColorRGBA color)
vector - the coordinates where to write the pixelcolor - the color to writepublic void setPixel(Vector3f vector, int mipLevel, ColorRGBA color)
vector - the coordinates where to write the pixelmipLevel - the miplevel to write tocolor - the color to writepublic void setPixel(int x,
int y,
int face,
ColorRGBA color)
x - the x tex coord (from 0 to width)y - the y tex coord (from 0 to height)face - the face to write tocolor - the color to writepublic void setPixel(int x,
int y,
int face,
int mipLevel,
ColorRGBA color)
x - the x tex coord (from 0 to width)y - the y tex coord (from 0 to height)face - the face to write tomipLevel - the mip level to write tocolor - the color to writepublic void initMipMaps(int nbMipMaps)
nbMipMaps - the number of mip maps to initialize