[vtkusers] Detect vtkActor motion

Koteswara Rao Ruvva ruvva at yahoo.com
Thu Jul 27 18:47:24 EDT 2017


Thank you Allie. I used the first approach of comparing individual elements of vtkMatrix4x4.BTW, the vtkMatrix.GetData() does not exist in VtkPython. I had to use GetElement(i,j).
On Thursday, July 27, 2017, 1:02:48 PM PDT, Allie Vacanti <allison.vacanti at kitware.com> wrote:

On Thu, Jul 27, 2017 at 1:29 PM, Koteswara Rao Ruvva via vtkusers
<vtkusers at vtk.org> wrote:
> Hello All,
>
> I want to find out whether a vtkActor is moved from its initial position. I
> want to compare vtkActor.GetMatrix() with its initial value, but I don't see
> vtkMatrix comparison API, like overloaded == or equivalent methods. Please
> suggest.

You'll either need to pull the elements of the matrix out
(aMatrix->GetData()) and compare them, or you can just check the
modification time (someMatrix->GetMTime()) to see if anything has
modified it since the last check, depending on your usecase.

HTH,
Allie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170727/5ce64a41/attachment.html>


More information about the vtkusers mailing list