CGA Shapes are different from the shapes previously mentioned in section Shapes; those shapes are so-called initial shapes.Shapes are the central ingredient of the cga shape grammar. In short, a shape has a name (the so-called shape symbol) and consists of a geometry with an oriented bounding box, the so-called scope. On this page this is going to be explained in detail.
A shape consists of:
ShapeSymbol (or Rule Name)
A shape has a name, the so-called shape symbol. The shape symbol is very important because the rule with matching name (and number and types of parameters, see below) is going to be used to generate the shape's successors.
Each shape can have an associated parameter list. The ordered parameter list is implicitly defined in the rule which creates the shape. Three parameter types are supported:
- numeric (internally represented with double-precision float)
The attributes contain the numeric and spatial description (including the geometry) of the shape. During the rule application process, these attributes can be accessed and modified by shape operations. The following are the most important shape attributes:
GeometryThe geometry of a shape is an arbitrary polygonal mesh. In addition, shader attributes like color, material and textures are also included in the geometry.
ScopeThe scope represents the oriented bounding box for the shape in space relative to the pivot (see below) and is defined by three vectors: the translation vector t (scope.tx, scope.ty and scope.tz), the rotation vector r (scope.rx, scope.ry and scope.rz), and the size vector s (scope.sx, scope.sy and scope.sz). The rotation vector is encoded as ordered rotation in degrees around the x, y and z axis.
PivotThe pivot describes the shape's coordinate system and is defined by a position vector p (pivot.px, pivot.py and pivot.pz) and an orientation vector o (pivot.ox, pivot.oy and pivot.oz; similarly encoded as the rotation vector above). The pivot is given in object coordinates, relative to the initial shape's origin; see also Coordinate Systems.
Copyright ©2008-2016 Esri R&D Center Zurich. All rights reserved.