目录

Renderable

Class Info

public class Renderable extends Component

渲染件组件。

Public Method Summary

Qualifier and Type

Method Name and Description

static Component.Descriptor<Renderable>

descriptor()

获取渲染件组件描述符。

Vector4

getBaseColorFactor()

获取基本颜色。

Box

getBoundingBox()

获取包围盒。

boolean

isBlendEnable()

是否开启颜色混合。

boolean

isDepthWriteEnable()

是否开启深度写入。

boolean

isOutline()

是否开启描边高亮效果。

boolean

isShadowCaster()

是否投射阴影。

boolean

isShadowReceiver()

是否接收阴影。

Renderable

setBaseColorFactor(Vector4 color)

设置基础颜色。

Renderable

setBaseColorTexture(Texture texture)

设置基础颜色贴图。

Renderable

setBlendEnable(boolean enable)

设置是否开启颜色混合。

Renderable

setBlendFunc(BlendFunc srcC, BlendFunc dstC, BlendFunc srcA, BlendFunc dstA)

设置颜色混合方程参数。

Renderable

setCastShadow(boolean enable)

设置是否投射阴影。

Renderable

setDepthWriteEnable(boolean enable)

设置是否开启深度写入。

Renderable

setOutline(boolean enable)

设置是否开启描边高亮。

Renderable

setReceiveShadow(boolean enable)

设置是否接收阴影。

Public Methods

[h2]descriptor

Method

public static Component.Descriptor<Renderable> descriptor()

获取渲染件组件描述符。

Returns

Type

Description

Component.Descriptor<Renderable>

渲染件组件描述符。

[h2]getBaseColorFactor

Method

public Vector4 getBaseColorFactor()

获取基本颜色。

Returns

Type

Description

Vector4

基本颜色,包括RGB与alpha值。

[h2]getBoundingBox

Method

public Box getBoundingBox()

获取包围盒。

Returns

Type

Description

Box

包围盒。

[h2]isBlendEnable

Method

public boolean isBlendEnable()

是否开启颜色混合。

Returns

Type

Description

boolean

是否开启颜色混合。

  • true:开启颜色混合。
  • false:未开启颜色混合。

[h2]isDepthWriteEnable

Method

public boolean isDepthWriteEnable()

是否开启深度写入。

Returns

Type

Description

boolean

是否开启深度写入。

  • true:开启深度写入。
  • false:未开启深度写入。

[h2]isOutline

Method

public boolean isOutline()

是否开启描边效果。

Returns

Type

Description

boolean

是否开启描边效果。

  • true:开启描边效果。
  • false:未开启描边效果。

[h2]isShadowCaster

Method

public boolean isShadowCaster()

是否投射阴影。

Returns

Type

Description

boolean

是否投射阴影。

  • true:投射阴影。
  • false:不投射阴影。

[h2]isShadowReceiver

Method

public boolean isShadowReceiver()

是否接收阴影。

Returns

Type

Description

boolean

是否接收阴影。

  • true:接收阴影。
  • false:不接收阴影。

[h2]setBaseColorFactor

Method

public Renderable setBaseColorFactor(Vector4 color)

设置基础颜色。

Parameters

Name

Description

color

基础颜色,包括RGB与alpha值。

Returns

Type

Description

Renderable

自身实例。

[h2]setBaseColorTexture

Method

public Renderable setBaseColorTexture(Texture texture)

设置基础颜色贴图。

Parameters

Name

Description

texture

基础颜色纹理贴图。

Returns

Type

Description

Renderable

自身实例。

[h2]setBlendEnable

Method

public Renderable setBlendEnable(boolean enable)

设置是否开启颜色混合。

Parameters

Name

Description

enable

是否开启颜色混合。

  • true:开启颜色混合。
  • false:关闭颜色混合。

Returns

Type

Description

Renderable

自身实例。

[h2]setBlendFunc

Method

public Renderable setBlendFunc(BlendFunc srcC, BlendFunc dstC, BlendFunc srcA, BlendFunc dstA)

设置颜色混合方程参数。

Parameters

Name

Description

srcC

源颜色。

dstC

目标颜色。

srcA

源颜色的alpha值。

dstA

目标颜色的alpha值。

Returns

Type

Description

Renderable

自身实例。

[h2]setCastShadow

Method

public Renderable setCastShadow(boolean enable)

设置是否投射阴影。

Parameters

Name

Description

enable

是否投射阴影。

  • true:设置投射阴影。
  • false:设置不投射阴影。

Returns

Type

Description

Renderable

自身实例。

[h2]setDepthWriteEnable

Method

public Renderable setDepthWriteEnable(boolean enable)

设置是否开启深度写入。

Parameters

Name

Description

enable

是否开启深度写入。

  • true:设置开启深度写入。
  • false:设置关闭深度写入。

Returns

Type

Description

Renderable

自身实例。

[h2]setOutline

Method

public Renderable setOutline(boolean enable)

设置是否开启描边高亮。

Parameters

Name

Description

enable

是否开启描边高亮。

  • true:开启描边高亮。
  • false:关闭描边高亮。

Returns

Type

Description

Renderable

自身实例。

[h2]setReceiveShadow

Method

public Renderable setReceiveShadow(boolean enable)

设置是否接收阴影。

Parameters

Name

Description

enable

是否接收阴影。

  • true:设置接收阴影。
  • false:设置不接收阴影。

Returns

Type

Description

Renderable

自身实例。