Skip to contents

Line-segment geometry for drawing connections or paths in the three-brain viewer. Vertices may be static numeric coordinates or dynamic electrode references resolved at render time.

Author

Zhengjia Wang

Super class

AbstractGeom -> LineSegmentsGeom

Public fields

type

Geometry type string ("linesegments").

color

CSS hex color string(s) applied to line segments.

size

Line width(s) in world-space units.

vertices

Vertex positions: a numeric matrix (3 x N) for static segments, or a list of position/electrode descriptors for dynamic segments.

Active bindings

dynamic

Logical; TRUE when vertices are electrode references resolved at render time rather than static coordinates.

Methods

Inherited methods


LineSegmentsGeom$new()

Create a new line-segment geometry.

Usage

LineSegmentsGeom$new(name, dynamic = FALSE, ...)

Arguments

name

Unique character name.

dynamic

Logical; when TRUE vertices are electrode references resolved at render time rather than fixed coordinates.

...

Additional arguments forwarded to AbstractGeom.


LineSegmentsGeom$set_vertices()

Set vertex positions for the line segments.

Usage

LineSegmentsGeom$set_vertices(..., .list = list(), append = FALSE)

Arguments

...

Positions as numeric vectors of length 3 (static mode) or named lists with subject_code and electrode elements (dynamic mode).

.list

Additional positions supplied as a list.

append

Logical; when TRUE append rather than replace.


LineSegmentsGeom$set_color()

Set the color(s) of the line segments.

Usage

LineSegmentsGeom$set_color(...)

Arguments

...

One or more R color values (names, hex strings, or integer palette indices) that are interpolated across all segments.


LineSegmentsGeom$set_size()

Set the line width(s).

Usage

LineSegmentsGeom$set_size(...)

Arguments

...

One or more positive numbers interpolated across all segments.


LineSegmentsGeom$to_list()

Serialize the line-segment geometry to a named list for JSON export.

Usage

LineSegmentsGeom$to_list()


LineSegmentsGeom$clone()

The objects of this class are cloneable with this method.

Usage

LineSegmentsGeom$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.