22 Jun
2022
22 Jun
'22
2:36 p.m.
so i have this, but i don't like the name "destranform" and how the operation of a transform brings something _out_ of the space. maybe I'll change it to be something positive like "apply" or "__call__" and just remember how to use it or write in the comment how: class CoordFrame: def __init__(self, mat = None): if mat is None: mat = np.array([1.0,0,0,0],[0,1.0,0,0],[0,0,1.0,0],[0,0,0,1.0]) self.mat = mat def detransform(self, vec): return self.mat @ vec def inverted(self): return CoordFrame(self.mat.inverse()) # to move into camera space, call cameraframe.inverted().detransform(vector)