scope

Syntax

  • float scope.t{x|y|z}
  • float scope.r{x|y|z}
  • float scope.s{x|y|z}
  • float scope.elevation

Description

The scope attribute represents the oriented bounding box for the current shape in space relative to the pivot and is defined by three vectors: the translation vector t, the rotation vector r (encoded in the same way as pivot.o) and the size vector s.

The vector elements are addressed with the x, y and z suffixes. This attribute can be both read and written. The scope.elevation attribute contains the elevation above sea level in meters of the origin of the current shape’s scope. This is the same as the y-coordinate of the CityEngine coordinate system; note that this attribute can not be set.

Examples

Wall --> print(scope.sx)
         s(10, '1, '1)
         print(scope.sx)

Wall --> set(scope.rz, 87.3)

Wall --> print(scope.ty)
         t(0, 10, 0)
         print(scope.ty)

Here is another example that prints the width of the front facade using scope.sx.

Lot --> extrude(10)
        comp(f) {front: print(scope.sx) FrontFacade}

Was this article helpful?