2021
24
    def update(self, rotated_base):
24
    def update(self, rotated_base):
25
        self.base.axis = rotated_base[1]
25
        self.base.axis = rotated_base[1]
26
        self.base.up = rotated_base[2]
26
        self.base.up = rotated_base[2]
27
 
27
        
28
 
28
 
29
class Orientation:
29
class Orientation:
30
    raise_when_updated = []
30
    raise_when_updated = []
...
 
...
 
46
        self.orientation = self.orientation*m
46
        self.orientation = self.orientation*m
47
 
47
 
48
        axis1 = self.orientation*matrix( [[1],[0],[0]] )
48
        axis1 = self.orientation*matrix( [[1],[0],[0]] )
49
        axis2 = self.orientation*matrix( [[0],[2],[0]] )
49
        axis2 = self.orientation*matrix( [[0],[1],[0]] )
50
        axis3 = self.orientation*matrix( [[0],[0],[1]] )
50
        axis3 = self.orientation*matrix( [[0],[0],[1]] )
51
        self.base[0] = vector(axis1[0,0], axis1[1,0], axis1[2,0] )
51
        self.base[0] = vector(axis1[0,0], axis1[1,0], axis1[2,0] )
52
        self.base[1] = vector(axis2[0,0], axis2[1,0], axis2[2,0] )
52
        self.base[1] = vector(axis2[0,0], axis2[1,0], axis2[2,0] )