1 |
""" |
2 |
@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 |
""" |
9 |
|
10 |
__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 |
import vtk |
22 |
|
23 |
class Sphere: |
24 |
""" |
25 |
Class that defines a sphere. |
26 |
""" |
27 |
|
28 |
def __init__(self): |
29 |
""" |
30 |
Initialise the sphere. |
31 |
""" |
32 |
|
33 |
self.__vtk_sphere = vtk.vtkSphereSource() |
34 |
|
35 |
def setThetaResolution(self, resolution): |
36 |
""" |
37 |
Set the theta resolution of the sphere. |
38 |
|
39 |
@type resolution: Number |
40 |
@param resolution: Theta resolution |
41 |
""" |
42 |
|
43 |
self.__vtk_sphere.SetThetaResolution(resolution) |
44 |
|
45 |
def setPhiResolution(self, resolution): |
46 |
""" |
47 |
Set the phi resolution of the sphere. |
48 |
|
49 |
@type resolution: Number |
50 |
@param resolution: Phi resolution |
51 |
""" |
52 |
|
53 |
self.__vtk_sphere.SetPhiResolution(resolution) |
54 |
|
55 |
def _getSphereOutput(self): |
56 |
""" |
57 |
Return the output of the sphere. |
58 |
|
59 |
@rtype: vtkPolyData |
60 |
@return: Polygonal data |
61 |
""" |
62 |
|
63 |
return self.__vtk_sphere.GetOutput() |
64 |
|