CompositeNode

sealed interface CompositeNode : ShapeNode

Marker for a leaf decorating a shape built from primitives.

Implemented by SegmentNode, PolylineNode, and PolygonNode. Sealed, so a when over a CompositeNode is exhaustive without an else — a new composite leaf is a compile error at every dispatch site. The marker parallels the shapes' own Composite without being related to it — the two hierarchies can't share a supertype, but every CompositeNode instance already is a Composite through the shape it subclasses.

Inheritors

Properties

Link copied to clipboard
abstract var style: ShapeStyle

The concrete paint this leaf renders with; mutable — restyling is an assignment.

Link copied to clipboard
abstract var tags: Set<String>

Free-form tokens riding the leaf — renderer-inert; empty by default. Mutable — retagging is an assignment.

Functions

Link copied to clipboard
operator fun ShapeNode.times(versor: Versor): ShapeNode

node * Versor => ShapeNode
Returns this leaf with versor's motion applied to its geometry — style and tags untouched.