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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1004 - (show annotations)
Thu Mar 1 04:57:31 2007 UTC (12 years, 4 months ago) by jongui
File MIME type: text/x-python
File size: 809 byte(s)
Updated the epydocs, comments and organized codes to ease readability.
1 """
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 def __init__(self, object):
15 """
16 Initialise the normals.
17
18 @type object: vtkPolyData, 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()

  ViewVC Help
Powered by ViewVC 1.1.26