// Proto file for Transforms

syntax = "proto3";

// Package
package ansys.api.edb.v1;

// Imports
import "ansys/api/edb/v1/edb_messages.proto";
import "ansys/api/edb/v1/point_data.proto";
import "ansys/api/edb/v1/polygon_data.proto";

service TransformService {
  rpc Rotate (PointDataRotateMessage) returns (PointMessage) {}
  rpc Create (TransformMessage) returns (EDBObjMessage) {}

  rpc GetScale (EDBObjMessage) returns (ValueMessage) {}
  rpc SetScale (ValuePropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetMirror (EDBObjMessage) returns (google.protobuf.BoolValue) {}
  rpc SetMirror (BoolPropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetRotation (EDBObjMessage) returns (ValueMessage) {}
  rpc SetRotation (ValuePropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetOffsetX (EDBObjMessage) returns (ValueMessage) {}
  rpc SetOffsetX (ValuePropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetOffsetY (EDBObjMessage) returns (ValueMessage) {}
  rpc SetOffsetY (ValuePropertyMessage) returns (google.protobuf.Empty) {}

  rpc TransformPlus (TransformOperatorMessage) returns (EDBObjMessage) {}
  rpc IsIdentity (EDBObjMessage) returns (google.protobuf.BoolValue) {}

  rpc TransformPoint (PointPropertyMessage) returns (PointMessage) {}
  rpc TransformPolygon (PolygonDataPropertyMessage) returns (PolygonDataMessage) {}
}

message TransformMessage {
  ValueMessage scale = 1;
  ValueMessage angle = 2;
  bool mirror = 3;
  ValueMessage offset_x = 4;
  ValueMessage offset_y = 5;
}

message TransformPropertyMessage {
  EDBObjMessage target = 1;
  TransformMessage transf = 2;
}

message TransformOperatorMessage {
  EDBObjMessage target_1 = 1;
  EDBObjMessage target_2 = 2;
}