ITextureUnit

All Implemented Interfaces: java.io.Closeable

public interface ITextureUnit extends Closeable

ITextureUnit represents a texture in the memory that shared between GPU and CPU and can be sampled by the shader, where the Texture only represents a reference to an external file. More details can be found https://en.wikipedia.org/wiki/Texture_mapping_unit

方法

方法描述
getDepth()获取此纹理的高度,对于非 3D 纹理始终为 1。
getHeight()获取此纹理的高度。
getMagnification()获取放大过滤模式。
getMinification()获取缩小过滤模式。
getMipmap()获取 mipmap 过滤模式。
getScale()获取 UV 坐标的缩放。
getScroll()获取 UV 坐标的滚动。
getType()获取此纹理单元的类型。
getUWrap()获取纹理 U 坐标的环绕模式。
getVWrap()获取纹理 V 坐标的环绕模式。
getWWrap()获取纹理 W 坐标的环绕模式。
getWidth()获取此纹理的宽度。
setMagnification(TextureFilter value)设置放大过滤模式。
setMinification(TextureFilter value)设置缩小过滤模式。
setMipmap(TextureFilter value)设置 mipmap 过滤模式。
setScale(Vector2 value)设置 UV 坐标的缩放。
setScroll(Vector2 value)设置 UV 坐标的滚动。
setUWrap(WrapMode value)设置纹理 U 坐标的环绕模式。
setVWrap(WrapMode value)设置纹理 V 坐标的环绕模式。
setWWrap(WrapMode value)设置纹理 W 坐标的环绕模式。

getDepth()

public abstract int getDepth()

获取此纹理的高度,对于非 3D 纹理始终为 1。

Returns: int - 此纹理的高度,对于非 3D 纹理始终为 1。

getHeight()

public abstract int getHeight()

获取此纹理的高度。

Returns: int - 此纹理的高度。

getMagnification()

public abstract TextureFilter getMagnification()

获取放大过滤模式。

Returns: TextureFilter - the filter mode for magnification.

getMinification()

public abstract TextureFilter getMinification()

获取缩小过滤模式。

Returns: TextureFilter - the filter mode for minification.

getMipmap()

public abstract TextureFilter getMipmap()

获取 mipmap 过滤模式。

Returns: TextureFilter - the filter mode for mipmap.

getScale()

public abstract Vector2 getScale()

获取 UV 坐标的缩放。

Returns: Vector2 - the scale of the UV coordinate.

getScroll()

public abstract Vector2 getScroll()

获取 UV 坐标的滚动。

Returns: Vector2 - the scroll of the UV coordinate.

getType()

public abstract TextureType getType()

获取此纹理单元的类型。

Returns: TextureType - the type of this texture unit.

getUWrap()

public abstract WrapMode getUWrap()

获取纹理 U 坐标的环绕模式。

Returns: WrapMode - the wrap mode for texture’s U coordinate.

getVWrap()

public abstract WrapMode getVWrap()

获取纹理 V 坐标的环绕模式。

Returns: WrapMode - the wrap mode for texture’s V coordinate.

getWWrap()

public abstract WrapMode getWWrap()

获取纹理 W 坐标的环绕模式。

Returns: WrapMode - the wrap mode for texture’s W coordinate.

getWidth()

public abstract int getWidth()

获取此纹理的宽度。

Returns: int - 此纹理的宽度。

setMagnification(TextureFilter value)

public abstract void setMagnification(TextureFilter value)

设置放大过滤模式。

Parameters:

参数类型描述
valueTextureFilter新值

setMinification(TextureFilter value)

public abstract void setMinification(TextureFilter value)

设置缩小过滤模式。

Parameters:

参数类型描述
valueTextureFilter新值

setMipmap(TextureFilter value)

public abstract void setMipmap(TextureFilter value)

设置 mipmap 过滤模式。

Parameters:

参数类型描述
valueTextureFilter新值

setScale(Vector2 value)

public abstract void setScale(Vector2 value)

设置 UV 坐标的缩放。

Parameters:

参数类型描述
valueVector2新值

setScroll(Vector2 value)

public abstract void setScroll(Vector2 value)

设置 UV 坐标的滚动。

Parameters:

参数类型描述
valueVector2新值

setUWrap(WrapMode value)

public abstract void setUWrap(WrapMode value)

设置纹理 U 坐标的环绕模式。

Parameters:

参数类型描述
valueWrapMode新值

setVWrap(WrapMode value)

public abstract void setVWrap(WrapMode value)

设置纹理 V 坐标的环绕模式。

Parameters:

参数类型描述
valueWrapMode新值

setWWrap(WrapMode value)

public abstract void setWWrap(WrapMode value)

设置纹理 W 坐标的环绕模式。

Parameters:

参数类型描述
valueWrapMode新值