r(rx, ry, rz)
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
rx, ry, rz | float | — | 绕 scope X/Y/Z 轴的旋转角度(度)。 |
旋转当前形状的 scope。r 是 rotateScope 的缩写形式(但官方中 r 与 rotateScope 略有不同,r 旋转 scope 和几何体,rotateScope 仅旋转 scope 轴)。在 CGA.js 中,r 实现为旋转几何体和 scope。
绕 Y 轴旋转 45°:
Mass --> r(0, 45, 0) Rotated
CGA.js 中的 r 实现基于 CityEngine 2025.1 官方文档。
@StartRule\nLot --> primitiveCube(4, 4, 4)\n r(0, 45, 0)\n color(1, 0.5, 0.5)