Class Info |
|---|
public class Renderable extends Component 渲染件组件。 |
Qualifier and Type | Method Name and Description |
|---|---|
static Component.Descriptor<Renderable> | 获取渲染件组件描述符。 |
| 获取基本颜色。 | |
| 获取包围盒。 | |
boolean | 是否开启颜色混合。 |
boolean | 是否开启深度写入。 |
boolean | 是否开启描边高亮效果。 |
boolean | 是否投射阴影。 |
boolean | 是否接收阴影。 |
setBaseColorFactor(Vector4 color) 设置基础颜色。 | |
setBaseColorTexture(Texture texture) 设置基础颜色贴图。 | |
setBlendEnable(boolean enable) 设置是否开启颜色混合。 | |
setBlendFunc(BlendFunc srcC, BlendFunc dstC, BlendFunc srcA, BlendFunc dstA) 设置颜色混合方程参数。 | |
setCastShadow(boolean enable) 设置是否投射阴影。 | |
setDepthWriteEnable(boolean enable) 设置是否开启深度写入。 | |
setOutline(boolean enable) 设置是否开启描边高亮。 | |
setReceiveShadow(boolean enable) 设置是否接收阴影。 |
Method |
|---|
public static Component.Descriptor<Renderable> descriptor() 获取渲染件组件描述符。 |
Returns
Type | Description |
|---|---|
渲染件组件描述符。 |
Method |
|---|
public Vector4 getBaseColorFactor() 获取基本颜色。 |
Returns
Type | Description |
|---|---|
基本颜色,包括RGB与alpha值。 |
Method |
|---|
public boolean isBlendEnable() 是否开启颜色混合。 |
Returns
Type | Description |
|---|---|
boolean | 是否开启颜色混合。
|
Method |
|---|
public boolean isDepthWriteEnable() 是否开启深度写入。 |
Returns
Type | Description |
|---|---|
boolean | 是否开启深度写入。
|
Method |
|---|
public boolean isOutline() 是否开启描边效果。 |
Returns
Type | Description |
|---|---|
boolean | 是否开启描边效果。
|
Method |
|---|
public boolean isShadowCaster() 是否投射阴影。 |
Returns
Type | Description |
|---|---|
boolean | 是否投射阴影。
|
Method |
|---|
public boolean isShadowReceiver() 是否接收阴影。 |
Returns
Type | Description |
|---|---|
boolean | 是否接收阴影。
|
Method |
|---|
public Renderable setBaseColorFactor(Vector4 color) 设置基础颜色。 |
Parameters
Name | Description |
|---|---|
color | 基础颜色,包括RGB与alpha值。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public Renderable setBaseColorTexture(Texture texture) 设置基础颜色贴图。 |
Parameters
Name | Description |
|---|---|
texture | 基础颜色纹理贴图。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public Renderable setBlendEnable(boolean enable) 设置是否开启颜色混合。 |
Parameters
Name | Description |
|---|---|
enable | 是否开启颜色混合。
|
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public Renderable setBlendFunc(BlendFunc srcC, BlendFunc dstC, BlendFunc srcA, BlendFunc dstA) 设置颜色混合方程参数。 |
Parameters
Name | Description |
|---|---|
srcC | 源颜色。 |
dstC | 目标颜色。 |
srcA | 源颜色的alpha值。 |
dstA | 目标颜色的alpha值。 |
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public Renderable setCastShadow(boolean enable) 设置是否投射阴影。 |
Parameters
Name | Description |
|---|---|
enable | 是否投射阴影。
|
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public Renderable setDepthWriteEnable(boolean enable) 设置是否开启深度写入。 |
Parameters
Name | Description |
|---|---|
enable | 是否开启深度写入。
|
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public Renderable setOutline(boolean enable) 设置是否开启描边高亮。 |
Parameters
Name | Description |
|---|---|
enable | 是否开启描边高亮。
|
Returns
Type | Description |
|---|---|
自身实例。 |
Method |
|---|
public Renderable setReceiveShadow(boolean enable) 设置是否接收阴影。 |
Parameters
Name | Description |
|---|---|
enable | 是否接收阴影。
|
Returns
Type | Description |
|---|---|
自身实例。 |