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

Annotation of /trunk/pyvisi/py_src/position.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1147 - (hide annotations)
Wed May 16 06:39:11 2007 UTC (13 years, 11 months ago) by ksteube
File MIME type: text/x-python
File size: 1223 byte(s)
Added back in some files that were accidentally deleted.

1 ksteube 1147 """
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 tuple containing numbers
27     @return: Tuple with the x and y coordinates
28     """
29    
30     return self.__position
31    
32    
33     ###############################################################################
34    
35    
36     class GlobalPosition:
37     """
38     Class that defines the global positioning coordinate system (3D)
39     """
40    
41     def __init__(self, x_coor, y_coor, z_coor):
42     """
43     Initialise the global position.
44    
45     @type x_coor: Number
46     @param x_coor: x coordinate
47     @type y_coor: Number
48     @param y_coor: y coordinate
49     @type z_coor: Number
50     @param z_coor: z coordinate
51     """
52    
53     self.__position = [x_coor, y_coor, z_coor]
54    
55     def _getGlobalPosition(self):
56     """
57     Return the global position.
58    
59     @rtype: Three column tuple containing numbers
60     @return: Tuple with the x, y and z coordinates
61     """
62    
63     return self.__position

  ViewVC Help
Powered by ViewVC 1.1.26