<< Click to Display Table of Contents > 

SAMLight Manual > Entities (Objects) > Entity Hierarchy

Entity Hierarchy
Previous pageReturn to chapter overviewNext page

Entities: All objects in the application are entities by definition. The three main categories of entities are elements, containers and groups; and in general an entity is either an element or a container or a group of entities. The elements keep the real geometric data, like lines, points and pixels, and the so called containers contain elements.

Elements:

Primitive Elements: Primitive elements are single points and single straight lines.

LineArray, PolyLine and PixelArray: LineArray, PolyLine and PixelArray are the next level of elements. LineArray and PolyLine represent sets of straight lines and PixelArray represents a set of pixels (points with gray values).

The difference between LineArray and PolyLine is as follows: The purpose of the element LineArray is to represent a set of lines. So the items of a LineArray are single straight lines, described by their start and end point. In contrary to this, a PolyLine is itself a line consisting of straight lines. So the description of a PolyLine is a sequence of points and the straight lines connect two subsequential points. They keep items of the corresponding kind in sequential order. For a PolyLine the item is a point p. Rectangles, triangles and ellipses are special closed PolyLines. So they are derived from PolyLine. A hatch is a special LineArray and therefore is derived from LineArray.

LineArrays,PolyLines and PixelArrays: LineArrays, PolyLines and PixelArrays are sets of special elements. A LineArrays set contains one or more LineArray elements. A PolyLines set contains one or more PolyLine elements. A PixelArrays set contains one or more PixelArray elements.

Containers: Container entities always consist of specific predefined numbers and types of subentities.

Layer: The Layer contains exactly three elements: one PolyLines, one LineArrays and one PixelArrays. This entity type is used for geometrical objects with a heterogeneous object description which are especially hatchable objects. For example, if one creates a rectangle (see Object Toolbar), an entity of type Layer will be created in the Entity List (see Entity List), because a rectangle is a hatchable object. The Polylines of the Layer keep the PolyLine that bounds the rectangle and the LineArrays will keep the hatches (see Hatch).