Operations
Geometry creation
Geometry subdivision
Geometry manipulation
Texturing
Transformations
Scope
Flow control
Context
Attributes
Shape attributes
Shape Attributes are properties of the current shape. They can always be read (like functions) and some of them can be set with the set operation.
comp | initialShape | material | pivot | scope | seedian | split | trim
Built-in functions
Functions always return a value and do not alter the current shape (with the exception of probability functions which change the state of the shape's random number generator).
Math functions
abs | acos | asin | atan | atan2 | ceil | cos | exp | floor | isinf | isnan | ln | log10 | pow | rint | sin | sqrt | tan
Probability functions
Conversion functions
bool | boolArray | float | floatArray | | isNull | sel | str | stringArray
String functions
count | find | len | splitString | substring
Geometry functions
geometry.angle |geometry.area | geometry.boundaryLength | geometry.{du|dv} | geometry.height | geometry.isClosedSurface | geometry.isConcave | geometry.isInstanced | geometry.isOriented | geometry.isPlanar | geometry.isRectangular | geometry.nEdges | geometry.nFaces | geometry.nHoles | geometry.nVertices | geometry.{uMin|uMax|vMin|vMax} | geometry.volume
File functions
fileExists | fileSearch | readFloatTable | readStringTable | readTextFile
Asset and image functions
assetInfo | assetNamingInfo | assetsSortRatio | assetsSortSize | imageInfo | imagesSortRatio
Occlusion functions
Context functions
Array functions
array initialization | colon operator | comp | findFirst | index operator | nColumns |nRows | size | transpose
Edge attribute functions
Miscellaneous functions
convert | getGeoCoord | getTreeKey | print | Simple types operators | Array types operators
Other keywords
CGA utility functions library
String utility functions
findFirst | findLast | getPrefix | getRange | getSuffix | replace
String list utility functions
String lists are a series of strings stored inside one string. The elements are separated by a semicolon (";"). The data type is "string", thus it is not any real type of array as used in other scripting languages.
listAdd | listClean | listCount | listFirst | listIndex | listItem | listLast | listRandom | listRange | listRemove | listRemoveAll | listRetainAll | listSize | listTerminate
File, asset and image utility functions
assetApproxRatio | assetApproxSize | assetBestRatio | assetBestSize | AssetFitSize | fileBaseName | fileDirectory | fileExtension | fileName | fileRandom | imageApproxRatio | imageBestRatio
Math utility functions
Color utility functions
colorHexToB | colorHexToG | colorHexToH | colorHexToO | colorHexToR | colorHexToS | colorHexToV | colorHSVToHex | colorHSVOToHex | colorRamp | colorRGBToHex | colorRGBOToHex
Miscellaneous information
CGA changelog | Annotations | Asset search | Built-in assets | Context and occlusion queries | Euler angles | Texturing
To view the offline CGA reference, click Help > Offline CGA Reference in the CityEngine main menu.