[vtkusers] simple updating problem using vtkPlaneSource
Louis Desjardins
lost_bits1110 at hotmail.com
Wed Jul 21 08:20:11 EDT 2004
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/
More information about the vtkusers
mailing list