A MarkerGO.T
is a geometric object describing a marker.
INTERFACEMarkerGO ; IMPORT Color, ColorProp, GO, MarkerTypeProp, Point3, PointProp, RealProp; TYPE T <: Public; Public = GO.T OBJECT METHODS init () : T; END;
m.init()
initializesm
, and returns it. The location of the marker is determined by the propertyCenter
.
VAR Center : PointProp.Name; Colour : ColorProp.Name; Scale : RealProp.Name; Type : MarkerTypeProp.Name;In addition to the properties observed by all \type{GO}{T}'s, there are some additional properties that are observed by
MarkerGO.T
's:
Center
is the name of a point property that describes the point indicated
by the marker. If no Center
property is specified, the marker is drawn at
the origin.
Colour
is the name of a color property that describes the color of the
marker. If no Colour
property is specified, the marker is drawn in white.
Scale
is the name of a real property that describes the scale of the
marker. If no Scale
property is specified, the marker is drawn with
scale 1.
Type
is the name of a marker type property that describes the type of
the marker (dot, cross, circle, asterisk, or X). If no Type
property
is specified, the marker is drawn as an asterisk.
PROCEDURE New (p : Point3.T) : T;
New(p)
creates a new marker and returns it. It also attaches the property(Center,PointProp.NewConst(p))
to the new marker.
The following four procedures provide sugaring to attach the
Center
, Colour
, Scale
, and Type
properties to geometric objects:
PROCEDURE SetCenter (o : GO.T; v : Point3.T);
The expressionSetCenter(o,p)
is equivalent too.setProp(Center.bind(PointProp.NewConst(p)))
.
PROCEDURE SetColour (o : GO.T; v : Color.T);
The expressionSetColour(o,c)
is equivalent too.setProp(Colour.bind(ColorProp.NewConst(c)))
.
PROCEDURE SetScale (o : GO.T; v : REAL);
The expressionSetScale(o,r)
is equivalent too.setProp(Scale.bind(RealProp.NewConst(r)))
.
PROCEDURE SetType (o : GO.T; v : MarkerTypeProp.Kind);
The expressionSetType(o,t)
is equivalent too.setProp(Type.bind(MarkerTypeProp.NewConst(t)))
.
END MarkerGO.