[vtkusers] Clipping plane transformation
Benjamin King
king at stud.uni-hannover.de
Thu Jun 13 13:13:53 EDT 2002
Hi!
The follwing code demonstrates a problem I had with clipping
planes:
----
package require vtk
vtkTkRenderWidget .rw
pack .rw -expand yes -fill both
vtkRenderer renderer
[.rw GetRenderWindow] AddRenderer renderer
vtkPlane plane
vtkTransform transform
plane SetTransform transform
vtkSampleFunction sample
sample SetImplicitFunction plane
sample SetSampleDimensions 2 2 2
vtkContourFilter contour
contour SetInput [sample GetOutput]
contour SetValue 0 0.0
vtkPolyDataMapper planemapper
planemapper SetInput [contour GetOutput]
vtkActor planeactor
planeactor SetMapper planemapper
vtkCubeSource cube
vtkPolyDataMapper cubemapper
cubemapper SetInput [cube GetOutput]
cubemapper AddClippingPlane plane
vtkActor cubeactor
cubeactor SetMapper cubemapper
renderer AddActor planeactor
renderer AddActor cubeactor
[renderer GetActiveCamera] Azimuth 127
update
while 1 {
transform RotateX 1
## even uncommenting the following two lines doesn't help
#cubemapper RemoveAllClippingPlanes
#cubemapper AddClippingPlane plane
.rw Render
}
----
The clipping plane isn't transformed like the version that is
mapped with planemapper. Is this a bug?
Using the plane's SetNormal method is a workaround for this.
cu,
Benni
--
[ X ] nail here for new monitor
More information about the vtkusers
mailing list