/[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 1148 - (hide annotations)
Wed May 16 22:45:33 2007 UTC (13 years, 11 months ago) by jongui
File MIME type: text/x-python
File size: 877 byte(s)
Added the updated files for pyvisi and removed some incorrect reference images.
1 ksteube 1147 """
2     @author: John NGUI
3     """
4    
5     import vtk
6    
7     class Normals:
8     """
9     Class that defines normals. Normals are 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 jongui 1148 def __init__(self):
15 ksteube 1147 """
16     Initialise the normals.
17 jongui 1148 """
18 ksteube 1147
19 jongui 1148 self.__vtk_poly_data_normals = vtk.vtkPolyDataNormals()
20    
21     def _setupNormals(self, object):
22     """
23     Setup the normals.
24    
25 ksteube 1147 @type object: vtkPolyData, etc
26     @param object: Input for the normals
27     """
28    
29     self.__object = object
30     self.__setInput()
31    
32     def __setInput(self):
33     """
34     Set the input for the normals.
35     """
36    
37     self.__vtk_poly_data_normals.SetInput(self.__object)
38    
39 jongui 1148 def _getNormalsOutput(self):
40 ksteube 1147 """
41     Return the output of the normals.
42    
43     @rtype: vtkPolyData
44     @return: Polygonal data
45     """
46    
47     return self.__vtk_poly_data_normals.GetOutput()

  ViewVC Help
Powered by ViewVC 1.1.26