syntax = "proto3";

package scene;

message CameraData {
  uint32 id = 1;
  string name = 2;
  uint32 width = 3;
  uint32 height = 4;
  repeated float intrinsics = 5;
}

message MaterialData {
  uint32 id = 1;
  string name = 2;
  repeated float blif = 3;
}

message ImageData {
  string type = 1;
  string path = 2;
}

message MeshData {
  string name = 1;
  string path = 2;
  repeated float pose = 3;
  bytes ply_data = 4;
}

message PointCloudData {
  message PointData {
    repeated float position = 1;
    repeated uint32 normal = 2;
  }
  string name = 1;
  repeated PointData points = 2;
}

message CaptureData {
  
  message LabelData {
    string id = 1;
    uint32 x = 2;
    uint32 y = 3;
  }

  string id = 1;
  uint64 timestamp = 2;
  string type = 3;
  uint32 exposure = 4;
  uint32 camera = 5;
  repeated float pose = 6;
  repeated ImageData images = 7;
  repeated LabelData labels = 8;
}

message SurfelData {
  repeated uint32 position = 1;
  repeated uint32 normal = 2;
  uint32 segment = 3;
  uint32 level = 4;
  uint32 type = 5;
  uint32 displacement = 6;
  uint32 material = 7;
}

message PlenopticFieldData {

  message SegmentData {
    uint32 id = 1;
    string name = 2;
  }

  float size = 1;
  repeated float min_corner = 2;
  repeated SegmentData segments = 3;
  repeated SurfelData surfels = 4;
}

message PointLightFieldData {
  message RadianceMapData {
    string type = 1;
    string path = 2;
  }
  uint32 id = 1;
  repeated float position = 2;
  repeated RadianceMapData radiance_map = 3;
  bytes incident = 4;
  bytes exitant = 5;
}

message SceneData {
  string name = 1;
  repeated string labels = 2;
  repeated MaterialData materials = 3;
  repeated CameraData cameras = 4;
  repeated MeshData meshes = 5;
  repeated PointCloudData point_clouds = 6;
  repeated CaptureData captures = 7;
  repeated PointLightFieldData point_light_fields = 8;
  repeated PlenopticFieldData plenoptic_fields = 9;
  
}