CGA 参考

操作

几何创建

几何细分

几何操作

纹理

变换

范围

流程控制

快捷菜单

属性

形状属性

形状属性是当前形状的属性。 此类属性可始终进行读取(与函数一样),其中一些可使用 set 操作进行设置。

comp | initialShape | material | pivot | scope | seedian | split | trim

内置函数

函数始终会返回一个值,并且不会更改当前形状(概率函数例外,此类函数会更改形状随机数生成器的状态)。

数学函数

abs | acos | asin | atan | atan2 | ceil | cos | exp | floor | isinf | isnan | ln | log10 | pow | rint | sin | sqrt | tan

概率函数

p | rand

转换功能

bool | boolArray | float | floatArray | isNull | sel | str | stringArray

字符串函数

count | find | len | splitString | substring

几何函数

geometry.angle |geometry.area | geometry.boundaryLength | geometry.{du|dv} | geometry.groups | geometry.height | geometry.isClosedSurface | geometry.isConcave | geometry.isInstanced | geometry.isOriented | geometry.isPlanar | geometry.isRectangular | geometry.materials | geometry.nEdges | geometry.nFaces | geometry.nHoles | geometry.nVertices | geometry.{uMin|uMax|vMin|vMax} | geometry.volume

材料函数

getMaterial

文件函数

fileExists | fileSearch / filesSearch | readFloatTable | readStringTable | readTextFile

资产和影像函数

assetInfo | assetNamingInfo / assetNamingInfos | assetsSortRatio | assetsSortSize | imageInfo | imagesSortRatio

堆叠函数

inside | overlaps | touches

上下文函数

contextCompare | contextCount | minimumDistance

数组函数

array initialization | colon operator | comp | findFirst | index operator | nColumns | nRows | size | sum | transpose

边属性函数

edgeAttr.getBool | edgeAttr.getFloat | edgeAttr.getString

其他函数

convert | getGeoCoord | getTreeKey | print | 简单类型运算符 | 数组类型运算符

其他关键字

attr | const | import | style | version | with

CGA 实用工具函数库

字符串实用工具函数

findFirst | findLast | getPrefix | getRange | getSuffix | replace

字符串列表实用工具函数

字符串列表是存储在一个字符串内的一系列字符串。 各个元素以分号 (";") 分隔。 数据类型为“字符串”,因此与在其他脚本语言中不同,它不是任何实际类型的数组。

listAdd | listClean | listCount | listFirst | listFromArray listIndex | listItem | listLast | listRandom | listRange | listRemove | listRemoveAll | listRetainAll | listSize | listTerminate | listToArray

文件、资产和图像实用工具函数

assetApproxRatio | assetApproxSize | assetBestRatio | assetBestSize | assetFitSize | fileBaseName | fileDirectory | fileExtension | fileName | fileRandom | imageApproxRatio | imageBestRatio

数学实用工具函数

clamp | min | max

颜色实用工具函数

colorHexToB | colorHexToG | colorHexToH | colorHexToO | colorHexToR | colorHexToS | colorHexToV | colorHSVToHex | colorHSVOToHex | colorRamp | colorRGBToHex | colorRGBOToHex

其他信息

CGA 更改日志 | 注记 | 资产搜索 | 内置资产 | 上下文和遮挡查询 | 欧拉角度 | 纹理

要查看离线 CGA 参考,请单击 CityEngine 主菜单中的帮助 > 离线 CGA 参考