← 返回函数库

rotateScope

Transformations Scope 部分实现

CityEngine 官方语法

rotateScope(rx, ry, rz)

参数说明

参数类型默认值说明
rx, ry, rzfloat绕 scope X/Y/Z 轴的旋转角度(度)。

描述

围绕 scope 中心旋转 scope 本身。与 r 不同,rotateScope 主要旋转 scope 的坐标轴方向,对几何体的影响取决于具体实现。

在 CGA.js 中,rotateScope 当前实现与 r 类似,旋转几何体和 scope。完整实现应仅旋转 scope 轴而不改变顶点坐标。

官方示例

旋转 scope 轴:

Mass --> rotateScope(0, 30, 0) Tilted

实现说明

CGA.js 中的 rotateScope 实现基于 CityEngine 2025.1 官方文档。

🎨 3D 预览 — 旋转 Scope

@StartRule\nLot --> primitiveCube(4, 4, 4)\n        rotateScope(0, 30, 0)\n        color(1, 0.5, 0.5)