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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 943 - (show annotations)
Mon Jan 29 07:22:43 2007 UTC (14 years, 1 month ago) by jongui
File MIME type: text/x-python
File size: 781 byte(s)
new pyvisi files
1 """
2 @author: John NGUI
3 """
4
5 import vtk
6
7 class Sphere:
8 """
9 Class that defines spheres.
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 resolutio of the sphere.
32
33 @type resolution: Number
34 @param resolution: Phi resolution
35 """
36
37 self.__vtk_sphere.SetPhiResolution(resolution)
38
39 def _getOutput(self):
40 """
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