/[escript]/trunk/pyvisi/py_src/normals.py
ViewVC logotype

Annotation of /trunk/pyvisi/py_src/normals.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 943 - (hide annotations)
Mon Jan 29 07:22:43 2007 UTC (13 years, 8 months ago) by jongui
File MIME type: text/x-python
File size: 819 byte(s)
new pyvisi files
1 jongui 943 """
2     @author: John NGUI
3     """
4    
5     import vtk
6    
7     class Normals:
8     """
9     Class that defines normals. Normals is used to average the normals of
10     points in order to generate better sufaces (in the case of tensors, normals
11     avoids the tensors from appearing black in color).
12     """
13    
14     def __init__(self, object):
15     """
16     Initialise the normals.
17    
18     @type object: vtkUnstructuredGrid, etc
19     @param object: Input for the normals
20     """
21    
22     self.__object = object
23     self.__vtk_poly_data_normals = vtk.vtkPolyDataNormals()
24     self.__setInput()
25    
26     def __setInput(self):
27     """
28     Set the input for the normals.
29     """
30    
31     self.__vtk_poly_data_normals.SetInput(self.__object)
32    
33     def _getOutput(self):
34     """
35     Return the output of the normals.
36    
37     @rtype: vtkPolyData
38     @return: Polygonal data
39     """
40    
41     return self.__vtk_poly_data_normals.GetOutput()
42    

  ViewVC Help
Powered by ViewVC 1.1.26