16 |
def testTransform(): |
def testTransform(): |
17 |
c = GLVobCoorder() |
c = GLVobCoorder() |
18 |
|
|
19 |
cs = c.coordsys(0, 5, 10, 15, 0, 0) |
cs1 = c.coordsys(0, 5, 10, 15, 0.5, 1) |
20 |
checkTrans(c, cs, [0, 0, 0, 1, 1, 1], [10, 15, 5, 10, 15, 6]) |
checkTrans(c, cs1, [0, 0, 0, 1, 1, 1], [10, 15, 5, 10.5, 16, 6]) |
21 |
|
|
22 |
cs = c.scaleXYZ(0, 2, 3, 4) |
cs2 = c.scaleXYZ(0, 2, 3, 4) |
23 |
checkTrans(c, cs, [0, 0, 0, 1, 1, 1], [0, 0, 0, 2, 3, 4]) |
checkTrans(c, cs2, [0, 0, 0, 1, 1, 1], [0, 0, 0, 2, 3, 4]) |
|
|
|
24 |
|
|
25 |
cs = c.distort(0, 0, 0, 0.1, 0.1, 20, 5) |
cs3 = c.distort(0, 0, 0, 0.1, 0.1, 20, 5) |
26 |
checkTrans(c, cs, [0, 0, 0, 0.001, 0.001, 1], [0, 0, 0, 0.02, 0.02, 1], delta=0.00001) |
checkTrans(c, cs3, [0, 0, 0, 0.001, 0.001, 1], [0, 0, 0, 0.02, 0.02, 1], delta=0.00001) |
27 |
|
|
28 |
|
cs = c.concat(cs1, cs2) |
29 |
|
checkTrans(c, cs, [0, 0, 0, 1, 1, 1, 2, 2, 2], [10, 15, 5, 11, 18, 9, 12, 21, 13]) |
30 |
|
|
31 |
def checkInverse(c, cs): |
def checkInverse(c, cs): |
32 |
# unit cube |
# unit cube |