def __init__(self, scale=(1,1,1), translate=(0,0,0)): Transform.__init__(self, "scale_translate.glsl") self['scale'] = np.zeros(3,np.float32) self['scale'][...] = scale self['translate'] = np.zeros(3,np.float32) self['translate'][...] = scale
def __init__(self, *args, **kwargs): """ Initialize the transform. """ self._forward = np.zeros((4,4), dtype=np.float32) self._inverse = np.zeros((4,4), dtype=np.float32) self._axis = Transform._get_kwarg("axis", kwargs, (0,0,1)) self._angle = Transform._get_kwarg("angle", kwargs, 0.0) self._origin = Transform._get_kwarg("origin", kwargs, (0.,0.,0.)) code = library.get("transforms/rotate.glsl") Transform.__init__(self, code, *args, **kwargs) # Force building of rotation matrices self.axis = self._axis
def __init__(self, *args, **kwargs): """ Initialize the transform. """ self._forward = np.zeros((4, 4), dtype=np.float32) self._inverse = np.zeros((4, 4), dtype=np.float32) self._axis = Transform._get_kwarg("axis", kwargs, (0, 0, 1)) self._angle = Transform._get_kwarg("angle", kwargs, 0.0) self._origin = Transform._get_kwarg("origin", kwargs, (0., 0., 0.)) code = library.get("transforms/rotate.glsl") Transform.__init__(self, code, *args, **kwargs) # Force building of rotation matrices self.axis = self._axis
def __init__(self, *args, **kwargs): code = library.get("transforms/translate.glsl") Transform.__init__(self, code, *args, **kwargs) self.translate = Transform._get_kwarg("translate", kwargs) or (0, 0, 0)
def __init__(self, *args, **kwargs): code = library.get("transforms/translate.glsl") Transform.__init__(self, code, *args, **kwargs) self.translate = Transform._get_kwarg("translate", kwargs) or (0,0,0)
def __init__(self, base = (0,0,0)): Transform.__init__(self, "log_scale.glsl") self["base"] = np.zeros(3, np.float32) self["base"][...] = base
def __init__(self): Transform.__init__(self, "identity.glsl")
def __init__(self): Transform.__init__(self, "polar.glsl")