Span Property

See Also Applies To Example Model

Sets or returns an object's span angle. Read/write Double.

Remarks

The Span property is used in conjunction with the ViewField object's Radius property to define the interaction space surrounding an object. For example, if a span angle value of 360 is specified, then the interaction space is a complete circle centered on the object, having a radius equal to the value of the Radius property. If a span angle value of 180 is specified, then the interaction space is a semi-circle located in front of the object.

The default value for this property is 360.

Example

The following example uses the ViewField object to define a Bot object's capture space used for modifying a nearby Bot object's icon. The capture region is a half circle spanning from -90 degrees to 90 degrees relative to the Bot object's heading, with a radius of 20 distance units. Only Bot objects that fall within this capture space are considered in the Closest method.

Bot.ViewField.Radius = 20
Bot.ViewField.Span = 180
Bot.ViewField.Show
Bot.Closest.Shape.Icon = Bot.Shape.Icon