MQFace 保存对象中一个面的信息。
属性#
| 读取(get) | 写入(set) | 类型 | 名称 | 说明 | ||||
|---|---|---|---|---|---|---|---|---|
| x | long | id | 唯一 ID | |||||
| x | int | numVertex | 顶点数量 | |||||
| x | list<int> | index | 顶点索引列表 | |||||
| x | list<MQCoordinate> | coord | UV 坐标列表 | |||||
| x | list<MQColor> | color | 顶点颜色列表 | |||||
| x | list<float> | alpha | 顶点 Alpha 值列表 | |||||
| x | list<float> | crease | 边折痕列表
|
|||||
| x | x | int | material | 材质索引 | ||||
| x | x | int | select | 选择状态
|
方法#
| 成员 | 说明 |
|---|---|
| getCoord | 获取顶点的 UV 坐标。 |
| setCoord | 设置顶点的 UV 坐标。 |
| getChannelCoord | 获取顶点在指定通道中的 UV 坐标。 |
| setChannelCoord | 设置顶点在指定通道中的 UV 坐标。 |
| getColor | 获取顶点颜色。 |
| setColor | 设置顶点颜色。 |
| getAlpha | 获取顶点的 Alpha 值。 |
| setAlpha | 设置顶点的 Alpha 值。 |
| getEdgeCrease | 获取边折痕。 |
| setEdgeCrease | 设置边折痕。 |
getCoord(index)#
setCoord(index, coord)#
设置顶点的 UV 坐标。
- 参数:
int index - 顶点索引 MQCoordinate coord - 坐标
getChannelCoord(index, channel)#
setChannelCoord(index, channel, coord)#
设置顶点在指定通道中的 UV 坐标。
- 参数:
int index - 顶点索引 int channel - UV 通道 ID MQCoordinate coord - 坐标
getColor(index)#
setColor(index, color)#
设置顶点颜色。
- 参数:
int index - 顶点索引 MQColor color - 顶点颜色
getAlpha(index)#
获取顶点的 Alpha 值。
- 参数:
int index - 顶点索引
- 返回值:
float - Alpha 值
setAlpha(index, alpha)#
设置顶点的 Alpha 值。
- 参数:
int index - 顶点索引 float alpha - Alpha 值
getEdgeCrease(index)#
获取边折痕。
- 参数:
int index - 顶点索引
- 返回值:
float - 边折痕
[0] 无折痕
[1] 有折痕
setEdgeCrease(index, crease)#
设置边折痕。
- 参数:
int index - 顶点索引 float crease - 边折痕
[0] 无折痕
[1] 有折痕