[vtkusers] color and vtkFeatureEdges

Melanie Tory mktory at cs.sfu.ca
Tue Mar 5 14:48:28 EST 2002


Hi,

I'm trying to give the edges of my actors a different color, so to do this
I'm using vtkFeatureEdges.  I select only the boundary edges, and set the
color of the edges in the actor.  However, the color only appears on one
side of the edges -- when I rotate the object, the other side is black.
Has anyone encountered this problem?  Any idea what is happening?

Here's a code snippet of what I'm doing (from Java):
	vtk FeatureEdges ph_edges = new vtkFeatureEdges();
            ph_edges.SetInput(ph_plane.GetOutput());
            ph_edges.BoundaryEdgesOn();
            ph_edges.ManifoldEdgesOff();
            ph_edges.FeatureEdgesOff();
            ph_edges.NonManifoldEdgesOff();
            ph_edges.ColoringOff();
        vtkPolyDataMapper edgeMapper = new vtkPolyDataMapper();
            edgeMapper.SetInput(ph_edges.GetOutput());
            edgeMapper.ScalarVisibilityOff();
        vtkActor edgeActor = new vtkActor();
            edgeActor.SetMapper(edgeMapper);
            edgeActor.GetProperty().SetColor(1.0, 0.0, 0.0);

Thanks for any help!

Melanie





More information about the vtkusers mailing list