[vtkusers] Frustum Culling
David E DeMarle
dave.demarle at kitware.com
Tue Mar 6 11:05:07 EST 2007
Have you tried vtkExtractSelectedFrustum?
On 3/6/07, Michael Knopke <Michael.Knopke at gmx.de> wrote:
>
> 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
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070306/91d6dfab/attachment.htm>
More information about the vtkusers
mailing list