|
RobinTrace
|
Virtual class for elementary optical parts which can be applied to ray bundles. More...
#include <lpart.h>
Public Member Functions | |
| virtual std::unique_ptr< lpart > | clone () const =0 |
| Obtain a copy of the lpart. | |
| virtual void | apply (bun &b)=0 |
Apply the lpart's operations to the ray bundle b. More... | |
| virtual void | intersect (bun &b)=0 |
Apply only the eventual intersection of the lpart with ray bundle b. More... | |
| virtual bool | is_transfer ()=0 |
| Is the part a transfer? | |
| virtual bool | is_renderable ()=0 |
| Is the part renderable? | |
Private Member Functions | |
| virtual std::string | print_str () const =0 |
| String for printing the object. | |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const lpart &lp) |
| Printer. | |
Virtual class for elementary optical parts which can be applied to ray bundles.
|
pure virtual |
Apply the lpart's operations to the ray bundle b.
A part typically manages the error cases which occur at the individual ray level. The default behaviour is to leave non-valid rays out of any computations and continue with valid rays.
Implemented in transfer_part, shape_refract_part< T >, and shape_reflect_part< T >.
|
pure virtual |
Apply only the eventual intersection of the lpart with ray bundle b.
This is used typically for rendering the part.
Implemented in transfer_part, shape_refract_part< T >, and shape_reflect_part< T >.