[vtkusers] Actor matrix and color

Jean-Baptiste Estival jeanbaptiste.estival at club-internet.fr
Thu Nov 27 04:43:36 EST 2003


Hello everybody,
i'm a newbie in vtk, and I have already some troubles with it.
I am drawing two simple objects in the scene : a cylinder and a cube.
the cylinder is blue but when I apply a matrix on the cylinder actor it appears black.
there is the code :
vtkMatrix4x4 * matrix = vtkMatrix4x4::New();

matrix->SetElement(0,0,0);

matrix->SetElement(1,0,1);

matrix->SetElement(2,0,0);

matrix->SetElement(3,0,0);

matrix->SetElement(0,1,1);

matrix->SetElement(1,1,0);

matrix->SetElement(2,1,0);

matrix->SetElement(3,1,0);

matrix->SetElement(0,2,0);

matrix->SetElement(1,2,0);

matrix->SetElement(2,2,1);

matrix->SetElement(3,2,0);

matrix->SetElement(0,3,0);

matrix->SetElement(1,3,0);

matrix->SetElement(2,3,0);

matrix->SetElement(3,3,1);

//this->cylindreActor->PokeMatrix(matrix);

this->cylindreActor->SetUserMatrix(matrix);

this->cylindreActor->GetProperty()->SetColor(0.54f,0.90f,0.96f);


If I comment the SetUserMatrix line, the object is blue but not in good orientation.
Can anybody help me ?
thanks

JB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20031127/827807db/attachment.htm>


More information about the vtkusers mailing list