CityEngine函数库六大组成部分

1. Shape Operations(模型操作)

改变几何体的形状

1.1 Geometry Creation(几何体的创建)

  • i(insert)
  • extrude
  • envelope
  • taper
  • roofGable
  • roofHip
  • roofPyramid
  • foofShed
  • innerRect

    1.2 Geometry Subdivision(几何体的细分)

  • split
  • comp
  • offset
  • setback
  • shapeL
  • shapeU
  • shapeO
  • scatter

    1.3 Geometry Manipulation(几何体的修改)

  • cleanupGeometry
  • convexify
  • deleteHoles
  • reverseNormals
  • setNormals
  • mirror
  • reduceGeometry
  • trim

    1.4 Transformations(几何体的变换)

  • t(scope translate)
  • translate
  • s(scope size)
  • r(scope rotate)
  • rotate
  • center

    1.5 Texturing(贴图)

  • texture
  • setupProjection
  • projectionUV
  • translateUV
  • scaleUV
  • normalizeUV
  • tileUV
  • rotateUV
  • deleteUV

    1.6 Scope(模型体边界盒操作)

  • alignScopeToAxes
  • alignScopeToGeometry
  • rotateScope
  • setPivot
  • mirrorScope

    1.7 Flow Control(流动控制)

  • pop
  • push
  • NIL

    1.8 Attributes(属性控制)

  • set
  • color
  • report
  • print

    2. Shape Attributes(模型属性)

    自模型创建起来之后包括的属性信息,全部属性都能读取,其中一部分可以通过set操作设置属性

  • comp

  • initialShape
  • material
  • pivot
  • scope
  • seedian
  • split
  • trim

    3. Builtin Functions(内置函数)

    内置函数通常返回一个值且不会对当前形状进行修改,包括一些数学函数和字符串操作函数等

3.1 数学函数

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

    3.2 概率函数

  • p
  • rand

    3.3 转换函数

  • bool
  • float
  • isnull
  • sel
  • str

    3.4 字符串函数

  • count
  • find
  • len
  • substring

    3.5 几何函数

  • geometry.area
  • geometry.angle
  • geometry.{du|dv}
  • geometry.isClosedSurface
  • geometry.isConcave
  • geometry.islnstanced
  • geometry.isOriented
  • geometry.isPlanar
  • geometry.isRectangular
  • geometry.nEdges
  • geometry.nFaces
  • geometry.nHoles
  • geometry.nVertices
  • geometry.{uMin|uMax|vMin|vMax}
  • geometry.volume

    3.6 文件函数

  • fileExists
  • fileSearch

    3.7 资源与影像函数

  • assetInfo
  • assetsSortRatio
  • assetsSortSize
  • imageInfo
  • imagesSortRatio

    3.8 相对位置函数

  • inside
  • overlaps
  • touches

    3.9 其他函数

  • convert
  • getGeoCoord
  • getTreeKey
  • print
  • Simple Type Operations

    4. Other Keyword(其他关键字)

  • attr
  • const
  • import
  • style
  • version

    5. CGA Utility Function Library(CGA 实用函数库)

    5.1 字符串实用函数库

  • findFirst

  • findLast
  • getPrefix
  • getRange
  • getSuffix
  • replace

    5.2 字符串链表函数库

  • listAdd
  • listClean
  • listCount
  • listFirst
  • listIndex
  • listltem
  • listLast
  • listRandom
  • listRange
  • listRemove
  • listRemoveAll
  • listRetainAll
  • listSize
  • listTerminate

    5.3 文件、资源和影像函数库

  • assetApproxRatio
  • assetApproxSize
  • assetBestRatio
  • assetBestSize
  • assetFitSize
  • fileBasename
  • fileDirectory
  • fileExtension
  • fileName
  • fileRandom
  • imageApproxRatio
  • imageBestRatio

    5.4 颜色函数

  • colorRamp

    6. Miscellaneous Information(其他信息)

  • CGA Changelog
  • Annotations
  • Asset Search
  • Builtin Assets
  • Texruring
  • Euler Angles
(*╹▽╹*)如果您觉得我的文章对您有帮助的话,不妨请我吃个冰棍儿呀~