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

Annotation of /trunk/pyvisi/py_src/sphere.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: 789 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 Sphere:
8     """
9     Class that defines a sphere.
10     """
11    
12     def __init__(self):
13     """
14     Initialise the sphere.
15     """
16    
17     self.__vtk_sphere = vtk.vtkSphereSource()
18    
19     def setThetaResolution(self, resolution):
20     """
21     Set the theta resolution of the sphere.
22    
23     @type resolution: Number
24     @param resolution: Theta resolution
25     """
26    
27     self.__vtk_sphere.SetThetaResolution(resolution)
28    
29     def setPhiResolution(self, resolution):
30     """
31     Set the phi resolution of the sphere.
32    
33     @type resolution: Number
34     @param resolution: Phi resolution
35     """
36    
37     self.__vtk_sphere.SetPhiResolution(resolution)
38    
39 jongui 1148 def _getSphereOutput(self):
40 ksteube 1147 """
41     Return the output of the sphere.
42    
43     @rtype: vtkPolyData
44     @return: Polygonal data
45     """
46    
47     return self.__vtk_sphere.GetOutput()
48    

  ViewVC Help
Powered by ViewVC 1.1.26