Struct LinePrimitive

Struct Documentation

struct LinePrimitive

A primitive representing a series of points connected by lines.

Public Types

enum class LineType : uint8_t

An enumeration indicating how input points should be interpreted to create lines.

Values:

enumerator LINE_STRIP

Connected line segments: 0-1, 1-2, …, (n-1)-n.

enumerator LINE_LOOP

Closed polygon: 0-1, 1-2, …, (n-1)-n, n-0.

enumerator LINE_LIST

Individual line segments: 0-1, 2-3, 4-5, …

Public Members

LineType type

Drawing primitive to use for lines.

std::optional<Pose> pose

Origin of lines relative to reference frame.

double thickness = 0

Line thickness.

bool scale_invariant = false

Indicates whether thickness is a fixed size in screen pixels (true), or specified in world coordinates and scales with distance from the camera (false)

std::vector<Point3> points

Points along the line.

std::optional<Color> color

Solid color to use for the whole line. One of color or colors must be provided.

std::vector<Color> colors

Per-point colors (if specified, must have the same length as points). One of color or colors must be provided.

std::vector<uint32_t> indices

Indices into the points and colors attribute arrays, which can be used to avoid duplicating attribute data.

If omitted or empty, indexing will not be used. This default behavior is equivalent to specifying [0, 1, …, N-1] for the indices (where N is the number of points provided).