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

syntax = "proto3";

import "foxglove/ArrowPrimitive.proto";
import "foxglove/CubePrimitive.proto";
import "foxglove/CylinderPrimitive.proto";
import "foxglove/KeyValuePair.proto";
import "foxglove/LinePrimitive.proto";
import "foxglove/ModelPrimitive.proto";
import "foxglove/SpherePrimitive.proto";
import "foxglove/TextPrimitive.proto";
import "foxglove/TriangleListPrimitive.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";

package foxglove;

// A visual element in a 3D scene. An entity may be composed of multiple primitives which all share the same frame of reference.
message SceneEntity {
  // Timestamp of the entity
  google.protobuf.Timestamp timestamp = 1;

  // Frame of reference
  string frame_id = 2;

  // Identifier for the entity. A entity will replace any prior entity on the same topic with the same `id`.
  string id = 3;

  // Length of time (relative to `timestamp`) after which the entity should be automatically removed. Zero value indicates the entity should remain visible until it is replaced or deleted.
  google.protobuf.Duration lifetime = 4;

  // Whether the entity should keep its location in the fixed frame (false) or follow the frame specified in `frame_id` as it moves relative to the fixed frame (true)
  bool frame_locked = 5;

  // Additional user-provided metadata associated with the entity. Keys must be unique.
  repeated foxglove.KeyValuePair metadata = 6;

  // Arrow primitives
  repeated foxglove.ArrowPrimitive arrows = 7;

  // Cube primitives
  repeated foxglove.CubePrimitive cubes = 8;

  // Sphere primitives
  repeated foxglove.SpherePrimitive spheres = 9;

  // Cylinder primitives
  repeated foxglove.CylinderPrimitive cylinders = 10;

  // Line primitives
  repeated foxglove.LinePrimitive lines = 11;

  // Triangle list primitives
  repeated foxglove.TriangleListPrimitive triangles = 12;

  // Text primitives
  repeated foxglove.TextPrimitive texts = 13;

  // Model primitives
  repeated foxglove.ModelPrimitive models = 14;
}
