function [Tlast] = manimate(h,P,Tcurr,Tset,ord)
% h- graphic handle
% P- Objective vertices
% Tcurr- current/starting position animation
% Tset- set of matrix with geom transform (3D array - hypermatrix)
% ord=1 - local (post-mult) ; 0- global (pre-mult)
for n=1:size(Tset,3)
    if ord==1
        T=Tcurr*Tset(:,:,n); %nao mudar o Tcurr
    else 
        T=Tset(:,:,n)*Tcurr;
    end
    P1=T*P; %update obj position
    set(h,'Vertices',P1(1:3,:)');
    
    %gerar os pontinhos
    %plot3(P1(1,1),P1(2,1),P1(3,1),'.b');
    pause(0.05);
end
Tlast= T;
end


