PrimitiveNode

sealed interface PrimitiveNode : ShapeNode

Marker for a leaf decorating a CGA element.

Implemented by the five blade leaves: FlatPointNode, LineNode, RoundPointNode, DipoleNode, CircleNode. Sealed, so a when over a PrimitiveNode is exhaustive without an else — a new blade leaf is a compile error at every dispatch site. The marker parallels the shapes' own Primitive without being related to it — the two hierarchies can't share a supertype, but every PrimitiveNode instance already is a Primitive 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.