Fwd: Re: User Transform....

Will Schroeder will.schroeder at kitware.com
Fri Mar 24 08:27:35 EST 2000


Hi David-

At 07:52 AM 3/24/00 -0500, you wrote:
>Hi Will,
>
>
>Personally, though, I would like the UserMatrix and UserTransform to
>be distinct.  Why?  Because a handfull of VTK classes use the 
>UserMatrix (e.g. vtkAssembly) which implies that it is not a true
>"User" matrix at all... if you set the UserMatrix for an actor and
>then add that actor to an assembly, its UserMatrix is overwritten.
>It seems that if one calls an ivar "User" and then modifies it when
>the user isn't expecting, it should have been called something else.

No longer true in my changes...this was one of the reasons I rewrote the assembly stuff.

The way things work in my changes is that there is a new class - vtkAssemblyPath - that is basically an ordered list of props with associated matrices (if any). (The path consists of nodes that refer to the prop and matrix.) Picking works now by returning an assembly path, and vtkAssembly and vtkPropAssembly build vtkAssemblyPaths without altering the UserMatrix. (The use of assembly paths is necessary to completely describe what was picked...e.g., an actor can be used in different assemblies, only the path tells you in what context was the actor picked.)

I plan on checking in the assembly changes when I get back from vacation the week of April 1. (We're also waiting on final permission from the client who paid to have this added to VTK.)


>Here is a possible solution.  The UserMatrix and UserTransform methods
>can both refer to the same transformation.
>
>Inside SetUserTransform(trans), SetUserMatrix(trans.GetMatrixPointer())
>is called.
>
>Inside SetUserMatrix(matrix), a new transform 'trans' is created from 
>the matrix, and SetUserTransform(trans) is called.

Maybe this is the right thing to do...let me study it and talk it over with some of the folks here.



>Eeek... this is looking like an opinion piece, and I don't know if
>belting out my opinions is wise considering how new I am to VTK.
>Oh well, I spent enough time writing this little piece that it would 
>be a waste to erase it and start over.

Opinions are good. As far as I'm concerned the work you are doing is first rate and a great addition to the system, I definitely don't want to discourage you in the slightest. I just want to make sure that we do things the best way possible.

Will




More information about the vtk-developers mailing list