RobinTrace
Public Member Functions | Private Member Functions | Friends | List of all members
lpart Class Referenceabstract

Virtual class for elementary optical parts which can be applied to ray bundles. More...

#include <lpart.h>

Inheritance diagram for lpart:
[legend]

Public Member Functions

virtual std::unique_ptr< lpartclone () 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.
 

Detailed Description

Virtual class for elementary optical parts which can be applied to ray bundles.

Member Function Documentation

◆ apply()

virtual void lpart::apply ( bun b)
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 >.

◆ intersect()

virtual void lpart::intersect ( bun b)
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 >.


The documentation for this class was generated from the following file: