def __init__(self, geometry, optics, location=None, rotation=None, fixed_color=False): """ Arguments: geometry - a GeometryManager object responsible for finding ray intersections with the surface. optics - a callable that gets the geometry manageri, bundle and selector, and returns the outgoing ray bundle generated by the geometry and bundle. location, rotation - passed directly to the HasFrame constructor. fixed_color - For rendering purposed. If a tuple of normalised RGB or RGBa is given, the geometry will be of that color in the rendering. """ HasFrame.__init__(self, location, rotation) self._geom = geometry self._opt = optics self._fixed_color = fixed_color if fixed_color: self._fixed_color = fixed_color[:3] if len(fixed_color) == 4: self._transparency = fixed_color[-1] else: self._transparency = 0
def __init__(self, location=None, rotation=None): """ Arguments: location - a 1D array of 3 components, representing the 3D location of the surface's frame's origin, in the containing object's frame. rotation - a 3x3 array representing the rotation matrix of the surface's """ HasFrame.__init__(self, location, rotation)
def __init__(self, geometry, optics, location=None, rotation=None): """ Arguments: geometry - a GeometryManager object responsible for finding ray intersections with the surface. optics - a callable that gets the geometry manageri, bundle and selector, and returns the outgoing ray bundle generated by the geometry and bundle. location, rotation - passed directly to the HasFrame constructor. """ HasFrame.__init__(self, location, rotation) self._geom = geometry self._opt = optics