[vtkusers] some help - rotations

Christos Panagiotou cpanagio at cs.ucl.ac.uk
Wed Aug 13 23:54:43 EDT 2003


guys

i want to rotate a vtkLineSource object and show the new and old position

1. i saw that vtkLineSource does not have a DeepCopy or SwallowCopy 
method (why?) - is there any way to achieve a creation
    of a duplicate lineSource object?
2. i do it using the vtkTransformPolyDataFilter

  vtkTransform *t = vtkTransform::New();
  vtkTransformPolyDataFilter *tpdf = vtkTransformPolyDataFilter::New();

   vtkLineSource *tempRay = vtkLineSource::New();
   tempRay->SetPoint1(coords1[0],coords1[1],coords1[2]);
   tempRay->SetPoint2(coords2[0],coords2[1],coords2[2]);
                   
    t->Translate(coords1[0],coords1[1],coords1[2]);
    t->RotateZ(i);
    t->Translate(-coords1[0],-coords1[1],-coords1[2]);
       
    tpdf->SetInput(tempRay->GetOutput());
    tpdf->SetTransform(t);

3. Is there anyway now to retrieve the vtkLineSource object from the 
tpdf? I need to collect all the points (start-end of line) for all lines 
that have
     been derived from the rotations

i would appreciate any help
christos

any suggestions?




More information about the vtkusers mailing list