// Generated by https://github.com/foxglove/schemas

syntax = "proto3";

import "foxglove/Color.proto";
import "foxglove/Point3.proto";
import "foxglove/Pose.proto";

package foxglove;

// A primitive representing a series of points connected by lines
message LinePrimitive {
  // An enumeration indicating how input points should be interpreted to create lines
  enum Type {
    // 0-1, 1-2, ..., (n-1)-n
    LINE_STRIP = 0;

    // 0-1, 1-2, ..., (n-1)-n, n-0
    LINE_LOOP = 1;

    // 0-1, 2-3, 4-5, ...
    LINE_LIST = 2;
  }
  // Drawing primitive to use for lines
  Type type = 1;

  // Origin of lines relative to reference frame
  foxglove.Pose pose = 2;

  // Line thickness
  double thickness = 3;

  // Indicates whether `thickness` is a fixed size in screen pixels (true), or specified in world coordinates and scales with distance from the camera (false)
  bool scale_invariant = 4;

  // Points along the line
  repeated foxglove.Point3 points = 5;

  // Solid color to use for the whole line. One of `color` or `colors` must be provided.
  foxglove.Color color = 6;

  // Per-point colors (if specified, must have the same length as `points`). One of `color` or `colors` must be provided.
  repeated foxglove.Color colors = 7;

  // 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).
  repeated fixed32 indices = 8;
}
