[vtkusers] Simple Updating Problem!!! (using vtkPlaneSource)

Louis Desjardins lost_bits1110 at hotmail.com
Wed Jul 21 09:07:25 EDT 2004


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/




More information about the vtkusers mailing list