/[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 1384 - (hide annotations)
Fri Jan 11 02:29:38 2008 UTC (13 years, 3 months ago) by phornby
Original Path: temp_trunk_copy/pyvisi/py_src/normals.py
File MIME type: text/x-python
File size: 1482 byte(s)
Make a temp copy of the trunk before checking in the windows changes


1 ksteube 1147 """
2 jongui 1197 @var __author__: name of author
3     @var __copyright__: copyrights
4     @var __license__: licence agreement
5     @var __url__: url entry point on documentation
6     @var __version__: version
7     @var __date__: date of the version
8 ksteube 1147 """
9    
10 jongui 1197 __author__="John Ngui, john.ngui@uq.edu.au"
11     __copyright__=""" Copyright (c) 2006 by ACcESS MNRF
12     http://www.access.edu.au
13     Primary Business: Queensland, Australia"""
14     __license__="""Licensed under the Open Software License version 3.0
15     http://www.opensource.org/licenses/osl-3.0.php"""
16     __url__="http://www.iservo.edu.au/esys"
17     __version__="$Revision$"
18     __date__="$Date$"
19    
20    
21 ksteube 1147 import vtk
22    
23     class Normals:
24     """
25     Class that defines normals. Normals are used to average the normals of
26     points in order to generate better sufaces (in the case of tensors, normals
27     avoids the tensors from appearing black in color).
28     """
29    
30 jongui 1148 def __init__(self):
31 ksteube 1147 """
32     Initialise the normals.
33 jongui 1148 """
34 ksteube 1147
35 jongui 1148 self.__vtk_poly_data_normals = vtk.vtkPolyDataNormals()
36    
37     def _setupNormals(self, object):
38     """
39     Setup the normals.
40    
41 ksteube 1147 @type object: vtkPolyData, etc
42     @param object: Input for the normals
43     """
44    
45     self.__object = object
46     self.__setInput()
47    
48     def __setInput(self):
49     """
50     Set the input for the normals.
51     """
52    
53     self.__vtk_poly_data_normals.SetInput(self.__object)
54    
55 jongui 1148 def _getNormalsOutput(self):
56 ksteube 1147 """
57     Return the output of the normals.
58    
59     @rtype: vtkPolyData
60     @return: Polygonal data
61     """
62    
63     return self.__vtk_poly_data_normals.GetOutput()

  ViewVC Help
Powered by ViewVC 1.1.26