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

Contents of /trunk/pyvisi/py_src/position.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: 1098 byte(s)
new pyvisi files
1 """
2 @author: John NGUI
3 """
4
5 class LocalPosition:
6 """
7 Class that defines the local positioning coordiante system (2D).
8 """
9
10 def __init__(self, x_coor, y_coor):
11 """
12 Initialise the local position.
13
14 @type x_coor: Number
15 @param x_coor: x coordinate
16 @type y_coor: Number
17 @param y_coor: y coordinate
18 """
19
20 self.__position = [x_coor, y_coor]
21
22 def _getLocalPosition(self):
23 """
24 Return the local position.
25
26 @rtype: Two column list
27 @return: List with the x and y coordinates
28 """
29
30 return self.__position
31
32 class GlobalPosition:
33 """
34 Class that defines the global positioning coordinate system (3D)
35 """
36
37 def __init__(self, x_coor, y_coor, z_coor):
38 """
39 Initialise the global position.
40
41 @type x_coor: Number
42 @param x_coor: x coordinate
43 @type y_coor: Number
44 @param y_coor: y coordinate
45 @type z_coor: Number
46 @param z_coor: z coordinate
47 """
48
49 self.__position = [x_coor, y_coor, z_coor]
50
51 def _getGlobalPosition(self):
52 """
53 Return the global position.
54
55 @rtype: Three column list
56 @return: List with the x, y and z coordinates
57 """
58
59 return self.__position

  ViewVC Help
Powered by ViewVC 1.1.26