[vtkusers] vtkPlaneSource Problem! (SetCenter to translate)

Louis Desjardins lost_bits1110 at hotmail.com
Wed Jul 21 11:03:38 EDT 2004


Okay, now I don't know whether its really an updating problem, or something 
else..

so first just to clarify: I use vtkPlaneSource's SetCenter(x,y,z) to 
reposition my parallelogram (i.e. my PlaneSource) over a different area of 
my unstructured grid slice.  It is this portion of the grid (the part that 
is outlined by the parallelogram) that is color coded.

So in my event loop, when I change the x and z values using SetCenter, it 
appears like nothing is changing,
but when I change the Y value, my parallelogram changes in a way that it 
appears either more zoomed in or zoomed out

This must have something to do with the fact that my vtkPlaneSource's Normal 
is set to (0,1,0) ?

Anyways, but why doesnt it translate left and right over my grid? it just 
looks like its zooming the same initial image in the PlaneSource 
parallelogram in and out..

Thank you again!

LD


>From: "Louis Desjardins" <lost_bits1110 at hotmail.com>
>To: vtkusers at vtk.org
>Subject: RE: [vtkusers] Simple Updating Problem!!! (using vtkPlaneSource)
>Date: Wed, 21 Jul 2004 13:07:25 +0000
>
>Okay also - if I do ColorBlock->Push(1) in my event loop, this does update 
>(ColorBlock is a vtkPlaneSource)
>but this is not the kind of translation I want,
>I want to translate it using vtkPlaneSource's SetCenter method
>but this won't update for some reason
>
>Okay tahnks in advance,
>LD
>
>
>>From: "Louis Desjardins" <lost_bits1110 at hotmail.com>
>>To: vtkusers at vtk.org
>>Subject: [vtkusers] simple updating problem using vtkPlaneSource
>>Date: Wed, 21 Jul 2004 12:20:11 +0000
>>
>>Hello vtkers,
>>
>>This seems like such a simple issue regardding just one call to an 
>>Update() or Modifed() method, but it doesnt seem to work,
>>Anyways so I have a vtkPlaneSource which slices through my 
>>vtkUnstructuredGrid dataset (appears as a small parallelogram which covers 
>>a small area of my UnstructuredGrid).   There is data associated with each 
>>of the nodes of my UnstructuredGrid, so when it is sliced by the 
>>PlaneSource, it then becomes a a set of Quad cells (SetOfQuadCells 
>>object), which is color coded with some LookupTable
>>
>>Anywyas so here is the initial setup just to get an idea:
>>
>>        ColorBlock->SetNormal( X_SliceNormal, Y_SliceNormal, Z_SliceNormal 
>>);
>>        ColorBlock->SpetOrigin( -1*XResolution, 1, -1*YResolution );
>>        ColorBlock->SetPoint1( -1*XResolution, 1, 0 );
>>        ColorBlock->SetPoint2( 0, 1, (-1*XResolution) + hypot*sin( 
>>(90-Angle)*(PI/180) ) );
>>       ColorBlock->SetResolution( XResolution, YResolution ) ;
>>
>>       ColorBlock->SetCenter( 10, CameraFocalPointY, -10 );
>>
>>	SetOfQuadCells = ColorBlock->GetOutput();
>>        SetOfQuadCells->Update();
>>
>>	CreateLookupTable();
>>
>>        ColorBlockMapper->SetInput(SetOfQuadCells);
>>        ColorBlockMapper->UseLookupTableScalarRangeOn();
>>        ColorBlockMapper->SetLookupTable(VelocityLookupTable);
>>	ColorBlockMapper->SetScalarModeToUsePointData();
>>
>>
>>etc..
>>now the center location of my vtkPlaneSource changes a few times every 
>>second, so it slices a different area of my UnstructuredGrid and so a 
>>different area shows up color coded on my screen.
>>
>>However, it appears that the color coded part is stuck as to what it was 
>>initially
>>
>>Below is what I've tried so far in the event loop to get it to update, but 
>>it doesnt work!
>>What am I missing!! =((
>>Doesnt this make sense? =(
>>
>>         ColorBlock->SetCenter( newX, newY, newZ );
>>	ColorBlock->GetOutput()->GetPointData()->Modified();
>>	ColorBlock->Update();
>>
>>	SetOfQuadCells->GetPoints()->Modified();
>>	SetOfQuadCells->Update();
>>
>>	ColorBlockMapper->GetInput()->GetPointData()->Modified();
>>	ColorBlockMapper->Update();
>>
>>	ColorBlockLODActor->Modified();
>>
>>Thanks very much in advance!
>>LD
>>
>>_________________________________________________________________
>>Discover the best of the best at MSN Luxury Living. http://lexus.msn.com/
>>
>>_______________________________________________
>>This is the private VTK discussion list. Please keep messages on-topic. 
>>Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>>Follow this link to subscribe/unsubscribe:
>>http://www.vtk.org/mailman/listinfo/vtkusers
>
>_________________________________________________________________
>FREE pop-up blocking with the new MSN Toolbar – get it now! 
>http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>
>_______________________________________________
>This is the private VTK discussion list. Please keep messages on-topic. 
>Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers

_________________________________________________________________
MSN Toolbar provides one-click access to Hotmail from any Web page – FREE 
download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/




More information about the vtkusers mailing list