[vtkusers] vtkTextureMapToPlane plane definition
    Christophe Franco 
    cfranco at amsatec.fr
       
    Thu Oct 23 04:51:06 EDT 2003
    
    
  
David.Pont at ForestResearch.co.nz wrote:
> Salut Christophe,
> 
> With vtkPlaneSource you can specify a plane (facing in the z direction)
> with three points, then change location and orientation with SetNormal(),
> SetCenter() and Push(). vtkTextureMapToPlane seems to combine
> vtkPlaneSource and vtkTexture but the documentation is not very clear.
> 
> 
> 
> You might have more control using vtlPlaneSource,  I have used the
> following:
> 
> 
> vtkTIFFReader -> vtkTexture
> --------------------------------------------------------v
> vtkPlaneSource -> vtkTransformPolyDataFilter -> vtkPolyDataMapper ->
> vtkActor
> 
> I set the 3 points for vtkPlaneSource by getting the image height and width
> using vtkTIFFReader->Update followed by vtkTIFFReader->GetDataExtent,
> then
> vtkPlaneSource->SetPoint0( 0, 0, 0 );
                   ^^^^^^^^^
I guess you mean SetOrigin here.
> vtkPlaneSource->SetPoint1( width, 0,  0 );
> vtkPlaneSource->SetPoint2( 0, height, 0 );
> 
> I use vtkPlaneSource->SetNormal(), SetCenter() and Push() to control
> location and orientation. I use a vtkTransform with the
> vtkTransformPolyDataFilter to control global scaling, you may not need
> this.
Thank you, this method works quite well for what I want to do, since I 
can use the vtkPlaneSource for a vtkGlyph3D.
    
    
More information about the vtkusers
mailing list