// Proto file for 3D Transforms

syntax = "proto3";

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

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

service Transform3DService {
  rpc CreateIdentity (google.protobuf.Empty) returns (EDBObjMessage) {}

  rpc CreateCopy (EDBObjMessage) returns (EDBObjMessage) {}
  rpc CreateOffset (CPos3DMessage) returns (EDBObjMessage) {}

  rpc CreateCenterScale (CPos3DDoubleMessage) returns (EDBObjMessage) {}
  rpc CreateRotationFromAngle (CPos3DMessage) returns (EDBObjMessage) {}
  
  rpc CreateRotationFromAxis (CPos3DTripleMessage) returns (EDBObjMessage) {}
  rpc CreateRotationFromAxisAndAngle (CPos3DDoubleMessage) returns (EDBObjMessage) {}
  
  rpc CreateRotationFromToAxis (CPos3DPairMessage) returns (EDBObjMessage) {}
  rpc CreateTransform2D (DoublePropertyMessage) returns (EDBObjMessage) {}
  
  rpc OperatorPlus (PointerPropertyMessage) returns (EDBObjMessage) {}
  
  rpc TransformPoint (CPos3DPropertyMessage) returns (CPos3DMessage) {}

  rpc GetZYXRotation (EDBObjMessage) returns (CPos3DMessage) {}
  rpc GetAxis (EDBObjMessage) returns (CPos3DTripleMessage) {}

  rpc Transpose (EDBObjMessage) returns (google.protobuf.Empty) {}
  rpc Invert (EDBObjMessage) returns (google.protobuf.Empty) {}

  rpc IsIdentity (IsIdentityMessage) returns (google.protobuf.BoolValue) {}
  rpc IsEqual (IsEqualMessage) returns (google.protobuf.BoolValue) {}
  
  rpc GetScaling (EDBObjMessage) returns (CPos3DMessage) {}
  rpc GetShift (EDBObjMessage) returns (CPos3DMessage) {}
  
  rpc SetMatrix (DoublesPropertyMessage) returns (google.protobuf.Empty) {}
  rpc GetMatrix (EDBObjMessage) returns (DoublesMessage) {}
}

message IsIdentityMessage {
  EDBObjMessage target = 1;
  double eps = 2;
  bool rotation = 3;
}

message IsEqualMessage {
  EDBObjMessage target = 1;
  EDBObjMessage value = 2;
  double eps = 3;
  bool rotation = 4;
}
