scope shape attribute

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 the elevation above sealevel 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.

Related

Example

 
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}

Copyright ©2008-2024 Esri R&D Center Zurich. All rights reserved.