Skip to content
Snippets Groups Projects
Commit 28ae5433 authored by Achilles Kappis's avatar Achilles Kappis
Browse files

Combine rotation and translation to a single liner

parent 75030d2a
No related branches found
No related tags found
No related merge requests found
......@@ -181,11 +181,8 @@ function [vPos, vPosMesh] = virtMicGeo(gType, geoDim, nSens, trans, rot)
error("Oops... something went wrong here... not known geometry...!!!");
end
% Rotate
vPos = vPos * rotMat3d(-rot(1), -rot(2), -rot(3), "Degs");
% Translate
vPos = vPos + trans(:).';
% Rotate and translate
vPos = vPos * rotMat3d(-rot(1), -rot(2), -rot(3), "Degs") + trans(:).';
% For "Cube" geometry provide the coordinates in a "mesh format"
if nargout > 1 && strcmpi(gType, "Cube")
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment