[vtkusers] Upgrading previous version code to vtk4.0?
Berk Geveci
berk.geveci at kitware.com
Wed May 22 09:27:30 EDT 2002
si->GetMatrix()->SetElement(0,0,1);
etc...
On Wed, 2002-05-22 at 09:05, Mahmoud El-Banna wrote:
hi,
i am trying to upgrade an old version code to be valid on vtk4.0 the
following code is to build 3d how can i map it to be valid on vtk
4.0(written in c++)
/////////////////////////////////////////////////////
vtkTransform *si=vtkTransform::New();
si->GetMatrix().SetElement(0,0,1);
si->GetMatrix().SetElement(0,1,0);
si->GetMatrix().SetElement(0,2,0);
si->GetMatrix().SetElement(0,3,0);
si->GetMatrix().SetElement(1,0,0);
si->GetMatrix().SetElement(1,1,0);
si->GetMatrix().SetElement(1,2,1);
si->GetMatrix().SetElement(1,3,0);
si->GetMatrix().SetElement(2,0,0);
si->GetMatrix().SetElement(2,1,-1);
si->GetMatrix().SetElement(2,2,0);
si->GetMatrix().SetElement(2,3,0);
si->GetMatrix().SetElement(3,0,0);
si->GetMatrix().SetElement(3,1,0);
si->GetMatrix().SetElement(3,2,0);
si->GetMatrix().SetElement(3,3,1);
vtkTransform *hf=vtkTransform::New();
hf->GetMatrix().SetElement (0 ,0 ,-1);
hf->GetMatrix().SetElement (0 ,1 ,0);
hf->GetMatrix().SetElement (0 ,2 ,0);
hf->GetMatrix().SetElement (0 ,3 ,0);
hf->GetMatrix().SetElement (1 ,0 ,0);
hf->GetMatrix().SetElement (1 ,1 ,1);
hf->GetMatrix().SetElement (1 ,2 ,0);
hf->GetMatrix().SetElement (1 ,3 ,0);
hf->GetMatrix().SetElement (2 ,0 ,0);
hf->GetMatrix().SetElement (2 ,1 ,0);
hf->GetMatrix().SetElement (2 ,2 ,-1);
hf->GetMatrix().SetElement (2 ,3 ,0);
hf->GetMatrix().SetElement (3 ,0 ,0);
hf->GetMatrix().SetElement (3 ,1 ,0);
hf->GetMatrix().SetElement (3 ,2 ,0);
hf->GetMatrix().SetElement (3 ,3, 1);
vtkTransform *hfsi=vtkTransform::New();
hfsi->Concatenate (hf->GetMatrix());
hfsi->Concatenate (si->GetMatrix());
thank u in advance
Mahmoud El-Banna
________________________________________________________________________
Send and receive Hotmail on your mobile device: Click Here
_______________________________________________ This is the private VTK
discussion list. Please keep messages on-topic. Check the FAQ at: Follow
this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list