[vtk-developers] vtkLODProp3D and vtkProp3D:SetUserTransform ? (+ GetActors bug ?)

Sebastien BARRE sebastien at barre.nom.fr
Mon Jul 17 13:45:50 EDT 2000


I found the bug Lisa (see below).
Maybe will David Gobbi tell us more about what to do with the Transform 
modification time.

>During a render, the current matrix of the LODProp3D is pushed down onto 
>the selected LOD:
>
>   // Push the matrix down into the selected LOD
>   vtkProp3D *p = this->LODs[this->SelectedLODIndex].Prop3D;
>   if ( p->GetMTime() < this->GetMTime() )
>     {
>     this->GetMatrix( p->GetUserMatrix() );
>     }

I see

>When you call this->GetMatrix() does this include the transform's matrix 
>as well?

Yes it is, BUT when you do...

   if ( p->GetMTime() < this->GetMTime() )

...it does not guarantee that 'this' has been modified when you have 
modified its UserTransform. I've just checked that out : if you modify the 
user transform, the GetMTime remains the same, therefore the matrix is not 
pushed down, and the transformation is not reflected.

If the cost of the matrix copy is small, then maybe should we remove the 
test. If not, introduce a new one managing the MTime of the UserTransform...

>I specifically avoided adding any access methods to the internally created 
>props so that users could not modify them in any way.

I understand, but what about the "power users" ? :) I mean, there is a lot 
of black magic behind the LODProp3D, creating actors, volumes and so on is 
not a small thing, there is a lot of case when one usually customize the 
actors, or just want access to them. Hence, I think an access method would 
be nice. But these are just my 2 cents.

Thanks for your help

Sebastien




More information about the vtk-developers mailing list