RobinTrace
Public Member Functions | Public Attributes | Private Member Functions | List of all members
shape_refract_part< T > Class Template Reference

Class template implementing the specialized lparts for refractive shape parts. More...

#include <shape_part.h>

Inheritance diagram for shape_refract_part< T >:
[legend]
Collaboration diagram for shape_refract_part< T >:
[legend]

Public Member Functions

 shape_refract_part (T _shp, double _nr)
 Constructor with initialization to the shape _shp and relative refractive index _nr. More...
 
virtual void apply (bun &b) override
 Apply refractive shape lpart operations to the ray bundle b. More...
 
virtual void intersect (bun &b) override
 Apply only the eventual intersection of the lpart with ray bundle b. More...
 
virtual std::unique_ptr< lpartclone () const override
 Obtain a copy of the lpart.
 
virtual bool is_transfer () override
 Is the part a transfer?
 
virtual bool is_renderable () override
 Is the part renderable?
 

Public Attributes

shp
 The shape of the part. More...
 
double nr
 Part's relative refractive index.
 

Private Member Functions

virtual std::string print_str () const override
 String for printing the object.
 

Detailed Description

template<class T>
class shape_refract_part< T >

Class template implementing the specialized lparts for refractive shape parts.

Constructor & Destructor Documentation

◆ shape_refract_part()

template<class T >
shape_refract_part< T >::shape_refract_part ( _shp,
double  _nr 
)
inline

Constructor with initialization to the shape _shp and relative refractive index _nr.

Parameters
_shpInitial shape of the part.
_nrInitial relative refractive index of the part.

Member Function Documentation

◆ apply()

template<class T >
virtual void shape_refract_part< T >::apply ( bun b)
inlineoverridevirtual

Apply refractive shape lpart operations to the ray bundle b.

Parameters
bRay bundle to apply the part's operations to.

The following operations are applied in succession to all rays in the bundle:

  1. shape.intersect()
  2. shape.normal()
  3. refract()

Implements lpart.

Here is the call graph for this function:

◆ intersect()

template<class T >
virtual void shape_refract_part< T >::intersect ( bun b)
inlineoverridevirtual

Apply only the eventual intersection of the lpart with ray bundle b.

This is used typically for rendering the part.

Implements lpart.

Member Data Documentation

◆ shp

template<class T >
T shape_refract_part< T >::shp

The shape of the part.

T is of type shape.


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