alignScopeToGeometry(axes)
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
axes | selector | — | 要对齐的轴:world.x、world.y、world.z 或组合。 |
将 scope 对齐到几何体的主要方向。常用于让 scope 跟随几何体的倾斜面或主轴线。
对齐到几何体:
Mass --> alignScopeToGeometry(world.y) Aligned
CGA.js 中的 alignScopeToGeometry 实现基于 CityEngine 2025.1 官方文档。
@StartRule\nLot --> primitiveCube(4, 4, 4)\n r(0, 30, 0)\n alignScopeToGeometry(world.y)\n color(0.5, 1, 0.5)