|
3 | 3 | # Copyright (C) 2013 GEATEC engineering |
4 | 4 | # |
5 | 5 | # This program is free software. |
6 | | -# You can use, redistribute and/or modify it, but only under the terms stated in the QQuickLicence. |
| 6 | +# You can use, redistribute and/or modify it, but only under the terms stated in the QQuickLicense. |
7 | 7 | # |
8 | 8 | # This program is distributed in the hope that it will be useful, |
9 | 9 | # but WITHOUT ANY WARRANTY, without even the implied warranty of |
10 | 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
11 | | -# See the QQuickLicence for details. |
| 11 | +# See the QQuickLicense for details. |
12 | 12 | # |
13 | | -# The QQuickLicense can be accessed at: http://www.geatec.com/qqLicence.html |
| 13 | +# The QQuickLicense can be accessed at: http://www.geatec.com/qqLicense.html |
14 | 14 | # |
15 | 15 | # __________________________________________________________________________ |
16 | 16 | # |
|
21 | 21 | # |
22 | 22 | # It is meant for training purposes only. |
23 | 23 | # |
24 | | -# Removing this header ends your licence. |
| 24 | +# Removing this header ends your license. |
25 | 25 | # |
26 | 26 |
|
27 | 27 | from time import * |
@@ -142,18 +142,18 @@ def __call__ (self, angle = 0, shift = (0, 0, 0), color = None, parts = lambda: |
142 | 142 | if color != None: |
143 | 143 | self.color = color |
144 | 144 | glPushMatrix () |
145 | | - glTranslate (*tAdd (self.center, self.joint)) # Put joint at correct position |
146 | | - glRotate (evaluate (angle), *self.pivot) # Rotate over varying angle parameter, so NOT fixed self.angle attribute, around self.pivot to move |
147 | | - glTranslate (*shift) # Put joint at correct position |
148 | | - glTranslate (*tNeg (self.joint)) # Put joint in origin |
| 145 | + glTranslate (*tAdd (self.center, self.joint)) # Put joint at correct position |
| 146 | + glRotate (evaluate (angle), *self.pivot) # Rotate over varying angle parameter, so NOT fixed self.angle attribute, around self.pivot to move |
| 147 | + glTranslate (evaluate (shift [0]), evaluate (shift [1]), evaluate (shift [2])) # Put joint at correct position |
| 148 | + glTranslate (*tNeg (self.joint)) # Put joint in origin |
149 | 149 | glPushMatrix () |
150 | | - glRotate (self.angle, *self.axis) # Rotate over fixed self.angle attribute, set by the constructor, around self.axis to achieve initial attitude |
| 150 | + glRotate (self.angle, *self.axis) # Rotate over fixed self.angle attribute, set by the constructor, around self.axis to achieve initial attitude |
151 | 151 | glColor (*self.color) |
152 | 152 | self._draw () |
153 | 153 | glPopMatrix () |
154 | 154 | parts () |
155 | 155 | glPopMatrix () |
156 | | - return 0 # Make concatenable by e.g. + operator |
| 156 | + return 0 # Make concatenable by e.g. + operator |
157 | 157 |
|
158 | 158 | class Beam (_Thing): |
159 | 159 | def __init__ (self, **arguments): |
|
0 commit comments