NAME
vtkPolyDataNormals - compute normals for polygonal mesh
SYNOPSIS
#include "/opt/vtk-c++/graphics/vtkPolyDataNormals.h"
class VTK_EXPORT vtkPolyDataNormals : public vtkPolyDataToPolyDataFilter
vtkPolyDataNormals();
static vtkPolyDataNormals *New() {return new vtkPolyDataNormals;};
const char *GetClassName() {return "vtkPolyDataNormals";};
void PrintSelf(ostream& os, vtkIndent indent);
void SetFeatureAngle(float);
float GetFeatureAngle();
void SetSplitting(int);
int GetSplitting();
void SplittingOn();
void SplittingOff();
void SetConsistency(int);
int GetConsistency();
void ConsistencyOn();
void ConsistencyOff();
void SetFlipNormals(int);
int GetFlipNormals();
void FlipNormalsOn();
void FlipNormalsOff();
void SetMaxRecursionDepth(int);
int GetMaxRecursionDepth();
void SetNonManifoldTraversal(int);
int GetNonManifoldTraversal();
void NonManifoldTraversalOn();
void NonManifoldTraversalOff();
DESCRIPTION
vtkPolyDataNormals is a filter that computes point normals for a polygonal mesh. The filter can reorder polygons to insure consistent orientation across polygon neighbors. Sharp edges can be split and points duplicated with separate normals to give crisp (rendered) surface definition. It is also possible to globally flip the normal orientation.
The algorithm works by determining normals for each polygon and then averaging them at shared points. When sharp edges are present, the edges are split and new points generated to prevent blurry edges (due to Gouraud shading).
CAVEATS
Normals are computed only for polygons and triangle strips. Normals are not computed for lines or vertices.
Triangle strips are broken up into triangle polygons. You may want to restrip the triangles.
SUMMARY
void SetFeatureAngle(float)
Specify the angle that defines a sharp edge. If the difference in angle across neighboring polygons is greater than this value, the shared edge is considered "sharp".
void SetSplitting(int)
Turn on/off the splitting of sharp edges.
void SetConsistency(int)
Turn on/off the enforcement of consistent polygon ordering.
void SetFlipNormals(int)
Turn on/off the global flipping of normal orientation. Flipping reverves the meaning of front and back for Frontface and Backface culling in vtkProperty. Flipping modifies both the normal direction and the order of a cell's points.
void SetMaxRecursionDepth(int)
Control the depth of recursion used in this algorithm. (Some systems have limited stack depth.)
void SetNonManifoldTraversal(int)
Turn on/off traversal across non-manifold edges. This will prevent problems where the consistency of polygonal ordering is corrupted due to topological loops.
vtkPolyDataNormals()
Construct with feature angle=30, splitting and consistency turned on, flipNormals turned off, and nonmanifold traversal turned on.