/[escript]/tags/trunk_2172_checkpoint/pyvisi/py_src/position.py
ViewVC logotype

Annotation of /tags/trunk_2172_checkpoint/pyvisi/py_src/position.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1387 - (hide annotations)
Fri Jan 11 07:45:26 2008 UTC (13 years, 3 months ago) by trankine
Original Path: temp/pyvisi/py_src/position.py
File MIME type: text/x-python
File size: 2158 byte(s)
Restore the trunk that existed before the windows changes were committed to the (now moved to branches) old trunk.
1 ksteube 1147 """
2 jongui 1197 @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 ksteube 1147 """
9    
10 jongui 1197 __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 ksteube 1147 class LocalPosition:
22     """
23 jongui 1199 Class that defines the local positioning (X and Y)coordiante system (2D).
24 ksteube 1147 """
25    
26     def __init__(self, x_coor, y_coor):
27     """
28     Initialise the local position.
29    
30     @type x_coor: Number
31     @param x_coor: x coordinate
32     @type y_coor: Number
33     @param y_coor: y coordinate
34     """
35    
36 jongui 1189 self.__x_coor = x_coor
37     self.__y_coor = y_coor
38 ksteube 1147 self.__position = [x_coor, y_coor]
39    
40 jongui 1189 def _getXCoor(self):
41     """
42     Return the X coordinate.
43    
44     @rtype: Number
45     @return: X coordinate
46     """
47    
48     return self.__x_coor
49    
50     def _getYCoor(self):
51     """
52     Return the Y coordinate.
53    
54     @rtype: Number
55     @return: Y coordinate
56     """
57    
58     return self.__y_coor
59    
60 ksteube 1147 def _getLocalPosition(self):
61     """
62     Return the local position.
63    
64     @rtype: Two column tuple containing numbers
65     @return: Tuple with the x and y coordinates
66     """
67    
68     return self.__position
69    
70    
71     ###############################################################################
72    
73    
74     class GlobalPosition:
75     """
76 jongui 1199 Class that defines the global positioning (X, Y and Z) coordinate system
77     (3D)
78 ksteube 1147 """
79    
80     def __init__(self, x_coor, y_coor, z_coor):
81     """
82     Initialise the global position.
83    
84     @type x_coor: Number
85     @param x_coor: x coordinate
86     @type y_coor: Number
87     @param y_coor: y coordinate
88     @type z_coor: Number
89     @param z_coor: z coordinate
90     """
91    
92     self.__position = [x_coor, y_coor, z_coor]
93    
94     def _getGlobalPosition(self):
95     """
96     Return the global position.
97    
98     @rtype: Three column tuple containing numbers
99     @return: Tuple with the x, y and z coordinates
100     """
101    
102     return self.__position

  ViewVC Help
Powered by ViewVC 1.1.26