[vtkusers] Frustum Culling

Michael Knopke Michael.Knopke at gmx.de
Tue Mar 6 03:30:27 EST 2007


Hi,

 

I'm trying to write a new vtk-filter that can crop-out (set scalars to fixed
value e.g. 0) selected volumes (e.g. inside of BoxWidget).

Unlike all other cropping filter I know, will this filter work with
vtkImageData and preserve topology and geometry. This means it will not cut
cells.

Therefore I'm trying to implement frustum culling (with the planes from
BoxWidget) and later add octree to speed up calculation.

 

The problem I have is regarding detection if the point that is evaluated
lies behind the plane. As far as I know, one has to calculate:

 

1). Shortest distance to plane (this works well)  --> returns
PlanePointDistance

 

2). Add this distance to the DotProduct of ( PointX, NormalOfPlane):

 

   Result = PlanePointDistance + (vtkMath::Dot(PointX, Normal));

 

3). If result is negative than pointX lies behind Plane

 

 

Unfortunately this yields wrong results. Does anybody know what's wrong?

 

Michael

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070306/fb5b2d3e/attachment.htm>


More information about the vtkusers mailing list