[ENH] vtkProp3D : UserMatrix : pre/post concatenation flag ?
Sebastien Barre
sbarre at claranet.fr
Sun Jan 2 19:24:02 EST 2000
Hi
I was wondering if it would be possible to add a flag to control how the
UserMatrix of a Prop3D is concatenated with the current Prop3D's own matrix.
Here is the actual code (graphics/vtkProp3D.cxx) :
void vtkProp3D::GetMatrix(double result[16])
{
// check whether or not need to rebuild the matrix
if ( this->GetMTime() > this->MatrixMTime )
{
this->GetOrientation();
this->Transform->Push();
this->Transform->Identity();
this->Transform->PostMultiply();
// shift back to actor's origin
[...]
// scale
[...]
// rotate
[...]
// move back from origin and translate
[...]
// apply user defined matrix last if there is one
if (this->UserMatrix)
{
this->Transform->Concatenate(this->UserMatrix);
}
this->Transform->PreMultiply();
[...]
}
As one can see, there is no way to control the concatenation of the user
matrix, it is set to PostMultiply. Maybe adding two members like
PostMultiplyUserMatrix, PostMultiplyUserMatrix ?
// apply user defined matrix last if there is one
if (this->UserMatrix)
{
if (this->PreMultiplyFlag != 0) {
this->Transform->PreMultiply();
}
this->Transform->Concatenate(this->UserMatrix);
}
Does it look stupid or break some design issues ? There is sometimes when
I'd like a transform common to many actors to take place, then a specific
transform to happen for a specific actor (in that order).
Thanks
-----------------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>. For help, send message body containing
"info vtkusers" to the same address. Live long and prosper.
-----------------------------------------------------------------------------
More information about the vtkusers
mailing list