[vtk-developers] 2D Clipping Planes

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Fri Feb 16 03:13:13 EST 2001


Lisa,

 >No objections, but is it possible for you to do this by moving the 
clipping places from vtkAbstractMapper3D to vtkAbstractMapper? This way, 
the way to specify them will be the same, and since 2D mappers can be used 
in 3D scenes this can be useful (and fast if OpenGL can be used to do the 
clipping.)

Actually, This is almost what I've done. Except that I've copied the 
relevant code (from the 3D mappers) into the 2D mappers, but I'll see if 
moving it all directly to Abstract mapper is better....

Incidentally....OpenGL behaves a little strangely when clipping images. If 
the left/bottom pixel is just outside the clipping region, it clips the 
whole image away, when in fact I'd like it to just clip the few pixels 
which are outside the region. I've got around this in my code by adding a 
whole series of tests which then set the render-rectangle and allow 
sub-regions to be rendered, but its messy and not ideal for general use. 
Has anyone come across this and found a "pure opengl" solution.

JB 





More information about the vtk-developers mailing list