96 lines
2.0 KiB
Protocol Buffer
96 lines
2.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
import "google/protobuf/wrappers.proto";
|
|
option csharp_namespace = "LayerClients";
|
|
|
|
service TestLayer {
|
|
rpc StreamPrerenderData (stream PrerenderRequest) returns (stream PrerenderResponse);
|
|
rpc Render (RenderRequest) returns (RenderResponse);
|
|
}
|
|
|
|
message PrerenderRequest {
|
|
ProjectData project_data = 1;
|
|
HardwareData hardware_data = 2;
|
|
string optical_schema_data = 3;
|
|
bytes image = 4;
|
|
google.protobuf.BytesValue mask = 5;
|
|
google.protobuf.BoolValue invert_mask = 6;
|
|
double difraction_angle = 7;
|
|
bool posterize_result = 8;
|
|
bool invert_profile = 9;
|
|
bool invert_horizontal_angle = 10;
|
|
double direct_angle = 11;
|
|
double angle_of_view = 12;
|
|
double object_angle = 13;
|
|
double horizontal_roughness = 14;
|
|
double vertical_roughness = 15;
|
|
}
|
|
|
|
message ProjectData {
|
|
double hologram_width = 1;
|
|
double hologram_Height = 2;
|
|
}
|
|
|
|
message HardwareData {
|
|
double ppu = 1;
|
|
double unit_size = 2;
|
|
IlluminationLevels illumination_levels = 3;
|
|
Resolution matrix_resolution = 4;
|
|
Resolution frame_resolution = 5;
|
|
Size frame_size = 6;
|
|
}
|
|
|
|
message IlluminationLevels {
|
|
int32 zero = 1;
|
|
int32 linear_low = 2;
|
|
int32 linear_high = 3;
|
|
}
|
|
|
|
message Resolution {
|
|
uint32 x = 1;
|
|
uint32 y = 2;
|
|
}
|
|
|
|
message Size {
|
|
DecimalValue width = 1;
|
|
DecimalValue height = 2;
|
|
SizeUnit unit = 3;
|
|
}
|
|
|
|
message DecimalValue {
|
|
// Whole units part of the amount
|
|
int64 units = 1;
|
|
// Nano units of the amount (10^-9)
|
|
// Must be same sign as units
|
|
sfixed32 nanos = 2;
|
|
}
|
|
|
|
enum SizeUnit {
|
|
um = 0;
|
|
mm = 1;
|
|
}
|
|
|
|
message PrerenderResponse {
|
|
repeated MatrixRow grating_period = 1;
|
|
repeated MatrixRow angles_horizontal = 2;
|
|
repeated MatrixRow phases = 3;
|
|
repeated MatrixRow saturation = 4;
|
|
}
|
|
|
|
message MatrixRow {
|
|
repeated double values = 1;
|
|
}
|
|
|
|
message RenderRequest {
|
|
uint32 x = 1;
|
|
uint32 y = 2;
|
|
uint32 frame_width = 3;
|
|
uint32 frame_height = 4;
|
|
bytes image = 5;
|
|
google.protobuf.BoolValue invert_mask = 6;
|
|
google.protobuf.BytesValue mask = 7;
|
|
google.protobuf.BytesValue automask = 8;
|
|
}
|
|
|
|
message RenderResponse {
|
|
bytes rendered_image = 1;
|
|
} |