This repository has been archived on 2023-03-25. You can view files and clone it, but cannot push or open issues or pull requests.
2021-10-24 19:19:52 +02:00

20 lines
536 B
Python

from abc import abstractmethod
from typing import Protocol, List
from ..ray import Ray
from ..shade import ShadeRec
class OpticMaterial(Protocol):
"""Protocol for an optical material"""
@abstractmethod
def generated_beams(self, ray: Ray, shade: ShadeRec) -> List[Ray]:
"""Compute the beams generated after intersection of a beam with this
material
Returns list of new beam seeds to start from after the intersection
of a beam and an object.
"""
raise NotImplementedError